Socket
Socket
Sign inDemoInstall

lerna

Package Overview
Dependencies
Maintainers
3
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lerna - npm Package Compare versions

Comparing version 2.0.0-beta.19 to 2.0.0-beta.20

lib/commands/ImportCommand.js

1

bin/lerna.js

@@ -29,2 +29,3 @@ #!/usr/bin/env node

" --scope [glob] Restricts the scope to package names matching the given glob (Works only in combination with the 'run' and the 'exec' command).",
" --ignore [glob] Ignores packages with names matching the given glob (Works only in combination with the 'bootstrap' command).",
" --force-publish Force publish for the specified packages (comma-separated) or all packages using * (skips the git diff check for changed packages)",

@@ -31,0 +32,0 @@ " --yes Skip all confirmation prompts",

19

lib/ChildProcessUtilities.js

@@ -18,2 +18,6 @@ "use strict";

var _syncExec = require("sync-exec");
var _syncExec2 = _interopRequireDefault(_syncExec);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -50,5 +54,11 @@

value: function execSync(command) {
return _child_process2.default.execSync(command, {
encoding: "utf8"
}).trim();
if (_child_process2.default.execSync) {
return _child_process2.default.execSync(command, {
encoding: "utf8"
}).trim();
} else {
return (0, _syncExec2.default)(command, {
encoding: "utf8"
}).stdout.trim();
}
}

