Socket
Socket
Sign inDemoInstall

@lerna/command

Package Overview
Dependencies
Maintainers
4
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/command - npm Package Compare versions

Comparing version 3.0.0-beta.7 to 3.0.0-beta.9

21

CHANGELOG.md

@@ -6,2 +6,23 @@ # Change Log

<a name="3.0.0-beta.9"></a>
# [3.0.0-beta.9](https://github.com/lerna/lerna/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2018-03-24)
### Features
* **command:** Remove legacy config handling ([d305a38](https://github.com/lerna/lerna/commit/d305a38))
* **command:** Rename this.repository -> this.project ([43e98a0](https://github.com/lerna/lerna/commit/43e98a0))
* **project:** Normalize config.commands -> config.command ([24e55e3](https://github.com/lerna/lerna/commit/24e55e3))
* **project:** Use cosmiconfig to locate and read lerna.json ([b8c2789](https://github.com/lerna/lerna/commit/b8c2789))
### BREAKING CHANGES
* **command:** lerna.json `bootstrapConfig` and `publishConfig` namespaces are no longer honored.
These config blocks should be moved to `command.bootstrap` and `command.publish`, respectively.
<a name="3.0.0-beta.7"></a>

@@ -8,0 +29,0 @@ # [3.0.0-beta.7](https://github.com/lerna/lerna/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2018-03-20)

46

index.js

@@ -42,3 +42,3 @@ "use strict";

chain = chain.then(() => {
this.repository = new Project(argv.cwd);
this.project = new Project(argv.cwd);
});

@@ -70,3 +70,3 @@ chain = chain.then(() => this.configureOptions());

if (err.name !== "ValidationError") {
writeLogFile(this.repository.rootPath);
writeLogFile(this.project.rootPath);
}

@@ -108,9 +108,7 @@

configureOptions() {
// Command config object is either "commands" or "command".
const { commands, command } = this.repository.lernaJson;
// Command config object normalized to "command" namespace
const commandConfig = this.project.config.command || {};
// The current command always overrides otherCommandConfigs
const lernaCommandOverrides = [this.name, ...this.otherCommandConfigs].map(
name => (commands || command || {})[name]
);
const overrides = [this.name, ...this.otherCommandConfigs].map(key => commandConfig[key]);

@@ -122,9 +120,7 @@ this.options = _.defaults(

// Namespaced command options from `lerna.json`
...lernaCommandOverrides,
...overrides,
// Global options from `lerna.json`
this.repository.lernaJson,
this.project.config,
// Command specific defaults
this.defaultOptions,
// Deprecated legacy options in `lerna.json`
this._legacyOptions()
this.defaultOptions
);

@@ -139,3 +135,3 @@ }

this.execOpts = {
cwd: this.repository.rootPath,
cwd: this.project.rootPath,
maxBuffer,

@@ -170,11 +166,11 @@ };

if (!this.repository.packageJson) {
if (!this.project.packageJson) {
throw new ValidationError("ENOPKG", "`package.json` does not exist, have you run `lerna init`?");
}
if (!this.repository.version) {
if (!this.project.version) {
throw new ValidationError("ENOLERNA", "`lerna.json` does not exist, have you run `lerna init`?");
}
if (this.options.independent && !this.repository.isIndependent()) {
if (this.options.independent && !this.project.isIndependent()) {
throw new ValidationError(

@@ -192,7 +188,7 @@ "EVERSIONMODE",

runPreparations() {
if (this.repository.isIndependent()) {
if (this.project.isIndependent()) {
log.info("versioning", "independent");
}
const { rootPath, packageConfigs } = this.repository;
const { rootPath, packageConfigs } = this.project;
const { scope: include, ignore: exclude } = this.options;

@@ -240,16 +236,2 @@

_legacyOptions() {
return ["bootstrap", "publish"].reduce((obj, command) => {
if (this.name === command && this.repository.lernaJson[`${command}Config`]) {
log.warn(
"deprecated",
`\`${command}Config.ignore\` has been replaced by \`command.${command}.ignore\`.`
);
obj.ignore = this.repository.lernaJson[`${command}Config`].ignore;
}
return obj;
}, {});
}
initialize() {

@@ -256,0 +238,0 @@ throw new Error("command.initialize() needs to be implemented.");

{
"name": "@lerna/command",
"version": "3.0.0-beta.7",
"version": "3.0.0-beta.9",
"description": "TODO",

@@ -36,7 +36,7 @@ "keywords": [

"@lerna/collect-packages": "^3.0.0-beta.1",
"@lerna/collect-updates": "^3.0.0-beta.3",
"@lerna/filter-packages": "^3.0.0-beta.2",
"@lerna/git-utils": "^3.0.0-beta.3",
"@lerna/collect-updates": "^3.0.0-beta.9",
"@lerna/filter-packages": "^3.0.0-beta.9",
"@lerna/git-utils": "^3.0.0-beta.9",
"@lerna/package-graph": "^3.0.0-beta.1",
"@lerna/project": "^3.0.0-beta.1",
"@lerna/project": "^3.0.0-beta.9",
"@lerna/validation-error": "^3.0.0-beta.0",

@@ -48,3 +48,3 @@ "@lerna/write-log-file": "^3.0.0-beta.0",

},
"gitHead": "3cb86666a711bffbf13a8cbded1c762d683f4bda"
"gitHead": "70528f23cad0186fdf7529fe32148cc1eff21272"
}
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