Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .yarn/patches/lerna-npm-9.0.6-162b638d8c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Adds --skip-check-working-tree flag to `lerna publish` so that
# tools/verdaccio/spawn-verdaccio.ts can publish to a local registry
# with uncommitted changes. See https://github.com/lerna/lerna/issues/2329
diff --git a/dist/commands/publish/command.js b/dist/commands/publish/command.js
index 81ba8ac28f0e3512df2e62144c5b13f1e7405a20..a3b7b493695f581c5e351b6cd9f7fefe7102aaed 100644
--- a/dist/commands/publish/command.js
+++ b/dist/commands/publish/command.js
@@ -7014,7 +7014,9 @@ var require_src = __commonJS({
this.runRootLifecycle = /^(pre|post)?version$/.test(process.env.npm_lifecycle_event) ? (stage) => {
this.logger.warn("lifecycle", "Skipping root %j because it has already been called", stage);
} : (stage) => this.runPackageLifecycle(this.project.manifest, stage);
- if (this.commitAndTag && this.gitOpts.amend !== true) {
+ if (this.options.skipCheckWorkingTree) {
+ this.logger.warn("version", "Skipping working tree validation, proceed at your own risk");
+ } else if (this.commitAndTag && this.gitOpts.amend !== true) {
const { forcePublish, conventionalCommits, conventionalGraduate } = this.options;
const checkUncommittedOnly = forcePublish || conventionalCommits && conventionalGraduate;
const check = checkUncommittedOnly ? throwIfUncommitted : checkWorkingTree;
@@ -8508,6 +8510,10 @@ var require_src2 = __commonJS({
}
}
verifyWorkingTreeClean() {
+ if (this.options.skipCheckWorkingTree) {
+ this.logger.warn("publish", "Skipping working tree check, proceed at your own risk");
+ return Promise.resolve();
+ }
return describeRef(this.execOpts).then(throwIfUncommitted);
}
async detectFromGit() {
@@ -9215,6 +9221,10 @@ var require_command2 = __commonJS({
"include-private": {
describe: "Include specified private packages when publishing by temporarily removing the private property from the package manifest. This should only be used for testing private packages that will become public. Private packages should not usually be published. See the npm docs for details (https://docs.npmjs.com/cli/v9/configuring-npm/package-json#private).",
type: "array"
+ },
+ "skip-check-working-tree": {
+ describe: "Skip the check for uncommitted changes in the working tree before publishing.",
+ type: "boolean"
}
};
composeVersionOptions(yargs2);
diff --git a/dist/commands/publish/index.js b/dist/commands/publish/index.js
index d0f1eafacb2336d387b43eb1d5a14bce636a3749..8ce1411fcd9b0d6aac988da7ff2ee699228c7868 100644
--- a/dist/commands/publish/index.js
+++ b/dist/commands/publish/index.js
@@ -7468,7 +7468,9 @@ var require_src = __commonJS({
this.runRootLifecycle = /^(pre|post)?version$/.test(process.env.npm_lifecycle_event) ? (stage) => {
this.logger.warn("lifecycle", "Skipping root %j because it has already been called", stage);
} : (stage) => this.runPackageLifecycle(this.project.manifest, stage);
- if (this.commitAndTag && this.gitOpts.amend !== true) {
+ if (this.options.skipCheckWorkingTree) {
+ this.logger.warn("version", "Skipping working tree validation, proceed at your own risk");
+ } else if (this.commitAndTag && this.gitOpts.amend !== true) {
const { forcePublish, conventionalCommits, conventionalGraduate } = this.options;
const checkUncommittedOnly = forcePublish || conventionalCommits && conventionalGraduate;
const check = checkUncommittedOnly ? throwIfUncommitted : checkWorkingTree;
@@ -8191,6 +8193,10 @@ var require_src2 = __commonJS({
}
}
verifyWorkingTreeClean() {
+ if (this.options.skipCheckWorkingTree) {
+ this.logger.warn("publish", "Skipping working tree check, proceed at your own risk");
+ return Promise.resolve();
+ }
return describeRef(this.execOpts).then(throwIfUncommitted);
}
async detectFromGit() {
diff --git a/dist/index.js b/dist/index.js
index 0860a73516147cec14807f56e381583212c9ccb1..0b4871926fbccc74437f7932cf9893e18898e263 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -10018,7 +10018,9 @@ var require_src2 = __commonJS({
this.runRootLifecycle = /^(pre|post)?version$/.test(process.env.npm_lifecycle_event) ? (stage) => {
this.logger.warn("lifecycle", "Skipping root %j because it has already been called", stage);
} : (stage) => this.runPackageLifecycle(this.project.manifest, stage);
- if (this.commitAndTag && this.gitOpts.amend !== true) {
+ if (this.options.skipCheckWorkingTree) {
+ this.logger.warn("version", "Skipping working tree validation, proceed at your own risk");
+ } else if (this.commitAndTag && this.gitOpts.amend !== true) {
const { forcePublish, conventionalCommits, conventionalGraduate } = this.options;
const checkUncommittedOnly = forcePublish || conventionalCommits && conventionalGraduate;
const check = checkUncommittedOnly ? throwIfUncommitted : checkWorkingTree;
@@ -11512,6 +11514,10 @@ var require_src3 = __commonJS({
}
}
verifyWorkingTreeClean() {
+ if (this.options.skipCheckWorkingTree) {
+ this.logger.warn("publish", "Skipping working tree check, proceed at your own risk");
+ return Promise.resolve();
+ }
return describeRef(this.execOpts).then(throwIfUncommitted);
}
async detectFromGit() {
@@ -12219,6 +12225,10 @@ var require_command10 = __commonJS({
"include-private": {
describe: "Include specified private packages when publishing by temporarily removing the private property from the package manifest. This should only be used for testing private packages that will become public. Private packages should not usually be published. See the npm docs for details (https://docs.npmjs.com/cli/v9/configuring-npm/package-json#private).",
type: "array"
+ },
+ "skip-check-working-tree": {
+ describe: "Skip the check for uncommitted changes in the working tree before publishing.",
+ type: "boolean"
}
};
composeVersionOptions(yargs2);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"electron-installer-common": "^0.10.2",
"fork-ts-checker-webpack-plugin": "^7.2.13",
"husky": "^7.0.1",
"lerna": "^9.0.0",
"lerna": "patch:lerna@npm%3A9.0.6#~/.yarn/patches/lerna-npm-9.0.6-162b638d8c.patch",
"lint-staged": "^12.1.7",
"lodash-es": "^4.17.21",
"markdownlint-cli2": "^0.19.1",
Expand Down
1 change: 1 addition & 0 deletions tools/verdaccio/spawn-verdaccio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ async function publishPackages(): Promise<void> {
'--yes',
'--no-git-tag-version',
'--no-push',
'--skip-check-working-tree',
],
{
cwd: FORGE_ROOT_DIR,
Expand Down
Loading