@@ -69,2 +79,3 @@ }, {

exports.default = ChildProcessUtilities;
exports.default = ChildProcessUtilities;
module.exports = exports["default"];

@@ -205,2 +205,3 @@ "use strict";

exports.default = Command;
exports.default = Command;
module.exports = exports["default"];

@@ -18,2 +18,6 @@ "use strict";

var _PackageUtilities = require("../PackageUtilities");
var _PackageUtilities2 = _interopRequireDefault(_PackageUtilities);
var _Command2 = require("../Command");

@@ -84,3 +88,5 @@

_async2.default.parallelLimit(this.packages.map(function (pkg) {
var ignore = this.flags.ignore || this.repository.bootstrapConfig.ignore;
_async2.default.parallelLimit(_PackageUtilities2.default.filterPackages(this.packages, ignore, true).map(function (pkg) {
return function (done) {

@@ -226,2 +232,3 @@ _async2.default.series([function (cb) {

exports.default = BootstrapCommand;
exports.default = BootstrapCommand;
module.exports = exports["default"];

@@ -101,2 +101,3 @@ "use strict";

exports.default = CleanCommand;
exports.default = CleanCommand;
module.exports = exports["default"];

@@ -88,2 +88,3 @@ "use strict";

exports.default = DiffCommand;
exports.default = DiffCommand;
module.exports = exports["default"];

@@ -94,2 +94,3 @@ "use strict";

exports.default = ExecCommand;
exports.default = ExecCommand;
module.exports = exports["default"];

@@ -149,2 +149,3 @@ "use strict";

exports.default = InitCommand;
exports.default = InitCommand;
module.exports = exports["default"];

@@ -54,2 +54,3 @@ "use strict";

exports.default = LsCommand;
exports.default = LsCommand;
module.exports = exports["default"];

@@ -511,2 +511,3 @@ "use strict";

exports.default = PublishCommand;
exports.default = PublishCommand;
module.exports = exports["default"];

@@ -124,2 +124,3 @@ "use strict";

exports.default = RunCommand;
exports.default = RunCommand;
module.exports = exports["default"];

@@ -60,2 +60,3 @@ "use strict";

exports.default = UpdatedCommand;
exports.default = UpdatedCommand;
module.exports = exports["default"];

@@ -90,2 +90,3 @@ "use strict";

exports.default = ExitHandler;
exports.default = ExitHandler;
module.exports = exports["default"];

@@ -125,2 +125,3 @@ "use strict";

}(), (_applyDecoratedDescriptor(_class, "mkdirSync", [_dec], Object.getOwnPropertyDescriptor(_class, "mkdirSync"), _class), _applyDecoratedDescriptor(_class, "mkdirp", [_dec2], Object.getOwnPropertyDescriptor(_class, "mkdirp"), _class), _applyDecoratedDescriptor(_class, "readdirSync", [_dec3], Object.getOwnPropertyDescriptor(_class, "readdirSync"), _class), _applyDecoratedDescriptor(_class, "existsSync", [_dec4], Object.getOwnPropertyDescriptor(_class, "existsSync"), _class), _applyDecoratedDescriptor(_class, "writeFile", [_dec5], Object.getOwnPropertyDescriptor(_class, "writeFile"), _class), _applyDecoratedDescriptor(_class, "writeFileSync", [_dec6], Object.getOwnPropertyDescriptor(_class, "writeFileSync"), _class), _applyDecoratedDescriptor(_class, "readFileSync", [_dec7], Object.getOwnPropertyDescriptor(_class, "readFileSync"), _class), _applyDecoratedDescriptor(_class, "rimraf", [_dec8], Object.getOwnPropertyDescriptor(_class, "rimraf"), _class), _applyDecoratedDescriptor(_class, "unlinkSync", [_dec9], Object.getOwnPropertyDescriptor(_class, "unlinkSync"), _class)), _class));
exports.default = FileSystemUtilities;
exports.default = FileSystemUtilities;
module.exports = exports["default"];

@@ -159,2 +159,3 @@ "use strict";

}(), (_applyDecoratedDescriptor(_class, "isInitialized", [_dec], Object.getOwnPropertyDescriptor(_class, "isInitialized"), _class), _applyDecoratedDescriptor(_class, "addFile", [_dec2], Object.getOwnPropertyDescriptor(_class, "addFile"), _class), _applyDecoratedDescriptor(_class, "commit", [_dec3], Object.getOwnPropertyDescriptor(_class, "commit"), _class), _applyDecoratedDescriptor(_class, "addTag", [_dec4], Object.getOwnPropertyDescriptor(_class, "addTag"), _class), _applyDecoratedDescriptor(_class, "removeTag", [_dec5], Object.getOwnPropertyDescriptor(_class, "removeTag"), _class), _applyDecoratedDescriptor(_class, "hasTags", [_dec6], Object.getOwnPropertyDescriptor(_class, "hasTags"), _class), _applyDecoratedDescriptor(_class, "getLastTaggedCommit", [_dec7], Object.getOwnPropertyDescriptor(_class, "getLastTaggedCommit"), _class), _applyDecoratedDescriptor(_class, "getFirstCommit", [_dec8], Object.getOwnPropertyDescriptor(_class, "getFirstCommit"), _class), _applyDecoratedDescriptor(_class, "pushWithTags", [_dec9], Object.getOwnPropertyDescriptor(_class, "pushWithTags"), _class), _applyDecoratedDescriptor(_class, "describeTag", [_dec10], Object.getOwnPropertyDescriptor(_class, "describeTag"), _class), _applyDecoratedDescriptor(_class, "diffSinceIn", [_dec11], Object.getOwnPropertyDescriptor(_class, "diffSinceIn"), _class), _applyDecoratedDescriptor(_class, "getCurrentSHA", [_dec12], Object.getOwnPropertyDescriptor(_class, "getCurrentSHA"), _class), _applyDecoratedDescriptor(_class, "getTopLevelDirectory", [_dec13], Object.getOwnPropertyDescriptor(_class, "getTopLevelDirectory"), _class), _applyDecoratedDescriptor(_class, "checkoutChanges", [_dec14], Object.getOwnPropertyDescriptor(_class, "checkoutChanges"), _class), _applyDecoratedDescriptor(_class, "getCurrentBranch", [_dec15], Object.getOwnPropertyDescriptor(_class, "getCurrentBranch"), _class), _applyDecoratedDescriptor(_class, "init", [_dec16], Object.getOwnPropertyDescriptor(_class, "init"), _class), _applyDecoratedDescriptor(_class, "hasCommit", [_dec17], Object.getOwnPropertyDescriptor(_class, "hasCommit"), _class)), _class));
exports.default = GitUtilities;
exports.default = GitUtilities;
module.exports = exports["default"];

@@ -184,2 +184,3 @@ "use strict";

exports.default = new Logger();
exports.default = new Logger();
module.exports = exports["default"];

@@ -61,9 +61,14 @@ "use strict";

value: function installInDir(directory, dependencies, callback) {
var command = "npm install";
var args = ["install"];
if (dependencies) {
command += " " + dependencies.join(" ");
args = args.concat(dependencies);
}
_ChildProcessUtilities2.default.exec(command, { cwd: directory }, callback);
var opts = {
cwd: directory,
stdio: "ignore"
};
_ChildProcessUtilities2.default.spawn("npm", args, opts, callback);
}

@@ -104,2 +109,3 @@ }, {

}(), (_applyDecoratedDescriptor(_class, "installInDir", [_dec], Object.getOwnPropertyDescriptor(_class, "installInDir"), _class), _applyDecoratedDescriptor(_class, "addDistTag", [_dec2], Object.getOwnPropertyDescriptor(_class, "addDistTag"), _class), _applyDecoratedDescriptor(_class, "removeDistTag", [_dec3], Object.getOwnPropertyDescriptor(_class, "removeDistTag"), _class), _applyDecoratedDescriptor(_class, "checkDistTag", [_dec4], Object.getOwnPropertyDescriptor(_class, "checkDistTag"), _class), _applyDecoratedDescriptor(_class, "execInDir", [_dec5], Object.getOwnPropertyDescriptor(_class, "execInDir"), _class), _applyDecoratedDescriptor(_class, "runScriptInDir", [_dec6], Object.getOwnPropertyDescriptor(_class, "runScriptInDir"), _class), _applyDecoratedDescriptor(_class, "publishTaggedInDir", [_dec7], Object.getOwnPropertyDescriptor(_class, "publishTaggedInDir"), _class)), _class));
exports.default = NpmUtilities;
exports.default = NpmUtilities;
module.exports = exports["default"];

@@ -93,2 +93,3 @@ "use strict";

exports.default = Package;
exports.default = Package;
module.exports = exports["default"];

@@ -102,2 +102,3 @@ "use strict";

* @param {String} glob The glob to match the package name against
* @param {Boolean} negate Negate glob pattern matches
* @return {Array.<Package>} The packages with a name matching the glob

@@ -110,5 +111,11 @@ * @throws in case a given glob would produce an empty list of packages

value: function filterPackages(packages, glob) {
var negate = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
if (typeof glob !== "undefined") {
packages = packages.filter(function (pkg) {
return (0, _minimatch2.default)(pkg.name, glob);
if (negate) {
return !(0, _minimatch2.default)(pkg.name, glob);
} else {
return (0, _minimatch2.default)(pkg.name, glob);
}
});

@@ -127,2 +134,3 @@

exports.default = PackageUtilities;
exports.default = PackageUtilities;
module.exports = exports["default"];

@@ -92,2 +92,3 @@ "use strict";

exports.default = new ProgressBarController();
exports.default = new ProgressBarController();
module.exports = exports["default"];

@@ -81,2 +81,3 @@ "use strict";

exports.default = PromptUtilities;
exports.default = PromptUtilities;
module.exports = exports["default"];

@@ -81,2 +81,7 @@ "use strict";

}
}, {
key: "bootstrapConfig",
get: function get() {
return this.lernaJson && this.lernaJson.bootstrapConfig || {};
}
}]);

