@pnpm/fs.packlist 1100.0.10 → 1100.0.12
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 +14 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +17 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @pnpm/fs.packlist
|
|
2
2
|
|
|
3
|
+
## 1100.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Relative local paths in root `overrides` now resolve from the workspace root when each project has its own lockfile [#17691](https://github.com/pnpm/pnpm/issues/17691).
|
|
8
|
+
|
|
9
|
+
Installing a local directory dependency no longer fails when another project's install is writing a lockfile in that directory.
|
|
10
|
+
|
|
11
|
+
## 1100.0.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- `pnpm pack` and `pnpm publish` now always include the binary file declared by a string `bin` field in `package.json`, even when `files` or `.npmignore` would otherwise exclude it.
|
|
16
|
+
|
|
3
17
|
## 1100.0.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A temporary file pnpm writes next to `pnpm-lock.yaml` and renames over it.
|
|
3
|
+
* Another project's install can create and remove it while a package root is
|
|
4
|
+
* walked, so it is never part of the package.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isLockfileStagingFile(fileName: string): boolean;
|
|
1
7
|
export interface PacklistOptions {
|
|
2
8
|
manifest?: Record<string, unknown>;
|
|
3
9
|
workspaceDir?: string;
|
package/lib/index.js
CHANGED
|
@@ -19,6 +19,9 @@ const ALTERNATE_MANIFEST_NAMES = ['package.yaml', 'package.json5'];
|
|
|
19
19
|
*/
|
|
20
20
|
class PackWalker extends npmPacklist.Walker {
|
|
21
21
|
onReaddir(entries) {
|
|
22
|
+
if (this.isPackage) {
|
|
23
|
+
entries = entries.filter((entry) => !isLockfileStagingFile(entry));
|
|
24
|
+
}
|
|
22
25
|
if (this.isPackage &&
|
|
23
26
|
!entries.includes('package.json') &&
|
|
24
27
|
entries.some((entry) => ALTERNATE_MANIFEST_NAMES.includes(entry))) {
|
|
@@ -66,6 +69,18 @@ class PackWalker extends npmPacklist.Walker {
|
|
|
66
69
|
return rules;
|
|
67
70
|
}
|
|
68
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* A temporary file pnpm writes next to `pnpm-lock.yaml` and renames over it.
|
|
74
|
+
* Another project's install can create and remove it while a package root is
|
|
75
|
+
* walked, so it is never part of the package.
|
|
76
|
+
*/
|
|
77
|
+
export function isLockfileStagingFile(fileName) {
|
|
78
|
+
const prefix = '.pnpm-lock.yaml.';
|
|
79
|
+
if (!fileName.startsWith(prefix))
|
|
80
|
+
return false;
|
|
81
|
+
const [pid, id, extension, ...rest] = fileName.slice(prefix.length).split('.');
|
|
82
|
+
return rest.length === 0 && extension === 'tmp' && id !== '' && pid !== '' && [...pid].every((char) => char >= '0' && char <= '9');
|
|
83
|
+
}
|
|
69
84
|
// ignore-walk's onstat, which npm-packlist overrides to skip everything that
|
|
70
85
|
// is neither a file nor a directory.
|
|
71
86
|
const ignoreWalkOnstat = Object.getPrototypeOf(npmPacklist.Walker.prototype).onstat;
|
|
@@ -381,7 +396,8 @@ function normalizePackage(pkg) {
|
|
|
381
396
|
normalized.browser = stripDotSlash(normalized.browser);
|
|
382
397
|
}
|
|
383
398
|
if (typeof normalized.bin === 'string') {
|
|
384
|
-
normalized.
|
|
399
|
+
const binName = typeof normalized.name === 'string' && normalized.name.length > 0 ? normalized.name : 'bin';
|
|
400
|
+
normalized.bin = { [binName]: stripDotSlash(normalized.bin) };
|
|
385
401
|
}
|
|
386
402
|
else if (normalized.bin != null && typeof normalized.bin === 'object') {
|
|
387
403
|
const bin = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/fs.packlist",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.12",
|
|
4
4
|
"description": "Get a list of the files to add from a directory into an npm package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"npm-packlist": "10.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@pnpm/fs.packlist": "1100.0.
|
|
36
|
+
"@pnpm/fs.packlist": "1100.0.12"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22.13"
|