@pnpm/fs.packlist 1.0.0 → 1.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/README.md +1 -1
- package/lib/index.js +7 -4
- package/package.json +3 -6
- package/lib/index.js.map +0 -1
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -4,12 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.packlist = void 0;
|
|
7
|
-
const arborist_1 = __importDefault(require("@npmcli/arborist"));
|
|
8
7
|
const npm_packlist_1 = __importDefault(require("npm-packlist"));
|
|
9
8
|
async function packlist(pkgDir) {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const files = await (0, npm_packlist_1.default)({ path: pkgDir });
|
|
10
|
+
// There's a bug in the npm-packlist version that we use,
|
|
11
|
+
// it sometimes returns duplicates.
|
|
12
|
+
// Related issue: https://github.com/pnpm/pnpm/issues/6997
|
|
13
|
+
// Unfortunately, we cannot upgrade the library
|
|
14
|
+
// newer versions of npm-packlist are very slow.
|
|
15
|
+
return Array.from(new Set(files.map((file) => file.replace(/^\.[/\\]/, ''))));
|
|
13
16
|
}
|
|
14
17
|
exports.packlist = packlist;
|
|
15
18
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/fs.packlist",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Get a list of the files to add from a directory into an npm package",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -21,14 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/pnpm/pnpm/blob/main/fs/packlist#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"
|
|
25
|
-
"npm-packlist": "^8.0.0"
|
|
24
|
+
"npm-packlist": "5.1.3"
|
|
26
25
|
},
|
|
27
26
|
"funding": "https://opencollective.com/pnpm",
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@types/npmcli__arborist": "5.6.4",
|
|
31
|
-
"@pnpm/fs.packlist": "1.0.0"
|
|
28
|
+
"@pnpm/fs.packlist": "1.0.2"
|
|
32
29
|
},
|
|
33
30
|
"exports": {
|
|
34
31
|
".": "./lib/index.js"
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAuC;AACvC,gEAAsC;AAE/B,KAAK,UAAU,QAAQ,CAAE,MAAc;IAC5C,MAAM,QAAQ,GAAG,IAAI,kBAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACjD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAA;IACxC,OAAO,IAAA,sBAAW,EAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAJD,4BAIC"}
|