@@ -87,2 +92,3 @@

exports.default = Repository;
exports.default = Repository;
module.exports = exports["default"];

@@ -222,2 +222,3 @@ "use strict";

exports.default = UpdatedPackagesCollector;
exports.default = UpdatedPackagesCollector;
module.exports = exports["default"];
{
"name": "lerna",
"version": "2.0.0-beta.19",
"version": "2.0.0-beta.20",
"description": "Tool for managing JavaScript projects with multiple packages",
"main": "index.js",
"main": "lib/index.js",
"scripts": {

@@ -40,3 +40,4 @@ "build": "babel src -d lib",

"semver": "^5.1.0",
"signal-exit": "^2.1.2"
"signal-exit": "^2.1.2",
"sync-exec": "^0.6.2"
},

@@ -49,2 +50,3 @@ "bin": {

"babel-eslint": "^6.0.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",

@@ -51,0 +53,0 @@ "babel-preset-es2015": "^6.6.0",

@@ -59,4 +59,4 @@ <p align="center">

```sh
# install the latest 2.x version using the `next` dist-tag
$ npm install --global lerna@next
# install the latest 2.x version using the `prerelease` dist-tag
$ npm install --global lerna@prerelease
# install version directly

@@ -162,2 +162,4 @@ $ npm install --global lerna@^2.0.0-beta

`lerna bootstrap` respects the `--ignore` flag (see below).
#### How `bootstrap` works

@@ -430,3 +432,3 @@

Allows to scope an command only affect a subset of packages.
Scopes a command to a subset of packages.

@@ -441,3 +443,25 @@ ```sh

#### --ignore [glob]
Excludes a subset of packages when running a command.
```sh
$ lerna bootstrap --ignore component-*
```
The `ignore` flag, when used with the `bootstrap` command, can also be set in `lerna.json` under the `bootstrapConfig` key. The command-line flag will take precendence over this option.
**Example**
```javascript
{
"lerna": "2.0.0-beta.16",
"version": "0.0.0",
"bootstrapConfig": {
"ignore": "component-*"
}
}
```
> Hint: The glob is matched against the package name defined in `package.json`,
> not the directory name the package lives in.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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