Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: stop publish smoke from check git clean #8058

Open
wants to merge 10 commits into
base: latest
Choose a base branch
from

Conversation

reggi
Copy link
Contributor

@reggi reggi commented Jan 22, 2025

Im a big proponent of scripts working the same way in ci as they would locally. and that we should be able to run anything the ci does locally. The publish script is used to publish npm and ws packages, but also within a series of smoke tests. Making the flags clear it's either one of the two paths was my goal.

@reggi reggi requested a review from a team as a code owner January 22, 2025 20:46
@reggi
Copy link
Contributor Author

reggi commented Jan 24, 2025

At the end of node ./scripts/publish.js --smokePublish we get this diff, but it doesn't verify dirty npm version was doing that and is prevented with --no-git-tag-version

diff --git a/package-lock.json b/package-lock.json
index 4d7330730..43654dd80 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "npm",
-  "version": "11.0.0",
+  "version": "11.0.1-smoke.0",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "npm",
-      "version": "11.0.0",
+      "version": "11.0.1-smoke.0",
       "bundleDependencies": [
         "@isaacs/string-locale-compare",
         "@npmcli/arborist",
@@ -18750,7 +18750,7 @@
     },
     "workspaces/arborist": {
       "name": "@npmcli/arborist",
-      "version": "9.0.0",
+      "version": "9.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "@isaacs/string-locale-compare": "^1.1.0",
@@ -18808,7 +18808,7 @@
     },
     "workspaces/config": {
       "name": "@npmcli/config",
-      "version": "10.0.0",
+      "version": "10.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "@npmcli/map-workspaces": "^4.0.1",
@@ -18831,7 +18831,7 @@
       }
     },
     "workspaces/libnpmaccess": {
-      "version": "10.0.0",
+      "version": "10.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "npm-package-arg": "^12.0.0",
@@ -18848,7 +18848,7 @@
       }
     },
     "workspaces/libnpmdiff": {
-      "version": "8.0.0",
+      "version": "8.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "@npmcli/arborist": "^9.0.0",
@@ -18869,8 +18869,56 @@
         "node": "^20.17.0 || >=22.9.0"
       }
     },
+    "workspaces/libnpmdiff/node_modules/@npmcli/arborist": {
+      "version": "9.0.0",
+      "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz",
+      "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==",
+      "license": "ISC",
+      "dependencies": {
+        "@isaacs/string-locale-compare": "^1.1.0",
+        "@npmcli/fs": "^4.0.0",
+        "@npmcli/installed-package-contents": "^3.0.0",
+        "@npmcli/map-workspaces": "^4.0.1",
+        "@npmcli/metavuln-calculator": "^9.0.0",
+        "@npmcli/name-from-folder": "^3.0.0",
+        "@npmcli/node-gyp": "^4.0.0",
+        "@npmcli/package-json": "^6.0.1",
+        "@npmcli/query": "^4.0.0",
+        "@npmcli/redact": "^3.0.0",
+        "@npmcli/run-script": "^9.0.1",
+        "bin-links": "^5.0.0",
+        "cacache": "^19.0.1",
+        "common-ancestor-path": "^1.0.1",
+        "hosted-git-info": "^8.0.0",
+        "json-stringify-nice": "^1.1.4",
+        "lru-cache": "^10.2.2",
+        "minimatch": "^9.0.4",
+        "nopt": "^8.0.0",
+        "npm-install-checks": "^7.1.0",
+        "npm-package-arg": "^12.0.0",
+        "npm-pick-manifest": "^10.0.0",
+        "npm-registry-fetch": "^18.0.1",
+        "pacote": "^21.0.0",
+        "parse-conflict-json": "^4.0.0",
+        "proc-log": "^5.0.0",
+        "proggy": "^3.0.0",
+        "promise-all-reject-late": "^1.0.0",
+        "promise-call-limit": "^3.0.1",
+        "read-package-json-fast": "^4.0.0",
+        "semver": "^7.3.7",
+        "ssri": "^12.0.0",
+        "treeverse": "^3.0.0",
+        "walk-up-path": "^4.0.0"
+      },
+      "bin": {
+        "arborist": "bin/index.js"
+      },
+      "engines": {
+        "node": "^20.17.0 || >=22.9.0"
+      }
+    },
     "workspaces/libnpmexec": {
-      "version": "10.0.0",
+      "version": "10.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "@npmcli/arborist": "^9.0.0",
@@ -18898,8 +18946,56 @@
         "node": "^20.17.0 || >=22.9.0"
       }
     },
