Skip to content

Commit

Permalink
Merge branch 'main' into kc/fix-npm-marks-wrong-files-as-executables
Browse files Browse the repository at this point in the history
  • Loading branch information
kchindam-infy committed Dec 9, 2024
2 parents 5efc3ef + bf1f60f commit c2483e5
Show file tree
Hide file tree
Showing 20 changed files with 567 additions and 372 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,17 @@ jobs:
os: macos-13
shell: bash
node-version:
- 18.17.0
- 18.x
- 20.5.0
- 20.17.0
- 20.x
- 22.9.0
- 22.x
exclude:
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.5.0
node-version: 20.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.9.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.x
runs-on: ${{ matrix.platform.os }}
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,17 @@ jobs:
os: macos-13
shell: bash
node-version:
- 18.17.0
- 18.x
- 20.5.0
- 20.17.0
- 20.x
- 22.9.0
- 22.x
exclude:
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 18.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.5.0
node-version: 20.17.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 20.x
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.9.0
- platform: { name: macOS, os: macos-13, shell: bash }
node-version: 22.x
runs-on: ${{ matrix.platform.os }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "19.0.1"
".": "21.0.0"
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## [21.0.0](https://github.com/npm/pacote/compare/v20.0.0...v21.0.0) (2024-11-25)
### ⚠️ BREAKING CHANGES
* `bun.lockb` files are now included in the strict ignore list during packing
* this module is now compatible with the following node versions: ^20.17.0 || >=22.9.0
### Bug Fixes
* [`844dc08`](https://github.com/npm/pacote/commit/844dc08895a16f67573f9d24eab092a32b77e3a3) update node engines to ^20.17.0 || >=22.9.0 (#414) (@wraithgar)
### Dependencies
* [`2cb6fa7`](https://github.com/npm/pacote/commit/2cb6fa7ecf8016776077ae76651aaf5e188715e5) [#415](https://github.com/npm/pacote/pull/415) `[email protected]` (#415)
* [`47b928c`](https://github.com/npm/pacote/commit/47b928ccefe1f3fc450e4d7df5058bac8a6090f6) [#412](https://github.com/npm/pacote/pull/412) replace node builtin rmSync with rimraf (#412) (@mbtools)
### Chores
* [`b6f35a2`](https://github.com/npm/pacote/commit/b6f35a20be8baf7552c63c8255b33937066a1f06) [#402](https://github.com/npm/pacote/pull/402) bump @npmcli/arborist from 7.5.4 to 8.0.0 (#402) (@dependabot[bot])
* [`1ef54ba`](https://github.com/npm/pacote/commit/1ef54ba08b37fe4d83786d6de70f7a93917d3b6f) [#408](https://github.com/npm/pacote/pull/408) support tests on win32 (#408) (@mbtools)
* [`555b000`](https://github.com/npm/pacote/commit/555b00080f608468fd9219b77e6b24570e98caa2) [#401](https://github.com/npm/pacote/pull/401) bump @npmcli/template-oss from 4.23.3 to 4.23.4 (#401) (@dependabot[bot], @npm-cli-bot)

## [20.0.0](https://github.com/npm/pacote/compare/v19.0.1...v20.0.0) (2024-10-17)
### ⚠️ BREAKING CHANGES
* honors `ignoreScripts` property within options
### Bug Fixes
* [`f27af63`](https://github.com/npm/pacote/commit/f27af6334daa0a51af547f1aef64035d4bebd359) [#407](https://github.com/npm/pacote/pull/407) honors `ignoreScripts` option to prevent `prepare` lifecycle script (@reggi)

## [19.0.1](https://github.com/npm/pacote/compare/v19.0.0...v19.0.1) (2024-10-15)
### Bug Fixes
* [`cbf94e8`](https://github.com/npm/pacote/commit/cbf94e8b0486e80f8f2e4c9ed7c7d18c3282096b) [#389](https://github.com/npm/pacote/pull/389) prepare script respects scriptshell config (#389) (@milaninfy)
Expand Down
3 changes: 3 additions & 0 deletions lib/dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class DirFetcher extends Fetcher {
if (!mani.scripts || !mani.scripts.prepare) {
return
}
if (this.opts.ignoreScripts) {
return
}

// we *only* run prepare.
// pre/post-pack is run by the npm CLI for publish and pack,
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pacote",
"version": "19.0.1",
"version": "21.0.0",
"description": "JavaScript package downloader",
"author": "GitHub Inc.",
"bin": {
Expand All @@ -26,13 +26,14 @@
]
},
"devDependencies": {
"@npmcli/arborist": "^7.1.0",
"@npmcli/arborist": "^8.0.0",
"@npmcli/eslint-config": "^5.0.0",
"@npmcli/template-oss": "4.23.3",
"@npmcli/template-oss": "4.23.4",
"hosted-git-info": "^8.0.0",
"mutate-fs": "^2.1.1",
"nock": "^13.2.4",
"npm-registry-mock": "^1.3.2",
"rimraf": "^6.0.1",
"tap": "^16.0.1"
},
"files": [
Expand All @@ -54,7 +55,7 @@
"fs-minipass": "^3.0.0",
"minipass": "^7.0.2",
"npm-package-arg": "^12.0.0",
"npm-packlist": "^9.0.0",
"npm-packlist": "^10.0.0",
"npm-pick-manifest": "^10.0.0",
"npm-registry-fetch": "^18.0.0",
"proc-log": "^5.0.0",
Expand All @@ -64,15 +65,15 @@
"tar": "^6.1.11"
},
"engines": {
"node": "^18.17.0 || >=20.5.0"
"node": "^20.17.0 || >=22.9.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/npm/pacote.git"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.23.3",
"version": "4.23.4",
"windowsCI": false,
"publish": "true"
}
Expand Down
40 changes: 20 additions & 20 deletions tap-snapshots/test/dir.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`test/dir.js TAP basic > extract 1`] = `
Object {
"from": "file:test/fixtures/abbrev",
"integrity": "{integrity}",
"resolved": "\${CWD}/test/fixtures/abbrev",
"resolved": "{CWD}/test/fixtures/abbrev",
}
`

Expand All @@ -18,7 +18,7 @@ Object {
"_from": "file:test/fixtures/abbrev",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/abbrev",
"_resolved": "{CWD}/test/fixtures/abbrev",
"author": "Isaac Z. Schlueter <[email protected]>",
"description": "Like ruby's abbrev module, but in js",
"devDependencies": Object {
Expand Down Expand Up @@ -76,15 +76,15 @@ Object {
"_from": "file:test/fixtures/abbrev",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/abbrev",
"_resolved": "{CWD}/test/fixtures/abbrev",
"author": "Isaac Z. Schlueter <[email protected]>",
"description": "Like ruby's abbrev module, but in js",
"devDependencies": Object {
"tap": "^10.1",
},
"dist": Object {
"integrity": null,
"tarball": "file:\${CWD}/test/fixtures/abbrev",
"tarball": "file:{CWD}/test/fixtures/abbrev",
},
"files": Array [
"abbrev.js",
Expand All @@ -110,7 +110,7 @@ Object {
"_from": "file:test/fixtures/abbrev",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/abbrev",
"_resolved": "{CWD}/test/fixtures/abbrev",
"author": "Isaac Z. Schlueter <[email protected]>",
"description": "Like ruby's abbrev module, but in js",
"devDependencies": Object {
Expand Down Expand Up @@ -144,15 +144,15 @@ Object {
"_from": "file:test/fixtures/abbrev",
"_id": "[email protected]",
"_integrity": "sha512-whatever-this-is-only-checked-if-we-extract-it",
"_resolved": "\${CWD}/test/fixtures/abbrev",
"_resolved": "{CWD}/test/fixtures/abbrev",
"author": "Isaac Z. Schlueter <[email protected]>",
"description": "Like ruby's abbrev module, but in js",
"devDependencies": Object {
"tap": "^10.1",
},
"dist": Object {
"integrity": "{integrity}",
"tarball": "file:\${CWD}/test/fixtures/abbrev",
"tarball": "file:{CWD}/test/fixtures/abbrev",
},
"files": Array [
"abbrev.js",
Expand All @@ -177,15 +177,15 @@ exports[`test/dir.js TAP make bins executable > results of unpack 1`] = `
Object {
"from": "file:test/fixtures/bin-object",
"integrity": "{integrity}",
"resolved": "\${CWD}/test/fixtures/bin-object",
"resolved": "{CWD}/test/fixtures/bin-object",
}
`

exports[`test/dir.js TAP responds to foregroundScripts: true > extract 1`] = `
Object {
"from": "file:test/fixtures/prepare-script",
"integrity": "{integrity}",
"resolved": "\${CWD}/test/fixtures/prepare-script",
"resolved": "{CWD}/test/fixtures/prepare-script",
}
`

Expand All @@ -202,7 +202,7 @@ Object {
"_from": "file:test/fixtures/prepare-script",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/prepare-script",
"_resolved": "{CWD}/test/fixtures/prepare-script",
"devDependencies": Object {
"abbrev": "^1.1.1",
},
Expand All @@ -227,13 +227,13 @@ Object {
"_from": "file:test/fixtures/prepare-script",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/prepare-script",
"_resolved": "{CWD}/test/fixtures/prepare-script",
"devDependencies": Object {
"abbrev": "^1.1.1",
},
"dist": Object {
"integrity": null,
"tarball": "file:\${CWD}/test/fixtures/prepare-script",
"tarball": "file:{CWD}/test/fixtures/prepare-script",
},
"license": "ISC",
"main": "index.js",
Expand All @@ -251,7 +251,7 @@ exports[`test/dir.js TAP with prepare script > extract 1`] = `
Object {
"from": "file:test/fixtures/prepare-script",
"integrity": "{integrity}",
"resolved": "\${CWD}/test/fixtures/prepare-script",
"resolved": "{CWD}/test/fixtures/prepare-script",
}
`

Expand All @@ -268,7 +268,7 @@ Object {
"_from": "file:test/fixtures/prepare-script",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/prepare-script",
"_resolved": "{CWD}/test/fixtures/prepare-script",
"devDependencies": Object {
"abbrev": "^1.1.1",
},
Expand All @@ -293,13 +293,13 @@ Object {
"_from": "file:test/fixtures/prepare-script",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/prepare-script",
"_resolved": "{CWD}/test/fixtures/prepare-script",
"devDependencies": Object {
"abbrev": "^1.1.1",
},
"dist": Object {
"integrity": null,
"tarball": "file:\${CWD}/test/fixtures/prepare-script",
"tarball": "file:{CWD}/test/fixtures/prepare-script",
},
"license": "ISC",
"main": "index.js",
Expand All @@ -317,7 +317,7 @@ exports[`test/dir.js TAP with prepare script with scriptshell configuration > ex
Object {
"from": "file:test/fixtures/prepare-script",
"integrity": "{integrity}",
"resolved": "\${CWD}/test/fixtures/prepare-script",
"resolved": "{CWD}/test/fixtures/prepare-script",
}
`

Expand All @@ -334,7 +334,7 @@ Object {
"_from": "file:test/fixtures/prepare-script",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/prepare-script",
"_resolved": "{CWD}/test/fixtures/prepare-script",
"devDependencies": Object {
"abbrev": "^1.1.1",
},
Expand All @@ -359,13 +359,13 @@ Object {
"_from": "file:test/fixtures/prepare-script",
"_id": "[email protected]",
"_integrity": null,
"_resolved": "\${CWD}/test/fixtures/prepare-script",
"_resolved": "{CWD}/test/fixtures/prepare-script",
"devDependencies": Object {
"abbrev": "^1.1.1",
},
"dist": Object {
"integrity": null,
"tarball": "file:\${CWD}/test/fixtures/prepare-script",
"tarball": "file:{CWD}/test/fixtures/prepare-script",
},
"license": "ISC",
"main": "index.js",
Expand Down
Loading

0 comments on commit c2483e5

Please sign in to comment.