@pnpm/fs.packlist 1100.0.1 → 1100.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +9 -3
- package/package.json +8 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @pnpm/fs.packlist
|
|
2
|
+
|
|
3
|
+
## 1100.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `pnpm pack` now respects workspace-root `.npmignore` and `.gitignore` files when packing workspace packages.
|
|
8
|
+
|
|
9
|
+
## 1100.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- dd8d5d7: Fix `pnpm pack` not bundling dependencies listed in `bundleDependencies` (or `bundledDependencies`). The npm-packlist upgrade in pnpm 11 changed its API to require the caller to pre-populate the dependency tree, which the wrapper was not doing — `bundleDependencies` were silently dropped from the tarball [#11519](https://github.com/pnpm/pnpm/issues/11519).
|
|
14
|
+
|
|
15
|
+
## 1001.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- 491a84f: This package is now pure ESM.
|
|
20
|
+
- 7d2fd48: Node.js v18, 19, 20, and 21 support discontinued.
|
|
21
|
+
|
|
22
|
+
## 2.0.0
|
|
23
|
+
|
|
24
|
+
### Major Changes
|
|
25
|
+
|
|
26
|
+
- 43cdd87: Node.js v16 support dropped. Use at least Node.js v18.12.
|
|
27
|
+
|
|
28
|
+
## 1.0.3
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 9fb45d0fc: `pnpm publish` should pack "main" file or "bin" files defined in "publishConfig" [#4195](https://github.com/pnpm/pnpm/issues/4195).
|
|
33
|
+
|
|
34
|
+
## 1.0.2
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- 74432d605: Downgraded `npm-packlist` because the newer version significantly slows down the installation of local directory dependencies, making it unbearably slow.
|
|
39
|
+
|
|
40
|
+
`npm-packlist` was upgraded in [this PR](https://github.com/pnpm/pnpm/pull/7250) to fix [#6997](https://github.com/pnpm/pnpm/issues/6997). We added our own file deduplication to fix the issue of duplicate file entries.
|
|
41
|
+
|
|
42
|
+
## 1.0.1
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- c7f1359b6: After upgrading one of our dependencies, we started to sometimes have an error on publish. We have forked `@npmcli/arborist` to patch it with a fix [#7269](https://github.com/pnpm/pnpm/pull/7269).
|
|
47
|
+
|
|
48
|
+
## 1.0.0
|
|
49
|
+
|
|
50
|
+
### Major Changes
|
|
51
|
+
|
|
52
|
+
- 500363647: Initial release.
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import util from 'node:util';
|
|
4
|
+
import { isSubdir } from 'is-subdir';
|
|
4
5
|
import npmPacklist from 'npm-packlist';
|
|
5
6
|
export async function packlist(pkgDir, opts) {
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const resolvedPkgDir = path.resolve(pkgDir);
|
|
8
|
+
const workspaceDir = opts?.workspaceDir == null ? undefined : path.resolve(opts.workspaceDir);
|
|
9
|
+
const pkg = opts?.manifest ?? readPackageJson(resolvedPkgDir);
|
|
10
|
+
const tree = buildRootTree(resolvedPkgDir, pkg);
|
|
11
|
+
const packlistOpts = workspaceDir != null && workspaceDir !== resolvedPkgDir && isSubdir(workspaceDir, resolvedPkgDir)
|
|
12
|
+
? { prefix: workspaceDir, workspaces: [resolvedPkgDir] }
|
|
13
|
+
: undefined;
|
|
14
|
+
const files = await npmPacklist(tree, packlistOpts);
|
|
9
15
|
return files.map((file) => file.replace(/^\.[/\\]/, ''));
|
|
10
16
|
}
|
|
11
17
|
function buildRootTree(pkgDir, pkg) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/fs.packlist",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.2",
|
|
4
4
|
"description": "Get a list of the files to add from a directory into an npm package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
],
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"funding": "https://opencollective.com/pnpm",
|
|
11
|
-
"repository":
|
|
12
|
-
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/pnpm/pnpm/tree/main/pnpm11/fs/packlist"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/fs/packlist#readme",
|
|
13
16
|
"bugs": {
|
|
14
17
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
15
18
|
},
|
|
@@ -24,10 +27,11 @@
|
|
|
24
27
|
"!*.map"
|
|
25
28
|
],
|
|
26
29
|
"dependencies": {
|
|
30
|
+
"is-subdir": "^2.0.0",
|
|
27
31
|
"npm-packlist": "10.0.4"
|
|
28
32
|
},
|
|
29
33
|
"devDependencies": {
|
|
30
|
-
"@pnpm/fs.packlist": "1100.0.
|
|
34
|
+
"@pnpm/fs.packlist": "1100.0.2"
|
|
31
35
|
},
|
|
32
36
|
"engines": {
|
|
33
37
|
"node": ">=22.13"
|