+    "workspaces/libnpmexec/node_modules/@npmcli/arborist": {
+      "version": "9.0.0",
+      "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz",
+      "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==",
+      "license": "ISC",
+      "dependencies": {
+        "@isaacs/string-locale-compare": "^1.1.0",
+        "@npmcli/fs": "^4.0.0",
+        "@npmcli/installed-package-contents": "^3.0.0",
+        "@npmcli/map-workspaces": "^4.0.1",
+        "@npmcli/metavuln-calculator": "^9.0.0",
+        "@npmcli/name-from-folder": "^3.0.0",
+        "@npmcli/node-gyp": "^4.0.0",
+        "@npmcli/package-json": "^6.0.1",
+        "@npmcli/query": "^4.0.0",
+        "@npmcli/redact": "^3.0.0",
+        "@npmcli/run-script": "^9.0.1",
+        "bin-links": "^5.0.0",
+        "cacache": "^19.0.1",
+        "common-ancestor-path": "^1.0.1",
+        "hosted-git-info": "^8.0.0",
+        "json-stringify-nice": "^1.1.4",
+        "lru-cache": "^10.2.2",
+        "minimatch": "^9.0.4",
+        "nopt": "^8.0.0",
+        "npm-install-checks": "^7.1.0",
+        "npm-package-arg": "^12.0.0",
+        "npm-pick-manifest": "^10.0.0",
+        "npm-registry-fetch": "^18.0.1",
+        "pacote": "^21.0.0",
+        "parse-conflict-json": "^4.0.0",
+        "proc-log": "^5.0.0",
+        "proggy": "^3.0.0",
+        "promise-all-reject-late": "^1.0.0",
+        "promise-call-limit": "^3.0.1",
+        "read-package-json-fast": "^4.0.0",
+        "semver": "^7.3.7",
+        "ssri": "^12.0.0",
+        "treeverse": "^3.0.0",
+        "walk-up-path": "^4.0.0"
+      },
+      "bin": {
+        "arborist": "bin/index.js"
+      },
+      "engines": {
+        "node": "^20.17.0 || >=22.9.0"
+      }
+    },
     "workspaces/libnpmfund": {
-      "version": "7.0.0",
+      "version": "7.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "@npmcli/arborist": "^9.0.0"
@@ -18913,8 +19009,56 @@
         "node": "^20.17.0 || >=22.9.0"
       }
     },
+    "workspaces/libnpmfund/node_modules/@npmcli/arborist": {
+      "version": "9.0.0",
+      "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz",
+      "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==",
+      "license": "ISC",
+      "dependencies": {
+        "@isaacs/string-locale-compare": "^1.1.0",
+        "@npmcli/fs": "^4.0.0",
+        "@npmcli/installed-package-contents": "^3.0.0",
+        "@npmcli/map-workspaces": "^4.0.1",
+        "@npmcli/metavuln-calculator": "^9.0.0",
+        "@npmcli/name-from-folder": "^3.0.0",
+        "@npmcli/node-gyp": "^4.0.0",
+        "@npmcli/package-json": "^6.0.1",
+        "@npmcli/query": "^4.0.0",
+        "@npmcli/redact": "^3.0.0",
+        "@npmcli/run-script": "^9.0.1",
+        "bin-links": "^5.0.0",
+        "cacache": "^19.0.1",
+        "common-ancestor-path": "^1.0.1",
+        "hosted-git-info": "^8.0.0",
+        "json-stringify-nice": "^1.1.4",
+        "lru-cache": "^10.2.2",
+        "minimatch": "^9.0.4",
+        "nopt": "^8.0.0",
+        "npm-install-checks": "^7.1.0",
+        "npm-package-arg": "^12.0.0",
+        "npm-pick-manifest": "^10.0.0",
+        "npm-registry-fetch": "^18.0.1",
+        "pacote": "^21.0.0",
+        "parse-conflict-json": "^4.0.0",
+        "proc-log": "^5.0.0",
+        "proggy": "^3.0.0",
+        "promise-all-reject-late": "^1.0.0",
+        "promise-call-limit": "^3.0.1",
+        "read-package-json-fast": "^4.0.0",
+        "semver": "^7.3.7",
+        "ssri": "^12.0.0",
+        "treeverse": "^3.0.0",
+        "walk-up-path": "^4.0.0"
+      },
+      "bin": {
+        "arborist": "bin/index.js"
+      },
+      "engines": {
+        "node": "^20.17.0 || >=22.9.0"
+      }
+    },
     "workspaces/libnpmorg": {
-      "version": "8.0.0",
+      "version": "8.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "aproba": "^2.0.0",
@@ -18932,7 +19076,7 @@
       }
     },
     "workspaces/libnpmpack": {
-      "version": "9.0.0",
+      "version": "9.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "@npmcli/arborist": "^9.0.0",
@@ -18951,8 +19095,56 @@
         "node": "^20.17.0 || >=22.9.0"
       }
     },
