Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elm

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elm - npm Package Compare versions

Comparing version 0.15.1-beta3 to 0.15.1-beta4

4

binwrap.js
var path = require("path");
var getPathTo = require(path.join(__dirname, "index")).getPathTo;
var spawn = require("child_process").spawn;

@@ -7,3 +6,2 @@ var platform = require(path.join(__dirname, "platform"));

module.exports = function(executable) {
var filename = getPathTo(executable);
var input = process.argv.slice(2);

@@ -13,4 +11,4 @@

spawn(filename, input, {stdio: 'inherit'})
spawn(platform.executablePaths[executable], input, {stdio: 'inherit'})
.on('exit', process.exit);
};

@@ -13,11 +13,10 @@ var Promise = require("promise");

var shareReactorDir = platform.shareReactorDir;
var expectedExecutablePaths = platform.executables.map(function(executable) {
return path.join(distDir, executable);
});
function checkBinariesPresent() {
return Promise.all(
expectedExecutablePaths.map(function(executable) {
platform.executables.map(function(executable) {
var executablePath = platform.executablePaths[executable];
return new Promise(function(resolve, reject) {
fs.stat(executable, function(err, stats) {
fs.stat(executablePath, function(err, stats) {
if (err) {

@@ -50,5 +49,3 @@ reject(executable + " was not found.");

if (response.statusCode == 404) {
console.log("There are currently no Elm Platform binaries available for your operating system and architecture. Building from source...");
return platform.buildFromSource().then(resolve, reject);
reject("Unfortunately, there are currently no Elm Platform binaries available for your operating system and architecture.\n\nIf you would like to build Elm from source, there are instructions at https://github.com/elm-lang/elm-platform#build-from-source\n");
}

@@ -55,0 +52,0 @@

{
"name": "elm",
"version": "0.15.1-beta3",
"version": "0.15.1-beta4",
"description": "The Elm Platform: Binaries for the Elm programming language.",

@@ -21,13 +21,8 @@ "preferGlobal": true,

},
"main": "./index.js",
"scripts": {
"install": "node install.js",
"prepublish": "node prepublish.js",
"build-from-source": "node buildFromSource.js"
"install": "node install.js"
},
"files": [
"BuildFromSource.hs",
"install.js",
"platform.js",
"buildFromSource.js",
"binaries.json",

@@ -34,0 +29,0 @@ "binwrap.js",

@@ -12,33 +12,18 @@ var Promise = require("promise");

var shareReactorDir = path.join(shareDir, "reactor");
var executables = Object.keys(packageInfo.bin);
var binaryExtension = process.platform === "win32" ? ".exe" : "";
var executablePaths = {};
function buildFromSource() {
return new Promise(function(resolve, reject) {
// From the "build from source" docs:
//
// Now that you have chosen a home for Elm-Platform/, add the absolute path
// to Elm-Platform/0.15.1/.cabal-sandbox/bin to your PATH. This is
// necessary to successfully build elm-reactor which relies on elm-make.
process.env.PATH = (process.env.PATH || "").split(":").concat([distDir]).join(":");
executables.forEach(function(executable) {
executablePaths[executable] = path.join(distDir, executable + binaryExtension);
});
var child = spawn("runhaskell", ["BuildFromSource.hs", elmVersion],
{stdio: "inherit"});
child.on("exit", function(exitCode) {
if (exitCode === 0) {
resolve();
} else {
reject(exitCode);
}
});
});
}
module.exports = {
packageInfo: packageInfo,
elmVersion: elmVersion,
buildFromSource: buildFromSource,
distDir: distDir,
shareDir: shareDir,
shareReactorDir: shareReactorDir,
executables: Object.keys(packageInfo.bin)
executablePaths: executablePaths,
executables: executables
};

@@ -14,4 +14,2 @@ npm install elm [![Build Status](https://travis-ci.org/elm-lang/elm-platform.svg?branch=master)](http://travis-ci.org/elm-lang/elm-platform)

For `elm-reactor` to work properly, set your `ELM_HOME` environment variable to `/usr/local/lib/node_modules/elm/share` or the appropriate directory created on your machine.
## Troubleshooting

@@ -18,0 +16,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc