knip 6.4.1 → 6.6.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/CacheConsultant.js +3 -3
- package/dist/CatalogCounselor.js +5 -5
- package/dist/ConfigurationChief.d.ts +39 -16
- package/dist/ConfigurationChief.js +15 -15
- package/dist/DependencyDeputy.d.ts +1 -1
- package/dist/DependencyDeputy.js +5 -5
- package/dist/IssueCollector.js +3 -3
- package/dist/IssueFixer.js +5 -5
- package/dist/JsonCatalogPeeker.js +1 -1
- package/dist/ProjectPrincipal.js +13 -13
- package/dist/WorkspaceWorker.d.ts +3 -2
- package/dist/WorkspaceWorker.js +39 -26
- package/dist/YamlCatalogPeeker.js +1 -1
- package/dist/binaries/bash-parser.js +10 -10
- package/dist/binaries/fallback.js +3 -3
- package/dist/binaries/index.js +3 -3
- package/dist/binaries/plugins.js +6 -6
- package/dist/binaries/resolvers/bun.js +4 -4
- package/dist/binaries/resolvers/bunx.js +4 -4
- package/dist/binaries/resolvers/find.js +1 -1
- package/dist/binaries/resolvers/index.js +8 -8
- package/dist/binaries/resolvers/npx.js +4 -4
- package/dist/binaries/resolvers/pnpm.js +3 -3
- package/dist/binaries/resolvers/pnpx.js +2 -2
- package/dist/binaries/resolvers/yarn.js +4 -4
- package/dist/cli.js +10 -10
- package/dist/compilers/index.d.ts +62 -22
- package/dist/compilers/index.js +2 -2
- package/dist/compilers/mdx.js +1 -1
- package/dist/compilers/scss.js +1 -1
- package/dist/constants.d.ts +25 -25
- package/dist/constants.js +1 -1
- package/dist/graph/analyze.js +7 -7
- package/dist/graph/build.d.ts +2 -2
- package/dist/graph/build.js +34 -26
- package/dist/graph-explorer/constants.d.ts +5 -5
- package/dist/graph-explorer/explorer.js +9 -9
- package/dist/graph-explorer/operations/build-exports-tree.js +2 -2
- package/dist/graph-explorer/operations/get-contention.js +3 -3
- package/dist/graph-explorer/operations/get-dependency-usage.js +1 -1
- package/dist/graph-explorer/operations/get-usage.js +5 -5
- package/dist/graph-explorer/operations/has-strictly-ns-references.js +1 -1
- package/dist/graph-explorer/operations/is-referenced.js +2 -2
- package/dist/graph-explorer/operations/resolve-definition.js +3 -3
- package/dist/graph-explorer/utils.d.ts +1 -1
- package/dist/graph-explorer/utils.js +2 -2
- package/dist/graph-explorer/visitors.js +1 -1
- package/dist/graph-explorer/walk-down.js +2 -2
- package/dist/graph-explorer/walk-up.js +2 -2
- package/dist/index.js +2 -2
- package/dist/manifest/helpers.js +2 -2
- package/dist/manifest/index.js +3 -3
- package/dist/plugins/_template/index.js +2 -2
- package/dist/plugins/angular/index.js +4 -4
- package/dist/plugins/astro/compiler-mdx.js +1 -1
- package/dist/plugins/astro/compiler.js +1 -1
- package/dist/plugins/astro/index.js +8 -6
- package/dist/plugins/astro/resolveFromAST.d.ts +1 -0
- package/dist/plugins/astro/resolveFromAST.js +40 -1
- package/dist/plugins/astro-db/index.js +1 -1
- package/dist/plugins/astro-og-canvas/index.js +2 -2
- package/dist/plugins/ava/index.js +2 -2
- package/dist/plugins/babel/helpers.d.ts +44 -6
- package/dist/plugins/babel/helpers.js +1 -1
- package/dist/plugins/babel/index.js +4 -4
- package/dist/plugins/biome/index.js +4 -4
- package/dist/plugins/bumpp/index.js +2 -2
- package/dist/plugins/bun/index.js +1 -1
- package/dist/plugins/c8/index.js +1 -1
- package/dist/plugins/capacitor/index.js +3 -3
- package/dist/plugins/changelogen/index.js +2 -2
- package/dist/plugins/changelogithub/index.js +2 -2
- package/dist/plugins/changesets/index.js +3 -3
- package/dist/plugins/commitizen/index.js +2 -2
- package/dist/plugins/commitlint/index.js +3 -3
- package/dist/plugins/convex/index.js +1 -1
- package/dist/plugins/create-typescript-app/index.js +1 -1
- package/dist/plugins/cspell/index.js +2 -2
- package/dist/plugins/cucumber/index.js +2 -2
- package/dist/plugins/cypress/helpers.js +2 -2
- package/dist/plugins/cypress/index.js +3 -3
- package/dist/plugins/danger/index.js +1 -1
- package/dist/plugins/dependency-cruiser/index.js +1 -1
- package/dist/plugins/docusaurus/helpers.js +2 -2
- package/dist/plugins/docusaurus/index.js +4 -4
- package/dist/plugins/dotenv/index.js +1 -1
- package/dist/plugins/drizzle/index.js +2 -2
- package/dist/plugins/eleventy/index.js +6 -6
- package/dist/plugins/eslint/helpers.js +5 -5
- package/dist/plugins/eslint/index.js +4 -4
- package/dist/plugins/eslint/resolveFromAST.js +3 -3
- package/dist/plugins/execa/index.js +2 -2
- package/dist/plugins/execa/visitors/execa.js +1 -1
- package/dist/plugins/expo/helpers.d.ts +3 -3
- package/dist/plugins/expo/helpers.js +3 -3
- package/dist/plugins/expo/index.js +4 -4
- package/dist/plugins/expressive-code/index.js +1 -1
- package/dist/plugins/gatsby/index.js +2 -2
- package/dist/plugins/github-action/index.js +4 -4
- package/dist/plugins/github-actions/index.js +4 -4
- package/dist/plugins/graphql-codegen/index.js +5 -5
- package/dist/plugins/hardhat/index.js +2 -2
- package/dist/plugins/husky/index.js +3 -3
- package/dist/plugins/i18next-parser/index.js +1 -1
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.js +152 -144
- package/dist/plugins/jest/helpers.js +2 -2
- package/dist/plugins/jest/index.js +4 -4
- package/dist/plugins/karma/helpers.d.ts +1 -1
- package/dist/plugins/karma/helpers.js +2 -2
- package/dist/plugins/karma/index.js +4 -4
- package/dist/plugins/knex/index.js +3 -3
- package/dist/plugins/ladle/index.js +4 -4
- package/dist/plugins/lefthook/index.js +5 -5
- package/dist/plugins/lint-staged/index.js +2 -2
- package/dist/plugins/linthtml/index.js +3 -3
- package/dist/plugins/lockfile-lint/index.js +2 -2
- package/dist/plugins/lost-pixel/index.js +1 -1
- package/dist/plugins/markdownlint/index.js +3 -3
- package/dist/plugins/mdx/index.js +2 -2
- package/dist/plugins/mdxlint/index.js +3 -3
- package/dist/plugins/metro/index.js +4 -4
- package/dist/plugins/mocha/index.js +2 -2
- package/dist/plugins/moonrepo/index.js +1 -1
- package/dist/plugins/msw/index.js +3 -3
- package/dist/plugins/nano-staged/index.js +1 -1
- package/dist/plugins/nest/index.js +2 -2
- package/dist/plugins/netlify/index.js +4 -4
- package/dist/plugins/next/index.js +3 -3
- package/dist/plugins/next/resolveFromAST.js +1 -1
- package/dist/plugins/next-intl/index.js +1 -1
- package/dist/plugins/next-mdx/index.js +3 -3
- package/dist/plugins/next-mdx/resolveFromAST.js +1 -1
- package/dist/plugins/nitro/index.js +3 -3
- package/dist/plugins/node/index.js +1 -1
- package/dist/plugins/node-modules-inspector/index.js +2 -2
- package/dist/plugins/npm-package-json-lint/index.js +3 -3
- package/dist/plugins/nuxt/helpers.js +3 -3
- package/dist/plugins/nuxt/index.js +10 -11
- package/dist/plugins/nx/index.js +4 -4
- package/dist/plugins/nyc/index.js +2 -2
- package/dist/plugins/oclif/index.js +2 -2
- package/dist/plugins/openapi-ts/index.js +2 -2
- package/dist/plugins/oxfmt/index.js +1 -1
- package/dist/plugins/oxlint/index.js +3 -3
- package/dist/plugins/panda-css/index.js +2 -2
- package/dist/plugins/parcel/index.js +2 -2
- package/dist/plugins/payload/index.js +2 -2
- package/dist/plugins/pino/index.d.ts +3 -0
- package/dist/plugins/pino/index.js +15 -0
- package/dist/plugins/pino/visitors/transportCall.d.ts +2 -0
- package/dist/plugins/pino/visitors/transportCall.js +87 -0
- package/dist/plugins/playwright/index.js +4 -4
- package/dist/plugins/playwright-ct/index.js +3 -3
- package/dist/plugins/playwright-test/index.js +1 -1
- package/dist/plugins/plop/index.js +1 -1
- package/dist/plugins/pm2/index.js +3 -3
- package/dist/plugins/pnpm/index.js +1 -1
- package/dist/plugins/postcss/index.js +3 -3
- package/dist/plugins/preconstruct/index.js +3 -3
- package/dist/plugins/prettier/index.js +6 -2
- package/dist/plugins/prisma/index.js +5 -5
- package/dist/plugins/qwik/index.js +5 -5
- package/dist/plugins/qwik/resolveFromAST.js +1 -1
- package/dist/plugins/raycast/index.js +3 -3
- package/dist/plugins/react-cosmos/index.js +3 -3
- package/dist/plugins/react-email/index.d.ts +3 -0
- package/dist/plugins/react-email/index.js +26 -0
- package/dist/plugins/react-native/index.js +2 -2
- package/dist/plugins/react-router/index.js +6 -10
- package/dist/plugins/relay/index.js +3 -3
- package/dist/plugins/release-it/index.js +2 -2
- package/dist/plugins/remark/index.js +3 -3
- package/dist/plugins/remix/index.js +1 -1
- package/dist/plugins/rolldown/index.js +3 -3
- package/dist/plugins/rolldown/resolveFromAST.js +1 -1
- package/dist/plugins/rollup/index.js +3 -3
- package/dist/plugins/rollup/resolveFromAST.js +1 -1
- package/dist/plugins/rsbuild/index.js +2 -2
- package/dist/plugins/rslib/index.js +1 -1
- package/dist/plugins/rspack/index.js +2 -2
- package/dist/plugins/rstest/index.js +2 -2
- package/dist/plugins/sanity/index.js +1 -1
- package/dist/plugins/semantic-release/index.js +3 -3
- package/dist/plugins/sentry/index.js +1 -1
- package/dist/plugins/serverless-framework/index.d.ts +3 -0
- package/dist/plugins/serverless-framework/index.js +23 -0
- package/dist/plugins/serverless-framework/types.d.ts +7 -0
- package/dist/plugins/serverless-framework/types.js +1 -0
- package/dist/plugins/simple-git-hooks/index.js +2 -2
- package/dist/plugins/size-limit/index.js +3 -3
- package/dist/plugins/sst/index.js +2 -2
- package/dist/plugins/sst/resolveFromAST.js +5 -5
- package/dist/plugins/starlight/index.js +4 -4
- package/dist/plugins/starlight/resolveFromAST.js +1 -1
- package/dist/plugins/stencil/index.js +3 -3
- package/dist/plugins/storybook/index.js +3 -3
- package/dist/plugins/stryker/index.js +2 -2
- package/dist/plugins/stylelint/index.js +3 -3
- package/dist/plugins/svelte/compiler.js +1 -1
- package/dist/plugins/svelte/index.js +3 -3
- package/dist/plugins/sveltejs-package/helpers.d.ts +8 -0
- package/dist/plugins/sveltejs-package/helpers.js +65 -0
- package/dist/plugins/sveltejs-package/index.d.ts +3 -0
- package/dist/plugins/sveltejs-package/index.js +27 -0
- package/dist/plugins/sveltekit/index.js +3 -3
- package/dist/plugins/svgo/index.js +1 -1
- package/dist/plugins/svgr/index.js +2 -2
- package/dist/plugins/swc/index.js +3 -3
- package/dist/plugins/syncpack/index.js +2 -2
- package/dist/plugins/tailwind/index.js +2 -2
- package/dist/plugins/tanstack-router/index.js +3 -3
- package/dist/plugins/taskfile/index.js +3 -3
- package/dist/plugins/travis/index.js +1 -1
- package/dist/plugins/tsdown/index.js +3 -3
- package/dist/plugins/tsdown/resolveFromAST.js +1 -1
- package/dist/plugins/tsup/index.js +3 -3
- package/dist/plugins/tsup/resolveFromAST.js +1 -1
- package/dist/plugins/tsx/index.js +2 -2
- package/dist/plugins/typedoc/index.js +2 -2
- package/dist/plugins/typescript/index.js +4 -4
- package/dist/plugins/unbuild/index.js +2 -2
- package/dist/plugins/unocss/index.js +2 -2
- package/dist/plugins/vercel-og/index.js +1 -1
- package/dist/plugins/vike/index.js +1 -1
- package/dist/plugins/vite/helpers.js +4 -4
- package/dist/plugins/vite/index.js +5 -5
- package/dist/plugins/vite/visitors/importMetaGlob.js +4 -4
- package/dist/plugins/vitepress/index.js +1 -1
- package/dist/plugins/vitest/helpers.d.ts +4 -2
- package/dist/plugins/vitest/helpers.js +18 -0
- package/dist/plugins/vitest/index.js +9 -23
- package/dist/plugins/vue/compiler.js +1 -1
- package/dist/plugins/vue/index.js +4 -4
- package/dist/plugins/webdriver-io/index.js +2 -2
- package/dist/plugins/webpack/index.js +5 -5
- package/dist/plugins/webpack/visitors/requireContext.js +6 -7
- package/dist/plugins/wireit/index.js +1 -1
- package/dist/plugins/wrangler/index.js +2 -2
- package/dist/plugins/xo/index.js +2 -2
- package/dist/plugins/yarn/index.js +2 -2
- package/dist/plugins/yorkie/index.js +2 -2
- package/dist/plugins/zx/index.js +2 -2
- package/dist/plugins.js +2 -2
- package/dist/reporters/codeclimate.js +2 -2
- package/dist/reporters/codeowners.js +3 -3
- package/dist/reporters/compact.js +1 -1
- package/dist/reporters/disclosure.js +1 -1
- package/dist/reporters/github-actions.js +4 -4
- package/dist/reporters/index.js +8 -8
- package/dist/reporters/json.js +4 -4
- package/dist/reporters/markdown.js +2 -2
- package/dist/reporters/symbols.js +2 -2
- package/dist/reporters/trace.js +7 -7
- package/dist/reporters/util/configuration-hints.d.ts +2 -2
- package/dist/reporters/util/configuration-hints.js +7 -10
- package/dist/reporters/util/util.d.ts +3 -3
- package/dist/reporters/util/util.js +16 -15
- package/dist/reporters/watch.js +7 -7
- package/dist/run.js +14 -14
- package/dist/schema/configuration.d.ts +89 -31
- package/dist/schema/configuration.js +2 -2
- package/dist/schema/plugins.d.ts +20 -0
- package/dist/schema/plugins.js +4 -0
- package/dist/session/build-maps.js +3 -3
- package/dist/session/file-descriptor.js +3 -3
- package/dist/session/index.js +7 -7
- package/dist/session/package-json-descriptor.js +1 -1
- package/dist/session/session.js +3 -3
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +4 -0
- package/dist/types/config.d.ts +13 -0
- package/dist/types/issues.d.ts +1 -1
- package/dist/typescript/SourceFileManager.js +3 -3
- package/dist/typescript/ast-helpers.d.ts +2 -0
- package/dist/typescript/ast-helpers.js +5 -5
- package/dist/typescript/comments.js +1 -1
- package/dist/typescript/follow-imports.js +2 -2
- package/dist/typescript/get-imports-and-exports.js +10 -10
- package/dist/typescript/resolve-module-names.js +5 -5
- package/dist/typescript/visitors/calls.js +3 -3
- package/dist/typescript/visitors/exports.js +4 -4
- package/dist/typescript/visitors/helpers.js +3 -3
- package/dist/typescript/visitors/imports.js +4 -4
- package/dist/typescript/visitors/members.js +4 -4
- package/dist/typescript/visitors/walk.js +9 -9
- package/dist/util/Performance.d.ts +1 -1
- package/dist/util/Performance.js +2 -2
- package/dist/util/catalog.js +3 -3
- package/dist/util/codeowners.js +4 -4
- package/dist/util/colors.d.ts +18 -0
- package/dist/util/colors.js +24 -0
- package/dist/util/create-input-handler.js +6 -6
- package/dist/util/create-options.d.ts +72 -33
- package/dist/util/create-options.js +14 -15
- package/dist/util/create-workspace-graph.js +1 -1
- package/dist/util/debug.js +2 -4
- package/dist/util/file-entry-cache.js +4 -4
- package/dist/util/fs.js +2 -2
- package/dist/util/get-included-issue-types.js +2 -2
- package/dist/util/git.js +1 -1
- package/dist/util/glob-cache.js +4 -4
- package/dist/util/glob-core.d.ts +3 -3
- package/dist/util/glob-core.js +80 -64
- package/dist/util/glob.d.ts +1 -1
- package/dist/util/glob.js +14 -7
- package/dist/util/input.js +1 -1
- package/dist/util/issue-initializers.js +1 -1
- package/dist/util/jiti.js +1 -1
- package/dist/util/load-config.js +3 -3
- package/dist/util/load-tsconfig.js +62 -50
- package/dist/util/loader.js +5 -5
- package/dist/util/log.js +3 -3
- package/dist/util/map-workspaces.js +6 -6
- package/dist/util/modules.js +2 -2
- package/dist/util/package-name.js +1 -1
- package/dist/util/parse-and-convert-gitignores.d.ts +4 -2
- package/dist/util/parse-and-convert-gitignores.js +19 -7
- package/dist/util/plugin.js +5 -5
- package/dist/util/remove-export.js +1 -1
- package/dist/util/reporter.js +3 -3
- package/dist/util/require.js +1 -1
- package/dist/util/resolve.js +3 -3
- package/dist/util/string.d.ts +1 -1
- package/dist/util/table.js +1 -1
- package/dist/util/tag.js +1 -1
- package/dist/util/to-source-path.d.ts +4 -2
- package/dist/util/to-source-path.js +46 -22
- package/dist/util/trace.js +8 -8
- package/dist/util/watch.js +8 -8
- package/dist/util/workspace-file-filter.js +2 -2
- package/dist/util/workspace-selectors.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +12 -19
- package/schema.json +13 -1
package/dist/CacheConsultant.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FileEntryCache } from
|
|
2
|
-
import { timerify } from
|
|
3
|
-
import { version } from
|
|
1
|
+
import { FileEntryCache } from './util/file-entry-cache.js';
|
|
2
|
+
import { timerify } from './util/Performance.js';
|
|
3
|
+
import { version } from './version.js';
|
|
4
4
|
const dummyFileDescriptor = { key: '', changed: true, notFound: true };
|
|
5
5
|
export class CacheConsultant {
|
|
6
6
|
isEnabled;
|
package/dist/CatalogCounselor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { ROOT_WORKSPACE_NAME } from
|
|
3
|
-
import { JsonCatalogPeeker } from
|
|
4
|
-
import { extractCatalogReferences, parseCatalog } from
|
|
5
|
-
import { extname } from
|
|
6
|
-
import { YamlCatalogPeeker } from
|
|
2
|
+
import { ROOT_WORKSPACE_NAME } from './constants.js';
|
|
3
|
+
import { JsonCatalogPeeker } from './JsonCatalogPeeker.js';
|
|
4
|
+
import { extractCatalogReferences, parseCatalog } from './util/catalog.js';
|
|
5
|
+
import { extname } from './util/path.js';
|
|
6
|
+
import { YamlCatalogPeeker } from './YamlCatalogPeeker.js';
|
|
7
7
|
export class CatalogCounselor {
|
|
8
8
|
filePath;
|
|
9
9
|
entries = new Set();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Configuration, IgnorePatterns, RawConfiguration, WorkspaceConfiguration } from './types/config.ts';
|
|
1
|
+
import type { Configuration, IgnorePatterns, RawConfiguration, SourceMap, WorkspaceConfiguration } from './types/config.ts';
|
|
2
2
|
import type { ConfigurationHint } from './types/issues.ts';
|
|
3
3
|
import type { WorkspacePackage } from './types/package-json.ts';
|
|
4
4
|
import type { MainOptions } from './util/create-options.ts';
|
|
5
5
|
import { type WorkspaceGraph } from './util/create-workspace-graph.ts';
|
|
6
6
|
import { type WorkspaceFilePathFilter } from './util/workspace-file-filter.ts';
|
|
7
|
-
export declare const isDefaultPattern: (type:
|
|
7
|
+
export declare const isDefaultPattern: (type: 'entry' | 'project', id: string) => boolean;
|
|
8
8
|
export type Workspace = {
|
|
9
9
|
name: string;
|
|
10
10
|
pkgName: string;
|
|
@@ -14,8 +14,7 @@ export type Workspace = {
|
|
|
14
14
|
manifestPath: string;
|
|
15
15
|
manifestStr: string;
|
|
16
16
|
ignoreMembers: IgnorePatterns;
|
|
17
|
-
|
|
18
|
-
outDir?: string;
|
|
17
|
+
sourceMaps?: SourceMap[];
|
|
19
18
|
};
|
|
20
19
|
export declare class ConfigurationChief {
|
|
21
20
|
cwd: string;
|
|
@@ -437,6 +436,11 @@ export declare class ConfigurationChief {
|
|
|
437
436
|
entry?: string | string[] | undefined;
|
|
438
437
|
project?: string | string[] | undefined;
|
|
439
438
|
} | undefined;
|
|
439
|
+
pino?: string | boolean | string[] | {
|
|
440
|
+
config?: string | string[] | undefined;
|
|
441
|
+
entry?: string | string[] | undefined;
|
|
442
|
+
project?: string | string[] | undefined;
|
|
443
|
+
} | undefined;
|
|
440
444
|
playwright?: string | boolean | string[] | {
|
|
441
445
|
config?: string | string[] | undefined;
|
|
442
446
|
entry?: string | string[] | undefined;
|
|
@@ -502,6 +506,11 @@ export declare class ConfigurationChief {
|
|
|
502
506
|
entry?: string | string[] | undefined;
|
|
503
507
|
project?: string | string[] | undefined;
|
|
504
508
|
} | undefined;
|
|
509
|
+
'react-email'?: string | boolean | string[] | {
|
|
510
|
+
config?: string | string[] | undefined;
|
|
511
|
+
entry?: string | string[] | undefined;
|
|
512
|
+
project?: string | string[] | undefined;
|
|
513
|
+
} | undefined;
|
|
505
514
|
'react-native'?: string | boolean | string[] | {
|
|
506
515
|
config?: string | string[] | undefined;
|
|
507
516
|
entry?: string | string[] | undefined;
|
|
@@ -577,6 +586,11 @@ export declare class ConfigurationChief {
|
|
|
577
586
|
entry?: string | string[] | undefined;
|
|
578
587
|
project?: string | string[] | undefined;
|
|
579
588
|
} | undefined;
|
|
589
|
+
'serverless-framework'?: string | boolean | string[] | {
|
|
590
|
+
config?: string | string[] | undefined;
|
|
591
|
+
entry?: string | string[] | undefined;
|
|
592
|
+
project?: string | string[] | undefined;
|
|
593
|
+
} | undefined;
|
|
580
594
|
'simple-git-hooks'?: string | boolean | string[] | {
|
|
581
595
|
config?: string | string[] | undefined;
|
|
582
596
|
entry?: string | string[] | undefined;
|
|
@@ -622,6 +636,11 @@ export declare class ConfigurationChief {
|
|
|
622
636
|
entry?: string | string[] | undefined;
|
|
623
637
|
project?: string | string[] | undefined;
|
|
624
638
|
} | undefined;
|
|
639
|
+
'sveltejs-package'?: string | boolean | string[] | {
|
|
640
|
+
config?: string | string[] | undefined;
|
|
641
|
+
entry?: string | string[] | undefined;
|
|
642
|
+
project?: string | string[] | undefined;
|
|
643
|
+
} | undefined;
|
|
625
644
|
sveltekit?: string | boolean | string[] | {
|
|
626
645
|
config?: string | string[] | undefined;
|
|
627
646
|
entry?: string | string[] | undefined;
|
|
@@ -794,12 +813,12 @@ export declare class ConfigurationChief {
|
|
|
794
813
|
ignoreUnresolved: (string | RegExp)[];
|
|
795
814
|
};
|
|
796
815
|
getConfigForWorkspace(workspaceName: string, extensions?: string[]): {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
816
|
+
entry: string[];
|
|
817
|
+
project: string[];
|
|
818
|
+
paths: Record<string, string[]>;
|
|
819
|
+
ignore: string[];
|
|
820
|
+
ignoreFiles: string[];
|
|
821
|
+
isIncludeEntryExports: boolean;
|
|
803
822
|
angular?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
804
823
|
astro?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
805
824
|
"astro-db"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -808,6 +827,7 @@ export declare class ConfigurationChief {
|
|
|
808
827
|
babel?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
809
828
|
biome?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
810
829
|
bumpp?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
830
|
+
bun?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
811
831
|
c8?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
812
832
|
capacitor?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
813
833
|
changelogen?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -838,6 +858,7 @@ export declare class ConfigurationChief {
|
|
|
838
858
|
hardhat?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
839
859
|
husky?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
840
860
|
"i18next-parser"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
861
|
+
jest?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
841
862
|
karma?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
842
863
|
knex?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
843
864
|
ladle?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -860,6 +881,7 @@ export declare class ConfigurationChief {
|
|
|
860
881
|
"next-intl"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
861
882
|
"next-mdx"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
862
883
|
nitro?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
884
|
+
node?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
863
885
|
"node-modules-inspector"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
864
886
|
nodemon?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
865
887
|
"npm-package-json-lint"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -873,11 +895,13 @@ export declare class ConfigurationChief {
|
|
|
873
895
|
"panda-css"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
874
896
|
parcel?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
875
897
|
payload?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
898
|
+
pino?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
876
899
|
playwright?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
877
900
|
"playwright-ct"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
878
901
|
"playwright-test"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
879
902
|
plop?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
880
903
|
pm2?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
904
|
+
pnpm?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
881
905
|
postcss?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
882
906
|
preconstruct?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
883
907
|
prettier?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -885,6 +909,7 @@ export declare class ConfigurationChief {
|
|
|
885
909
|
qwik?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
886
910
|
raycast?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
887
911
|
"react-cosmos"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
912
|
+
"react-email"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
888
913
|
"react-native"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
889
914
|
"react-router"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
890
915
|
relay?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -900,6 +925,7 @@ export declare class ConfigurationChief {
|
|
|
900
925
|
sanity?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
901
926
|
"semantic-release"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
902
927
|
sentry?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
928
|
+
"serverless-framework"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
903
929
|
"simple-git-hooks"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
904
930
|
"size-limit"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
905
931
|
sst?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -909,6 +935,7 @@ export declare class ConfigurationChief {
|
|
|
909
935
|
stryker?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
910
936
|
stylelint?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
911
937
|
svelte?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
938
|
+
"sveltejs-package"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
912
939
|
sveltekit?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
913
940
|
svgo?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
914
941
|
svgr?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -923,6 +950,7 @@ export declare class ConfigurationChief {
|
|
|
923
950
|
tsup?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
924
951
|
tsx?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
925
952
|
typedoc?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
953
|
+
typescript?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
926
954
|
unbuild?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
927
955
|
unocss?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
928
956
|
"vercel-og"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -936,14 +964,9 @@ export declare class ConfigurationChief {
|
|
|
936
964
|
wireit?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
937
965
|
wrangler?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
938
966
|
xo?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
967
|
+
yarn?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
939
968
|
yorkie?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
940
969
|
zx?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
941
|
-
entry: string[];
|
|
942
|
-
project: string[];
|
|
943
|
-
paths: Record<string, string[]>;
|
|
944
|
-
ignore: string[];
|
|
945
|
-
ignoreFiles: string[];
|
|
946
|
-
isIncludeEntryExports: boolean;
|
|
947
970
|
};
|
|
948
971
|
findWorkspaceByFilePath(filePath: string): Workspace | undefined;
|
|
949
972
|
getUnusedIgnoredWorkspaces(): string[];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import picomatch from 'picomatch';
|
|
2
|
-
import { DEFAULT_EXTENSIONS, ROOT_WORKSPACE_NAME } from
|
|
3
|
-
import { pluginNames } from
|
|
4
|
-
import { arrayify, compact, partition } from
|
|
5
|
-
import { createWorkspaceGraph } from
|
|
6
|
-
import { isDirectory, isFile } from
|
|
7
|
-
import { _dirGlob, removeProductionSuffix } from
|
|
8
|
-
import { graphSequencer } from
|
|
9
|
-
import mapWorkspaces from
|
|
10
|
-
import { join, relative } from
|
|
11
|
-
import { normalizePluginConfig } from
|
|
12
|
-
import { toRegexOrString } from
|
|
13
|
-
import { ELLIPSIS } from
|
|
14
|
-
import { byPathDepth } from
|
|
15
|
-
import { createWorkspaceFilePathFilter } from
|
|
16
|
-
import { selectWorkspaces } from
|
|
2
|
+
import { DEFAULT_EXTENSIONS, ROOT_WORKSPACE_NAME } from './constants.js';
|
|
3
|
+
import { pluginNames } from './types/PluginNames.js';
|
|
4
|
+
import { arrayify, compact, partition } from './util/array.js';
|
|
5
|
+
import { createWorkspaceGraph } from './util/create-workspace-graph.js';
|
|
6
|
+
import { isDirectory, isFile } from './util/fs.js';
|
|
7
|
+
import { _dirGlob, removeProductionSuffix } from './util/glob.js';
|
|
8
|
+
import { graphSequencer } from './util/graph-sequencer.js';
|
|
9
|
+
import mapWorkspaces from './util/map-workspaces.js';
|
|
10
|
+
import { join, relative } from './util/path.js';
|
|
11
|
+
import { normalizePluginConfig } from './util/plugin.js';
|
|
12
|
+
import { toRegexOrString } from './util/regex.js';
|
|
13
|
+
import { ELLIPSIS } from './util/string.js';
|
|
14
|
+
import { byPathDepth } from './util/workspace.js';
|
|
15
|
+
import { createWorkspaceFilePathFilter } from './util/workspace-file-filter.js';
|
|
16
|
+
import { selectWorkspaces } from './util/workspace-selectors.js';
|
|
17
17
|
const defaultBaseFilenamePattern = '{index,cli,main}';
|
|
18
18
|
export const isDefaultPattern = (type, id) => {
|
|
19
19
|
if (type === 'project')
|
|
@@ -14,7 +14,7 @@ export declare class DependencyDeputy {
|
|
|
14
14
|
installedBinaries: Map<string, InstalledBinaries>;
|
|
15
15
|
hasTypesIncluded: Map<string, Set<string>>;
|
|
16
16
|
constructor({ isProduction, isStrict, isReportDependencies }: MainOptions);
|
|
17
|
-
addWorkspace({ name, cwd, dir, manifestPath, manifestStr, manifest, ignoreDependencies: id, ignoreBinaries: ib, ignoreUnresolved: iu
|
|
17
|
+
addWorkspace({ name, cwd, dir, manifestPath, manifestStr, manifest, ignoreDependencies: id, ignoreBinaries: ib, ignoreUnresolved: iu }: {
|
|
18
18
|
name: string;
|
|
19
19
|
cwd: string;
|
|
20
20
|
dir: string;
|
package/dist/DependencyDeputy.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isBuiltin } from 'node:module';
|
|
2
|
-
import { DT_SCOPE, IGNORE_DEFINITELY_TYPED, IGNORED_DEPENDENCIES, IGNORED_GLOBAL_BINARIES, IGNORED_RUNTIME_DEPENDENCIES, ROOT_WORKSPACE_NAME, } from
|
|
3
|
-
import { getDependencyMetaData } from
|
|
4
|
-
import { PackagePeeker } from
|
|
5
|
-
import { getDefinitelyTypedFor, getPackageFromDefinitelyTyped, getPackageNameFromModuleSpecifier, isDefinitelyTyped, } from
|
|
6
|
-
import { findMatch, toRegexOrString } from
|
|
2
|
+
import { DT_SCOPE, IGNORE_DEFINITELY_TYPED, IGNORED_DEPENDENCIES, IGNORED_GLOBAL_BINARIES, IGNORED_RUNTIME_DEPENDENCIES, ROOT_WORKSPACE_NAME, } from './constants.js';
|
|
3
|
+
import { getDependencyMetaData } from './manifest/index.js';
|
|
4
|
+
import { PackagePeeker } from './PackagePeeker.js';
|
|
5
|
+
import { getDefinitelyTypedFor, getPackageFromDefinitelyTyped, getPackageNameFromModuleSpecifier, isDefinitelyTyped, } from './util/modules.js';
|
|
6
|
+
import { findMatch, toRegexOrString } from './util/regex.js';
|
|
7
7
|
const filterIsProduction = (id, isProduction) => typeof id === 'string' ? (isProduction || !id.endsWith('!') ? id.replace(/!$/, '') : []) : id;
|
|
8
8
|
export class DependencyDeputy {
|
|
9
9
|
isProduction;
|
package/dist/IssueCollector.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import picomatch from 'picomatch';
|
|
2
|
-
import { partition } from
|
|
3
|
-
import { initCounters, initIssues } from
|
|
4
|
-
import { relative } from
|
|
2
|
+
import { partition } from './util/array.js';
|
|
3
|
+
import { initCounters, initIssues } from './util/issue-initializers.js';
|
|
4
|
+
import { relative } from './util/path.js';
|
|
5
5
|
const createMatcher = (patterns) => {
|
|
6
6
|
const [negated, positive] = partition(patterns, p => p[0] === '!');
|
|
7
7
|
if (positive.length === 0) {
|
package/dist/IssueFixer.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { readFile, rm, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { formatly } from 'formatly';
|
|
3
|
-
import { DEFAULT_CATALOG } from
|
|
4
|
-
import { debugLogArray, debugLogObject } from
|
|
5
|
-
import { load, save } from
|
|
6
|
-
import { extname, join } from
|
|
7
|
-
import { removeExport } from
|
|
3
|
+
import { DEFAULT_CATALOG } from './util/catalog.js';
|
|
4
|
+
import { debugLogArray, debugLogObject } from './util/debug.js';
|
|
5
|
+
import { load, save } from './util/package-json.js';
|
|
6
|
+
import { extname, join } from './util/path.js';
|
|
7
|
+
import { removeExport } from './util/remove-export.js';
|
|
8
8
|
export const fix = async (issues, counters, options) => {
|
|
9
9
|
const fixer = new IssueFixer(options);
|
|
10
10
|
const touchedFiles = await fixer.fixIssues(issues);
|
package/dist/ProjectPrincipal.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { extractSpecifiers } from
|
|
2
|
-
import { parseFile } from
|
|
3
|
-
import { CacheConsultant } from
|
|
4
|
-
import { getCompilerExtensions } from
|
|
5
|
-
import { DEFAULT_EXTENSIONS } from
|
|
6
|
-
import { _getImportsAndExports } from
|
|
7
|
-
import { createBunShellVisitor } from
|
|
8
|
-
import { buildVisitor } from
|
|
9
|
-
import { createCustomModuleResolver } from
|
|
10
|
-
import { SourceFileManager } from
|
|
11
|
-
import { compact } from
|
|
12
|
-
import { timerify } from
|
|
13
|
-
import { extname, isInNodeModules, toAbsolute } from
|
|
1
|
+
import { extractSpecifiers } from './typescript/follow-imports.js';
|
|
2
|
+
import { parseFile } from './typescript/visitors/helpers.js';
|
|
3
|
+
import { CacheConsultant } from './CacheConsultant.js';
|
|
4
|
+
import { getCompilerExtensions } from './compilers/index.js';
|
|
5
|
+
import { DEFAULT_EXTENSIONS } from './constants.js';
|
|
6
|
+
import { _getImportsAndExports } from './typescript/get-imports-and-exports.js';
|
|
7
|
+
import { createBunShellVisitor } from './typescript/visitors/script-visitors.js';
|
|
8
|
+
import { buildVisitor } from './typescript/visitors/walk.js';
|
|
9
|
+
import { createCustomModuleResolver } from './typescript/resolve-module-names.js';
|
|
10
|
+
import { SourceFileManager } from './typescript/SourceFileManager.js';
|
|
11
|
+
import { compact } from './util/array.js';
|
|
12
|
+
import { timerify } from './util/Performance.js';
|
|
13
|
+
import { extname, isInNodeModules, toAbsolute } from './util/path.js';
|
|
14
14
|
export class ProjectPrincipal {
|
|
15
15
|
entryPaths = new Set();
|
|
16
16
|
projectPaths = new Set();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CacheConsultant } from './CacheConsultant.ts';
|
|
2
2
|
import { type Workspace } from './ConfigurationChief.ts';
|
|
3
|
-
import type { HandleInput, RegisterCompiler, RegisterVisitorsOptions, WorkspaceConfiguration } from './types/config.ts';
|
|
3
|
+
import type { HandleInput, RegisterCompiler, RegisterVisitorsOptions, SourceMap, WorkspaceConfiguration } from './types/config.ts';
|
|
4
4
|
import type { ConfigurationHint } from './types/issues.ts';
|
|
5
5
|
import type { PluginName } from './types/PluginNames.ts';
|
|
6
6
|
import type { PackageJson } from './types/package-json.ts';
|
|
@@ -46,7 +46,7 @@ export declare class WorkspaceWorker {
|
|
|
46
46
|
enabledPluginsInAncestors: string[];
|
|
47
47
|
cache: CacheConsultant<CacheItem>;
|
|
48
48
|
configFilesMap: Map<string, Map<PluginName, Set<string>>>;
|
|
49
|
-
constructor({ name, dir, config, manifest, dependencies, rootManifest, negatedWorkspacePatterns, ignoredWorkspacePatterns, enabledPluginsInAncestors, handleInput, findWorkspaceByFilePath, readFile, configFilesMap, options
|
|
49
|
+
constructor({ name, dir, config, manifest, dependencies, rootManifest, negatedWorkspacePatterns, ignoredWorkspacePatterns, enabledPluginsInAncestors, handleInput, findWorkspaceByFilePath, readFile, configFilesMap, options }: WorkspaceManagerOptions);
|
|
50
50
|
init(): Promise<void>;
|
|
51
51
|
private determineEnabledPlugins;
|
|
52
52
|
private getConfigForPlugin;
|
|
@@ -60,6 +60,7 @@ export declare class WorkspaceWorker {
|
|
|
60
60
|
getProductionProjectFilePatterns(negatedTestFilePatterns: string[]): string[];
|
|
61
61
|
private getConfigurationFilePatterns;
|
|
62
62
|
registerCompilers(registerCompiler: RegisterCompiler): Promise<void>;
|
|
63
|
+
resolveSourceMaps(): Promise<SourceMap[]>;
|
|
63
64
|
registerVisitors(options: RegisterVisitorsOptions): void;
|
|
64
65
|
runPlugins(): Promise<Input[]>;
|
|
65
66
|
private filterTransitiveDependencies;
|
package/dist/WorkspaceWorker.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import picomatch from 'picomatch';
|
|
2
|
-
import { _getInputsFromScripts } from
|
|
3
|
-
import { CacheConsultant } from
|
|
4
|
-
import { isDefaultPattern } from
|
|
5
|
-
import { DEFAULT_EXTENSIONS, ROOT_WORKSPACE_NAME } from
|
|
6
|
-
import { getFilteredScripts } from
|
|
7
|
-
import { PluginEntries, Plugins } from
|
|
8
|
-
import { collectStringLiterals, isExternalReExportsOnly } from
|
|
9
|
-
import { parseFile } from
|
|
10
|
-
import { compact } from
|
|
11
|
-
import { debugLogArray, debugLogObject } from
|
|
12
|
-
import { _glob, hasNoProductionSuffix, hasProductionSuffix, negate } from
|
|
13
|
-
import { isConfig, isDeferResolve, isDependency, toConfig, toDebugString, toEntry, toProductionEntry, } from
|
|
14
|
-
import { getPackageNameFromSpecifier } from
|
|
15
|
-
import { getKeysByValue } from
|
|
16
|
-
import { timerify } from
|
|
17
|
-
import { basename, dirname, isInternal, join } from
|
|
18
|
-
import { extractPatternExtensions } from
|
|
19
|
-
import { loadConfigForPlugin } from
|
|
20
|
-
import { ELLIPSIS } from
|
|
2
|
+
import { _getInputsFromScripts } from './binaries/index.js';
|
|
3
|
+
import { CacheConsultant } from './CacheConsultant.js';
|
|
4
|
+
import { isDefaultPattern } from './ConfigurationChief.js';
|
|
5
|
+
import { DEFAULT_EXTENSIONS, ROOT_WORKSPACE_NAME } from './constants.js';
|
|
6
|
+
import { getFilteredScripts } from './manifest/helpers.js';
|
|
7
|
+
import { PluginEntries, Plugins } from './plugins.js';
|
|
8
|
+
import { collectStringLiterals, isExternalReExportsOnly } from './typescript/ast-helpers.js';
|
|
9
|
+
import { parseFile } from './typescript/visitors/helpers.js';
|
|
10
|
+
import { compact } from './util/array.js';
|
|
11
|
+
import { debugLogArray, debugLogObject } from './util/debug.js';
|
|
12
|
+
import { _glob, hasNoProductionSuffix, hasProductionSuffix, negate } from './util/glob.js';
|
|
13
|
+
import { isConfig, isDeferResolve, isDependency, toConfig, toDebugString, toEntry, toProductionEntry, } from './util/input.js';
|
|
14
|
+
import { getPackageNameFromSpecifier } from './util/modules.js';
|
|
15
|
+
import { getKeysByValue } from './util/object.js';
|
|
16
|
+
import { timerify } from './util/Performance.js';
|
|
17
|
+
import { basename, dirname, isInternal, join } from './util/path.js';
|
|
18
|
+
import { extractPatternExtensions } from './util/pattern-extensions.js';
|
|
19
|
+
import { loadConfigForPlugin } from './util/plugin.js';
|
|
20
|
+
import { ELLIPSIS } from './util/string.js';
|
|
21
21
|
const nullConfig = { config: null, entry: null, project: null };
|
|
22
22
|
const initEnabledPluginsMap = () => Object.keys(Plugins).reduce((enabled, pluginName) => ({ ...enabled, [pluginName]: false }), {});
|
|
23
23
|
export class WorkspaceWorker {
|
|
@@ -170,6 +170,24 @@ export class WorkspaceWorker {
|
|
|
170
170
|
await plugin.registerCompilers({ cwd, hasDependency, registerCompiler });
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
+
async resolveSourceMaps() {
|
|
174
|
+
const options = {
|
|
175
|
+
cwd: this.dir,
|
|
176
|
+
rootCwd: this.options.cwd,
|
|
177
|
+
manifest: this.manifest,
|
|
178
|
+
rootManifest: this.rootManifest,
|
|
179
|
+
dependencies: this.dependencies,
|
|
180
|
+
};
|
|
181
|
+
const pairs = [];
|
|
182
|
+
for (const pluginName of this.enabledPlugins) {
|
|
183
|
+
const plugin = Plugins[pluginName];
|
|
184
|
+
if (!plugin.resolveSourceMap)
|
|
185
|
+
continue;
|
|
186
|
+
for (const pair of await plugin.resolveSourceMap(options))
|
|
187
|
+
pairs.push(pair);
|
|
188
|
+
}
|
|
189
|
+
return pairs;
|
|
190
|
+
}
|
|
173
191
|
registerVisitors(options) {
|
|
174
192
|
for (const pluginName of this.enabledPlugins) {
|
|
175
193
|
if (options.registeredPlugins.has(pluginName))
|
|
@@ -434,15 +452,10 @@ export class WorkspaceWorker {
|
|
|
434
452
|
const seen = new Set();
|
|
435
453
|
for (const pattern of userDefinedPatterns) {
|
|
436
454
|
for (const ext of extractPatternExtensions(pattern)) {
|
|
437
|
-
if (seen.has(ext) || DEFAULT_EXTENSIONS.has(ext))
|
|
455
|
+
if (seen.has(ext) || DEFAULT_EXTENSIONS.has(ext) || compilerExtensions.has(ext))
|
|
438
456
|
continue;
|
|
439
457
|
seen.add(ext);
|
|
440
|
-
|
|
441
|
-
hints.push({ type: 'project-extension-redundant', identifier: ext, workspaceName });
|
|
442
|
-
}
|
|
443
|
-
else {
|
|
444
|
-
hints.push({ type: 'project-extension-unregistered', identifier: ext, workspaceName });
|
|
445
|
-
}
|
|
458
|
+
hints.push({ type: 'project-extension-unregistered', identifier: ext, workspaceName });
|
|
446
459
|
}
|
|
447
460
|
}
|
|
448
461
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { parse } from 'unbash';
|
|
2
|
-
import { Plugins, pluginArgsMap } from
|
|
3
|
-
import { debugLogObject } from
|
|
4
|
-
import { toBinary, toDeferResolve } from
|
|
5
|
-
import { extractBinary, isValidBinary } from
|
|
6
|
-
import { relative } from
|
|
7
|
-
import { truncate } from
|
|
8
|
-
import { resolve as fallbackResolve } from
|
|
9
|
-
import KnownResolvers from
|
|
10
|
-
import { resolve as resolverFromPlugins } from
|
|
11
|
-
import { parseNodeArgs } from
|
|
2
|
+
import { Plugins, pluginArgsMap } from '../plugins.js';
|
|
3
|
+
import { debugLogObject } from '../util/debug.js';
|
|
4
|
+
import { toBinary, toDeferResolve } from '../util/input.js';
|
|
5
|
+
import { extractBinary, isValidBinary } from '../util/modules.js';
|
|
6
|
+
import { relative } from '../util/path.js';
|
|
7
|
+
import { truncate } from '../util/string.js';
|
|
8
|
+
import { resolve as fallbackResolve } from './fallback.js';
|
|
9
|
+
import KnownResolvers from './resolvers/index.js';
|
|
10
|
+
import { resolve as resolverFromPlugins } from './plugins.js';
|
|
11
|
+
import { parseNodeArgs } from './util.js';
|
|
12
12
|
const spawningBinaries = ['cross-env', 'retry-cli'];
|
|
13
13
|
const collectExpansionScripts = (word, out) => {
|
|
14
14
|
if (!word.parts)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { compact } from
|
|
3
|
-
import { toBinary, toDeferResolve, toEntry } from
|
|
4
|
-
import { isValidBinary } from
|
|
2
|
+
import { compact } from '../util/array.js';
|
|
3
|
+
import { toBinary, toDeferResolve, toEntry } from '../util/input.js';
|
|
4
|
+
import { isValidBinary } from '../util/modules.js';
|
|
5
5
|
const endOfCommandBinaries = ['dotenvx', 'env-cmd', 'op'];
|
|
6
6
|
const positionals = new Set(['babel-node', 'esbuild', 'execa', 'jiti', 'oxnode', 'vite-node', 'zx']);
|
|
7
7
|
const positionalBinaries = new Set(['concurrently']);
|
package/dist/binaries/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fromBinary, isBinary, isDependency } from
|
|
2
|
-
import { timerify } from
|
|
3
|
-
import { getDependenciesFromScript } from
|
|
1
|
+
import { fromBinary, isBinary, isDependency } from '../util/input.js';
|
|
2
|
+
import { timerify } from '../util/Performance.js';
|
|
3
|
+
import { getDependenciesFromScript } from './bash-parser.js';
|
|
4
4
|
const getInputsFromScripts = (npmScripts, options) => {
|
|
5
5
|
const scripts = typeof npmScripts === 'string' ? [npmScripts] : Array.from(npmScripts);
|
|
6
6
|
const results = scripts.flatMap(script => getDependenciesFromScript(script, options));
|
package/dist/binaries/plugins.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { pluginArgsMap } from
|
|
3
|
-
import { compact } from
|
|
4
|
-
import { toBinary, toConfig, toDeferResolve, toDeferResolveEntry, toEntry } from
|
|
5
|
-
import { extractBinary } from
|
|
6
|
-
import { dirname } from
|
|
7
|
-
import { resolve as fallbackResolve } from
|
|
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 { extractBinary } from '../util/modules.js';
|
|
6
|
+
import { dirname } from '../util/path.js';
|
|
7
|
+
import { resolve as fallbackResolve } from './fallback.js';
|
|
8
8
|
const isGlobLikeMatch = /(^!|[*+\\(|{^$])/;
|
|
9
9
|
const isGlobLike = (value) => isGlobLikeMatch.test(value);
|
|
10
10
|
const nodeLoadersArgs = { import: ['r', 'experimental-loader', 'require', 'loader'] };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { toEntry } from
|
|
3
|
-
import { isAbsolute, join } from
|
|
4
|
-
import { _resolveSync } from
|
|
5
|
-
import { resolveX } from
|
|
2
|
+
import { toEntry } from '../../util/input.js';
|
|
3
|
+
import { isAbsolute, join } from '../../util/path.js';
|
|
4
|
+
import { _resolveSync } from '../../util/resolve.js';
|
|
5
|
+
import { resolveX } from './bunx.js';
|
|
6
6
|
const commands = new Set([
|
|
7
7
|
'add',
|
|
8
8
|
'audit',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { toBinary, toDependency } from
|
|
3
|
-
import { stripVersionFromSpecifier } from
|
|
4
|
-
import { isInternal } from
|
|
5
|
-
import { argsFrom } from
|
|
2
|
+
import { toBinary, toDependency } from '../../util/input.js';
|
|
3
|
+
import { stripVersionFromSpecifier } from '../../util/modules.js';
|
|
4
|
+
import { isInternal } from '../../util/path.js';
|
|
5
|
+
import { argsFrom } from '../util.js';
|
|
6
6
|
export const resolveX = (args, options) => {
|
|
7
7
|
const { fromArgs } = options;
|
|
8
8
|
const parsed = parseArgs(args, { boolean: ['bun'] });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as bun from
|
|
2
|
-
import * as bunx from
|
|
3
|
-
import * as find from
|
|
4
|
-
import * as npm from
|
|
5
|
-
import * as npx from
|
|
6
|
-
import * as pnpm from
|
|
7
|
-
import * as pnpx from
|
|
8
|
-
import * as yarn from
|
|
1
|
+
import * as bun from './bun.js';
|
|
2
|
+
import * as bunx from './bunx.js';
|
|
3
|
+
import * as find from './find.js';
|
|
4
|
+
import * as npm from './npm.js';
|
|
5
|
+
import * as npx from './npx.js';
|
|
6
|
+
import * as pnpm from './pnpm.js';
|
|
7
|
+
import * as pnpx from './pnpx.js';
|
|
8
|
+
import * as yarn from './yarn.js';
|
|
9
9
|
export default {
|
|
10
10
|
bun: bun.resolve,
|
|
11
11
|
bunx: bunx.resolve,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { toBinary, toDependency } from
|
|
3
|
-
import { stripVersionFromSpecifier } from
|
|
4
|
-
import { isInternal } from
|
|
5
|
-
import { argsFrom } from
|
|
2
|
+
import { toBinary, toDependency } from '../../util/input.js';
|
|
3
|
+
import { stripVersionFromSpecifier } from '../../util/modules.js';
|
|
4
|
+
import { isInternal } from '../../util/path.js';
|
|
5
|
+
import { argsFrom } from '../util.js';
|
|
6
6
|
export const resolve = (_binary, args, options) => {
|
|
7
7
|
const { fromArgs } = options;
|
|
8
8
|
const parsed = parseArgs(args, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { toBinary } from
|
|
3
|
-
import { isValidBinary } from
|
|
4
|
-
import { resolveDlx } from
|
|
2
|
+
import { toBinary } from '../../util/input.js';
|
|
3
|
+
import { isValidBinary } from '../../util/modules.js';
|
|
4
|
+
import { resolveDlx } from './pnpx.js';
|
|
5
5
|
const commands = [
|
|
6
6
|
'add',
|
|
7
7
|
'approve-builds',
|