+    "workspaces/libnpmpack/node_modules/@npmcli/arborist": {
+      "version": "9.0.0",
+      "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz",
+      "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==",
+      "license": "ISC",
+      "dependencies": {
+        "@isaacs/string-locale-compare": "^1.1.0",
+        "@npmcli/fs": "^4.0.0",
+        "@npmcli/installed-package-contents": "^3.0.0",
+        "@npmcli/map-workspaces": "^4.0.1",
+        "@npmcli/metavuln-calculator": "^9.0.0",
+        "@npmcli/name-from-folder": "^3.0.0",
+        "@npmcli/node-gyp": "^4.0.0",
+        "@npmcli/package-json": "^6.0.1",
+        "@npmcli/query": "^4.0.0",
+        "@npmcli/redact": "^3.0.0",
+        "@npmcli/run-script": "^9.0.1",
+        "bin-links": "^5.0.0",
+        "cacache": "^19.0.1",
+        "common-ancestor-path": "^1.0.1",
+        "hosted-git-info": "^8.0.0",
+        "json-stringify-nice": "^1.1.4",
+        "lru-cache": "^10.2.2",
+        "minimatch": "^9.0.4",
+        "nopt": "^8.0.0",
+        "npm-install-checks": "^7.1.0",
+        "npm-package-arg": "^12.0.0",
+        "npm-pick-manifest": "^10.0.0",
+        "npm-registry-fetch": "^18.0.1",
+        "pacote": "^21.0.0",
+        "parse-conflict-json": "^4.0.0",
+        "proc-log": "^5.0.0",
+        "proggy": "^3.0.0",
+        "promise-all-reject-late": "^1.0.0",
+        "promise-call-limit": "^3.0.1",
+        "read-package-json-fast": "^4.0.0",
+        "semver": "^7.3.7",
+        "ssri": "^12.0.0",
+        "treeverse": "^3.0.0",
+        "walk-up-path": "^4.0.0"
+      },
+      "bin": {
+        "arborist": "bin/index.js"
+      },
+      "engines": {
+        "node": "^20.17.0 || >=22.9.0"
+      }
+    },
     "workspaces/libnpmpublish": {
-      "version": "11.0.0",
+      "version": "11.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "ci-info": "^4.0.0",
@@ -18976,7 +19168,7 @@
       }
     },
     "workspaces/libnpmsearch": {
-      "version": "9.0.0",
+      "version": "9.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "npm-registry-fetch": "^18.0.1"
@@ -18992,7 +19184,7 @@
       }
     },
     "workspaces/libnpmteam": {
-      "version": "8.0.0",
+      "version": "8.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "aproba": "^2.0.0",
@@ -19009,7 +19201,7 @@
       }
     },
     "workspaces/libnpmversion": {
-      "version": "8.0.0",
+      "version": "8.0.1-smoke.0",
       "license": "ISC",
       "dependencies": {
         "@npmcli/git": "^6.0.1",
diff --git a/package.json b/package.json
index 8b5e9744a..228eab33d 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  "version": "11.0.0",
+  "version": "11.0.1-smoke.0",
   "name": "npm",
   "description": "a package manager for JavaScript",
   "workspaces": [
diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json
index a8c9ae041..7bb2da9c9 100644
--- a/workspaces/arborist/package.json
+++ b/workspaces/arborist/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@npmcli/arborist",
-  "version": "9.0.0",
+  "version": "9.0.1-smoke.0",
   "description": "Manage node_modules trees",
   "dependencies": {
     "@isaacs/string-locale-compare": "^1.1.0",
diff --git a/workspaces/config/package.json b/workspaces/config/package.json
index eb89879ff..53bad07eb 100644
--- a/workspaces/config/package.json
+++ b/workspaces/config/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@npmcli/config",
-  "version": "10.0.0",
+  "version": "10.0.1-smoke.0",
   "files": [
     "bin/",
     "lib/"
diff --git a/workspaces/libnpmaccess/package.json b/workspaces/libnpmaccess/package.json
index ff63233c4..d35e5aa3f 100644
--- a/workspaces/libnpmaccess/package.json
+++ b/workspaces/libnpmaccess/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmaccess",
-  "version": "10.0.0",
+  "version": "10.0.1-smoke.0",
   "description": "programmatic library for `npm access` commands",
   "author": "GitHub Inc.",
   "license": "ISC",
diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json
index 48673c03f..dbd55f5b9 100644
--- a/workspaces/libnpmdiff/package.json
+++ b/workspaces/libnpmdiff/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmdiff",
-  "version": "8.0.0",
+  "version": "8.0.1-smoke.0",
   "description": "The registry diff",
   "repository": {
     "type": "git",
diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json
index 5009d76d1..932a1a91b 100644
--- a/workspaces/libnpmexec/package.json
+++ b/workspaces/libnpmexec/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmexec",
-  "version": "10.0.0",
+  "version": "10.0.1-smoke.0",
   "files": [
     "bin/",
     "lib/"
diff --git a/workspaces/libnpmfund/package.json b/workspaces/libnpmfund/package.json
index 8d458259a..4eb241968 100644
--- a/workspaces/libnpmfund/package.json
+++ b/workspaces/libnpmfund/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmfund",
-  "version": "7.0.0",
+  "version": "7.0.1-smoke.0",
   "main": "lib/index.js",
   "files": [
     "bin/",
diff --git a/workspaces/libnpmorg/package.json b/workspaces/libnpmorg/package.json
index aec1ef797..296c1d023 100644
--- a/workspaces/libnpmorg/package.json
+++ b/workspaces/libnpmorg/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmorg",
-  "version": "8.0.0",
+  "version": "8.0.1-smoke.0",
   "description": "Programmatic api for `npm org` commands",
   "author": "GitHub Inc.",
   "main": "lib/index.js",
diff --git a/workspaces/libnpmpack/package.json b/workspaces/libnpmpack/package.json
index eba99bd38..d19db5f0b 100644
--- a/workspaces/libnpmpack/package.json
+++ b/workspaces/libnpmpack/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmpack",
-  "version": "9.0.0",
+  "version": "9.0.1-smoke.0",
   "description": "Programmatic API for the bits behind npm pack",
   "author": "GitHub Inc.",
   "main": "lib/index.js",
diff --git a/workspaces/libnpmpublish/package.json b/workspaces/libnpmpublish/package.json
index 87526bdd8..27dbc7724 100644
--- a/workspaces/libnpmpublish/package.json
+++ b/workspaces/libnpmpublish/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmpublish",
-  "version": "11.0.0",
+  "version": "11.0.1-smoke.0",
   "description": "Programmatic API for the bits behind npm publish and unpublish",
   "author": "GitHub Inc.",
   "main": "lib/index.js",
diff --git a/workspaces/libnpmsearch/package.json b/workspaces/libnpmsearch/package.json
index ca021f241..3cd2977c1 100644
--- a/workspaces/libnpmsearch/package.json
+++ b/workspaces/libnpmsearch/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmsearch",
-  "version": "9.0.0",
+  "version": "9.0.1-smoke.0",
   "description": "Programmatic API for searching in npm and compatible registries.",
   "author": "GitHub Inc.",
   "main": "lib/index.js",
diff --git a/workspaces/libnpmteam/package.json b/workspaces/libnpmteam/package.json
index 72858f25c..f2ef96bc6 100644
--- a/workspaces/libnpmteam/package.json
+++ b/workspaces/libnpmteam/package.json
@@ -1,7 +1,7 @@
 {
   "name": "libnpmteam",
   "description": "npm Team management APIs",
-  "version": "8.0.0",
+  "version": "8.0.1-smoke.0",
   "author": "GitHub Inc.",
   "license": "ISC",
   "main": "lib/index.js",
diff --git a/workspaces/libnpmversion/package.json b/workspaces/libnpmversion/package.json
index b319156a1..9043512b3 100644
--- a/workspaces/libnpmversion/package.json
+++ b/workspaces/libnpmversion/package.json
@@ -1,6 +1,6 @@
 {
   "name": "libnpmversion",
-  "version": "8.0.0",
+  "version": "8.0.1-smoke.0",
   "main": "lib/index.js",
   "files": [
     "bin/",

const { isLocal, smokePublish, packDestination } = opts
const isPack = !!packDestination
const publishes = await getPublishes({ force: isPack })
const { test, otp, dryRun, smokePublish, packDestination } = opts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destructing ALL flags here is really helpful to know what can be passed into this script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant