knip 5.33.3 → 5.34.0
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/dist/ConfigurationChief.d.ts +27 -27
- package/dist/ConfigurationChief.js +20 -36
- package/dist/ConfigurationValidator.d.ts +392 -0
- package/dist/ConfigurationValidator.js +7 -0
- package/dist/DependencyDeputy.js +5 -2
- package/dist/PrincipalFactory.d.ts +3 -20
- package/dist/PrincipalFactory.js +4 -4
- package/dist/ProjectPrincipal.d.ts +2 -5
- package/dist/ProjectPrincipal.js +0 -5
- package/dist/WorkspaceWorker.d.ts +15 -13
- package/dist/WorkspaceWorker.js +144 -105
- package/dist/binaries/bash-parser.d.ts +3 -2
- package/dist/binaries/bash-parser.js +33 -22
- package/dist/binaries/fallback.d.ts +2 -0
- package/dist/binaries/fallback.js +12 -0
- package/dist/binaries/index.d.ts +2 -2
- package/dist/binaries/index.js +15 -26
- package/dist/binaries/package-manager/bun.d.ts +2 -0
- package/dist/binaries/{resolvers → package-manager}/bun.js +6 -4
- package/dist/binaries/package-manager/index.d.ts +8 -0
- package/dist/binaries/package-manager/index.js +12 -0
- package/dist/binaries/{resolvers → package-manager}/node.d.ts +0 -2
- package/dist/binaries/package-manager/node.js +5 -0
- package/dist/binaries/package-manager/npm.d.ts +2 -0
- package/dist/binaries/package-manager/npm.js +8 -0
- package/dist/binaries/package-manager/npx.d.ts +2 -0
- package/dist/binaries/{resolvers → package-manager}/npx.js +6 -6
- package/dist/binaries/package-manager/pnpm.d.ts +2 -0
- package/dist/binaries/{resolvers → package-manager}/pnpm.js +6 -3
- package/dist/binaries/package-manager/yarn.d.ts +2 -0
- package/dist/binaries/{resolvers → package-manager}/yarn.js +9 -7
- package/dist/binaries/plugins.d.ts +2 -0
- package/dist/binaries/plugins.js +61 -0
- package/dist/binaries/util.d.ts +0 -2
- package/dist/binaries/util.js +0 -25
- package/dist/compilers/index.d.ts +70 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -1
- package/dist/index.js +74 -46
- package/dist/manifest/helpers.d.ts +1 -5
- package/dist/manifest/helpers.js +8 -7
- package/dist/plugins/_template/index.d.ts +2 -2
- package/dist/plugins/_template/index.js +4 -3
- package/dist/plugins/angular/index.d.ts +1 -1
- package/dist/plugins/angular/index.js +13 -10
- package/dist/plugins/astro/index.d.ts +1 -1
- package/dist/plugins/astro/index.js +6 -5
- package/dist/plugins/ava/index.d.ts +1 -1
- package/dist/plugins/ava/index.js +4 -5
- package/dist/plugins/babel/helpers.js +1 -1
- package/dist/plugins/babel/index.d.ts +3 -2
- package/dist/plugins/babel/index.js +4 -3
- package/dist/plugins/c8/index.d.ts +10 -0
- package/dist/plugins/c8/index.js +11 -0
- package/dist/plugins/capacitor/index.d.ts +1 -1
- package/dist/plugins/capacitor/index.js +5 -4
- package/dist/plugins/changesets/index.d.ts +1 -1
- package/dist/plugins/changesets/index.js +4 -3
- package/dist/plugins/commitizen/index.d.ts +1 -1
- package/dist/plugins/commitizen/index.js +3 -2
- package/dist/plugins/commitlint/index.d.ts +1 -1
- package/dist/plugins/commitlint/index.js +4 -2
- package/dist/plugins/cspell/index.d.ts +1 -1
- package/dist/plugins/cspell/index.js +3 -2
- package/dist/plugins/cucumber/index.d.ts +2 -2
- package/dist/plugins/cucumber/index.js +4 -4
- package/dist/plugins/cypress/helpers.d.ts +1 -1
- package/dist/plugins/cypress/helpers.js +3 -4
- package/dist/plugins/cypress/index.d.ts +1 -1
- package/dist/plugins/cypress/index.js +6 -5
- package/dist/plugins/dotenv/index.d.ts +8 -0
- package/dist/plugins/dotenv/index.js +9 -0
- package/dist/plugins/drizzle/index.d.ts +1 -1
- package/dist/plugins/drizzle/index.js +3 -3
- package/dist/plugins/eleventy/index.d.ts +1 -1
- package/dist/plugins/eleventy/index.js +6 -6
- package/dist/plugins/eslint/helpers.d.ts +4 -5
- package/dist/plugins/eslint/helpers.js +10 -32
- package/dist/plugins/eslint/index.d.ts +1 -1
- package/dist/plugins/eslint/index.js +3 -6
- package/dist/plugins/gatsby/index.d.ts +1 -1
- package/dist/plugins/gatsby/index.js +6 -3
- package/dist/plugins/github-actions/index.d.ts +1 -1
- package/dist/plugins/github-actions/index.js +23 -7
- package/dist/plugins/graphql-codegen/index.d.ts +1 -1
- package/dist/plugins/graphql-codegen/index.js +7 -7
- package/dist/plugins/husky/index.d.ts +1 -1
- package/dist/plugins/husky/index.js +4 -3
- package/dist/plugins/index.d.ts +685 -77
- package/dist/plugins/index.js +170 -77
- package/dist/plugins/jest/index.d.ts +1 -1
- package/dist/plugins/jest/index.js +22 -24
- package/dist/plugins/ladle/index.d.ts +2 -2
- package/dist/plugins/ladle/index.js +4 -4
- package/dist/plugins/lefthook/index.d.ts +1 -1
- package/dist/plugins/lefthook/index.js +18 -14
- package/dist/plugins/lint-staged/index.d.ts +1 -1
- package/dist/plugins/lint-staged/index.js +6 -5
- package/dist/plugins/linthtml/index.d.ts +1 -1
- package/dist/plugins/linthtml/index.js +6 -8
- package/dist/plugins/lockfile-lint/index.d.ts +2 -2
- package/dist/plugins/lockfile-lint/index.js +2 -1
- package/dist/plugins/lost-pixel/index.d.ts +2 -2
- package/dist/plugins/lost-pixel/index.js +1 -1
- package/dist/plugins/markdownlint/index.d.ts +1 -1
- package/dist/plugins/markdownlint/index.js +3 -2
- package/dist/plugins/mocha/index.d.ts +4 -1
- package/dist/plugins/mocha/index.js +8 -4
- package/dist/plugins/moonrepo/index.d.ts +2 -2
- package/dist/plugins/moonrepo/index.js +4 -4
- package/dist/plugins/msw/index.d.ts +1 -1
- package/dist/plugins/msw/index.js +4 -4
- package/dist/plugins/nest/index.d.ts +2 -2
- package/dist/plugins/nest/index.js +4 -3
- package/dist/plugins/netlify/index.d.ts +1 -1
- package/dist/plugins/netlify/index.js +6 -6
- package/dist/plugins/next/index.d.ts +1 -1
- package/dist/plugins/next/index.js +1 -1
- package/dist/plugins/node/index.d.ts +8 -0
- package/dist/plugins/node/index.js +9 -0
- package/dist/plugins/node-test-runner/index.d.ts +1 -1
- package/dist/plugins/nodemon/index.d.ts +10 -0
- package/dist/plugins/nodemon/index.js +11 -0
- package/dist/plugins/npm-package-json-lint/index.d.ts +1 -1
- package/dist/plugins/npm-package-json-lint/index.js +4 -2
- package/dist/plugins/nuxt/index.d.ts +1 -1
- package/dist/plugins/nuxt/index.js +4 -4
- package/dist/plugins/nx/index.d.ts +5 -1
- package/dist/plugins/nx/index.js +10 -8
- package/dist/plugins/nyc/index.d.ts +1 -1
- package/dist/plugins/nyc/index.js +3 -2
- package/dist/plugins/oclif/index.d.ts +2 -2
- package/dist/plugins/oclif/index.js +3 -2
- package/dist/plugins/playwright/index.d.ts +13 -1
- package/dist/plugins/playwright/index.js +13 -6
- package/dist/plugins/playwright-ct/index.d.ts +9 -3
- package/dist/plugins/playwright-ct/index.js +3 -2
- package/dist/plugins/playwright-test/index.d.ts +13 -0
- package/dist/plugins/playwright-test/index.js +16 -0
- package/dist/plugins/postcss/index.d.ts +1 -1
- package/dist/plugins/postcss/index.js +5 -2
- package/dist/plugins/preconstruct/index.d.ts +1 -1
- package/dist/plugins/preconstruct/index.js +3 -3
- package/dist/plugins/prettier/index.d.ts +1 -1
- package/dist/plugins/prettier/index.js +5 -5
- package/dist/plugins/react-cosmos/index.d.ts +2 -2
- package/dist/plugins/react-cosmos/index.js +5 -6
- package/dist/plugins/release-it/index.d.ts +1 -1
- package/dist/plugins/release-it/index.js +4 -3
- package/dist/plugins/remark/index.d.ts +1 -1
- package/dist/plugins/remark/index.js +3 -2
- package/dist/plugins/remix/index.d.ts +1 -1
- package/dist/plugins/remix/index.js +1 -1
- package/dist/plugins/rollup/index.d.ts +3 -1
- package/dist/plugins/rollup/index.js +8 -1
- package/dist/plugins/rsbuild/index.d.ts +2 -2
- package/dist/plugins/rsbuild/index.js +1 -1
- package/dist/plugins/rspack/index.d.ts +2 -2
- package/dist/plugins/rspack/index.js +4 -8
- package/dist/plugins/semantic-release/index.d.ts +1 -1
- package/dist/plugins/semantic-release/index.js +4 -2
- package/dist/plugins/sentry/index.d.ts +1 -1
- package/dist/plugins/sentry/index.js +1 -1
- package/dist/plugins/simple-git-hooks/index.d.ts +2 -2
- package/dist/plugins/simple-git-hooks/index.js +5 -5
- package/dist/plugins/size-limit/index.d.ts +2 -2
- package/dist/plugins/size-limit/index.js +2 -1
- package/dist/plugins/storybook/index.d.ts +1 -1
- package/dist/plugins/storybook/index.js +5 -5
- package/dist/plugins/stryker/index.d.ts +1 -1
- package/dist/plugins/stryker/index.js +3 -2
- package/dist/plugins/stylelint/index.d.ts +1 -1
- package/dist/plugins/stylelint/index.js +4 -3
- package/dist/plugins/svelte/index.d.ts +1 -1
- package/dist/plugins/svelte/index.js +1 -1
- package/dist/plugins/syncpack/index.d.ts +2 -3
- package/dist/plugins/syncpack/index.js +2 -4
- package/dist/plugins/tailwind/index.d.ts +1 -1
- package/dist/plugins/tailwind/index.js +1 -1
- package/dist/plugins/travis/index.d.ts +1 -1
- package/dist/plugins/travis/index.js +2 -3
- package/dist/plugins/ts-node/index.d.ts +15 -0
- package/dist/plugins/ts-node/index.js +12 -0
- package/dist/plugins/tsup/index.d.ts +4 -1
- package/dist/plugins/tsup/index.js +7 -3
- package/dist/plugins/tsx/index.d.ts +9 -0
- package/dist/plugins/tsx/index.js +10 -0
- package/dist/plugins/typedoc/index.d.ts +4 -1
- package/dist/plugins/typedoc/index.js +10 -3
- package/dist/plugins/typedoc/types.d.ts +1 -0
- package/dist/plugins/typescript/index.d.ts +11 -2
- package/dist/plugins/typescript/index.js +19 -34
- package/dist/plugins/unbuild/index.d.ts +1 -1
- package/dist/plugins/unbuild/index.js +3 -3
- package/dist/plugins/unocss/index.d.ts +2 -2
- package/dist/plugins/unocss/index.js +2 -1
- package/dist/plugins/vercel-og/index.d.ts +1 -1
- package/dist/plugins/vercel-og/index.js +1 -1
- package/dist/plugins/vike/index.d.ts +2 -2
- package/dist/plugins/vike/index.js +1 -1
- package/dist/plugins/vite/index.d.ts +3 -3
- package/dist/plugins/vite/index.js +2 -2
- package/dist/plugins/vitest/index.d.ts +4 -1
- package/dist/plugins/vitest/index.js +31 -20
- package/dist/plugins/vue/index.d.ts +1 -1
- package/dist/plugins/vue/index.js +10 -10
- package/dist/plugins/webdriver-io/index.d.ts +1 -1
- package/dist/plugins/webdriver-io/index.js +3 -2
- package/dist/plugins/webpack/index.d.ts +3 -5
- package/dist/plugins/webpack/index.js +18 -19
- package/dist/plugins/wireit/index.d.ts +1 -1
- package/dist/plugins/wireit/index.js +2 -2
- package/dist/plugins/wrangler/index.d.ts +1 -1
- package/dist/plugins/wrangler/index.js +3 -2
- package/dist/plugins/xo/index.d.ts +2 -2
- package/dist/plugins/xo/index.js +4 -4
- package/dist/plugins/yorkie/index.d.ts +1 -1
- package/dist/plugins/yorkie/index.js +6 -5
- package/dist/plugins.d.ts +7 -4
- package/dist/plugins.js +17 -10
- package/dist/reporters/symbols.js +1 -1
- package/dist/types/PluginNames.d.ts +2 -0
- package/dist/types/PluginNames.js +86 -0
- package/dist/types/args.d.ts +14 -0
- package/dist/types/config.d.ts +84 -21
- package/dist/types/package-json.d.ts +10 -0
- package/dist/types/project.d.ts +18 -0
- package/dist/typescript/get-imports-and-exports.d.ts +1 -11
- package/dist/typescript/get-imports-and-exports.js +3 -1
- package/dist/typescript/visitors/dynamic-imports/importCall.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/importType.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/index.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/jsDocType.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/requireCall.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/resolveCall.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportAssignment.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportKeyword.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportsAccessExpression.d.ts +1 -1
- package/dist/typescript/visitors/exports/index.d.ts +1 -1
- package/dist/typescript/visitors/exports/moduleExportsAccessExpression.d.ts +1 -1
- package/dist/typescript/visitors/imports/importDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/imports/importEqualsDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/imports/index.d.ts +1 -1
- package/dist/typescript/visitors/imports/reExportDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/index.d.ts +1 -1
- package/dist/typescript/visitors/scripts/bun.d.ts +1 -1
- package/dist/typescript/visitors/scripts/execa.d.ts +1 -1
- package/dist/typescript/visitors/scripts/index.d.ts +1 -1
- package/dist/typescript/visitors/scripts/zx.d.ts +1 -1
- package/dist/util/create-workspace-graph.d.ts +1 -1
- package/dist/util/create-workspace-graph.js +7 -7
- package/dist/util/debug.d.ts +2 -2
- package/dist/util/debug.js +1 -1
- package/dist/util/glob.js +2 -2
- package/dist/util/{handle-dependency.d.ts → handle-referenced-dependency.d.ts} +2 -1
- package/dist/util/handle-referenced-dependency.js +82 -0
- package/dist/util/input.d.ts +37 -0
- package/dist/util/input.js +36 -0
- package/dist/util/map-workspaces.d.ts +5 -2
- package/dist/util/map-workspaces.js +6 -6
- package/dist/util/modules.d.ts +1 -0
- package/dist/util/modules.js +4 -3
- package/dist/util/object.d.ts +1 -0
- package/dist/util/object.js +19 -0
- package/dist/util/plugin-config.d.ts +24 -0
- package/dist/util/plugin-config.js +32 -0
- package/dist/util/plugin.d.ts +3 -31
- package/dist/util/plugin.js +9 -54
- package/dist/util/regex.js +3 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -10
- package/schema.json +28 -0
- package/dist/binaries/resolvers/bun.d.ts +0 -2
- package/dist/binaries/resolvers/c8.d.ts +0 -2
- package/dist/binaries/resolvers/c8.js +0 -11
- package/dist/binaries/resolvers/dotenv.d.ts +0 -2
- package/dist/binaries/resolvers/dotenv.js +0 -7
- package/dist/binaries/resolvers/fallback.d.ts +0 -2
- package/dist/binaries/resolvers/fallback.js +0 -26
- package/dist/binaries/resolvers/index.d.ts +0 -15
- package/dist/binaries/resolvers/index.js +0 -26
- package/dist/binaries/resolvers/node.js +0 -11
- package/dist/binaries/resolvers/nodemon.d.ts +0 -2
- package/dist/binaries/resolvers/nodemon.js +0 -16
- package/dist/binaries/resolvers/npx.d.ts +0 -2
- package/dist/binaries/resolvers/nx.d.ts +0 -2
- package/dist/binaries/resolvers/nx.js +0 -9
- package/dist/binaries/resolvers/pnpm.d.ts +0 -2
- package/dist/binaries/resolvers/rollup.d.ts +0 -2
- package/dist/binaries/resolvers/rollup.js +0 -12
- package/dist/binaries/resolvers/ts-node.d.ts +0 -2
- package/dist/binaries/resolvers/ts-node.js +0 -16
- package/dist/binaries/resolvers/tsx.d.ts +0 -2
- package/dist/binaries/resolvers/tsx.js +0 -6
- package/dist/binaries/resolvers/yarn.d.ts +0 -2
- package/dist/binaries/types.d.ts +0 -11
- package/dist/types/plugins.d.ts +0 -42
- package/dist/util/handle-dependency.js +0 -63
- package/dist/util/protocols.d.ts +0 -9
- package/dist/util/protocols.js +0 -9
- /package/dist/{binaries/types.js → types/args.js} +0 -0
- /package/dist/types/{plugins.js → project.js} +0 -0
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import parse, {} from '../../vendor/bash-parser/index.js';
|
|
2
|
+
import { pluginArgsMap } from '../plugins.js';
|
|
2
3
|
import { debugLogObject } from '../util/debug.js';
|
|
3
|
-
import { toBinary } from '../util/
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { parseNodeArgs } from './
|
|
4
|
+
import { toBinary, toDeferResolve } from '../util/input.js';
|
|
5
|
+
import { resolve as fallbackResolve } from './fallback.js';
|
|
6
|
+
import PackageManagerResolvers from './package-manager/index.js';
|
|
7
|
+
import { parseNodeArgs } from './package-manager/node.js';
|
|
8
|
+
import { resolve as resolverFromPlugins } from './plugins.js';
|
|
7
9
|
import { trimBinary } from './util.js';
|
|
8
10
|
const spawningBinaries = ['cross-env', 'retry-cli'];
|
|
9
11
|
const isExpansion = (node) => 'expansion' in node;
|
|
10
12
|
const isAssignment = (node) => 'type' in node && node.type === 'AssignmentWord';
|
|
11
|
-
export const
|
|
13
|
+
export const getDependenciesFromScript = (script, options) => {
|
|
12
14
|
if (!script)
|
|
13
15
|
return [];
|
|
14
|
-
const fromArgs = (args) =>
|
|
15
|
-
|
|
16
|
+
const fromArgs = (args) => {
|
|
17
|
+
return getDependenciesFromScript(args.filter(arg => arg !== '--').join(' '), {
|
|
18
|
+
...options,
|
|
19
|
+
knownBinsOnly: false,
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const getDependenciesFromNodes = (nodes) => nodes.flatMap(node => {
|
|
16
23
|
switch (node.type) {
|
|
17
24
|
case 'Command': {
|
|
18
25
|
const text = node.name?.text;
|
|
@@ -22,7 +29,7 @@ export const getBinariesFromScript = (script, options) => {
|
|
|
22
29
|
.map(prefix => prefix.expansion)
|
|
23
30
|
.flatMap(expansion => expansion.filter(expansion => expansion.type === 'CommandExpansion') ?? []) ?? [];
|
|
24
31
|
if (commandExpansions.length > 0) {
|
|
25
|
-
return commandExpansions.flatMap(expansion =>
|
|
32
|
+
return (commandExpansions.flatMap(expansion => getDependenciesFromNodes(expansion.commandAST.commands)) ?? []);
|
|
26
33
|
}
|
|
27
34
|
if (!binary || binary === '.' || binary === 'source' || binary === '[')
|
|
28
35
|
return [];
|
|
@@ -37,38 +44,42 @@ export const getBinariesFromScript = (script, options) => {
|
|
|
37
44
|
.flatMap(node => node.text.split('=')[1])
|
|
38
45
|
.map(arg => parseNodeArgs(arg.split(' ')))
|
|
39
46
|
.filter(args => args.require)
|
|
40
|
-
.flatMap(arg => arg.require)
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
.flatMap(arg => arg.require)
|
|
48
|
+
.map(toDeferResolve) ?? [];
|
|
49
|
+
if (binary in PackageManagerResolvers) {
|
|
50
|
+
const resolver = PackageManagerResolvers[binary];
|
|
43
51
|
return resolver(binary, args, { ...options, fromArgs });
|
|
44
52
|
}
|
|
53
|
+
if (pluginArgsMap.has(binary)) {
|
|
54
|
+
return [...resolverFromPlugins(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
55
|
+
}
|
|
45
56
|
if (spawningBinaries.includes(binary)) {
|
|
46
|
-
const command = script.replace(new RegExp(`.*${
|
|
47
|
-
return [toBinary(binary), ...
|
|
57
|
+
const command = script.replace(new RegExp(`.*${text ?? binary}(\\s--\\s)?`), '');
|
|
58
|
+
return [toBinary(binary), ...getDependenciesFromScript(command, options)];
|
|
48
59
|
}
|
|
49
|
-
if (options.
|
|
60
|
+
if (options.knownBinsOnly && !text?.startsWith('.'))
|
|
50
61
|
return [];
|
|
51
|
-
return [...
|
|
62
|
+
return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
52
63
|
}
|
|
53
64
|
case 'LogicalExpression':
|
|
54
|
-
return
|
|
65
|
+
return getDependenciesFromNodes([node.left, node.right]);
|
|
55
66
|
case 'If':
|
|
56
|
-
return
|
|
67
|
+
return getDependenciesFromNodes([node.clause, node.then, ...(node.else ? [node.else] : [])]);
|
|
57
68
|
case 'For':
|
|
58
|
-
return
|
|
69
|
+
return getDependenciesFromNodes(node.do.commands);
|
|
59
70
|
case 'CompoundList':
|
|
60
|
-
return
|
|
71
|
+
return getDependenciesFromNodes(node.commands);
|
|
61
72
|
case 'Pipeline':
|
|
62
|
-
return
|
|
73
|
+
return getDependenciesFromNodes(node.commands);
|
|
63
74
|
case 'Function':
|
|
64
|
-
return
|
|
75
|
+
return getDependenciesFromNodes(node.body.commands);
|
|
65
76
|
default:
|
|
66
77
|
return [];
|
|
67
78
|
}
|
|
68
79
|
});
|
|
69
80
|
try {
|
|
70
81
|
const parsed = parse(script);
|
|
71
|
-
return parsed?.commands ?
|
|
82
|
+
return parsed?.commands ? getDependenciesFromNodes(parsed.commands) : [];
|
|
72
83
|
}
|
|
73
84
|
catch (error) {
|
|
74
85
|
debugLogObject('*', 'Bash parser error', error);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import parseArgs from 'minimist';
|
|
2
|
+
import { compact } from '../util/array.js';
|
|
3
|
+
import { toBinary, toDeferResolve, toEntry } from '../util/input.js';
|
|
4
|
+
const spawningBinaries = ['cross-env', 'retry-cli'];
|
|
5
|
+
const positionals = new Set(['babel-node', 'esbuild', 'execa', 'vite-node', 'zx']);
|
|
6
|
+
export const resolve = (binary, args, { fromArgs }) => {
|
|
7
|
+
const parsed = parseArgs(args, { boolean: ['quiet', 'verbose'] });
|
|
8
|
+
const bin = binary.startsWith('.') ? toEntry(binary) : toBinary(binary);
|
|
9
|
+
const shiftedArgs = spawningBinaries.includes(binary) ? fromArgs(args) : [];
|
|
10
|
+
const pos = positionals.has(binary) ? [toDeferResolve(parsed._[0])] : [];
|
|
11
|
+
return compact([bin, ...shiftedArgs, ...pos]);
|
|
12
|
+
};
|
package/dist/binaries/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const
|
|
1
|
+
import type { GetInputsFromScripts } from '../types/config.js';
|
|
2
|
+
export declare const _getInputsFromScripts: GetInputsFromScripts;
|
package/dist/binaries/index.js
CHANGED
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import { FOREIGN_FILE_EXTENSIONS } from '../constants.js';
|
|
2
1
|
import { timerify } from '../util/Performance.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return identifier;
|
|
18
|
-
}
|
|
19
|
-
if (isInternal(identifier)) {
|
|
20
|
-
const ext = extname(identifier);
|
|
21
|
-
if (ext && FOREIGN_FILE_EXTENSIONS.has(ext))
|
|
22
|
-
return;
|
|
23
|
-
return identifier;
|
|
24
|
-
}
|
|
25
|
-
return getPackageNameFromModuleSpecifier(identifier);
|
|
26
|
-
}));
|
|
2
|
+
import { fromBinary, isBinary } from '../util/input.js';
|
|
3
|
+
import { getDependenciesFromScript } from './bash-parser.js';
|
|
4
|
+
const getInputsFromScripts = (npmScripts, options) => {
|
|
5
|
+
const scripts = typeof npmScripts === 'string' ? [npmScripts] : Array.from(npmScripts);
|
|
6
|
+
const results = scripts.flatMap(script => getDependenciesFromScript(script, options));
|
|
7
|
+
const inputs = new Set();
|
|
8
|
+
for (const input of results) {
|
|
9
|
+
if (!input.specifier || input.specifier.startsWith('http'))
|
|
10
|
+
continue;
|
|
11
|
+
if (isBinary(input) && !/^\b/.test(fromBinary(input)))
|
|
12
|
+
continue;
|
|
13
|
+
inputs.add(input);
|
|
14
|
+
}
|
|
15
|
+
return Array.from(inputs);
|
|
27
16
|
};
|
|
28
|
-
export const
|
|
17
|
+
export const _getInputsFromScripts = timerify(getInputsFromScripts);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import {
|
|
2
|
+
import { isFile } from '../../util/fs.js';
|
|
3
|
+
import { toEntry } from '../../util/input.js';
|
|
4
|
+
import { isAbsolute, join } from '../../util/path.js';
|
|
3
5
|
const commands = ['add', 'create', 'init', 'install', 'link', 'pm', 'remove', 'run', 'test', 'update', 'upgrade'];
|
|
4
6
|
export const resolve = (_binary, args, { manifestScriptNames, cwd, fromArgs }) => {
|
|
5
7
|
const parsed = parseArgs(args);
|
|
@@ -9,8 +11,8 @@ export const resolve = (_binary, args, { manifestScriptNames, cwd, fromArgs }) =
|
|
|
9
11
|
if (manifestScriptNames.has(command) || commands.includes(command))
|
|
10
12
|
return [];
|
|
11
13
|
const filePath = command === 'run' ? script : command;
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
return [
|
|
14
|
+
const absFilePath = isAbsolute(filePath) ? filePath : join(cwd, filePath);
|
|
15
|
+
if (isFile(absFilePath))
|
|
16
|
+
return [toEntry(absFilePath)];
|
|
15
17
|
return fromArgs(args);
|
|
16
18
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
bun: import("../../types/config.js").BinaryResolver;
|
|
3
|
+
npm: import("../../types/config.js").BinaryResolver;
|
|
4
|
+
npx: import("../../types/config.js").BinaryResolver;
|
|
5
|
+
pnpm: import("../../types/config.js").BinaryResolver;
|
|
6
|
+
yarn: import("../../types/config.js").BinaryResolver;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as bun from './bun.js';
|
|
2
|
+
import * as npm from './npm.js';
|
|
3
|
+
import * as npx from './npx.js';
|
|
4
|
+
import * as pnpm from './pnpm.js';
|
|
5
|
+
import * as yarn from './yarn.js';
|
|
6
|
+
export default {
|
|
7
|
+
bun: bun.resolve,
|
|
8
|
+
npm: npm.resolve,
|
|
9
|
+
npx: npx.resolve,
|
|
10
|
+
pnpm: pnpm.resolve,
|
|
11
|
+
yarn: yarn.resolve,
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import parseArgs from 'minimist';
|
|
2
|
+
import { toBinary } from '../../util/input.js';
|
|
3
|
+
export const resolve = (_binary, args, options) => {
|
|
4
|
+
const { fromArgs } = options;
|
|
5
|
+
const parsed = parseArgs(args);
|
|
6
|
+
const [command] = parsed._;
|
|
7
|
+
return [toBinary(_binary), ...(command !== 'exec' ? [] : fromArgs(parsed._.slice(1)))];
|
|
8
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
+
import { toBinary, toDependency } from '../../util/input.js';
|
|
2
3
|
import { isInternal } from '../../util/path.js';
|
|
3
|
-
import { toBinary } from '../../util/protocols.js';
|
|
4
4
|
import { argsFrom, stripVersionFromSpecifier } from '../util.js';
|
|
5
5
|
export const resolve = (_binary, args, options) => {
|
|
6
|
-
const { fromArgs
|
|
6
|
+
const { fromArgs } = options;
|
|
7
7
|
const parsed = parseArgs(args, {
|
|
8
|
-
boolean: ['yes', 'no'],
|
|
8
|
+
boolean: ['yes', 'no', 'quiet'],
|
|
9
9
|
alias: { yes: 'y', no: 'no-install', package: 'p', call: 'c' },
|
|
10
10
|
});
|
|
11
11
|
const packageSpecifier = parsed._[0];
|
|
@@ -13,8 +13,8 @@ export const resolve = (_binary, args, options) => {
|
|
|
13
13
|
const packages = parsed.package && !parsed.yes ? [parsed.package].flat().map(stripVersionFromSpecifier) : [];
|
|
14
14
|
const command = parsed.call ? fromArgs([parsed.call]) : [];
|
|
15
15
|
const restArgs = argsFrom(args, packageSpecifier);
|
|
16
|
-
const isBinary = specifier && !packageSpecifier.includes('@') && !isInternal(specifier)
|
|
17
|
-
const dependency = isBinary ? toBinary(specifier) : specifier;
|
|
16
|
+
const isBinary = specifier && !packageSpecifier.includes('@') && !isInternal(specifier);
|
|
17
|
+
const dependency = isBinary ? toBinary(specifier) : toDependency(specifier);
|
|
18
18
|
const specifiers = dependency && !parsed.yes ? [dependency] : [];
|
|
19
|
-
return [...specifiers, ...packages, ...command, ...fromArgs(restArgs).slice(1)];
|
|
19
|
+
return [toBinary(_binary), ...specifiers, ...packages.map(toDependency), ...command, ...fromArgs(restArgs).slice(1)];
|
|
20
20
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { toBinary } from '../../util/
|
|
2
|
+
import { toBinary } from '../../util/input.js';
|
|
3
3
|
const commands = [
|
|
4
4
|
'add',
|
|
5
5
|
'audit',
|
|
@@ -51,7 +51,7 @@ const commands = [
|
|
|
51
51
|
'upgrade',
|
|
52
52
|
'why',
|
|
53
53
|
];
|
|
54
|
-
export const resolve = (_binary, args, { manifestScriptNames }) => {
|
|
54
|
+
export const resolve = (_binary, args, { manifestScriptNames, fromArgs }) => {
|
|
55
55
|
const parsed = parseArgs(args, {
|
|
56
56
|
boolean: ['recursive', 'silent', 'shell-mode'],
|
|
57
57
|
alias: { recursive: 'r', silent: 's', 'shell-mode': 'c' },
|
|
@@ -59,7 +59,10 @@ export const resolve = (_binary, args, { manifestScriptNames }) => {
|
|
|
59
59
|
const [command, binary] = parsed._;
|
|
60
60
|
if (manifestScriptNames.has(command) || commands.includes(command))
|
|
61
61
|
return [];
|
|
62
|
-
if (command === 'exec')
|
|
62
|
+
if (command === 'exec') {
|
|
63
|
+
if (parsed._.length > 2)
|
|
64
|
+
return [toBinary(binary), ...fromArgs(parsed._.slice(1))];
|
|
63
65
|
return [toBinary(binary)];
|
|
66
|
+
}
|
|
64
67
|
return command ? [toBinary(command)] : [];
|
|
65
68
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { toBinary } from '../../util/
|
|
2
|
+
import { toBinary } from '../../util/input.js';
|
|
3
|
+
import { join } from '../../util/path.js';
|
|
3
4
|
const commands = [
|
|
4
5
|
'add',
|
|
5
6
|
'bin',
|
|
@@ -32,16 +33,17 @@ const commands = [
|
|
|
32
33
|
'workspace',
|
|
33
34
|
'workspaces',
|
|
34
35
|
];
|
|
35
|
-
export const resolve = (_binary, args, { manifestScriptNames, fromArgs }) => {
|
|
36
|
-
const parsed = parseArgs(args, {});
|
|
36
|
+
export const resolve = (_binary, args, { manifestScriptNames, fromArgs, cwd, rootCwd }) => {
|
|
37
|
+
const parsed = parseArgs(args, { boolean: ['top-level'], string: ['cwd'] });
|
|
37
38
|
const [command, binary] = parsed._;
|
|
38
|
-
|
|
39
|
+
const dir = parsed['top-level'] ? rootCwd : parsed.cwd ? join(cwd, parsed.cwd) : undefined;
|
|
40
|
+
if ((!dir && manifestScriptNames.has(command)) || commands.includes(command))
|
|
39
41
|
return [];
|
|
40
|
-
if (command === 'run' && manifestScriptNames.has(binary))
|
|
42
|
+
if (!dir && command === 'run' && manifestScriptNames.has(binary))
|
|
41
43
|
return [];
|
|
42
44
|
if (command === 'run' || command === 'exec')
|
|
43
|
-
return [toBinary(binary)];
|
|
45
|
+
return dir ? [{ ...toBinary(binary), dir }] : [toBinary(binary)];
|
|
44
46
|
if (command === 'node')
|
|
45
47
|
return fromArgs(parsed._);
|
|
46
|
-
return command ? [toBinary(command)] : [];
|
|
48
|
+
return command ? (dir ? [{ ...toBinary(command), dir }] : [toBinary(command)]) : [];
|
|
47
49
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import parseArgs from 'minimist';
|
|
2
|
+
import { pluginArgsMap } from '../plugins.js';
|
|
3
|
+
import { compact } from '../util/array.js';
|
|
4
|
+
import { toBinary, toConfig, toDeferResolve, toDeferResolveEntry, toEntry } from '../util/input.js';
|
|
5
|
+
import { resolve as fallbackResolve } from './fallback.js';
|
|
6
|
+
const isGlobLikeMatch = /(^!|[*+\\(|{^$])/;
|
|
7
|
+
const isGlobLike = (value) => isGlobLikeMatch.test(value);
|
|
8
|
+
const nodeLoadersArgs = { import: ['r', 'experimental-loader', 'require', 'loader', 'test-reporter'] };
|
|
9
|
+
export const resolve = (binary, _args, options) => {
|
|
10
|
+
const { fromArgs, containingFilePath } = options;
|
|
11
|
+
const [pluginName, pluginArgs] = pluginArgsMap.get(binary) ?? [];
|
|
12
|
+
if (!pluginArgs)
|
|
13
|
+
return fallbackResolve(binary, _args, options);
|
|
14
|
+
const opts = pluginArgs;
|
|
15
|
+
const args = typeof opts.args === 'function' ? opts.args(_args) : _args;
|
|
16
|
+
const parsed = parseArgs(args, {
|
|
17
|
+
string: [
|
|
18
|
+
...(opts.nodeImportArgs ? ['import'] : []),
|
|
19
|
+
...(opts.config === true ? ['config'] : []),
|
|
20
|
+
...(opts.string ?? []),
|
|
21
|
+
],
|
|
22
|
+
boolean: ['quiet', 'verbose', 'watch', ...(opts.boolean ?? [])],
|
|
23
|
+
alias: {
|
|
24
|
+
...(opts.nodeImportArgs ? nodeLoadersArgs : {}),
|
|
25
|
+
...(opts.config === true ? { config: ['c'] } : {}),
|
|
26
|
+
...opts.alias,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const positionals = [];
|
|
30
|
+
if (opts.positional) {
|
|
31
|
+
const id = parsed._[0];
|
|
32
|
+
if (isGlobLike(id))
|
|
33
|
+
positionals.push(toEntry(id));
|
|
34
|
+
else
|
|
35
|
+
positionals.push(toDeferResolveEntry(id));
|
|
36
|
+
}
|
|
37
|
+
const mapToParsedKey = (id) => parsed[id];
|
|
38
|
+
const resolved = compact(opts.resolve ? opts.resolve.flatMap(mapToParsedKey) : []);
|
|
39
|
+
const resolvedImports = opts.nodeImportArgs && parsed.import ? [parsed.import].flat() : [];
|
|
40
|
+
const resolvedFromArgs = typeof opts.fromArgs === 'function'
|
|
41
|
+
? fromArgs(opts.fromArgs(parsed, args))
|
|
42
|
+
: Array.isArray(opts.fromArgs)
|
|
43
|
+
? fromArgs(opts.fromArgs.flatMap(mapToParsedKey))
|
|
44
|
+
: [];
|
|
45
|
+
const config = opts.config === true ? ['config'] : opts.config || [];
|
|
46
|
+
const mapToConfigPattern = (value) => {
|
|
47
|
+
if (typeof value === 'string')
|
|
48
|
+
return parsed[value] && pluginName ? [toConfig(pluginName, parsed[value], containingFilePath)] : [];
|
|
49
|
+
const [id, fn] = value;
|
|
50
|
+
return parsed[id] && pluginName ? [toConfig(pluginName, fn(parsed[id]), containingFilePath)] : [];
|
|
51
|
+
};
|
|
52
|
+
const configFilePaths = config.flatMap(mapToConfigPattern);
|
|
53
|
+
return [
|
|
54
|
+
toBinary(binary),
|
|
55
|
+
...positionals,
|
|
56
|
+
...resolved.map(toDeferResolve),
|
|
57
|
+
...resolvedImports.map(toDeferResolve),
|
|
58
|
+
...resolvedFromArgs,
|
|
59
|
+
...configFilePaths,
|
|
60
|
+
];
|
|
61
|
+
};
|
package/dist/binaries/util.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const tryResolveFilePath: (cwd: string, specifier: string, acceptModuleSpecifier?: boolean) => string | undefined;
|
|
2
|
-
export declare const tryResolveSpecifiers: (cwd: string, specifiers: string[]) => (string | undefined)[];
|
|
3
1
|
export declare const stripVersionFromSpecifier: (specifier: string) => string;
|
|
4
2
|
export declare const trimBinary: (command: string) => string;
|
|
5
3
|
export declare const argsFrom: (args: string[], from: string) => string[];
|
package/dist/binaries/util.js
CHANGED
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
import { getPackageNameFromFilePath, getPackageNameFromModuleSpecifier } from '../util/modules.js';
|
|
2
|
-
import { isAbsolute, isInNodeModules, join } from '../util/path.js';
|
|
3
|
-
import { toBinary } from '../util/protocols.js';
|
|
4
|
-
import { _resolveSync } from '../util/resolve.js';
|
|
5
|
-
export const tryResolveFilePath = (cwd, specifier, acceptModuleSpecifier) => {
|
|
6
|
-
if (specifier) {
|
|
7
|
-
const filePath = isAbsolute(specifier) ? specifier : join(cwd, specifier);
|
|
8
|
-
if (!isInNodeModules(filePath)) {
|
|
9
|
-
const resolvedFilePath = _resolveSync(filePath, cwd);
|
|
10
|
-
if (resolvedFilePath) {
|
|
11
|
-
return resolvedFilePath;
|
|
12
|
-
}
|
|
13
|
-
if (acceptModuleSpecifier) {
|
|
14
|
-
return getPackageNameFromModuleSpecifier(specifier);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
else if (specifier.includes('node_modules/.bin')) {
|
|
18
|
-
return toBinary(trimBinary(specifier));
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return getPackageNameFromFilePath(specifier);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
export const tryResolveSpecifiers = (cwd, specifiers) => specifiers.map(specifier => tryResolveFilePath(cwd, specifier, true));
|
|
26
1
|
export const stripVersionFromSpecifier = (specifier) => specifier.replace(/(\S+)@.*/, '$1');
|
|
27
2
|
const stripNodeModulesFromPath = (command) => command.replace(/^(\.\/)?node_modules\//, '');
|
|
28
3
|
export const trimBinary = (command) => stripVersionFromSpecifier(stripNodeModulesFromPath(command)
|
|
@@ -6,6 +6,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
6
6
|
asyncCompilers: Record<string, AsyncCompilerFn>;
|
|
7
7
|
exclude?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
8
8
|
include?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
9
|
+
node?: string | boolean | string[] | {
|
|
10
|
+
config?: string | string[] | undefined;
|
|
11
|
+
entry?: string | string[] | undefined;
|
|
12
|
+
project?: string | string[] | undefined;
|
|
13
|
+
} | undefined;
|
|
9
14
|
rules?: Partial<Record<"dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
|
|
10
15
|
entry?: string | string[] | undefined;
|
|
11
16
|
project?: string | string[] | undefined;
|
|
@@ -38,6 +43,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
38
43
|
entry?: string | string[] | undefined;
|
|
39
44
|
project?: string | string[] | undefined;
|
|
40
45
|
} | undefined;
|
|
46
|
+
c8?: string | boolean | string[] | {
|
|
47
|
+
config?: string | string[] | undefined;
|
|
48
|
+
entry?: string | string[] | undefined;
|
|
49
|
+
project?: string | string[] | undefined;
|
|
50
|
+
} | undefined;
|
|
41
51
|
capacitor?: string | boolean | string[] | {
|
|
42
52
|
config?: string | string[] | undefined;
|
|
43
53
|
entry?: string | string[] | undefined;
|
|
@@ -73,6 +83,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
73
83
|
entry?: string | string[] | undefined;
|
|
74
84
|
project?: string | string[] | undefined;
|
|
75
85
|
} | undefined;
|
|
86
|
+
dotenv?: string | boolean | string[] | {
|
|
87
|
+
config?: string | string[] | undefined;
|
|
88
|
+
entry?: string | string[] | undefined;
|
|
89
|
+
project?: string | string[] | undefined;
|
|
90
|
+
} | undefined;
|
|
76
91
|
eleventy?: string | boolean | string[] | {
|
|
77
92
|
config?: string | string[] | undefined;
|
|
78
93
|
entry?: string | string[] | undefined;
|
|
@@ -173,6 +188,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
173
188
|
entry?: string | string[] | undefined;
|
|
174
189
|
project?: string | string[] | undefined;
|
|
175
190
|
} | undefined;
|
|
191
|
+
nodemon?: string | boolean | string[] | {
|
|
192
|
+
config?: string | string[] | undefined;
|
|
193
|
+
entry?: string | string[] | undefined;
|
|
194
|
+
project?: string | string[] | undefined;
|
|
195
|
+
} | undefined;
|
|
176
196
|
'node-test-runner'?: string | boolean | string[] | {
|
|
177
197
|
config?: string | string[] | undefined;
|
|
178
198
|
entry?: string | string[] | undefined;
|
|
@@ -213,6 +233,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
213
233
|
entry?: string | string[] | undefined;
|
|
214
234
|
project?: string | string[] | undefined;
|
|
215
235
|
} | undefined;
|
|
236
|
+
'playwright-test'?: string | boolean | string[] | {
|
|
237
|
+
config?: string | string[] | undefined;
|
|
238
|
+
entry?: string | string[] | undefined;
|
|
239
|
+
project?: string | string[] | undefined;
|
|
240
|
+
} | undefined;
|
|
216
241
|
postcss?: string | boolean | string[] | {
|
|
217
242
|
config?: string | string[] | undefined;
|
|
218
243
|
entry?: string | string[] | undefined;
|
|
@@ -318,11 +343,21 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
318
343
|
entry?: string | string[] | undefined;
|
|
319
344
|
project?: string | string[] | undefined;
|
|
320
345
|
} | undefined;
|
|
346
|
+
'ts-node'?: string | boolean | string[] | {
|
|
347
|
+
config?: string | string[] | undefined;
|
|
348
|
+
entry?: string | string[] | undefined;
|
|
349
|
+
project?: string | string[] | undefined;
|
|
350
|
+
} | undefined;
|
|
321
351
|
tsup?: string | boolean | string[] | {
|
|
322
352
|
config?: string | string[] | undefined;
|
|
323
353
|
entry?: string | string[] | undefined;
|
|
324
354
|
project?: string | string[] | undefined;
|
|
325
355
|
} | undefined;
|
|
356
|
+
tsx?: string | boolean | string[] | {
|
|
357
|
+
config?: string | string[] | undefined;
|
|
358
|
+
entry?: string | string[] | undefined;
|
|
359
|
+
project?: string | string[] | undefined;
|
|
360
|
+
} | undefined;
|
|
326
361
|
typedoc?: string | boolean | string[] | {
|
|
327
362
|
config?: string | string[] | undefined;
|
|
328
363
|
entry?: string | string[] | undefined;
|
|
@@ -399,6 +434,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
399
434
|
project?: string | string[] | undefined;
|
|
400
435
|
} | undefined;
|
|
401
436
|
workspaces?: Record<string, {
|
|
437
|
+
node?: string | boolean | string[] | {
|
|
438
|
+
config?: string | string[] | undefined;
|
|
439
|
+
entry?: string | string[] | undefined;
|
|
440
|
+
project?: string | string[] | undefined;
|
|
441
|
+
} | undefined;
|
|
402
442
|
entry?: string | string[] | undefined;
|
|
403
443
|
project?: string | string[] | undefined;
|
|
404
444
|
paths?: Record<string, string[]> | undefined;
|
|
@@ -427,6 +467,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
427
467
|
entry?: string | string[] | undefined;
|
|
428
468
|
project?: string | string[] | undefined;
|
|
429
469
|
} | undefined;
|
|
470
|
+
c8?: string | boolean | string[] | {
|
|
471
|
+
config?: string | string[] | undefined;
|
|
472
|
+
entry?: string | string[] | undefined;
|
|
473
|
+
project?: string | string[] | undefined;
|
|
474
|
+
} | undefined;
|
|
430
475
|
capacitor?: string | boolean | string[] | {
|
|
431
476
|
config?: string | string[] | undefined;
|
|
432
477
|
entry?: string | string[] | undefined;
|
|
@@ -462,6 +507,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
462
507
|
entry?: string | string[] | undefined;
|
|
463
508
|
project?: string | string[] | undefined;
|
|
464
509
|
} | undefined;
|
|
510
|
+
dotenv?: string | boolean | string[] | {
|
|
511
|
+
config?: string | string[] | undefined;
|
|
512
|
+
entry?: string | string[] | undefined;
|
|
513
|
+
project?: string | string[] | undefined;
|
|
514
|
+
} | undefined;
|
|
465
515
|
eleventy?: string | boolean | string[] | {
|
|
466
516
|
config?: string | string[] | undefined;
|
|
467
517
|
entry?: string | string[] | undefined;
|
|
@@ -562,6 +612,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
562
612
|
entry?: string | string[] | undefined;
|
|
563
613
|
project?: string | string[] | undefined;
|
|
564
614
|
} | undefined;
|
|
615
|
+
nodemon?: string | boolean | string[] | {
|
|
616
|
+
config?: string | string[] | undefined;
|
|
617
|
+
entry?: string | string[] | undefined;
|
|
618
|
+
project?: string | string[] | undefined;
|
|
619
|
+
} | undefined;
|
|
565
620
|
'node-test-runner'?: string | boolean | string[] | {
|
|
566
621
|
config?: string | string[] | undefined;
|
|
567
622
|
entry?: string | string[] | undefined;
|
|
@@ -602,6 +657,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
602
657
|
entry?: string | string[] | undefined;
|
|
603
658
|
project?: string | string[] | undefined;
|
|
604
659
|
} | undefined;
|
|
660
|
+
'playwright-test'?: string | boolean | string[] | {
|
|
661
|
+
config?: string | string[] | undefined;
|
|
662
|
+
entry?: string | string[] | undefined;
|
|
663
|
+
project?: string | string[] | undefined;
|
|
664
|
+
} | undefined;
|
|
605
665
|
postcss?: string | boolean | string[] | {
|
|
606
666
|
config?: string | string[] | undefined;
|
|
607
667
|
entry?: string | string[] | undefined;
|
|
@@ -707,11 +767,21 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
707
767
|
entry?: string | string[] | undefined;
|
|
708
768
|
project?: string | string[] | undefined;
|
|
709
769
|
} | undefined;
|
|
770
|
+
'ts-node'?: string | boolean | string[] | {
|
|
771
|
+
config?: string | string[] | undefined;
|
|
772
|
+
entry?: string | string[] | undefined;
|
|
773
|
+
project?: string | string[] | undefined;
|
|
774
|
+
} | undefined;
|
|
710
775
|
tsup?: string | boolean | string[] | {
|
|
711
776
|
config?: string | string[] | undefined;
|
|
712
777
|
entry?: string | string[] | undefined;
|
|
713
778
|
project?: string | string[] | undefined;
|
|
714
779
|
} | undefined;
|
|
780
|
+
tsx?: string | boolean | string[] | {
|
|
781
|
+
config?: string | string[] | undefined;
|
|
782
|
+
entry?: string | string[] | undefined;
|
|
783
|
+
project?: string | string[] | undefined;
|
|
784
|
+
} | undefined;
|
|
715
785
|
typedoc?: string | boolean | string[] | {
|
|
716
786
|
config?: string | string[] | undefined;
|
|
717
787
|
entry?: string | string[] | undefined;
|
package/dist/constants.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const INTERNAL_TAG = "@internal";
|
|
|
10
10
|
export declare const BETA_TAG = "@beta";
|
|
11
11
|
export declare const ALIAS_TAG = "@alias";
|
|
12
12
|
export declare const DT_SCOPE = "@types";
|
|
13
|
+
export declare const PROTOCOL_VIRTUAL = "virtual:";
|
|
13
14
|
export declare const IGNORED_GLOBAL_BINARIES: Set<string>;
|
|
14
15
|
export declare const IGNORED_DEPENDENCIES: Set<string>;
|
|
15
16
|
export declare const IGNORED_RUNTIME_DEPENDENCIES: Set<string>;
|
package/dist/constants.js
CHANGED
|
@@ -18,6 +18,7 @@ export const INTERNAL_TAG = '@internal';
|
|
|
18
18
|
export const BETA_TAG = '@beta';
|
|
19
19
|
export const ALIAS_TAG = '@alias';
|
|
20
20
|
export const DT_SCOPE = '@types';
|
|
21
|
+
export const PROTOCOL_VIRTUAL = 'virtual:';
|
|
21
22
|
export const IGNORED_GLOBAL_BINARIES = new Set([
|
|
22
23
|
'aws',
|
|
23
24
|
'base64',
|
|
@@ -118,7 +119,7 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
|
|
|
118
119
|
'yes',
|
|
119
120
|
]);
|
|
120
121
|
export const IGNORED_DEPENDENCIES = new Set(['knip', 'typescript']);
|
|
121
|
-
export const IGNORED_RUNTIME_DEPENDENCIES = new Set(['bun', 'deno']);
|
|
122
|
+
export const IGNORED_RUNTIME_DEPENDENCIES = new Set(['node', 'bun', 'deno']);
|
|
122
123
|
export const FOREIGN_FILE_EXTENSIONS = new Set([
|
|
123
124
|
'.avif',
|
|
124
125
|
'.css',
|