@pnpm/fs.packlist 1100.0.11 → 1100.0.13
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 +15 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +15 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @pnpm/fs.packlist
|
|
2
2
|
|
|
3
|
+
## 1100.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies:
|
|
8
|
+
- @pnpm/workspace.project-manifest-reader@1100.1.6
|
|
9
|
+
|
|
10
|
+
## 1100.0.12
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 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).
|
|
15
|
+
|
|
16
|
+
Installing a local directory dependency no longer fails when another project's install is writing a lockfile in that directory.
|
|
17
|
+
|
|
3
18
|
## 1100.0.11
|
|
4
19
|
|
|
5
20
|
### 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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/fs.packlist",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.13",
|
|
4
4
|
"description": "Get a list of the files to add from a directory into an npm package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@pnpm/error": "1100.2.2",
|
|
31
|
-
"@pnpm/workspace.project-manifest-reader": "1100.1.
|
|
31
|
+
"@pnpm/workspace.project-manifest-reader": "1100.1.6",
|
|
32
32
|
"is-subdir": "^2.0.1",
|
|
33
33
|
"npm-packlist": "10.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@pnpm/fs.packlist": "1100.0.
|
|
36
|
+
"@pnpm/fs.packlist": "1100.0.13"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22.13"
|