From 221ed4ff696a386f337b69013a9b496fdc56de7e Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 10 Nov 2022 13:12:20 -0700 Subject: [PATCH 1/6] chore: @npmcli/template-oss@4.10.0 --- .github/workflows/release.yml | 8 +++--- docs/package.json | 4 +-- mock-registry/package.json | 4 +-- package-lock.json | 41 ++++++++++++++------------- package.json | 4 +-- smoke-tests/package.json | 4 +-- workspaces/arborist/package.json | 4 +-- workspaces/config/package.json | 4 +-- workspaces/libnpmaccess/package.json | 4 +-- workspaces/libnpmdiff/package.json | 4 +-- workspaces/libnpmexec/package.json | 4 +-- workspaces/libnpmfund/package.json | 4 +-- workspaces/libnpmhook/package.json | 4 +-- workspaces/libnpmorg/package.json | 4 +-- workspaces/libnpmpack/package.json | 4 +-- workspaces/libnpmpublish/package.json | 4 +-- workspaces/libnpmsearch/package.json | 4 +-- workspaces/libnpmteam/package.json | 4 +-- workspaces/libnpmversion/package.json | 4 +-- 19 files changed, 59 insertions(+), 58 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ca624d660c7e..36cb489fc469b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,9 +71,9 @@ jobs: const comments = await github.paginate(github.rest.issues.listComments, issue) let commentId = comments?.find(c => c.user.login === 'github-actions[bot]' && c.body.startsWith(body))?.id - body += `Release workflow run: ${workflow.html_url}\n\n#### Force CI to Rerun for This Release\n\n` - body += `This PR will be updated and CI will run for every non-\`chore:\` commit that is pushed to \`main\`. ` - body += `To force CI to rerun, run this command:\n\n` + body += `Release workflow run: ${workflow.html_url}\n\n#### Force CI to Update This Release\n\n` + body += `This PR will be updated and CI will run for every non-\`chore:\` commit that is pushed to \`latest\`. ` + body += `To force CI to update this PR, run this command:\n\n` body += `\`\`\`\ngh workflow run release.yml -r ${REF_NAME}\n\`\`\`` if (commentId) { @@ -162,7 +162,7 @@ jobs: RELEASE_COMMENT_ID: ${{ needs.release.outputs.comment-id }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - node . exec --offline -- template-oss-release-manager + node . exec --offline -- template-oss-release-manager --lockfile=true node . run rp-pull-request --ignore-scripts -ws -iwr --if-present - name: Commit id: commit diff --git a/docs/package.json b/docs/package.json index 6130418caee9e..36ccbdde62fa1 100644 --- a/docs/package.json +++ b/docs/package.json @@ -22,7 +22,7 @@ "devDependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "front-matter": "^4.0.2", "ignore-walk": "^6.0.0", "jsdom": "^20.0.1", @@ -56,7 +56,7 @@ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "ciVersions": "latest", "engines": "^14.17.0 || ^16.13.0 || >=18.0.0", - "version": "4.9.0", + "version": "4.10.0", "content": "../scripts/template-oss/index.js", "workspaceRepo": { "add": { diff --git a/mock-registry/package.json b/mock-registry/package.json index 3729a17f1e004..89b1e9e0346bb 100644 --- a/mock-registry/package.json +++ b/mock-registry/package.json @@ -34,7 +34,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0" + "version": "4.10.0" }, "tap": { "no-coverage": true, @@ -46,7 +46,7 @@ "devDependencies": { "@npmcli/arborist": "^6.1.1", "@npmcli/eslint-config": "^4.0.1", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.9", "npm-package-arg": "^10.0.0", "pacote": "^15.0.6", diff --git a/package-lock.json b/package-lock.json index 0c995200daf81..bf2bfaebd42f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -165,7 +165,7 @@ "@npmcli/git": "^4.0.1", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "licensee": "^9.0.0", "nock": "^13.2.4", "npm-packlist": "^7.0.1", @@ -186,7 +186,7 @@ "devDependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "front-matter": "^4.0.2", "ignore-walk": "^6.0.0", "jsdom": "^20.0.1", @@ -211,7 +211,7 @@ "devDependencies": { "@npmcli/arborist": "^6.1.1", "@npmcli/eslint-config": "^4.0.1", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.9", "npm-package-arg": "^10.0.0", "pacote": "^15.0.6", @@ -2268,9 +2268,9 @@ "link": true }, "node_modules/@npmcli/template-oss": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.9.0.tgz", - "integrity": "sha512-zfo9e5bGLXf3GAF2TWDIKBlTjP3zR578nKkCaYTFnw00TwEMjjHzNFskbJNNdBXqW9Lc7BH246LCrhYikmYlCQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.10.0.tgz", + "integrity": "sha512-KeC93o3umyr3FpJots5paojysrU/RL/oNVhDEYKr3O+Replidr3EgU96VmnCJwfHcMs64lz9oIYA/94A5fAC9w==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2287,6 +2287,7 @@ "glob": "^8.0.1", "handlebars": "^4.7.7", "hosted-git-info": "^6.0.0", + "ini": "^3.0.1", "json-parse-even-better-errors": "^3.0.0", "just-deep-map-values": "^1.1.1", "just-diff": "^5.0.1", @@ -14968,7 +14969,7 @@ "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "http-proxy": "^1.18.1", "just-extend": "^6.1.1", "just-safe-set": "^4.1.1", @@ -15023,7 +15024,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "benchmark": "^2.1.4", "chalk": "^4.1.0", "minify-registry-metadata": "^2.1.0", @@ -15050,7 +15051,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "tap": "^16.0.1" }, "engines": { @@ -15066,7 +15067,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -15090,7 +15091,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "tap": "^16.0.1" }, "engines": { @@ -15116,7 +15117,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "bin-links": "^4.0.1", "minify-registry-metadata": "^2.2.0", "mkdirp": "^1.0.4", @@ -15134,7 +15135,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "tap": "^16.0.1" }, "engines": { @@ -15150,7 +15151,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -15167,7 +15168,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "minipass": "^3.1.1", "nock": "^13.2.4", "tap": "^16.0.1" @@ -15187,7 +15188,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.0.7", "spawk": "^1.7.1", "tap": "^16.0.1" @@ -15208,7 +15209,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "libnpmpack": "^5.0.3", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", @@ -15226,7 +15227,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -15243,7 +15244,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -15263,7 +15264,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "require-inject": "^1.4.4", "tap": "^16.0.1" }, diff --git a/package.json b/package.json index ba34d7a2793ec..dedabdd6f9d28 100644 --- a/package.json +++ b/package.json @@ -202,7 +202,7 @@ "@npmcli/git": "^4.0.1", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "licensee": "^9.0.0", "nock": "^13.2.4", "npm-packlist": "^7.0.1", @@ -256,7 +256,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "./scripts/template-oss/root.js" }, "license": "Artistic-2.0", diff --git a/smoke-tests/package.json b/smoke-tests/package.json index e2ca299c69884..4f5f0a1f1da0b 100644 --- a/smoke-tests/package.json +++ b/smoke-tests/package.json @@ -21,7 +21,7 @@ "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "http-proxy": "^1.18.1", "just-extend": "^6.1.1", "just-safe-set": "^4.1.1", @@ -32,7 +32,7 @@ "license": "ISC", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json index 8ff8546f42ed0..14f8ae33f260f 100644 --- a/workspaces/arborist/package.json +++ b/workspaces/arborist/package.json @@ -39,7 +39,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "benchmark": "^2.1.4", "chalk": "^4.1.0", "minify-registry-metadata": "^2.1.0", @@ -101,7 +101,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/workspaces/config/package.json b/workspaces/config/package.json index faeefbd08de49..7fd9f061414a9 100644 --- a/workspaces/config/package.json +++ b/workspaces/config/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "tap": "^16.0.1" }, "dependencies": { @@ -50,6 +50,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0" + "version": "4.10.0" } } diff --git a/workspaces/libnpmaccess/package.json b/workspaces/libnpmaccess/package.json index 121c16418d3bf..76baabab2ca69 100644 --- a/workspaces/libnpmaccess/package.json +++ b/workspaces/libnpmaccess/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -40,7 +40,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index 07acc9852e362..5e998399f6844 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "tap": "^16.0.1" }, "dependencies": { @@ -59,7 +59,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index 31f3531cbc538..ad37c76328dd3 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "bin-links": "^4.0.1", "minify-registry-metadata": "^2.2.0", "mkdirp": "^1.0.4", @@ -73,7 +73,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/workspaces/libnpmfund/package.json b/workspaces/libnpmfund/package.json index 352babd7a7c84..5d348d84c892d 100644 --- a/workspaces/libnpmfund/package.json +++ b/workspaces/libnpmfund/package.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "tap": "^16.0.1" }, "dependencies": { @@ -53,7 +53,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmhook/package.json b/workspaces/libnpmhook/package.json index 7b2c911663700..aebd8edb9a123 100644 --- a/workspaces/libnpmhook/package.json +++ b/workspaces/libnpmhook/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmorg/package.json b/workspaces/libnpmorg/package.json index e1d309162bc0a..a7255e3f7bb63 100644 --- a/workspaces/libnpmorg/package.json +++ b/workspaces/libnpmorg/package.json @@ -28,7 +28,7 @@ ], "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "minipass": "^3.1.1", "nock": "^13.2.4", "tap": "^16.0.1" @@ -49,7 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmpack/package.json b/workspaces/libnpmpack/package.json index 469864a4fb184..e2dac34457dde 100644 --- a/workspaces/libnpmpack/package.json +++ b/workspaces/libnpmpack/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.0.7", "spawk": "^1.7.1", "tap": "^16.0.1" @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmpublish/package.json b/workspaces/libnpmpublish/package.json index 0498dcce2919d..cb521a0c26270 100644 --- a/workspaces/libnpmpublish/package.json +++ b/workspaces/libnpmpublish/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "libnpmpack": "^5.0.3", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", @@ -50,7 +50,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmsearch/package.json b/workspaces/libnpmsearch/package.json index 25b8c2664f0e5..e34a2ea6afdf8 100644 --- a/workspaces/libnpmsearch/package.json +++ b/workspaces/libnpmsearch/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -45,7 +45,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmteam/package.json b/workspaces/libnpmteam/package.json index f85f67de8d3ae..e25095e109aba 100644 --- a/workspaces/libnpmteam/package.json +++ b/workspaces/libnpmteam/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -39,7 +39,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmversion/package.json b/workspaces/libnpmversion/package.json index 410bcfe0b727e..261b86a46958a 100644 --- a/workspaces/libnpmversion/package.json +++ b/workspaces/libnpmversion/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.9.0", + "@npmcli/template-oss": "4.10.0", "require-inject": "^1.4.4", "tap": "^16.0.1" }, @@ -48,7 +48,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.9.0", + "version": "4.10.0", "content": "../../scripts/template-oss/index.js" } } From 3f1381898ad6c8a477d32765d7304dd55a2c8c9d Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 16 Nov 2022 09:55:44 -0800 Subject: [PATCH 2/6] fix: refactor / inline single use code (#5859) --- .../arborist/lib/arborist/build-ideal-tree.js | 10 +- workspaces/arborist/lib/place-dep.js | 223 +++++++----------- .../tap-snapshots/test/place-dep.js.test.cjs | 10 +- 3 files changed, 92 insertions(+), 151 deletions(-) diff --git a/workspaces/arborist/lib/arborist/build-ideal-tree.js b/workspaces/arborist/lib/arborist/build-ideal-tree.js index d64bdd7e496ae..61d9c171c764f 100644 --- a/workspaces/arborist/lib/arborist/build-ideal-tree.js +++ b/workspaces/arborist/lib/arborist/build-ideal-tree.js @@ -941,15 +941,15 @@ This is a one-time fix-up, please be patient... edge, dep, - explicitRequest: this[_explicitRequests].has(edge), - updateNames: this[_updateNames], auditReport: this.auditReport, + explicitRequest: this[_explicitRequests].has(edge), force: this[_force], - preferDedupe: this[_preferDedupe], - strictPeerDeps: this[_strictPeerDeps], installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, installStrategy: this[_installStrategy], + legacyPeerDeps: this.legacyPeerDeps, + preferDedupe: this[_preferDedupe], + strictPeerDeps: this[_strictPeerDeps], + updateNames: this[_updateNames], })) const promises = [] diff --git a/workspaces/arborist/lib/place-dep.js b/workspaces/arborist/lib/place-dep.js index 2e37e35f6014b..16a0095fa0963 100644 --- a/workspaces/arborist/lib/place-dep.js +++ b/workspaces/arborist/lib/place-dep.js @@ -23,71 +23,39 @@ const peerEntrySets = require('./peer-entry-sets.js') class PlaceDep { constructor (options) { - const { - dep, - edge, - parent = null, - } = options - this.name = edge.name - this.dep = dep - this.edge = edge - this.canPlace = null - - this.target = null - this.placed = null - - // inherit all these fields from the parent to ensure consistency. - const { - preferDedupe, - force, - explicitRequest, - updateNames, - auditReport, - strictPeerDeps, - installLinks, - legacyPeerDeps, - installStrategy, - } = parent || options - Object.assign(this, { - preferDedupe, - force, - explicitRequest, - updateNames, - auditReport, - strictPeerDeps, - installLinks, - installStrategy, - legacyPeerDeps, - }) + this.auditReport = options.auditReport + this.dep = options.dep + this.edge = options.edge + this.explicitRequest = options.explicitRequest + this.force = options.force + this.installLinks = options.installLinks + this.installStrategy = options.installStrategy + this.legacyPeerDeps = options.legacyPeerDeps + this.parent = options.parent || null + this.preferDedupe = options.preferDedupe + this.strictPeerDeps = options.strictPeerDeps + this.updateNames = options.updateNames + this.canPlace = null + this.canPlaceSelf = null + // XXX this only appears to be used by tests + this.checks = new Map() this.children = [] - this.parent = parent - this.peerConflict = null - this.needEvaluation = new Set() + this.peerConflict = null + this.placed = null + this.target = null - this.checks = new Map() - - this.place() - } - - place () { - const { - edge, - dep, - preferDedupe, - explicitRequest, - updateNames, - installStrategy, - checks, - } = this + this.current = this.edge.to + this.name = this.edge.name + this.top = this.parent?.top || this // nothing to do if the edge is fine as it is - if (edge.to && - !edge.error && - !explicitRequest && - !updateNames.includes(edge.name) && - !this.isVulnerable(edge.to)) { + if (this.edge.to && + !this.edge.error && + !this.explicitRequest && + !this.updateNames.includes(this.edge.name) && + !this.auditReport?.isVulnerable(this.edge.to)) { return } @@ -95,8 +63,6 @@ class PlaceDep { // where the dep is not a peer dep. const start = this.getStartNode() - let canPlace = null - let canPlaceSelf = null for (const target of start.ancestry()) { // if the current location has a peerDep on it, then we can't place here // this is pretty rare to hit, since we always prefer deduping peers, @@ -112,14 +78,14 @@ class PlaceDep { // Then we check under b, and can't, because of the optional peer dep. // but we CAN place it under a, so the correct thing to do is keep // walking up the tree. - const targetEdge = target.edgesOut.get(edge.name) + const targetEdge = target.edgesOut.get(this.edge.name) if (!target.isTop && targetEdge && targetEdge.peer) { continue } const cpd = new CanPlaceDep({ - dep, - edge, + dep: this.dep, + edge: this.edge, // note: this sets the parent's canPlace as the parent of this // canPlace, but it does NOT add this canPlace to the parent's // children. This way, we can know that it's a peer dep, and @@ -127,10 +93,10 @@ class PlaceDep { // tree of checks that factored into the original decision. parent: this.parent && this.parent.canPlace, target, - preferDedupe, + preferDedupe: this.preferDedupe, explicitRequest: this.explicitRequest, }) - checks.set(target, cpd) + this.checks.set(target, cpd) // It's possible that a "conflict" is a conflict among the *peers* of // a given node we're trying to place, but there actually is no current @@ -146,13 +112,13 @@ class PlaceDep { // where they did not themselves conflict, and skip c@2 if conflict // is ok by virtue of being forced or not ours and not strict. if (cpd.canPlaceSelf !== CONFLICT) { - canPlaceSelf = cpd + this.canPlaceSelf = cpd } // we found a place this can go, along with all its peer friends. // we break when we get the first conflict if (cpd.canPlace !== CONFLICT) { - canPlace = cpd + this.canPlace = cpd } else { break } @@ -161,19 +127,19 @@ class PlaceDep { // since we're going to crash the build or prune it out anyway. // but, this will frequently NOT be a successful canPlace, because // it'll have no version or other information. - if (dep.errors.length) { + if (this.dep.errors.length) { break } // nest packages like npm v1 and v2 // very disk-inefficient - if (installStrategy === 'nested') { + if (this.installStrategy === 'nested') { break } // when installing globally, or just in global style, we never place // deps above the first level. - if (installStrategy === 'shallow') { + if (this.installStrategy === 'shallow') { const rp = target.resolveParent if (rp && rp.isProjectRoot) { break @@ -181,18 +147,12 @@ class PlaceDep { } } - Object.assign(this, { - canPlace, - canPlaceSelf, - }) - this.current = edge.to - // if we can't find a target, that means that the last place checked, // and all the places before it, had a conflict. - if (!canPlace) { - // if not forced, or it's our dep, or strictPeerDeps is set, then + if (!this.canPlace) { + // if not forced, and it's our dep, or strictPeerDeps is set, then // this is an ERESOLVE error. - if (!this.conflictOk) { + if (!this.force && (this.isMine || this.strictPeerDeps)) { return this.failPeerConflict() } @@ -200,54 +160,45 @@ class PlaceDep { // if we have a current, then we treat CONFLICT as a KEEP. // otherwise, we just skip it. Only warn on the one that actually // could not be placed somewhere. - if (!canPlaceSelf) { + if (!this.canPlaceSelf) { this.warnPeerConflict() return } - this.canPlace = canPlaceSelf + this.canPlace = this.canPlaceSelf } // now we have a target, a tree of CanPlaceDep results for the peer group, // and we are ready to go - this.placeInTree() - } - - placeInTree () { - const { - dep, - canPlace, - edge, - } = this /* istanbul ignore next */ - if (!canPlace) { + if (!this.canPlace) { debug(() => { throw new Error('canPlace not set, but trying to place in tree') }) return } - const { target } = canPlace + const { target } = this.canPlace log.silly( 'placeDep', target.location || 'ROOT', - `${dep.name}@${dep.version}`, - canPlace.description, + `${this.dep.name}@${this.dep.version}`, + this.canPlace.description, `for: ${this.edge.from.package._id || this.edge.from.location}`, - `want: ${edge.spec || '*'}` + `want: ${this.edge.spec || '*'}` ) - const placementType = canPlace.canPlace === CONFLICT - ? canPlace.canPlaceSelf - : canPlace.canPlace + const placementType = this.canPlace.canPlace === CONFLICT + ? this.canPlace.canPlaceSelf + : this.canPlace.canPlace // if we're placing in the tree with --force, we can get here even though // it's a conflict. Treat it as a KEEP, but warn and move on. if (placementType === KEEP) { // this was a peerConflicted peer dep - if (edge.peer && !edge.valid) { + if (this.edge.peer && !this.edge.valid) { this.warnPeerConflict() } @@ -276,7 +227,7 @@ class PlaceDep { // instead of nesting forever, when the loop occurs, create // a symbolic link to the earlier instance for (let p = target; p; p = p.resolveParent) { - if (p.matches(dep) && !p.isTop) { + if (p.matches(this.dep) && !p.isTop) { this.placed = new Link({ parent: target, target: p }) return } @@ -286,17 +237,17 @@ class PlaceDep { // remove any that are not being replaced and will now be invalid, and // re-evaluate them deeper into the tree. - const virtualRoot = dep.parent - this.placed = new dep.constructor({ - name: dep.name, - pkg: dep.package, - resolved: dep.resolved, - integrity: dep.integrity, + const virtualRoot = this.dep.parent + this.placed = new this.dep.constructor({ + name: this.dep.name, + pkg: this.dep.package, + resolved: this.dep.resolved, + integrity: this.dep.integrity, installLinks: this.installLinks, legacyPeerDeps: this.legacyPeerDeps, - error: dep.errors[0], - ...(dep.overrides ? { overrides: dep.overrides } : {}), - ...(dep.isLink ? { target: dep.target, realpath: dep.realpath } : {}), + error: this.dep.errors[0], + ...(this.dep.overrides ? { overrides: this.dep.overrides } : {}), + ...(this.dep.isLink ? { target: this.dep.target, realpath: this.dep.realpath } : {}), }) this.oldDep = target.children.get(this.name) @@ -307,7 +258,7 @@ class PlaceDep { } // if it's a peerConflicted peer dep, warn about it - if (edge.peer && !this.placed.satisfies(edge)) { + if (this.edge.peer && !this.placed.satisfies(this.edge)) { this.warnPeerConflict() } @@ -315,8 +266,8 @@ class PlaceDep { // MAY end up putting a better/identical node further up the tree in // a way that causes an unnecessary duplication. If so, remove the // now-unnecessary node. - if (edge.valid && edge.to && edge.to !== this.placed) { - this.pruneDedupable(edge.to, false) + if (this.edge.valid && this.edge.to && this.edge.to !== this.placed) { + this.pruneDedupable(this.edge.to, false) } // in case we just made some duplicates that can be removed, @@ -360,6 +311,15 @@ class PlaceDep { } this.children.push(new PlaceDep({ + auditReport: this.auditReport, + explicitRequest: this.explicitRequest, + force: this.force, + installLinks: this.installLinks, + installStrategy: this.installStrategy, + legacyPeerDeps: this.legaycPeerDeps, + preferDedupe: this.preferDedupe, + strictPeerDeps: this.strictPeerDeps, + updateNames: this.updateName, parent: this, dep: peer, node: this.placed, @@ -492,10 +452,6 @@ class PlaceDep { } } - get conflictOk () { - return this.force || (!this.isMine && !this.strictPeerDeps) - } - get isMine () { const { edge } = this.top const { from: node } = edge @@ -550,10 +506,15 @@ class PlaceDep { const { from: node } = edge const curNode = node.resolve(edge.name) + // XXX decorate more with this.canPlace and this.canPlaceSelf, + // this.checks, this.children, walk over conflicted peers, etc. const expl = { code: 'ERESOLVE', edge: edge.explain(), dep: dep.explain(edge), + force: this.force, + isMine: this.isMine, + strictPeerDeps: this.strictPeerDeps, } if (this.parent) { @@ -582,37 +543,17 @@ class PlaceDep { } } - const { - strictPeerDeps, - force, - isMine, - } = this - Object.assign(expl, { - strictPeerDeps, - force, - isMine, - }) - - // XXX decorate more with this.canPlace and this.canPlaceSelf, - // this.checks, this.children, walk over conflicted peers, etc. return expl } getStartNode () { - // if we are a peer, then we MUST be at least as shallow as the - // peer dependent - const from = this.parent ? this.parent.getStartNode() : this.edge.from + // if we are a peer, then we MUST be at least as shallow as the peer + // dependent + const from = this.parent?.getStartNode() || this.edge.from return deepestNestingTarget(from, this.name) } - get top () { - return this.parent ? this.parent.top : this - } - - isVulnerable (node) { - return this.auditReport && this.auditReport.isVulnerable(node) - } - + // XXX this only appears to be used by tests get allChildren () { const set = new Set(this.children) for (const child of set) { diff --git a/workspaces/arborist/tap-snapshots/test/place-dep.js.test.cjs b/workspaces/arborist/tap-snapshots/test/place-dep.js.test.cjs index 9929906f650e2..99acc594d81ed 100644 --- a/workspaces/arborist/tap-snapshots/test/place-dep.js.test.cjs +++ b/workspaces/arborist/tap-snapshots/test/place-dep.js.test.cjs @@ -15,7 +15,7 @@ exports[`test/place-dep.js TAP placement tests accept an older transitive depend Array [ Object { "canPlace": null, - "canPlaceSelf": undefined, + "canPlaceSelf": null, "checks": Map {}, "dep": "bar@1.0.1", "edge": "{ node_modules/foo prod bar@1 }", @@ -3553,7 +3553,7 @@ exports[`test/place-dep.js TAP placement tests fail with ERESOLVE on deep peer d Array [ Object { "canPlace": null, - "canPlaceSelf": undefined, + "canPlaceSelf": null, "checks": Map {}, "dep": "b@2.0.0", "edge": "{ ROOT prod b@2 }", @@ -6629,7 +6629,7 @@ exports[`test/place-dep.js TAP placement tests prod dep directly on conflicted p Array [ Object { "canPlace": null, - "canPlaceSelf": undefined, + "canPlaceSelf": null, "checks": Map {}, "dep": "b@2.0.0", "edge": "{ ROOT prod b@2 }", @@ -8136,7 +8136,7 @@ exports[`test/place-dep.js TAP placement tests prod dep directly on conflicted p Array [ Object { "canPlace": null, - "canPlaceSelf": undefined, + "canPlaceSelf": null, "checks": Map {}, "dep": "b@1.0.0", "edge": "{ ROOT prod b@1 }", @@ -10627,7 +10627,7 @@ exports[`test/place-dep.js TAP placement tests upgrade a transitive dependency > Array [ Object { "canPlace": null, - "canPlaceSelf": undefined, + "canPlaceSelf": null, "checks": Map {}, "dep": "bar@1.0.1", "edge": "{ node_modules/foo prod bar@1 }", From a351685c4951b1d9e2ba86bc99e3706688813438 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 16 Nov 2022 10:41:55 -0800 Subject: [PATCH 3/6] deps: move from @npmcli/ci-detect to ci-info (#5858) See https://github.com/watson/ci-info/pull/95 for more context on achieving parity between these two modules. This changes npm to use `ci-info` instead of `@npmcli/ci-detect`. Everything that npm currently flags as a CI environment should still be doing so, so there is no breaking change there. There is going to be a subtle difference in the `ci-name` config, which nothing in npm currently looks at anyways, as well as the ci name that shows up in the default `user-agent` string. Some providers will be slightly different (i.e. circle-ci vs circleci and cirrus vs cirrus-ci) --- DEPENDENCIES.md | 8 +- lib/utils/config/definitions.js | 9 +- lib/utils/update-notifier.js | 4 +- node_modules/.gitignore | 2 +- node_modules/@npmcli/ci-detect/LICENSE | 15 -- node_modules/@npmcli/ci-detect/lib/index.js | 52 ---- node_modules/@npmcli/ci-detect/package.json | 44 ---- node_modules/ci-info/LICENSE | 21 ++ node_modules/ci-info/index.d.ts | 70 ++++++ node_modules/ci-info/index.js | 89 +++++++ node_modules/ci-info/package.json | 37 +++ node_modules/ci-info/vendors.json | 248 ++++++++++++++++++++ package-lock.json | 23 +- package.json | 4 +- scripts/dependency-graph.js | 1 - scripts/npm-cli-repos.txt | 1 - tap-snapshots/test/lib/docs.js.test.cjs | 2 +- test/lib/utils/config/definitions.js | 4 +- test/lib/utils/update-notifier.js | 8 +- workspaces/libnpmexec/lib/index.js | 4 +- workspaces/libnpmexec/lib/run-script.js | 8 +- workspaces/libnpmexec/package.json | 2 +- workspaces/libnpmexec/test/index.js | 14 +- workspaces/libnpmexec/test/run-script.js | 12 +- 24 files changed, 515 insertions(+), 167 deletions(-) delete mode 100644 node_modules/@npmcli/ci-detect/LICENSE delete mode 100644 node_modules/@npmcli/ci-detect/lib/index.js delete mode 100644 node_modules/@npmcli/ci-detect/package.json create mode 100644 node_modules/ci-info/LICENSE create mode 100644 node_modules/ci-info/index.d.ts create mode 100644 node_modules/ci-info/index.js create mode 100644 node_modules/ci-info/package.json create mode 100644 node_modules/ci-info/vendors.json diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 1448db1b9fde5..2187275722624 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -32,7 +32,6 @@ graph LR; libnpmexec-->minify-registry-metadata; libnpmexec-->npm-package-arg; libnpmexec-->npmcli-arborist["@npmcli/arborist"]; - libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"]; libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"]; libnpmexec-->npmcli-run-script["@npmcli/run-script"]; libnpmexec-->npmcli-template-oss["@npmcli/template-oss"]; @@ -113,7 +112,6 @@ graph LR; npm-->npm-registry-fetch; npm-->npm-user-validate; npm-->npmcli-arborist["@npmcli/arborist"]; - npm-->npmcli-ci-detect["@npmcli/ci-detect"]; npm-->npmcli-config["@npmcli/config"]; npm-->npmcli-docs["@npmcli/docs"]; npm-->npmcli-eslint-config["@npmcli/eslint-config"]; @@ -353,11 +351,11 @@ graph LR; libnpmdiff-->tar; libnpmexec-->bin-links; libnpmexec-->chalk; + libnpmexec-->ci-info; libnpmexec-->minify-registry-metadata; libnpmexec-->mkdirp; libnpmexec-->npm-package-arg; libnpmexec-->npmcli-arborist["@npmcli/arborist"]; - libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"]; libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"]; libnpmexec-->npmcli-run-script["@npmcli/run-script"]; libnpmexec-->npmcli-template-oss["@npmcli/template-oss"]; @@ -476,6 +474,7 @@ graph LR; npm-->archy; npm-->cacache; npm-->chalk; + npm-->ci-info; npm-->cli-columns; npm-->cli-table3; npm-->columnify; @@ -519,7 +518,6 @@ graph LR; npm-->npm-registry-fetch; npm-->npm-user-validate; npm-->npmcli-arborist["@npmcli/arborist"]; - npm-->npmcli-ci-detect["@npmcli/ci-detect"]; npm-->npmcli-config["@npmcli/config"]; npm-->npmcli-docs["@npmcli/docs"]; npm-->npmcli-eslint-config["@npmcli/eslint-config"]; @@ -783,4 +781,4 @@ packages higher up the chain. - @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json - @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, promzard - @npmcli/docs, @npmcli/fs, npm-bundled, read-package-json-fast, unique-filename, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, read - - @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, treeverse, minify-registry-metadata, ini, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, npm-audit-report, npm-user-validate + - @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, treeverse, minify-registry-metadata, ini, @npmcli/disparity-colors, mute-stream, npm-audit-report, npm-user-validate diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 245b9170d56fc..f511b1badfe85 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -4,8 +4,7 @@ module.exports = definitions const Definition = require('./definition.js') const { version: npmVersion } = require('../../../package.json') -const ciDetect = require('@npmcli/ci-detect') -const ciName = ciDetect() +const ciInfo = require('ci-info') const querystring = require('querystring') const { isWindows } = require('../is-windows.js') const { join } = require('path') @@ -433,7 +432,7 @@ define('cert', { }) define('ci-name', { - default: ciName || null, + default: ciInfo.name ? ciInfo.name.toLowerCase().split(' ').join('-') : null, defaultDescription: ` The name of the current CI system, or \`null\` when not on a known CI platform. @@ -442,7 +441,7 @@ define('ci-name', { description: ` The name of a continuous integration system. If not set explicitly, npm will detect the current CI environment using the - [\`@npmcli/ci-detect\`](http://npm.im/@npmcli/ci-detect) module. + [\`ci-info\`](http://npm.im/@npmcli/ci-info) module. `, flatten, }) @@ -1597,7 +1596,7 @@ define('production', { }) define('progress', { - default: !ciName, + default: !ciInfo.isCI, defaultDescription: ` \`true\` unless running in a known CI system `, diff --git a/lib/utils/update-notifier.js b/lib/utils/update-notifier.js index 75e944407ffbd..a7eaaca64747f 100644 --- a/lib/utils/update-notifier.js +++ b/lib/utils/update-notifier.js @@ -3,7 +3,7 @@ // Check daily for betas, and weekly otherwise. const pacote = require('pacote') -const ciDetect = require('@npmcli/ci-detect') +const ciInfo = require('ci-info') const semver = require('semver') const chalk = require('chalk') const { promisify } = require('util') @@ -39,7 +39,7 @@ const updateNotifier = async (npm, spec = 'latest') => { // never check for updates in CI, when updating npm already, or opted out if (!npm.config.get('update-notifier') || isGlobalNpmUpdate(npm) || - ciDetect()) { + ciInfo.isCI) { return SKIP } diff --git a/node_modules/.gitignore b/node_modules/.gitignore index b94e4bd99842c..de73c53a67719 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -15,7 +15,6 @@ !/@npmcli/ /@npmcli/* !/@npmcli/arborist -!/@npmcli/ci-detect !/@npmcli/config !/@npmcli/disparity-colors !/@npmcli/fs @@ -55,6 +54,7 @@ !/cacache !/chalk !/chownr +!/ci-info !/cidr-regex !/clean-stack !/cli-columns diff --git a/node_modules/@npmcli/ci-detect/LICENSE b/node_modules/@npmcli/ci-detect/LICENSE deleted file mode 100644 index 19cec97b18468..0000000000000 --- a/node_modules/@npmcli/ci-detect/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@npmcli/ci-detect/lib/index.js b/node_modules/@npmcli/ci-detect/lib/index.js deleted file mode 100644 index 34755c7f166c3..0000000000000 --- a/node_modules/@npmcli/ci-detect/lib/index.js +++ /dev/null @@ -1,52 +0,0 @@ -module.exports = () => - process.env.GERRIT_PROJECT ? 'gerrit' - : process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI ? 'azure-pipelines' - : process.env.BITRISE_IO ? 'bitrise' - : process.env.BUDDY_WORKSPACE_ID ? 'buddy' - : process.env.BUILDKITE ? 'buildkite' - : process.env.CIRRUS_CI ? 'cirrus' - : process.env.GITLAB_CI ? 'gitlab' - : process.env.APPVEYOR ? 'appveyor' - : process.env.CIRCLECI ? 'circle-ci' - : process.env.SEMAPHORE ? 'semaphore' - : process.env.DRONE ? 'drone' - : process.env.DSARI ? 'dsari' - : process.env.GITHUB_ACTION ? 'github-actions' - : process.env.TDDIUM ? 'tddium' - : process.env.SCREWDRIVER ? 'screwdriver' - : process.env.STRIDER ? 'strider' - : process.env.TASKCLUSTER_ROOT_URL ? 'taskcluster' - : process.env.JENKINS_URL ? 'jenkins' - : process.env['bamboo.buildKey'] ? 'bamboo' - : process.env.GO_PIPELINE_NAME ? 'gocd' - : process.env.HUDSON_URL ? 'hudson' - : process.env.WERCKER ? 'wercker' - : process.env.NETLIFY ? 'netlify' - : process.env.NOW_GITHUB_DEPLOYMENT ? 'now-github' - : process.env.GITLAB_DEPLOYMENT ? 'now-gitlab' - : process.env.BITBUCKET_DEPLOYMENT ? 'now-bitbucket' - : process.env.BITBUCKET_BUILD_NUMBER ? 'bitbucket-pipelines' - : process.env.NOW_BUILDER ? 'now' - : process.env.VERCEL_GITHUB_DEPLOYMENT ? 'vercel-github' - : process.env.VERCEL_GITLAB_DEPLOYMENT ? 'vercel-gitlab' - : process.env.VERCEL_BITBUCKET_DEPLOYMENT ? 'vercel-bitbucket' - : process.env.VERCEL_URL ? 'vercel' - : process.env.MAGNUM ? 'magnum' - : process.env.NEVERCODE ? 'nevercode' - : process.env.RENDER ? 'render' - : process.env.SAIL_CI ? 'sail' - : process.env.SHIPPABLE ? 'shippable' - : process.env.TEAMCITY_VERSION ? 'teamcity' - // codeship and a few others - : process.env.CI_NAME ? process.env.CI_NAME - // heroku doesn't set envs other than node in a heroku-specific location - : /\/\.heroku\/node\/bin\/node$/.test(process.env.NODE || '') ? 'heroku' - // test travis after the others, since several CI systems mimic it - : process.env.TRAVIS ? 'travis-ci' - // aws CodeBuild/CodePipeline - : process.env.CODEBUILD_SRC_DIR ? 'aws-codebuild' - : process.env.CI === 'woodpecker' ? 'woodpecker' - : process.env.CI === 'true' || process.env.CI === '1' ? 'custom' - // Google Cloud Build - it sets almost nothing - : process.env.BUILDER_OUTPUT ? 'builder' - : false diff --git a/node_modules/@npmcli/ci-detect/package.json b/node_modules/@npmcli/ci-detect/package.json deleted file mode 100644 index 4be4b65fe671f..0000000000000 --- a/node_modules/@npmcli/ci-detect/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@npmcli/ci-detect", - "version": "3.0.1", - "description": "Detect what kind of CI environment the program is in", - "author": "GitHub Inc.", - "license": "ISC", - "main": "./lib", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.6.2", - "tap": "^16.0.1" - }, - "files": [ - "bin/", - "lib/" - ], - "repository": { - "type": "git", - "url": "https://github.com/npm/ci-detect.git" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.6.2" - } -} diff --git a/node_modules/ci-info/LICENSE b/node_modules/ci-info/LICENSE new file mode 100644 index 0000000000000..2cc7405a823c4 --- /dev/null +++ b/node_modules/ci-info/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2021 Thomas Watson Steen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ci-info/index.d.ts b/node_modules/ci-info/index.d.ts new file mode 100644 index 0000000000000..0572d36ea9eca --- /dev/null +++ b/node_modules/ci-info/index.d.ts @@ -0,0 +1,70 @@ +/** + * Returns a boolean. Will be `true` if the code is running on a CI server, + * otherwise `false`. + * + * Some CI servers not listed here might still trigger the `ci.isCI` + * boolean to be set to `true` if they use certain vendor neutral environment + * variables. In those cases `ci.name` will be `null` and no vendor specific + * boolean will be set to `true`. + */ +export const isCI: boolean; +/** + * Returns a boolean if PR detection is supported for the current CI server. + * Will be `true` if a PR is being tested, otherwise `false`. If PR detection is + * not supported for the current CI server, the value will be `null`. + */ +export const isPR: boolean | null; +/** + * Returns a string containing name of the CI server the code is running on. If + * CI server is not detected, it returns `null`. + * + * Don't depend on the value of this string not to change for a specific vendor. + * If you find your self writing `ci.name === 'Travis CI'`, you most likely want + * to use `ci.TRAVIS` instead. + */ +export const name: string | null; + +export const APPVEYOR: boolean; +export const AZURE_PIPELINES: boolean; +export const APPCIRCLE: boolean; +export const BAMBOO: boolean; +export const BITBUCKET: boolean; +export const BITRISE: boolean; +export const BUDDY: boolean; +export const BUILDKITE: boolean; +export const CIRCLE: boolean; +export const CIRRUS: boolean; +export const CODEBUILD: boolean; +export const CODEMAGIC: boolean; +export const CODEFRESH: boolean; +export const CODESHIP: boolean; +export const DRONE: boolean; +export const DSARI: boolean; +export const EAS: boolean; +export const GERRIT: boolean; +export const GITHUB_ACTIONS: boolean; +export const GITLAB: boolean; +export const GOCD: boolean; +export const GOOGLE_CLOUD_BUILD: boolean; +export const HEROKU: boolean; +export const HUDSON: boolean; +export const JENKINS: boolean; +export const LAYERCI: boolean; +export const MAGNUM: boolean; +export const NETLIFY: boolean; +export const NEVERCODE: boolean; +export const RENDER: boolean; +export const SAIL: boolean; +export const SEMAPHORE: boolean; +export const SCREWDRIVER: boolean; +export const SHIPPABLE: boolean; +export const SOLANO: boolean; +export const STRIDER: boolean; +export const TASKCLUSTER: boolean; +export const TEAMCITY: boolean; +export const TRAVIS: boolean; +export const VERCEL: boolean; +export const APPCENTER: boolean; +export const XCODE_CLOUD: boolean; +export const XCODE_SERVER: boolean; +export const WOODPECKER: boolean; diff --git a/node_modules/ci-info/index.js b/node_modules/ci-info/index.js new file mode 100644 index 0000000000000..e91c518557897 --- /dev/null +++ b/node_modules/ci-info/index.js @@ -0,0 +1,89 @@ +'use strict' + +const vendors = require('./vendors.json') + +const env = process.env + +// Used for testing only +Object.defineProperty(exports, '_vendors', { + value: vendors.map(function (v) { + return v.constant + }) +}) + +exports.name = null +exports.isPR = null + +vendors.forEach(function (vendor) { + const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env] + const isCI = envs.every(function (obj) { + return checkEnv(obj) + }) + + exports[vendor.constant] = isCI + + if (!isCI) { + return + } + + exports.name = vendor.name + + switch (typeof vendor.pr) { + case 'string': + // "pr": "CIRRUS_PR" + exports.isPR = !!env[vendor.pr] + break + case 'object': + if ('env' in vendor.pr) { + // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" } + exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne + } else if ('any' in vendor.pr) { + // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] } + exports.isPR = vendor.pr.any.some(function (key) { + return !!env[key] + }) + } else { + // "pr": { "DRONE_BUILD_EVENT": "pull_request" } + exports.isPR = checkEnv(vendor.pr) + } + break + default: + // PR detection not supported for this vendor + exports.isPR = null + } +}) + +exports.isCI = !!( + env.BUILD_ID || // Jenkins, Cloudbees + env.BUILD_NUMBER || // Jenkins, TeamCity + env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari + env.CI_APP_ID || // Appflow + env.CI_BUILD_ID || // Appflow + env.CI_BUILD_NUMBER || // Appflow + env.CI_NAME || // Codeship and others + env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI + env.RUN_ID || // TaskCluster, dsari + exports.name || + false +) + +function checkEnv (obj) { + // "env": "CIRRUS" + if (typeof obj === 'string') return !!env[obj] + + // "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } + if ('env' in obj) { + // Currently there are no other types, uncomment when there are + // if ('includes' in obj) { + return env[obj.env] && env[obj.env].includes(obj.includes) + // } + } + if ('any' in obj) { + return obj.any.some(function (k) { + return !!env[k] + }) + } + return Object.keys(obj).every(function (k) { + return env[k] === obj[k] + }) +} diff --git a/node_modules/ci-info/package.json b/node_modules/ci-info/package.json new file mode 100644 index 0000000000000..59ab4df86d624 --- /dev/null +++ b/node_modules/ci-info/package.json @@ -0,0 +1,37 @@ +{ + "name": "ci-info", + "version": "3.6.1", + "description": "Get details about the current Continuous Integration environment", + "main": "index.js", + "typings": "index.d.ts", + "author": "Thomas Watson Steen (https://twitter.com/wa7son)", + "license": "MIT", + "repository": "https://github.com/watson/ci-info.git", + "bugs": "https://github.com/watson/ci-info/issues", + "homepage": "https://github.com/watson/ci-info", + "keywords": [ + "ci", + "continuous", + "integration", + "test", + "detect" + ], + "files": [ + "vendors.json", + "index.js", + "index.d.ts", + "CHANGELOG.md" + ], + "scripts": { + "lint:fix": "standard --fix", + "test": "standard && node test.js" + }, + "devDependencies": { + "clear-module": "^4.1.2", + "standard": "^17.0.0", + "tape": "^5.6.1" + }, + "engines": { + "node": ">=8" + } +} diff --git a/node_modules/ci-info/vendors.json b/node_modules/ci-info/vendors.json new file mode 100644 index 0000000000000..29d90c2979fe1 --- /dev/null +++ b/node_modules/ci-info/vendors.json @@ -0,0 +1,248 @@ +[ + { + "name": "Appcircle", + "constant": "APPCIRCLE", + "env": "AC_APPCIRCLE" + }, + { + "name": "AppVeyor", + "constant": "APPVEYOR", + "env": "APPVEYOR", + "pr": "APPVEYOR_PULL_REQUEST_NUMBER" + }, + { + "name": "AWS CodeBuild", + "constant": "CODEBUILD", + "env": "CODEBUILD_BUILD_ARN" + }, + { + "name": "Azure Pipelines", + "constant": "AZURE_PIPELINES", + "env": "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", + "pr": "SYSTEM_PULLREQUEST_PULLREQUESTID" + }, + { + "name": "Bamboo", + "constant": "BAMBOO", + "env": "bamboo_planKey" + }, + { + "name": "Bitbucket Pipelines", + "constant": "BITBUCKET", + "env": "BITBUCKET_COMMIT", + "pr": "BITBUCKET_PR_ID" + }, + { + "name": "Bitrise", + "constant": "BITRISE", + "env": "BITRISE_IO", + "pr": "BITRISE_PULL_REQUEST" + }, + { + "name": "Buddy", + "constant": "BUDDY", + "env": "BUDDY_WORKSPACE_ID", + "pr": "BUDDY_EXECUTION_PULL_REQUEST_ID" + }, + { + "name": "Buildkite", + "constant": "BUILDKITE", + "env": "BUILDKITE", + "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" } + }, + { + "name": "CircleCI", + "constant": "CIRCLE", + "env": "CIRCLECI", + "pr": "CIRCLE_PULL_REQUEST" + }, + { + "name": "Cirrus CI", + "constant": "CIRRUS", + "env": "CIRRUS_CI", + "pr": "CIRRUS_PR" + }, + { + "name": "Codefresh", + "constant": "CODEFRESH", + "env": "CF_BUILD_ID", + "pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] } + }, + { + "name": "Codemagic", + "constant": "CODEMAGIC", + "env": "CM_BUILD_ID", + "pr": "CM_PULL_REQUEST" + }, + { + "name": "Codeship", + "constant": "CODESHIP", + "env": { "CI_NAME": "codeship" } + }, + { + "name": "Drone", + "constant": "DRONE", + "env": "DRONE", + "pr": { "DRONE_BUILD_EVENT": "pull_request" } + }, + { + "name": "dsari", + "constant": "DSARI", + "env": "DSARI" + }, + { + "name": "Expo Application Services", + "constant": "EAS", + "env": "EAS_BUILD" + }, + { + "name": "GitHub Actions", + "constant": "GITHUB_ACTIONS", + "env": "GITHUB_ACTIONS", + "pr": { "GITHUB_EVENT_NAME": "pull_request" } + }, + { + "name": "GitLab CI", + "constant": "GITLAB", + "env": "GITLAB_CI", + "pr": "CI_MERGE_REQUEST_ID" + }, + { + "name": "GoCD", + "constant": "GOCD", + "env": "GO_PIPELINE_LABEL" + }, + { + "name": "Google Cloud Build", + "constant": "GOOGLE_CLOUD_BUILD", + "env": "BUILDER_OUTPUT" + }, + { + "name": "LayerCI", + "constant": "LAYERCI", + "env": "LAYERCI", + "pr": "LAYERCI_PULL_REQUEST" + }, + { + "name": "Gerrit", + "constant": "GERRIT", + "env": "GERRIT_PROJECT" + }, + { + "name": "Heroku", + "constant": "HEROKU", + "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } + }, + { + "name": "Hudson", + "constant": "HUDSON", + "env": "HUDSON_URL" + }, + { + "name": "Jenkins", + "constant": "JENKINS", + "env": ["JENKINS_URL", "BUILD_ID"], + "pr": { "any": ["ghprbPullId", "CHANGE_ID"] } + }, + { + "name": "Magnum CI", + "constant": "MAGNUM", + "env": "MAGNUM" + }, + { + "name": "Netlify CI", + "constant": "NETLIFY", + "env": "NETLIFY", + "pr": { "env": "PULL_REQUEST", "ne": "false" } + }, + { + "name": "Nevercode", + "constant": "NEVERCODE", + "env": "NEVERCODE", + "pr": { "env": "NEVERCODE_PULL_REQUEST", "ne": "false" } + }, + { + "name": "Render", + "constant": "RENDER", + "env": "RENDER", + "pr": { "IS_PULL_REQUEST": "true" } + }, + { + "name": "Sail CI", + "constant": "SAIL", + "env": "SAILCI", + "pr": "SAIL_PULL_REQUEST_NUMBER" + }, + { + "name": "Screwdriver", + "constant": "SCREWDRIVER", + "env": "SCREWDRIVER", + "pr": { "env": "SD_PULL_REQUEST", "ne": "false" } + }, + { + "name": "Semaphore", + "constant": "SEMAPHORE", + "env": "SEMAPHORE", + "pr": "PULL_REQUEST_NUMBER" + }, + { + "name": "Shippable", + "constant": "SHIPPABLE", + "env": "SHIPPABLE", + "pr": { "IS_PULL_REQUEST": "true" } + }, + { + "name": "Solano CI", + "constant": "SOLANO", + "env": "TDDIUM", + "pr": "TDDIUM_PR_ID" + }, + { + "name": "Strider CD", + "constant": "STRIDER", + "env": "STRIDER" + }, + { + "name": "TaskCluster", + "constant": "TASKCLUSTER", + "env": ["TASK_ID", "RUN_ID"] + }, + { + "name": "TeamCity", + "constant": "TEAMCITY", + "env": "TEAMCITY_VERSION" + }, + { + "name": "Travis CI", + "constant": "TRAVIS", + "env": "TRAVIS", + "pr": { "env": "TRAVIS_PULL_REQUEST", "ne": "false" } + }, + { + "name": "Vercel", + "constant": "VERCEL", + "env": { "any": ["NOW_BUILDER", "VERCEL_URL"] } + }, + { + "name": "Visual Studio App Center", + "constant": "APPCENTER", + "env": "APPCENTER_BUILD_ID" + }, + { + "name": "Woodpecker", + "constant": "WOODPECKER", + "env": { "CI": "woodpecker" }, + "pr": { "CI_BUILD_EVENT": "pull_request" } + }, + { + "name": "Xcode Cloud", + "constant": "XCODE_CLOUD", + "env": "CI_XCODE_PROJECT", + "pr": "CI_PULL_REQUEST_NUMBER" + }, + { + "name": "Xcode Server", + "constant": "XCODE_SERVER", + "env": "XCS" + } +] diff --git a/package-lock.json b/package-lock.json index bf2bfaebd42f8..1140ea07457f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", - "@npmcli/ci-detect", "@npmcli/config", "@npmcli/map-workspaces", "@npmcli/package-json", @@ -19,6 +18,7 @@ "archy", "cacache", "chalk", + "ci-info", "cli-columns", "cli-table3", "columnify", @@ -87,7 +87,6 @@ "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^6.1.2", - "@npmcli/ci-detect": "^3.0.1", "@npmcli/config": "^6.1.0", "@npmcli/map-workspaces": "^3.0.0", "@npmcli/package-json": "^3.0.0", @@ -96,6 +95,7 @@ "archy": "~1.0.0", "cacache": "^17.0.2", "chalk": "^4.1.2", + "ci-info": "^3.6.1", "cli-columns": "^4.0.0", "cli-table3": "^0.6.3", "columnify": "^1.6.0", @@ -2079,14 +2079,6 @@ "resolved": "workspaces/arborist", "link": true }, - "node_modules/@npmcli/ci-detect": { - "version": "3.0.1", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/@npmcli/config": { "resolved": "workspaces/config", "link": true @@ -3307,6 +3299,15 @@ "node": ">=10" } }, + "node_modules/ci-info": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.6.1.tgz", + "integrity": "sha512-up5ggbaDqOqJ4UqLKZ2naVkyqSJQgJi5lwD6b6mM748ysrghDBX0bx/qJTUHzw7zu6Mq4gycviSF5hJnwceD8w==", + "inBundle": true, + "engines": { + "node": ">=8" + } + }, "node_modules/cidr-regex": { "version": "3.1.1", "inBundle": true, @@ -15103,9 +15104,9 @@ "license": "ISC", "dependencies": { "@npmcli/arborist": "^6.1.2", - "@npmcli/ci-detect": "^3.0.1", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", + "ci-info": "^3.6.1", "npm-package-arg": "^10.0.0", "npmlog": "^7.0.1", "pacote": "^15.0.2", diff --git a/package.json b/package.json index dedabdd6f9d28..10bf67ee3c4bc 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^6.1.2", - "@npmcli/ci-detect": "^3.0.1", "@npmcli/config": "^6.1.0", "@npmcli/map-workspaces": "^3.0.0", "@npmcli/package-json": "^3.0.0", @@ -67,6 +66,7 @@ "archy": "~1.0.0", "cacache": "^17.0.2", "chalk": "^4.1.2", + "ci-info": "^3.6.1", "cli-columns": "^4.0.0", "cli-table3": "^0.6.3", "columnify": "^1.6.0", @@ -128,7 +128,6 @@ "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", - "@npmcli/ci-detect", "@npmcli/config", "@npmcli/map-workspaces", "@npmcli/package-json", @@ -137,6 +136,7 @@ "archy", "cacache", "chalk", + "ci-info", "cli-columns", "cli-table3", "columnify", diff --git a/scripts/dependency-graph.js b/scripts/dependency-graph.js index e292ce448fe74..2d8a773e03724 100644 --- a/scripts/dependency-graph.js +++ b/scripts/dependency-graph.js @@ -20,7 +20,6 @@ const aliases = { // If we see a bare package with just this name, it's NOT ours const namespaced = [ 'arborist', - 'ci-detect', 'config', 'disparity-colors', 'eslint-config', diff --git a/scripts/npm-cli-repos.txt b/scripts/npm-cli-repos.txt index 75b604fed9011..3f16b74fb23f6 100644 --- a/scripts/npm-cli-repos.txt +++ b/scripts/npm-cli-repos.txt @@ -4,7 +4,6 @@ are-we-there-yet benchmarks bin-links cacache -ci-detect cli cmd-shim config diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 3c6a1b5025989..03913a0453ada 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -758,7 +758,7 @@ npm exec --package yo --package generator-node --call "yo node" The name of a continuous integration system. If not set explicitly, npm will detect the current CI environment using the -[\`@npmcli/ci-detect\`](http://npm.im/@npmcli/ci-detect) module. +[\`ci-info\`](http://npm.im/@npmcli/ci-info) module. #### \`cidr\` diff --git a/test/lib/utils/config/definitions.js b/test/lib/utils/config/definitions.js index da53ac3aea03f..dca584e104833 100644 --- a/test/lib/utils/config/definitions.js +++ b/test/lib/utils/config/definitions.js @@ -731,10 +731,10 @@ YYYY\r t.test('detect CI', t => { const defnNoCI = mockDefs({ - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false, name: null }, }) const defnCIFoo = mockDefs({ - '@npmcli/ci-detect': () => 'foo', + 'ci-info': { isCI: false, name: 'foo' }, }) t.equal(defnNoCI['ci-name'].default, null, 'null when not in CI') t.equal(defnCIFoo['ci-name'].default, 'foo', 'name of CI when in CI') diff --git a/test/lib/utils/update-notifier.js b/test/lib/utils/update-notifier.js index a35886c6ef20a..fa4a04bad9839 100644 --- a/test/lib/utils/update-notifier.js +++ b/test/lib/utils/update-notifier.js @@ -1,5 +1,5 @@ const t = require('tap') -let ciMock = null +let ciMock = {} const flatOptions = { global: false, cache: t.testdir() + '/_cacache' } const MANIFEST_REQUEST = [] @@ -86,7 +86,7 @@ t.afterEach(() => { const runUpdateNotifier = async ({ color = true, ...npmOptions } = {}) => { const _npm = { ...defaultNpm, ...npmOptions, logColor: color } return t.mock('../../../lib/utils/update-notifier.js', { - '@npmcli/ci-detect': () => ciMock, + 'ci-info': ciMock, pacote, fs, })(_npm) @@ -159,9 +159,9 @@ t.test('situations in which we do not notify', t => { t.test('do not update in CI', async t => { t.teardown(() => { - ciMock = null + ciMock = {} }) - ciMock = 'something' + ciMock = { isCI: true, name: 'something' } t.equal(await runUpdateNotifier(), null) t.strictSame(MANIFEST_REQUEST, [], 'no requests for manifests') }) diff --git a/workspaces/libnpmexec/lib/index.js b/workspaces/libnpmexec/lib/index.js index 575f8e6ea4a5e..2d6a7eafc2901 100644 --- a/workspaces/libnpmexec/lib/index.js +++ b/workspaces/libnpmexec/lib/index.js @@ -4,7 +4,7 @@ const { mkdir } = require('fs/promises') const { promisify } = require('util') const Arborist = require('@npmcli/arborist') -const ciDetect = require('@npmcli/ci-detect') +const ciInfo = require('ci-info') const crypto = require('crypto') const log = require('proc-log') const npa = require('npm-package-arg') @@ -242,7 +242,7 @@ const exec = async (opts) => { throw new Error('canceled') } - if (noTTY() || ciDetect()) { + if (noTTY() || ciInfo.isCI) { log.warn('exec', `The following package${ add.length === 1 ? ' was' : 's were' } not found and will be installed: ${ diff --git a/workspaces/libnpmexec/lib/run-script.js b/workspaces/libnpmexec/lib/run-script.js index 2f7b258345faa..ba60395468d62 100644 --- a/workspaces/libnpmexec/lib/run-script.js +++ b/workspaces/libnpmexec/lib/run-script.js @@ -1,5 +1,5 @@ const chalk = require('chalk') -const ciDetect = require('@npmcli/ci-detect') +const ciInfo = require('ci-info') const runScript = require('@npmcli/run-script') const readPackageJson = require('read-package-json-fast') const npmlog = require('npmlog') @@ -44,10 +44,8 @@ const run = async ({ try { if (script === scriptShell) { - const isTTY = !noTTY() - - if (isTTY) { - if (ciDetect()) { + if (!noTTY()) { + if (ciInfo.isCI) { return log.warn('exec', 'Interactive mode disabled in CI environment') } diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index ad37c76328dd3..8f5908859e49e 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -59,9 +59,9 @@ }, "dependencies": { "@npmcli/arborist": "^6.1.2", - "@npmcli/ci-detect": "^3.0.1", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", + "ci-info": "^3.6.1", "npm-package-arg": "^10.0.0", "npmlog": "^7.0.1", "pacote": "^15.0.2", diff --git a/workspaces/libnpmexec/test/index.js b/workspaces/libnpmexec/test/index.js index 739a686aba8c3..269e74c18e793 100644 --- a/workspaces/libnpmexec/test/index.js +++ b/workspaces/libnpmexec/test/index.js @@ -475,7 +475,7 @@ require('fs').writeFileSync(process.argv.slice(2)[0], 'LOCAL PKG')`, fs.chmodSync(executable, 0o775) const mockexec = t.mock('../lib/index.js', { - '@npmcli/ci-detect': () => true, + 'ci-info': { isCI: true }, 'proc-log': { warn (title, msg) { t.fail('should not warn about local file package install') @@ -850,7 +850,7 @@ t.test('prompt, accepts', async t => { const npxCache = resolve(testdir, 'npxCache') t.test('with clearProgress function', async t => { const mockexec = t.mock('../lib/index.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, npmlog: { clearProgress () { t.ok(true, 'should call clearProgress function') @@ -881,7 +881,7 @@ t.test('prompt, accepts', async t => { t.test('without clearProgress function', async t => { const mockexec = t.mock('../lib/index.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, read (opts, cb) { cb(null, 'y') }, @@ -916,7 +916,7 @@ t.test('prompt, refuses', async t => { const npxCache = resolve(testdir, 'npxCache') t.test('with clearProgress function', async t => { const mockexec = t.mock('../lib/index.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, npmlog: { clearProgress () { t.ok(true, 'should call clearProgress function') @@ -955,7 +955,7 @@ t.test('prompt, refuses', async t => { t.test('without clearProgress function', async t => { const mockexec = t.mock('../lib/index.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, read (opts, cb) { cb(null, 'n') }, @@ -1062,7 +1062,7 @@ t.test('no prompt if CI', async t => { const cache = resolve(testdir, 'cache') const npxCache = resolve(testdir, 'npxCache') const mockexec = t.mock('../lib/index.js', { - '@npmcli/ci-detect': () => true, + 'ci-info': { isCI: true }, }) await mockexec({ @@ -1091,7 +1091,7 @@ t.test('no prompt if CI, multiple packages', async t => { const cache = resolve(testdir, 'cache') const npxCache = resolve(testdir, 'npxCache') const mockexec = t.mock('../lib/index.js', { - '@npmcli/ci-detect': () => true, + 'ci-info': { isCI: true }, 'proc-log': { warn (title, msg) { t.equal(title, 'exec', 'should warn exec title') diff --git a/workspaces/libnpmexec/test/run-script.js b/workspaces/libnpmexec/test/run-script.js index 4b1cafa0dec73..d360fc1a2025b 100644 --- a/workspaces/libnpmexec/test/run-script.js +++ b/workspaces/libnpmexec/test/run-script.js @@ -21,7 +21,7 @@ t.test('disable, enable log progress', t => { }), }) const runScript = t.mock('../lib/run-script.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, '@npmcli/run-script': async () => { t.ok('should call run-script') }, @@ -46,7 +46,7 @@ t.test('no package.json', t => { t.plan(1) const runScript = t.mock('../lib/run-script.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, '@npmcli/run-script': async () => { t.ok('should call run-script') }, @@ -60,7 +60,7 @@ t.test('colorized interactive mode msg', async t => { t.plan(2) const runScript = t.mock('../lib/run-script.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, '@npmcli/run-script': async () => { t.ok('should call run-script') }, @@ -83,7 +83,7 @@ t.test('no color interactive mode msg', async t => { t.plan(2) const runScript = t.mock('../lib/run-script.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, '@npmcli/run-script': async () => { t.ok('should call run-script') }, @@ -105,7 +105,7 @@ t.test('no tty', t => { t.plan(1) const runScript = t.mock('../lib/run-script.js', { - '@npmcli/ci-detect': () => false, + 'ci-info': { isCI: false }, '@npmcli/run-script': async () => { t.ok('should call run-script') }, @@ -119,7 +119,7 @@ t.test('ci env', t => { t.plan(2) const runScript = t.mock('../lib/run-script.js', { - '@npmcli/ci-detect': () => true, + 'ci-info': { isCI: true }, '@npmcli/run-script': async () => { throw new Error('should not call run-script') }, From cc0ad2798a3e9d2a25e9b3ac947c0324fa8b40c1 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 16 Nov 2022 11:14:07 -0800 Subject: [PATCH 4/6] fix(npx): properly look for local bins when there are more than one (#5842) --- workspaces/libnpmexec/lib/index.js | 6 ++++-- workspaces/libnpmexec/test/index.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/workspaces/libnpmexec/lib/index.js b/workspaces/libnpmexec/lib/index.js index 2d6a7eafc2901..ea4ff5d547424 100644 --- a/workspaces/libnpmexec/lib/index.js +++ b/workspaces/libnpmexec/lib/index.js @@ -110,7 +110,7 @@ const exec = async (opts) => { return run() } - const needPackageCommandSwap = (args.length > 0) && (packages.length === 0) + let needPackageCommandSwap = (args.length > 0) && (packages.length === 0) // If they asked for a command w/o specifying a package, see if there is a // bin that directly matches that name: // - in the local package itself @@ -126,9 +126,11 @@ const exec = async (opts) => { if (localManifest?.bin?.[args[0]]) { // we have to install the local package into the npx cache so that its // bin links get set up + flatOptions.installLinks = false + // args[0] will exist when the package is installed packages.push(path) yes = true - flatOptions.installLinks = false + needPackageCommandSwap = false } else { const dir = dirname(dirname(localBin)) const localBinPath = await localFileExists(dir, args[0], '/') diff --git a/workspaces/libnpmexec/test/index.js b/workspaces/libnpmexec/test/index.js index 269e74c18e793..c3cdecf66e8d9 100644 --- a/workspaces/libnpmexec/test/index.js +++ b/workspaces/libnpmexec/test/index.js @@ -28,6 +28,7 @@ t.test('bin in local pkg', async t => { const pkg = { name: '@npmcli/local-pkg-bin-test', bin: { + b: 'echo this is something else', a: 'local-bin-test.js', }, } From d9654cffd7024ec2d068147868978fc994d696e4 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 16 Nov 2022 11:15:03 -0800 Subject: [PATCH 5/6] fix: remove unwanted package.json entries (#5861) --- package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package.json b/package.json index 10bf67ee3c4bc..a8acabe3397ea 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,6 @@ "package manager", "package.json" ], - "preferGlobal": true, - "config": { - "publishtest": false - }, "homepage": "https://docs.npmjs.com/", "author": "GitHub Inc.", "repository": { From dc8e6bdd1d9e3416846c4f0624705cb42a7fb067 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 19:16:29 +0000 Subject: [PATCH 6/6] chore: release 9.1.2 --- .release-please-manifest.json | 14 +++++----- CHANGELOG.md | 16 +++++++++++ package-lock.json | 38 +++++++++++++-------------- package.json | 14 +++++----- workspaces/arborist/CHANGELOG.md | 6 +++++ workspaces/arborist/package.json | 2 +- workspaces/libnpmdiff/CHANGELOG.md | 6 +++++ workspaces/libnpmdiff/package.json | 4 +-- workspaces/libnpmexec/CHANGELOG.md | 11 ++++++++ workspaces/libnpmexec/package.json | 4 +-- workspaces/libnpmfund/CHANGELOG.md | 6 +++++ workspaces/libnpmfund/package.json | 4 +-- workspaces/libnpmpack/CHANGELOG.md | 6 +++++ workspaces/libnpmpack/package.json | 4 +-- workspaces/libnpmpublish/CHANGELOG.md | 6 +++++ workspaces/libnpmpublish/package.json | 4 +-- 16 files changed, 101 insertions(+), 44 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7b70cdd152096..aa4f78d56cc5b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,14 +1,14 @@ { - ".": "9.1.1", - "workspaces/arborist": "6.1.2", + ".": "9.1.2", + "workspaces/arborist": "6.1.3", "workspaces/libnpmaccess": "7.0.0", - "workspaces/libnpmdiff": "5.0.3", - "workspaces/libnpmexec": "5.0.3", - "workspaces/libnpmfund": "4.0.3", + "workspaces/libnpmdiff": "5.0.4", + "workspaces/libnpmexec": "5.0.4", + "workspaces/libnpmfund": "4.0.4", "workspaces/libnpmhook": "9.0.0", "workspaces/libnpmorg": "5.0.0", - "workspaces/libnpmpack": "5.0.3", - "workspaces/libnpmpublish": "7.0.3", + "workspaces/libnpmpack": "5.0.4", + "workspaces/libnpmpublish": "7.0.4", "workspaces/libnpmsearch": "6.0.0", "workspaces/libnpmteam": "5.0.0", "workspaces/libnpmversion": "4.0.1", diff --git a/CHANGELOG.md b/CHANGELOG.md index bfc3c26cc637a..b2d1970b4d0e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [9.1.2](https://github.com/npm/cli/compare/v9.1.1...v9.1.2) (2022-11-16) + +### Bug Fixes + +* [`d9654cf`](https://github.com/npm/cli/commit/d9654cffd7024ec2d068147868978fc994d696e4) [#5861](https://github.com/npm/cli/pull/5861) remove unwanted package.json entries (#5861) (@wraithgar) + +### Dependencies + +* [`a351685`](https://github.com/npm/cli/commit/a351685c4951b1d9e2ba86bc99e3706688813438) [#5858](https://github.com/npm/cli/pull/5858) move from @npmcli/ci-detect to ci-info (#5858) +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3): `@npmcli/arborist@6.1.3` +* [Workspace](https://github.com/npm/cli/compare/libnpmdiff-v5.0.3...libnpmdiff-v5.0.4): `libnpmdiff@5.0.4` +* [Workspace](https://github.com/npm/cli/compare/libnpmexec-v5.0.3...libnpmexec-v5.0.4): `libnpmexec@5.0.4` +* [Workspace](https://github.com/npm/cli/compare/libnpmfund-v4.0.3...libnpmfund-v4.0.4): `libnpmfund@4.0.4` +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.3...libnpmpack-v5.0.4): `libnpmpack@5.0.4` +* [Workspace](https://github.com/npm/cli/compare/libnpmpublish-v7.0.3...libnpmpublish-v7.0.4): `libnpmpublish@7.0.4` + ## [9.1.1](https://github.com/npm/cli/compare/v9.1.0...v9.1.1) (2022-11-09) ### Documentation diff --git a/package-lock.json b/package-lock.json index 1140ea07457f5..350ea7a5b3afa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "npm", - "version": "9.1.1", + "version": "9.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "npm", - "version": "9.1.1", + "version": "9.1.2", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -86,7 +86,7 @@ ], "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/config": "^6.1.0", "@npmcli/map-workspaces": "^3.0.0", "@npmcli/package-json": "^3.0.0", @@ -109,13 +109,13 @@ "is-cidr": "^4.0.2", "json-parse-even-better-errors": "^3.0.0", "libnpmaccess": "^7.0.0", - "libnpmdiff": "^5.0.3", - "libnpmexec": "^5.0.3", - "libnpmfund": "^4.0.3", + "libnpmdiff": "^5.0.4", + "libnpmexec": "^5.0.4", + "libnpmfund": "^4.0.4", "libnpmhook": "^9.0.0", "libnpmorg": "^5.0.0", - "libnpmpack": "^5.0.3", - "libnpmpublish": "^7.0.3", + "libnpmpack": "^5.0.4", + "libnpmpublish": "^7.0.4", "libnpmsearch": "^6.0.0", "libnpmteam": "^5.0.0", "libnpmversion": "^4.0.1", @@ -14983,7 +14983,7 @@ }, "workspaces/arborist": { "name": "@npmcli/arborist", - "version": "6.1.2", + "version": "6.1.3", "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -15077,10 +15077,10 @@ } }, "workspaces/libnpmdiff": { - "version": "5.0.3", + "version": "5.0.4", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", @@ -15100,10 +15100,10 @@ } }, "workspaces/libnpmexec": { - "version": "5.0.3", + "version": "5.0.4", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", "ci-info": "^3.6.1", @@ -15129,10 +15129,10 @@ } }, "workspaces/libnpmfund": { - "version": "4.0.3", + "version": "4.0.4", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.2" + "@npmcli/arborist": "^6.1.3" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", @@ -15179,10 +15179,10 @@ } }, "workspaces/libnpmpack": { - "version": "5.0.3", + "version": "5.0.4", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/run-script": "^6.0.0", "npm-package-arg": "^10.0.0", "pacote": "^15.0.2" @@ -15199,7 +15199,7 @@ } }, "workspaces/libnpmpublish": { - "version": "7.0.3", + "version": "7.0.4", "license": "ISC", "dependencies": { "normalize-package-data": "^5.0.0", @@ -15211,7 +15211,7 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/template-oss": "4.10.0", - "libnpmpack": "^5.0.3", + "libnpmpack": "^5.0.4", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", "tap": "^16.0.1" diff --git a/package.json b/package.json index a8acabe3397ea..65042e523136a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "9.1.1", + "version": "9.1.2", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -53,7 +53,7 @@ }, "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/config": "^6.1.0", "@npmcli/map-workspaces": "^3.0.0", "@npmcli/package-json": "^3.0.0", @@ -76,13 +76,13 @@ "is-cidr": "^4.0.2", "json-parse-even-better-errors": "^3.0.0", "libnpmaccess": "^7.0.0", - "libnpmdiff": "^5.0.3", - "libnpmexec": "^5.0.3", - "libnpmfund": "^4.0.3", + "libnpmdiff": "^5.0.4", + "libnpmexec": "^5.0.4", + "libnpmfund": "^4.0.4", "libnpmhook": "^9.0.0", "libnpmorg": "^5.0.0", - "libnpmpack": "^5.0.3", - "libnpmpublish": "^7.0.3", + "libnpmpack": "^5.0.4", + "libnpmpublish": "^7.0.4", "libnpmsearch": "^6.0.0", "libnpmteam": "^5.0.0", "libnpmversion": "^4.0.1", diff --git a/workspaces/arborist/CHANGELOG.md b/workspaces/arborist/CHANGELOG.md index 1e74c11923202..b69684f80d171 100644 --- a/workspaces/arborist/CHANGELOG.md +++ b/workspaces/arborist/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [6.1.3](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3) (2022-11-16) + +### Bug Fixes + +* [`3f13818`](https://github.com/npm/cli/commit/3f1381898ad6c8a477d32765d7304dd55a2c8c9d) [#5859](https://github.com/npm/cli/pull/5859) refactor / inline single use code (#5859) (@wraithgar) + ## [6.1.2](https://github.com/npm/cli/compare/arborist-v6.1.1...arborist-v6.1.2) (2022-11-09) ### Dependencies diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json index 14f8ae33f260f..91d9f60c8d205 100644 --- a/workspaces/arborist/package.json +++ b/workspaces/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "6.1.2", + "version": "6.1.3", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", diff --git a/workspaces/libnpmdiff/CHANGELOG.md b/workspaces/libnpmdiff/CHANGELOG.md index 40f783c57efde..6eb0186cd241a 100644 --- a/workspaces/libnpmdiff/CHANGELOG.md +++ b/workspaces/libnpmdiff/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [5.0.4](https://github.com/npm/cli/compare/libnpmdiff-v5.0.3...libnpmdiff-v5.0.4) (2022-11-16) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3): `@npmcli/arborist@6.1.3` + ## [5.0.3](https://github.com/npm/cli/compare/libnpmdiff-v5.0.2...libnpmdiff-v5.0.3) (2022-11-09) ### Dependencies diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index 5e998399f6844..5728476a18578 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "5.0.3", + "version": "5.0.4", "description": "The registry diff", "repository": { "type": "git", @@ -47,7 +47,7 @@ "tap": "^16.0.1" }, "dependencies": { - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", diff --git a/workspaces/libnpmexec/CHANGELOG.md b/workspaces/libnpmexec/CHANGELOG.md index 7cbe7d1dbbfd5..d54a544b5cc04 100644 --- a/workspaces/libnpmexec/CHANGELOG.md +++ b/workspaces/libnpmexec/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [5.0.4](https://github.com/npm/cli/compare/libnpmexec-v5.0.3...libnpmexec-v5.0.4) (2022-11-16) + +### Bug Fixes + +* [`cc0ad27`](https://github.com/npm/cli/commit/cc0ad2798a3e9d2a25e9b3ac947c0324fa8b40c1) [#5842](https://github.com/npm/cli/pull/5842) npx: properly look for local bins when there are more than one (#5842) (@wraithgar) + +### Dependencies + +* [`a351685`](https://github.com/npm/cli/commit/a351685c4951b1d9e2ba86bc99e3706688813438) [#5858](https://github.com/npm/cli/pull/5858) move from @npmcli/ci-detect to ci-info (#5858) +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3): `@npmcli/arborist@6.1.3` + ## [5.0.3](https://github.com/npm/cli/compare/libnpmexec-v5.0.2...libnpmexec-v5.0.3) (2022-11-09) ### Bug Fixes diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index 8f5908859e49e..660e8f96620ad 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "5.0.3", + "version": "5.0.4", "files": [ "bin/", "lib/" @@ -58,7 +58,7 @@ "tap": "^16.0.1" }, "dependencies": { - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", "ci-info": "^3.6.1", diff --git a/workspaces/libnpmfund/CHANGELOG.md b/workspaces/libnpmfund/CHANGELOG.md index 4889150836b7e..06b757c833fee 100644 --- a/workspaces/libnpmfund/CHANGELOG.md +++ b/workspaces/libnpmfund/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [4.0.4](https://github.com/npm/cli/compare/libnpmfund-v4.0.3...libnpmfund-v4.0.4) (2022-11-16) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3): `@npmcli/arborist@6.1.3` + ## [4.0.3](https://github.com/npm/cli/compare/libnpmfund-v4.0.2...libnpmfund-v4.0.3) (2022-11-09) ### Dependencies diff --git a/workspaces/libnpmfund/package.json b/workspaces/libnpmfund/package.json index 5d348d84c892d..61324e2b3e8ff 100644 --- a/workspaces/libnpmfund/package.json +++ b/workspaces/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "4.0.3", + "version": "4.0.4", "main": "lib/index.js", "files": [ "bin/", @@ -46,7 +46,7 @@ "tap": "^16.0.1" }, "dependencies": { - "@npmcli/arborist": "^6.1.2" + "@npmcli/arborist": "^6.1.3" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" diff --git a/workspaces/libnpmpack/CHANGELOG.md b/workspaces/libnpmpack/CHANGELOG.md index 1da3688596da1..f8df27b8857ab 100644 --- a/workspaces/libnpmpack/CHANGELOG.md +++ b/workspaces/libnpmpack/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [5.0.4](https://github.com/npm/cli/compare/libnpmpack-v5.0.3...libnpmpack-v5.0.4) (2022-11-16) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.1.2...arborist-v6.1.3): `@npmcli/arborist@6.1.3` + ## [5.0.3](https://github.com/npm/cli/compare/libnpmpack-v5.0.2...libnpmpack-v5.0.3) (2022-11-09) ### Dependencies diff --git a/workspaces/libnpmpack/package.json b/workspaces/libnpmpack/package.json index e2dac34457dde..1c2eff2465e98 100644 --- a/workspaces/libnpmpack/package.json +++ b/workspaces/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "5.0.3", + "version": "5.0.4", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -36,7 +36,7 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^6.1.2", + "@npmcli/arborist": "^6.1.3", "@npmcli/run-script": "^6.0.0", "npm-package-arg": "^10.0.0", "pacote": "^15.0.2" diff --git a/workspaces/libnpmpublish/CHANGELOG.md b/workspaces/libnpmpublish/CHANGELOG.md index 7b27afdf3b925..c19bafd2265ea 100644 --- a/workspaces/libnpmpublish/CHANGELOG.md +++ b/workspaces/libnpmpublish/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [7.0.4](https://github.com/npm/cli/compare/libnpmpublish-v7.0.3...libnpmpublish-v7.0.4) (2022-11-16) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.3...libnpmpack-v5.0.4): `libnpmpack@5.0.4` + ## [7.0.3](https://github.com/npm/cli/compare/libnpmpublish-v7.0.2...libnpmpublish-v7.0.3) (2022-11-09) ### Dependencies diff --git a/workspaces/libnpmpublish/package.json b/workspaces/libnpmpublish/package.json index cb521a0c26270..5445ac14b76fa 100644 --- a/workspaces/libnpmpublish/package.json +++ b/workspaces/libnpmpublish/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "7.0.3", + "version": "7.0.4", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", @@ -26,7 +26,7 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/template-oss": "4.10.0", - "libnpmpack": "^5.0.3", + "libnpmpack": "^5.0.4", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", "tap": "^16.0.1"