Socket
Socket
Sign inDemoInstall

builder

Package Overview
Dependencies
Maintainers
22
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder - npm Package Compare versions

Comparing version 3.2.2 to 3.2.3

6

HISTORY.md
History
=======
## 3.2.3
* Account for `PATH` vs. `Path` env var differences in MinGW vs. cmd on
Windows.
[#142](https://github.com/FormidableLabs/builder/issues/142)
## 3.2.2

@@ -5,0 +11,0 @@

24

lib/environment.js

@@ -19,3 +19,10 @@ "use strict";

var ENV_PATH_NAME = IS_WIN ? "Path" : "PATH";
var splitPath = function (val) {
return (val || "").split(DELIM).filter(Boolean);
};
// Filter to unique values.
// Simple, but inefficient `O(n^2)`.
var uniqueVals = function (val, i, vals) { return vals.indexOf(val) === i; };
// Node directories.

@@ -58,3 +65,3 @@ var CWD_BIN = path.join(process.cwd(), "node_modules/.bin");

// Mutate environment paths.
this.env[ENV_PATH_NAME] = this.updatePath(this.config.archetypePaths);
this.env.PATH = this.env[ENV_PATH_NAME] = this.updatePath(this.config.archetypePaths);
this.env.NODE_PATH = this.updateNodePath(this.config.archetypeNodePaths);

@@ -81,10 +88,8 @@

Environment.prototype.updatePath = function (archetypePaths) {
var basePath = (this.env[ENV_PATH_NAME] || "")
.split(DELIM)
.filter(function (x) { return x; });
return []
.concat(archetypePaths || [])
.concat([CWD_BIN])
.concat(basePath)
.concat(splitPath(this.env[ENV_PATH_NAME]))
.concat(splitPath(this.env.PATH))
.filter(uniqueVals)
.join(DELIM);

@@ -106,10 +111,7 @@ };

Environment.prototype.updateNodePath = function (archetypeNodePaths) {
var baseNodePath = (this.env.NODE_PATH || "")
.split(DELIM)
.filter(function (x) { return x; });
return []
.concat(archetypeNodePaths || [])
.concat([CWD_NODE_PATH])
.concat(baseNodePath)
.concat(splitPath(this.env.NODE_PATH))
.filter(uniqueVals)
.join(DELIM);

@@ -116,0 +118,0 @@ };

{
"name": "builder",
"version": "3.2.2",
"version": "3.2.3",
"description": "An NPM-based task runner",

@@ -44,5 +44,6 @@ "repository": {

"eslint-plugin-filenames": "^0.1.2",
"istanbul": "^0.4.5",
"istanbul": "^1.1.0-alpha.1",
"mocha": "^2.3.4",
"mock-fs": "^3.7.0",
"mock-fs": "^4.4.1",
"object-assign": "^4.1.1",
"sinon": "^1.17.2",

@@ -49,0 +50,0 @@ "sinon-chai": "^2.8.0"

@@ -335,2 +335,4 @@ [![Travis Status][trav_img]][trav_site]

**Mac / Linux**
```sh

@@ -341,2 +343,9 @@ $ builder envs <task> '[{ "FOO": "VAL1" }, { "FOO": "VAL2" }, { "FOO": "VAL3" }]'

**Mac / Linux / Windows**
```sh
$ builder envs <task> "[{ \"FOO\": \"VAL1\" }, { \"FOO\": \"VAL2\" }, { \"FOO\": \"VAL3\" }]"
$ builder envs <task> "[{ \"FOO\": \"VAL1\", \"BAR\": \"VAL2\" }, { \"FOO\": \"VAL3\" }]"
```
Flags:

@@ -343,0 +352,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