-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: packing the same file twice during publish (#7250)
close #6997
- Loading branch information
Showing
20 changed files
with
838 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@pnpm/fs.packlist": major | ||
--- | ||
|
||
Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@pnpm/plugin-commands-publishing": patch | ||
"@pnpm/plugin-commands-patching": patch | ||
"@pnpm/directory-fetcher": patch | ||
"pnpm": patch | ||
--- | ||
|
||
`pnpm publish` should not pack the same file twice sometimes [#6997](https://github.com/pnpm/pnpm/issues/6997). | ||
|
||
The fix was to update `npm-packlist` to the latest version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,7 @@ | |
"noproxy", | ||
"nosystem", | ||
"nothrow", | ||
"npmcli", | ||
"npmignore", | ||
"npmjs", | ||
"ofjergrg", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# @pnpm/fs.packlist | ||
|
||
> Get a list of the files to add from a directory into an npm package | ||
<!--@shields('npm')--> | ||
[![npm version](https://img.shields.io/npm/v/packlist.svg)](https://www.npmjs.com/package/@pnpm/fs.packlist) | ||
<!--/@--> | ||
|
||
## Installation | ||
|
||
```sh | ||
pnpm add @pnpm/fs.packlist | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
const { packlist } = require('path') | ||
|
||
const files = packlist('/package-dir') | ||
``` | ||
|
||
## License | ||
|
||
MIT © [Zoltan Kochan](https://www.kochan.io) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "@pnpm/fs.packlist", | ||
"version": "0.0.0", | ||
"description": "Get a list of the files to add from a directory into an npm package", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib", | ||
"!*.map" | ||
], | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
"lint": "eslint \"src/**/*.ts\"", | ||
"prepublishOnly": "pnpm run compile", | ||
"compile": "tsc --build && pnpm run lint --fix", | ||
"test": "pnpm run compile" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/main/fs/packlist", | ||
"keywords": [ | ||
"pnpm8" | ||
], | ||
"engines": { | ||
"node": ">=16.14" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/pnpm/issues" | ||
}, | ||
"homepage": "https://github.com/pnpm/pnpm/blob/main/fs/packlist#readme", | ||
"dependencies": { | ||
"@npmcli/arborist": "7.2.0", | ||
"npm-packlist": "^8.0.0" | ||
}, | ||
"funding": "https://opencollective.com/pnpm", | ||
"devDependencies": { | ||
"@pnpm/fs.packlist": "workspace:*", | ||
"@types/npm-packlist": "^7.0.2", | ||
"@types/npmcli__arborist": "5.6.4" | ||
}, | ||
"exports": { | ||
".": "./lib/index.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Arborist from '@npmcli/arborist' | ||
import npmPacklist from 'npm-packlist' | ||
|
||
export async function packlist (pkgDir: string) { | ||
const arborist = new Arborist(({ path: pkgDir })) | ||
const tree = await arborist.loadActual() | ||
return npmPacklist(tree) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "@pnpm/tsconfig", | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"rootDir": "src" | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"../../__typings__/**/*.d.ts" | ||
], | ||
"references": [], | ||
"composite": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
"src/**/*.ts", | ||
"test/**/*.ts", | ||
"../../__typings__/**/*.d.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.