@lerna/publish
Advanced tools
Comparing version 5.2.0 to 5.3.0
49
index.js
@@ -61,2 +61,5 @@ "use strict"; | ||
// For publish we want to enable topological sorting by default, but allow users to override with --no-sort | ||
this.toposort = this.options.sort !== false; | ||
// Defaults are necessary here because yargs defaults | ||
@@ -106,2 +109,9 @@ // override durable options provided by a config file | ||
if (this.options.graphType === "dependencies") { | ||
this.logger.warn( | ||
"graph-type", | ||
"--graph-type=dependencies is deprecated and will be removed in lerna v6. If you have a use-case you feel requires it please open an issue to discuss: https://github.com/lerna/lerna/issues/new/choose" | ||
); | ||
} | ||
if (this.options.skipNpm) { | ||
@@ -631,11 +641,17 @@ // TODO: remove in next major release | ||
topoMapPackages(mapper) { | ||
// we don't respect --no-sort here, sorry | ||
return runTopologically(this.packagesToPublish, mapper, { | ||
concurrency: this.concurrency, | ||
rejectCycles: this.options.rejectCycles, | ||
// By default, do not include devDependencies in the graph because it would | ||
// increase the chance of dependency cycles, causing less-than-ideal order. | ||
// If the user has opted-in to --graph-type=all (or "graphType": "all" in lerna.json), | ||
// devDependencies _will_ be included in the graph construction. | ||
graphType: this.options.graphType === "all" ? "allDependencies" : "dependencies", | ||
/** | ||
* Previously `publish` had unique default behavior for graph creation vs other commands: it would only consider dependencies when finding | ||
* edges by default (i.e. relationships between packages specified via devDependencies would be ignored). It was documented to be the case | ||
* in order to try and reduce the chance of dependency cycles. | ||
* | ||
* We are removing this behavior altogether in v6 because we do not want to have different ways of constructing the graph, | ||
* only different ways of utilizing it (e.g. --no-sort vs topological sort). | ||
* | ||
* Therefore until we remove graphType altogether in v6, we provide a way for users to opt into the old default behavior | ||
* by setting the `graphType` option to `dependencies`. | ||
*/ | ||
graphType: this.options.graphType === "dependencies" ? "dependencies" : "allDependencies", | ||
}); | ||
@@ -682,3 +698,8 @@ } | ||
chain = chain.then(() => this.topoMapPackages(mapper)); | ||
chain = chain.then(() => { | ||
if (this.toposort) { | ||
return this.topoMapPackages(mapper); | ||
} | ||
return pMap(this.packagesToPublish, mapper, { concurrency: this.concurrency }); | ||
}); | ||
@@ -736,3 +757,8 @@ chain = chain.then(() => removeTempLicenses(this.packagesToBeLicensed)); | ||
chain = chain.then(() => this.topoMapPackages(mapper)); | ||
chain = chain.then(() => { | ||
if (this.toposort) { | ||
return this.topoMapPackages(mapper); | ||
} | ||
return pMap(this.packagesToPublish, mapper, { concurrency: this.concurrency }); | ||
}); | ||
@@ -780,3 +806,8 @@ if (!this.hasRootedLeaf) { | ||
chain = chain.then(() => this.topoMapPackages(mapper)); | ||
chain = chain.then(() => { | ||
if (this.toposort) { | ||
return this.topoMapPackages(mapper); | ||
} | ||
return pMap(this.packagesToPublish, mapper, { concurrency: this.concurrency }); | ||
}); | ||
@@ -783,0 +814,0 @@ return chain.finally(() => tracker.finish()); |
{ | ||
"name": "@lerna/publish", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"description": "Publish packages in the current project", | ||
@@ -38,25 +38,25 @@ "keywords": [ | ||
"dependencies": { | ||
"@lerna/check-working-tree": "5.2.0", | ||
"@lerna/child-process": "5.2.0", | ||
"@lerna/collect-updates": "5.2.0", | ||
"@lerna/command": "5.2.0", | ||
"@lerna/describe-ref": "5.2.0", | ||
"@lerna/log-packed": "5.2.0", | ||
"@lerna/npm-conf": "5.2.0", | ||
"@lerna/npm-dist-tag": "5.2.0", | ||
"@lerna/npm-publish": "5.2.0", | ||
"@lerna/otplease": "5.2.0", | ||
"@lerna/output": "5.2.0", | ||
"@lerna/pack-directory": "5.2.0", | ||
"@lerna/prerelease-id-from-version": "5.2.0", | ||
"@lerna/prompt": "5.2.0", | ||
"@lerna/pulse-till-done": "5.2.0", | ||
"@lerna/run-lifecycle": "5.2.0", | ||
"@lerna/run-topologically": "5.2.0", | ||
"@lerna/validation-error": "5.2.0", | ||
"@lerna/version": "5.2.0", | ||
"@lerna/check-working-tree": "5.3.0", | ||
"@lerna/child-process": "5.3.0", | ||
"@lerna/collect-updates": "5.3.0", | ||
"@lerna/command": "5.3.0", | ||
"@lerna/describe-ref": "5.3.0", | ||
"@lerna/log-packed": "5.3.0", | ||
"@lerna/npm-conf": "5.3.0", | ||
"@lerna/npm-dist-tag": "5.3.0", | ||
"@lerna/npm-publish": "5.3.0", | ||
"@lerna/otplease": "5.3.0", | ||
"@lerna/output": "5.3.0", | ||
"@lerna/pack-directory": "5.3.0", | ||
"@lerna/prerelease-id-from-version": "5.3.0", | ||
"@lerna/prompt": "5.3.0", | ||
"@lerna/pulse-till-done": "5.3.0", | ||
"@lerna/run-lifecycle": "5.3.0", | ||
"@lerna/run-topologically": "5.3.0", | ||
"@lerna/validation-error": "5.3.0", | ||
"@lerna/version": "5.3.0", | ||
"fs-extra": "^9.1.0", | ||
"libnpmaccess": "^4.0.1", | ||
"npm-package-arg": "^8.1.0", | ||
"npm-registry-fetch": "^9.0.0", | ||
"libnpmaccess": "^6.0.3", | ||
"npm-package-arg": "8.1.1", | ||
"npm-registry-fetch": "^13.3.0", | ||
"npmlog": "^6.0.2", | ||
@@ -68,3 +68,3 @@ "p-map": "^4.0.0", | ||
}, | ||
"gitHead": "4f43ba15b0024f87ec04c68522c78bcd1edbc185" | ||
"gitHead": "535afac9b27892e8e5354aae950338a7187356f2" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69129
396472
1249
+ Added@lerna/check-working-tree@5.3.0(transitive)
+ Added@lerna/child-process@5.3.0(transitive)
+ Added@lerna/collect-uncommitted@5.3.0(transitive)
+ Added@lerna/collect-updates@5.3.0(transitive)
+ Added@lerna/command@5.3.0(transitive)
+ Added@lerna/conventional-commits@5.3.0(transitive)
+ Added@lerna/describe-ref@5.3.0(transitive)
+ Added@lerna/get-packed@5.3.0(transitive)
+ Added@lerna/github-client@5.3.0(transitive)
+ Added@lerna/gitlab-client@5.3.0(transitive)
+ Added@lerna/log-packed@5.3.0(transitive)
+ Added@lerna/npm-conf@5.3.0(transitive)
+ Added@lerna/npm-dist-tag@5.3.0(transitive)
+ Added@lerna/npm-publish@5.3.0(transitive)
+ Added@lerna/otplease@5.3.0(transitive)
+ Added@lerna/output@5.3.0(transitive)
+ Added@lerna/pack-directory@5.3.0(transitive)
+ Added@lerna/package@5.3.0(transitive)
+ Added@lerna/package-graph@5.3.0(transitive)
+ Added@lerna/prerelease-id-from-version@5.3.0(transitive)
+ Added@lerna/project@5.3.0(transitive)
+ Added@lerna/prompt@5.3.0(transitive)
+ Added@lerna/pulse-till-done@5.3.0(transitive)
+ Added@lerna/query-graph@5.3.0(transitive)
+ Added@lerna/run-lifecycle@5.3.0(transitive)
+ Added@lerna/run-topologically@5.3.0(transitive)
+ Added@lerna/temp-write@5.3.0(transitive)
+ Added@lerna/validation-error@5.3.0(transitive)
+ Added@lerna/version@5.3.0(transitive)
+ Added@lerna/write-log-file@5.3.0(transitive)
+ Addedhosted-git-info@3.0.8(transitive)
+ Addedlibnpmaccess@6.0.4(transitive)
+ Addedlibnpmpublish@6.0.5(transitive)
+ Addednpm-package-arg@8.1.1(transitive)
+ Addedwrite-file-atomic@4.0.2(transitive)
- Removed@lerna/check-working-tree@5.2.0(transitive)
- Removed@lerna/child-process@5.2.0(transitive)
- Removed@lerna/collect-uncommitted@5.2.0(transitive)
- Removed@lerna/collect-updates@5.2.0(transitive)
- Removed@lerna/command@5.2.0(transitive)
- Removed@lerna/conventional-commits@5.2.0(transitive)
- Removed@lerna/describe-ref@5.2.0(transitive)
- Removed@lerna/get-packed@5.2.0(transitive)
- Removed@lerna/github-client@5.2.0(transitive)
- Removed@lerna/gitlab-client@5.2.0(transitive)
- Removed@lerna/log-packed@5.2.0(transitive)
- Removed@lerna/npm-conf@5.2.0(transitive)
- Removed@lerna/npm-dist-tag@5.2.0(transitive)
- Removed@lerna/npm-publish@5.2.0(transitive)
- Removed@lerna/otplease@5.2.0(transitive)
- Removed@lerna/output@5.2.0(transitive)
- Removed@lerna/pack-directory@5.2.0(transitive)
- Removed@lerna/package@5.2.0(transitive)
- Removed@lerna/package-graph@5.2.0(transitive)
- Removed@lerna/prerelease-id-from-version@5.2.0(transitive)
- Removed@lerna/project@5.2.0(transitive)
- Removed@lerna/prompt@5.2.0(transitive)
- Removed@lerna/pulse-till-done@5.2.0(transitive)
- Removed@lerna/query-graph@5.2.0(transitive)
- Removed@lerna/run-lifecycle@5.2.0(transitive)
- Removed@lerna/run-topologically@5.2.0(transitive)
- Removed@lerna/temp-write@5.2.0(transitive)
- Removed@lerna/validation-error@5.2.0(transitive)
- Removed@lerna/version@5.2.0(transitive)
- Removed@lerna/write-log-file@5.2.0(transitive)
- Removed@npmcli/ci-detect@1.4.0(transitive)
- Removed@npmcli/fs@1.1.1(transitive)
- Removed@npmcli/move-file@1.1.2(transitive)
- Removed@npmcli/run-script@3.0.3(transitive)
- Removed@tootallnate/once@1.1.2(transitive)
- Removedcacache@15.3.0(transitive)
- Removedhttp-proxy-agent@4.0.1(transitive)
- Removedlibnpmaccess@4.0.3(transitive)
- Removedlibnpmpublish@4.0.2(transitive)
- Removedmake-fetch-happen@8.0.149.1.0(transitive)
- Removedminipass-fetch@1.4.1(transitive)
- Removednode-gyp@8.4.1(transitive)
- Removednopt@5.0.0(transitive)
- Removednpm-package-arg@8.1.5(transitive)
- Removednpm-registry-fetch@11.0.09.0.0(transitive)
- Removedread-package-json@3.0.1(transitive)
- Removedsocks-proxy-agent@5.0.16.2.1(transitive)
- Removedssri@8.0.1(transitive)
- Removedunique-filename@1.1.1(transitive)
- Removedunique-slug@2.0.2(transitive)
Updated@lerna/child-process@5.3.0
Updated@lerna/collect-updates@5.3.0
Updated@lerna/command@5.3.0
Updated@lerna/describe-ref@5.3.0
Updated@lerna/log-packed@5.3.0
Updated@lerna/npm-conf@5.3.0
Updated@lerna/npm-dist-tag@5.3.0
Updated@lerna/npm-publish@5.3.0
Updated@lerna/otplease@5.3.0
Updated@lerna/output@5.3.0
Updated@lerna/pack-directory@5.3.0
Updated@lerna/prompt@5.3.0
Updated@lerna/pulse-till-done@5.3.0
Updated@lerna/run-lifecycle@5.3.0
Updated@lerna/version@5.3.0
Updatedlibnpmaccess@^6.0.3
Updatednpm-package-arg@8.1.1
Updatednpm-registry-fetch@^13.3.0