npm-pkg-lint 5.2.5 → 5.3.1
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 +21 -10
- package/dist/index.js +116 -90
- package/dist/index.js.map +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# NPM Package linting
|
|
2
2
|
|
|
3
3
|
[](https://github.com/ext/npm-pkg-lint/actions?query=workflow%3ABuild)
|
|
4
|
-
[](https://coveralls.io/github/ext/npm-pkg-lint?branch=main)
|
|
5
5
|
|
|
6
6
|
Opinionated linter for NPM package tarball and `package.json` metadata.
|
|
7
7
|
|
|
@@ -20,7 +20,8 @@ Core principles:
|
|
|
20
20
|
```
|
|
21
21
|
usage: index.js [-h] [-v] [-t TARBALL] [-p PKGFILE] [--cache CACHE]
|
|
22
22
|
[--allow-dependency DEPENDENCY] [--allow-types-dependencies]
|
|
23
|
-
[--ignore-missing-fields]
|
|
23
|
+
[--allow-file FILE] [--ignore-missing-fields]
|
|
24
|
+
[--ignore-node-version [MAJOR]]
|
|
24
25
|
|
|
25
26
|
Opiniated linter for NPM package tarball and package.json metadata
|
|
26
27
|
|
|
@@ -37,6 +38,9 @@ optional arguments:
|
|
|
37
38
|
multiple times or as a comma-separated list)
|
|
38
39
|
--allow-types-dependencies
|
|
39
40
|
allow production dependencies to `@types/*`
|
|
41
|
+
--allow-file FILE explicitly allow given filename or glob in tarball
|
|
42
|
+
(can be given multiple times or as a comma-separated
|
|
43
|
+
list)
|
|
40
44
|
--ignore-missing-fields
|
|
41
45
|
ignore errors for missing fields (but still checks for
|
|
42
46
|
empty and valid)
|
|
@@ -64,20 +68,21 @@ This tool can be used directly with Github Actions:
|
|
|
64
68
|
- name: Setup Node.js
|
|
65
69
|
uses: actions/setup-node@v4
|
|
66
70
|
- name: npm-pkg-lint
|
|
67
|
-
uses: ext/npm-pkg-lint@
|
|
71
|
+
uses: ext/npm-pkg-lint@v5.3.0
|
|
68
72
|
```
|
|
69
73
|
|
|
70
74
|
> [!IMPORTANT]
|
|
71
75
|
> You need to have `npm-pkg-lint` installed as a dependency in `package.json`.
|
|
72
76
|
> This ensures you have control over which version of the tool is actually running.
|
|
73
77
|
|
|
74
|
-
| Input parameter | Default | Description
|
|
75
|
-
| -------------------- | --------- |
|
|
76
|
-
| allow-dependencies | `-` | Comma-separated list of dependencies to explicitly allow even if they would yield an error
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
78
|
+
| Input parameter | Default | Description |
|
|
79
|
+
| -------------------- | --------- | ----------------------------------------------------------------------------------------------------------- |
|
|
80
|
+
| allow-dependencies | `-` | Comma-separated list of dependencies to explicitly allow even if they would yield an error |
|
|
81
|
+
| allow-files | `-` | Comma-separated list of filenames or globs to explicitly allow in tarball even if they would yield an error |
|
|
82
|
+
| build | `"build"` | Build command (executed with `npm run`). Set to `false` to disable build. |
|
|
83
|
+
| folders | `"."` | Space-separated list of folder to run in. |
|
|
84
|
+
| ignore-node-version | - | Ignore error for outdated node version (see --ignore-node-version CLI argument) |
|
|
85
|
+
| npm-pack | `true` | When enabled `npm pack` is run automatically |
|
|
81
86
|
|
|
82
87
|
## Disallowed files
|
|
83
88
|
|
|
@@ -93,6 +98,12 @@ Disallows certain files from being included in the package tarball.
|
|
|
93
98
|
- Typescript configs (tsconfig)
|
|
94
99
|
- Editor-related files
|
|
95
100
|
|
|
101
|
+
If needed, `--allow-file` can be used to explicitly allow one or more files or globs in the tarball even if they would otherwise be disallowed.
|
|
102
|
+
|
|
103
|
+
> [!TIP]
|
|
104
|
+
> `--allow-file '**/*'` can be used to effectively disable this rule entirely.
|
|
105
|
+
> Use `'**/*,**/.*'` if you also need to allow dotfiles (e.g. `.eslintrc.json`).
|
|
106
|
+
|
|
96
107
|
## Missing files
|
|
97
108
|
|
|
98
109
|
Requires files specified in `package.json` to be present.
|
package/dist/index.js
CHANGED
|
@@ -4581,6 +4581,7 @@ function isBlacklisted(filename2) {
|
|
|
4581
4581
|
|
|
4582
4582
|
// src/tarball.ts
|
|
4583
4583
|
import fs3 from "node:fs";
|
|
4584
|
+
import { matchesGlob } from "node:path";
|
|
4584
4585
|
|
|
4585
4586
|
// node_modules/tar/dist/esm/index.min.js
|
|
4586
4587
|
import Qr from "events";
|
|
@@ -7595,8 +7596,13 @@ async function getFileContent(tarball, filenames) {
|
|
|
7595
7596
|
rs2.pipe(t);
|
|
7596
7597
|
});
|
|
7597
7598
|
}
|
|
7598
|
-
function
|
|
7599
|
-
return
|
|
7599
|
+
function isAllowedFile(filename2, allowedFiles) {
|
|
7600
|
+
return allowedFiles.some((pattern) => matchesGlob(filename2, pattern));
|
|
7601
|
+
}
|
|
7602
|
+
function blacklistedFiles(filelist, allowedFiles = []) {
|
|
7603
|
+
return filelist.filter(
|
|
7604
|
+
(filename2) => isBlacklisted(filename2) && !isAllowedFile(filename2, allowedFiles)
|
|
7605
|
+
);
|
|
7600
7606
|
}
|
|
7601
7607
|
function normalizeRequiredFiles(src) {
|
|
7602
7608
|
if (typeof src === "string") {
|
|
@@ -7675,10 +7681,11 @@ function fileExists(filelist, filename2) {
|
|
|
7675
7681
|
}
|
|
7676
7682
|
return false;
|
|
7677
7683
|
}
|
|
7678
|
-
async function verifyTarball(pkg, tarball) {
|
|
7684
|
+
async function verifyTarball(pkg, tarball, options) {
|
|
7679
7685
|
const messages = [];
|
|
7680
7686
|
const filelist = await getFileList(tarball.filePath);
|
|
7681
|
-
|
|
7687
|
+
const disallowedFiles = blacklistedFiles(filelist, options.allowedFiles);
|
|
7688
|
+
for (const filename2 of disallowedFiles) {
|
|
7682
7689
|
messages.push({
|
|
7683
7690
|
ruleId: "no-disallowed-files",
|
|
7684
7691
|
severity: 2,
|
|
@@ -8636,11 +8643,11 @@ function* outdatedEngines(pkg, pkgAst, ignoreNodeVersion) {
|
|
|
8636
8643
|
if (ignoreNodeVersion === true) {
|
|
8637
8644
|
return;
|
|
8638
8645
|
}
|
|
8639
|
-
for (const [
|
|
8646
|
+
for (const [version3, descriptor] of nodeVersions) {
|
|
8640
8647
|
if (!descriptor.eol) {
|
|
8641
8648
|
break;
|
|
8642
8649
|
}
|
|
8643
|
-
const expanded =
|
|
8650
|
+
const expanded = version3.replaceAll(/[*X]/gi, "999");
|
|
8644
8651
|
if (!import_semver2.default.satisfies(expanded, range)) {
|
|
8645
8652
|
continue;
|
|
8646
8653
|
}
|
|
@@ -8650,28 +8657,29 @@ function* outdatedEngines(pkg, pkgAst, ignoreNodeVersion) {
|
|
|
8650
8657
|
return;
|
|
8651
8658
|
}
|
|
8652
8659
|
const nodeRelease = major > 0 ? major : `0.${String(minor)}`;
|
|
8653
|
-
const
|
|
8660
|
+
const message2 = `engines.node is satisfied by Node ${String(nodeRelease)} (EOL since ${descriptor.eol})`;
|
|
8654
8661
|
yield {
|
|
8655
8662
|
ruleId: ruleId9,
|
|
8656
8663
|
severity: severity7,
|
|
8657
|
-
message,
|
|
8664
|
+
message: message2,
|
|
8658
8665
|
line,
|
|
8659
8666
|
column
|
|
8660
8667
|
};
|
|
8661
8668
|
return;
|
|
8662
8669
|
}
|
|
8663
|
-
if (typeof ignoreNodeVersion
|
|
8664
|
-
|
|
8665
|
-
const version2 = `v${String(ignoreNodeVersion)}.x`;
|
|
8666
|
-
const message = `--ignore-node-version=${option} used but engines.node="${range}" does not match ${version2} or the version is not EOL yet`;
|
|
8667
|
-
yield {
|
|
8668
|
-
ruleId: ruleId9,
|
|
8669
|
-
severity: severity7,
|
|
8670
|
-
message,
|
|
8671
|
-
line,
|
|
8672
|
-
column
|
|
8673
|
-
};
|
|
8670
|
+
if (typeof ignoreNodeVersion !== "number") {
|
|
8671
|
+
return;
|
|
8674
8672
|
}
|
|
8673
|
+
const option = String(ignoreNodeVersion);
|
|
8674
|
+
const version2 = `v${String(ignoreNodeVersion)}.x`;
|
|
8675
|
+
const message = `--ignore-node-version=${option} used but engines.node="${range}" does not match ${version2} or the version is not EOL yet`;
|
|
8676
|
+
yield {
|
|
8677
|
+
ruleId: ruleId9,
|
|
8678
|
+
severity: severity7,
|
|
8679
|
+
message,
|
|
8680
|
+
line,
|
|
8681
|
+
column
|
|
8682
|
+
};
|
|
8675
8683
|
}
|
|
8676
8684
|
|
|
8677
8685
|
// src/rules/prefer-types.ts
|
|
@@ -8770,30 +8778,31 @@ function* tsconfigBaseMatchingEngine(pkg, pkgAst) {
|
|
|
8770
8778
|
const [first, ...duplicates] = tsconfig;
|
|
8771
8779
|
if (duplicates.length > 0) {
|
|
8772
8780
|
for (const dup of duplicates) {
|
|
8773
|
-
const { line, column } = jsonLocation(pkgAst, "member", source, dup);
|
|
8781
|
+
const { line: line2, column: column2 } = jsonLocation(pkgAst, "member", source, dup);
|
|
8774
8782
|
yield {
|
|
8775
8783
|
ruleId: ruleId12,
|
|
8776
8784
|
severity: severity10,
|
|
8777
8785
|
message: `${dup} and ${first} cannot be used at the same time`,
|
|
8778
|
-
line,
|
|
8779
|
-
column
|
|
8786
|
+
line: line2,
|
|
8787
|
+
column: column2
|
|
8780
8788
|
};
|
|
8781
8789
|
}
|
|
8782
8790
|
continue;
|
|
8783
8791
|
}
|
|
8784
8792
|
const match2 = matchDependency.exec(first);
|
|
8785
8793
|
const baseVersion = Number(match2[1]);
|
|
8786
|
-
if (baseVersion
|
|
8787
|
-
|
|
8788
|
-
const expectedVersion = `v${String(nodeVersion.major)}`;
|
|
8789
|
-
yield {
|
|
8790
|
-
ruleId: ruleId12,
|
|
8791
|
-
severity: severity10,
|
|
8792
|
-
message: `${first} does not match engines.node ${expectedVersion}`,
|
|
8793
|
-
line,
|
|
8794
|
-
column
|
|
8795
|
-
};
|
|
8794
|
+
if (baseVersion === nodeVersion.major) {
|
|
8795
|
+
continue;
|
|
8796
8796
|
}
|
|
8797
|
+
const { line, column } = jsonLocation(pkgAst, "member", source, first);
|
|
8798
|
+
const expectedVersion = `v${String(nodeVersion.major)}`;
|
|
8799
|
+
yield {
|
|
8800
|
+
ruleId: ruleId12,
|
|
8801
|
+
severity: severity10,
|
|
8802
|
+
message: `${first} does not match engines.node ${expectedVersion}`,
|
|
8803
|
+
line,
|
|
8804
|
+
column
|
|
8805
|
+
};
|
|
8797
8806
|
}
|
|
8798
8807
|
}
|
|
8799
8808
|
|
|
@@ -8819,18 +8828,19 @@ function* typesNodeMatchingEngine(pkg, pkgAst) {
|
|
|
8819
8828
|
if (!nodeVersion || !typesVersion) {
|
|
8820
8829
|
continue;
|
|
8821
8830
|
}
|
|
8822
|
-
if (typesVersion.major
|
|
8823
|
-
|
|
8824
|
-
const actualVersion = `v${String(typesVersion.major)}`;
|
|
8825
|
-
const expectedVersion = `v${String(nodeVersion.major)}`;
|
|
8826
|
-
yield {
|
|
8827
|
-
ruleId: ruleId13,
|
|
8828
|
-
severity: severity11,
|
|
8829
|
-
message: `@types/node ${actualVersion} does not equal engines.node ${expectedVersion}`,
|
|
8830
|
-
line,
|
|
8831
|
-
column
|
|
8832
|
-
};
|
|
8831
|
+
if (typesVersion.major === nodeVersion.major) {
|
|
8832
|
+
continue;
|
|
8833
8833
|
}
|
|
8834
|
+
const { line, column } = jsonLocation(pkgAst, "value", source, "@types/node");
|
|
8835
|
+
const actualVersion = `v${String(typesVersion.major)}`;
|
|
8836
|
+
const expectedVersion = `v${String(nodeVersion.major)}`;
|
|
8837
|
+
yield {
|
|
8838
|
+
ruleId: ruleId13,
|
|
8839
|
+
severity: severity11,
|
|
8840
|
+
message: `@types/node ${actualVersion} does not equal engines.node ${expectedVersion}`,
|
|
8841
|
+
line,
|
|
8842
|
+
column
|
|
8843
|
+
};
|
|
8834
8844
|
}
|
|
8835
8845
|
}
|
|
8836
8846
|
|
|
@@ -8950,11 +8960,12 @@ function nonempty(key, value) {
|
|
|
8950
8960
|
}
|
|
8951
8961
|
return;
|
|
8952
8962
|
}
|
|
8953
|
-
if (value
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8963
|
+
if (!value || typeof value !== "object") {
|
|
8964
|
+
return;
|
|
8965
|
+
}
|
|
8966
|
+
const values = Object.values(value);
|
|
8967
|
+
if (values.length === 0) {
|
|
8968
|
+
throw new ValidationError(nonempty.name, `"${key}" must not be empty`);
|
|
8958
8969
|
}
|
|
8959
8970
|
}
|
|
8960
8971
|
|
|
@@ -9121,32 +9132,34 @@ function verifyDependencies(pkg, pkgAst, options) {
|
|
|
9121
9132
|
if (options.allowTypesDependencies && dependency.startsWith("@types/")) {
|
|
9122
9133
|
continue;
|
|
9123
9134
|
}
|
|
9124
|
-
if (isDisallowedDependency(pkg, dependency)) {
|
|
9125
|
-
|
|
9126
|
-
const name = key === dependency ? `"${dependency}"` : `"${key}" ("npm:${dependency}")`;
|
|
9127
|
-
messages.push({
|
|
9128
|
-
ruleId: "disallowed-dependency",
|
|
9129
|
-
severity: 2,
|
|
9130
|
-
message: `${name} should be a devDependency`,
|
|
9131
|
-
line,
|
|
9132
|
-
column
|
|
9133
|
-
});
|
|
9135
|
+
if (!isDisallowedDependency(pkg, dependency)) {
|
|
9136
|
+
continue;
|
|
9134
9137
|
}
|
|
9138
|
+
const { line, column } = jsonLocation(pkgAst, "member", "dependencies", key);
|
|
9139
|
+
const name = key === dependency ? `"${dependency}"` : `"${key}" ("npm:${dependency}")`;
|
|
9140
|
+
messages.push({
|
|
9141
|
+
ruleId: "disallowed-dependency",
|
|
9142
|
+
severity: 2,
|
|
9143
|
+
message: `${name} should be a devDependency`,
|
|
9144
|
+
line,
|
|
9145
|
+
column
|
|
9146
|
+
});
|
|
9135
9147
|
}
|
|
9136
9148
|
function verifyObsolete(key, version2, source) {
|
|
9137
9149
|
const { name: dependency } = normalizeDependency(key, version2);
|
|
9138
9150
|
const obsolete2 = isObsoleteDependency(dependency);
|
|
9139
|
-
if (obsolete2) {
|
|
9140
|
-
|
|
9141
|
-
const name = key === dependency ? `"${dependency}"` : `"${key}" ("npm:${dependency}")`;
|
|
9142
|
-
messages.push({
|
|
9143
|
-
ruleId: "obsolete-dependency",
|
|
9144
|
-
severity: 2,
|
|
9145
|
-
message: `${name} is obsolete and should no longer be used: ${obsolete2.message}`,
|
|
9146
|
-
line,
|
|
9147
|
-
column
|
|
9148
|
-
});
|
|
9151
|
+
if (!obsolete2) {
|
|
9152
|
+
return;
|
|
9149
9153
|
}
|
|
9154
|
+
const { line, column } = jsonLocation(pkgAst, "member", source, key);
|
|
9155
|
+
const name = key === dependency ? `"${dependency}"` : `"${key}" ("npm:${dependency}")`;
|
|
9156
|
+
messages.push({
|
|
9157
|
+
ruleId: "obsolete-dependency",
|
|
9158
|
+
severity: 2,
|
|
9159
|
+
message: `${name} is obsolete and should no longer be used: ${obsolete2.message}`,
|
|
9160
|
+
line,
|
|
9161
|
+
column
|
|
9162
|
+
});
|
|
9150
9163
|
}
|
|
9151
9164
|
for (const [key, version2] of Object.entries(dependencies)) {
|
|
9152
9165
|
verifyObsolete(key, version2, "dependencies");
|
|
@@ -9159,7 +9172,11 @@ function verifyDependencies(pkg, pkgAst, options) {
|
|
|
9159
9172
|
}
|
|
9160
9173
|
return messages;
|
|
9161
9174
|
}
|
|
9162
|
-
async function verifyPackageJson(pkg, pkgAst, filePath, options = {
|
|
9175
|
+
async function verifyPackageJson(pkg, pkgAst, filePath, options = {
|
|
9176
|
+
allowedDependencies: /* @__PURE__ */ new Set(),
|
|
9177
|
+
allowedFiles: [],
|
|
9178
|
+
ignoreNodeVersion: false
|
|
9179
|
+
}) {
|
|
9163
9180
|
const { ignoreNodeVersion } = options;
|
|
9164
9181
|
const messages = [
|
|
9165
9182
|
...conflictingTypesTypings(pkg, pkgAst),
|
|
@@ -9253,25 +9270,26 @@ async function verifyPackageLock() {
|
|
|
9253
9270
|
if (pkg.link) {
|
|
9254
9271
|
continue;
|
|
9255
9272
|
}
|
|
9256
|
-
if (
|
|
9257
|
-
|
|
9258
|
-
results.push({
|
|
9259
|
-
messages: [
|
|
9260
|
-
{
|
|
9261
|
-
ruleId: "package-lock-registry",
|
|
9262
|
-
severity: 2,
|
|
9263
|
-
message: `package "${name}" is resolved from "${String(pkg.resolved)}" instead of the npm registry`,
|
|
9264
|
-
line,
|
|
9265
|
-
column
|
|
9266
|
-
}
|
|
9267
|
-
],
|
|
9268
|
-
filePath: lockfilePath,
|
|
9269
|
-
errorCount: 1,
|
|
9270
|
-
warningCount: 0,
|
|
9271
|
-
fixableErrorCount: 0,
|
|
9272
|
-
fixableWarningCount: 0
|
|
9273
|
-
});
|
|
9273
|
+
if (isValidResolved(pkg)) {
|
|
9274
|
+
continue;
|
|
9274
9275
|
}
|
|
9276
|
+
const { line, column } = jsonLocation(ast, "value", "packages", name, "resolved");
|
|
9277
|
+
results.push({
|
|
9278
|
+
messages: [
|
|
9279
|
+
{
|
|
9280
|
+
ruleId: "package-lock-registry",
|
|
9281
|
+
severity: 2,
|
|
9282
|
+
message: `package "${name}" is resolved from "${String(pkg.resolved)}" instead of the npm registry`,
|
|
9283
|
+
line,
|
|
9284
|
+
column
|
|
9285
|
+
}
|
|
9286
|
+
],
|
|
9287
|
+
filePath: lockfilePath,
|
|
9288
|
+
errorCount: 1,
|
|
9289
|
+
warningCount: 0,
|
|
9290
|
+
fixableErrorCount: 0,
|
|
9291
|
+
fixableWarningCount: 0
|
|
9292
|
+
});
|
|
9275
9293
|
}
|
|
9276
9294
|
return results;
|
|
9277
9295
|
}
|
|
@@ -9315,7 +9333,7 @@ async function verifyShebang(pkg, tarball) {
|
|
|
9315
9333
|
// src/verify.ts
|
|
9316
9334
|
async function verify(pkg, pkgAst, pkgPath, tarball, options) {
|
|
9317
9335
|
return [
|
|
9318
|
-
...await verifyTarball(pkg, tarball),
|
|
9336
|
+
...await verifyTarball(pkg, tarball, { allowedFiles: options.allowedFiles }),
|
|
9319
9337
|
...await verifyPackageJson(pkg, pkgAst, pkgPath, options),
|
|
9320
9338
|
...await verifyPackageLock(),
|
|
9321
9339
|
...await verifyShebang(pkg, tarball)
|
|
@@ -9328,7 +9346,8 @@ var { version } = JSON.parse(readFileSync(pkgFilepath, "utf-8"));
|
|
|
9328
9346
|
var PACKAGE_JSON = "package.json";
|
|
9329
9347
|
var HELP_TEXT = `usage: index.js [-h] [-v] [-t TARBALL] [-p PKGFILE] [--cache CACHE]
|
|
9330
9348
|
[--allow-dependency DEPENDENCY] [--allow-types-dependencies]
|
|
9331
|
-
[--
|
|
9349
|
+
[--allow-file FILE] [--ignore-missing-fields]
|
|
9350
|
+
[--ignore-node-version [MAJOR]]
|
|
9332
9351
|
|
|
9333
9352
|
Opiniated linter for NPM package tarball and package.json metadata
|
|
9334
9353
|
|
|
@@ -9345,6 +9364,9 @@ options:
|
|
|
9345
9364
|
multiple times or as a comma-separated list)
|
|
9346
9365
|
--allow-types-dependencies
|
|
9347
9366
|
allow production dependencies to \`@types/*\`
|
|
9367
|
+
--allow-file FILE explicitly allow given filename or glob in tarball
|
|
9368
|
+
(can be given multiple times or as a comma-separated
|
|
9369
|
+
list)
|
|
9348
9370
|
--ignore-missing-fields
|
|
9349
9371
|
ignore errors for missing fields (but still checks for
|
|
9350
9372
|
empty and valid)
|
|
@@ -9450,6 +9472,7 @@ function parseCliArgs(argv) {
|
|
|
9450
9472
|
cache: { type: "string" },
|
|
9451
9473
|
"allow-dependency": { type: "string", multiple: true, default: [] },
|
|
9452
9474
|
"allow-types-dependencies": { type: "boolean" },
|
|
9475
|
+
"allow-file": { type: "string", multiple: true, default: [] },
|
|
9453
9476
|
"ignore-missing-fields": { type: "boolean" }
|
|
9454
9477
|
},
|
|
9455
9478
|
strict: true
|
|
@@ -9469,7 +9492,8 @@ function parseCliArgs(argv) {
|
|
|
9469
9492
|
ignoreMissingFields: values["ignore-missing-fields"],
|
|
9470
9493
|
ignoreNodeVersion,
|
|
9471
9494
|
allowDependency: values["allow-dependency"],
|
|
9472
|
-
allowTypesDependencies: values["allow-types-dependencies"]
|
|
9495
|
+
allowTypesDependencies: values["allow-types-dependencies"],
|
|
9496
|
+
allowFile: values["allow-file"]
|
|
9473
9497
|
}
|
|
9474
9498
|
};
|
|
9475
9499
|
}
|
|
@@ -9508,6 +9532,7 @@ async function run() {
|
|
|
9508
9532
|
}
|
|
9509
9533
|
const { args } = cli;
|
|
9510
9534
|
const allowedDependencies2 = new Set(args.allowDependency.flatMap((it2) => it2.split(",")));
|
|
9535
|
+
const allowedFiles = args.allowFile.flatMap((it2) => it2.split(","));
|
|
9511
9536
|
if (args.cache) {
|
|
9512
9537
|
await setCacheDirecory(args.cache);
|
|
9513
9538
|
}
|
|
@@ -9526,6 +9551,7 @@ async function run() {
|
|
|
9526
9551
|
const options = {
|
|
9527
9552
|
allowedDependencies: allowedDependencies2,
|
|
9528
9553
|
allowTypesDependencies: args.allowTypesDependencies,
|
|
9554
|
+
allowedFiles,
|
|
9529
9555
|
ignoreMissingFields: args.ignoreMissingFields,
|
|
9530
9556
|
ignoreNodeVersion: args.ignoreNodeVersion
|
|
9531
9557
|
};
|