knip 6.4.0 → 6.5.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 +31 -13
- 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 +1 -1
- package/dist/WorkspaceWorker.js +21 -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 +52 -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 +17 -17
- 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 +5 -5
- package/dist/plugins/astro/resolveFromAST.js +1 -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 +3 -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 +3 -0
- package/dist/plugins/index.js +150 -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/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 +1 -1
- package/dist/plugins/vitest/index.js +7 -7
- 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 +4 -4
- 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 +3 -3
- package/dist/reporters/watch.js +3 -3
- package/dist/run.js +14 -14
- package/dist/schema/configuration.d.ts +74 -31
- package/dist/schema/configuration.js +2 -2
- package/dist/schema/plugins.d.ts +15 -0
- package/dist/schema/plugins.js +3 -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 +3 -0
- package/dist/types/issues.d.ts +1 -1
- package/dist/typescript/SourceFileManager.js +3 -3
- package/dist/typescript/ast-helpers.js +2 -2
- 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/create-input-handler.js +6 -6
- package/dist/util/create-options.d.ts +62 -33
- package/dist/util/create-options.js +14 -15
- package/dist/util/create-workspace-graph.js +1 -1
- 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 +62 -50
- 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/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 +1 -1
- package/dist/util/to-source-path.js +10 -9
- 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 +11 -17
- package/schema.json +13 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IMPORT_STAR } from
|
|
2
|
-
import { getExportedIdentifiers } from
|
|
3
|
-
import { forEachAliasReExport, forEachNamespaceReExport, forEachPassThroughReExport, getStarReExportSources, } from
|
|
1
|
+
import { IMPORT_STAR } from '../constants.js';
|
|
2
|
+
import { getExportedIdentifiers } from '../graph-explorer/utils.js';
|
|
3
|
+
import { forEachAliasReExport, forEachNamespaceReExport, forEachPassThroughReExport, getStarReExportSources, } from '../graph-explorer/visitors.js';
|
|
4
4
|
const FALLBACK_LOCATION = { identifier: undefined, pos: 0, line: 0, col: 0 };
|
|
5
5
|
export const buildImportLookup = (fileNode) => {
|
|
6
6
|
const imports = new Map();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createGraphExplorer } from
|
|
2
|
-
import { toAbsolute } from
|
|
3
|
-
import { buildExportsMap, buildImportLookup, buildInternalImports } from
|
|
1
|
+
import { createGraphExplorer } from '../graph-explorer/explorer.js';
|
|
2
|
+
import { toAbsolute } from '../util/path.js';
|
|
3
|
+
import { buildExportsMap, buildImportLookup, buildInternalImports } from './build-maps.js';
|
|
4
4
|
export const buildFileDescriptor = (filePath, cwd, graph, entryPaths, options = {}) => {
|
|
5
5
|
const absolutePath = toAbsolute(filePath, cwd);
|
|
6
6
|
const node = graph.get(absolutePath);
|
package/dist/session/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { IMPORT_STAR, KNIP_CONFIG_LOCATIONS, SIDE_EFFECTS } from
|
|
2
|
-
export { finalizeConfigurationHints } from
|
|
3
|
-
export { getIssuePrefix } from
|
|
4
|
-
export { createOptions } from
|
|
5
|
-
export { buildFileDescriptor } from
|
|
6
|
-
export { buildPackageJsonDescriptor } from
|
|
7
|
-
export { createSession } from
|
|
1
|
+
export { IMPORT_STAR, KNIP_CONFIG_LOCATIONS, SIDE_EFFECTS } from '../constants.js';
|
|
2
|
+
export { finalizeConfigurationHints } from '../reporters/util/configuration-hints.js';
|
|
3
|
+
export { getIssuePrefix } from '../reporters/util/util.js';
|
|
4
|
+
export { createOptions } from '../util/create-options.js';
|
|
5
|
+
export { buildFileDescriptor } from './file-descriptor.js';
|
|
6
|
+
export { buildPackageJsonDescriptor } from './package-json-descriptor.js';
|
|
7
|
+
export { createSession } from './session.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createGraphExplorer } from
|
|
1
|
+
import { createGraphExplorer } from '../graph-explorer/explorer.js';
|
|
2
2
|
export const buildPackageJsonDescriptor = (graph, entryPaths) => {
|
|
3
3
|
const explorer = createGraphExplorer(graph, entryPaths);
|
|
4
4
|
return {
|
package/dist/session/session.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { run } from
|
|
2
|
-
import { buildFileDescriptor } from
|
|
3
|
-
import { buildPackageJsonDescriptor } from
|
|
1
|
+
import { run } from '../run.js';
|
|
2
|
+
import { buildFileDescriptor } from './file-descriptor.js';
|
|
3
|
+
import { buildPackageJsonDescriptor } from './package-json-descriptor.js';
|
|
4
4
|
export const createSession = async (options) => {
|
|
5
5
|
const { session, results } = await run(options);
|
|
6
6
|
if (!session)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
-
export declare const pluginNames: readonly [
|
|
1
|
+
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
+
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'eleventy', 'eslint', 'execa', 'expo', 'expressive-code', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lockfile-lint', 'lost-pixel', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nx', 'nyc', 'oclif', 'openapi-ts', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel-og', 'vike', 'vite', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
@@ -75,6 +75,7 @@ export const pluginNames = [
|
|
|
75
75
|
'panda-css',
|
|
76
76
|
'parcel',
|
|
77
77
|
'payload',
|
|
78
|
+
'pino',
|
|
78
79
|
'playwright',
|
|
79
80
|
'playwright-ct',
|
|
80
81
|
'playwright-test',
|
|
@@ -88,6 +89,7 @@ export const pluginNames = [
|
|
|
88
89
|
'qwik',
|
|
89
90
|
'raycast',
|
|
90
91
|
'react-cosmos',
|
|
92
|
+
'react-email',
|
|
91
93
|
'react-native',
|
|
92
94
|
'react-router',
|
|
93
95
|
'relay',
|
|
@@ -103,6 +105,7 @@ export const pluginNames = [
|
|
|
103
105
|
'sanity',
|
|
104
106
|
'semantic-release',
|
|
105
107
|
'sentry',
|
|
108
|
+
'serverless-framework',
|
|
106
109
|
'simple-git-hooks',
|
|
107
110
|
'size-limit',
|
|
108
111
|
'sst',
|
package/dist/types/issues.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export type Preprocessor = (options: ReporterOptions) => ReporterOptions;
|
|
|
70
70
|
export type IssueSeverity = 'error' | 'warn' | 'off';
|
|
71
71
|
export type Rules = Record<IssueType, IssueSeverity>;
|
|
72
72
|
export type ConfigurationHints = Map<string, ConfigurationHint>;
|
|
73
|
-
export type ConfigurationHintType = 'ignore' | 'ignoreFiles' | 'ignoreBinaries' | 'ignoreDependencies' | 'ignoreUnresolved' | 'ignoreWorkspaces' | 'entry-redundant' | 'project-redundant' | 'entry-top-level' | 'project-top-level' | 'entry-empty' | 'project-empty' | 'project-extension-unregistered' | '
|
|
73
|
+
export type ConfigurationHintType = 'ignore' | 'ignoreFiles' | 'ignoreBinaries' | 'ignoreDependencies' | 'ignoreUnresolved' | 'ignoreWorkspaces' | 'entry-redundant' | 'project-redundant' | 'entry-top-level' | 'project-top-level' | 'entry-empty' | 'project-empty' | 'project-extension-unregistered' | 'package-entry' | 'top-level-unconfigured' | 'workspace-unconfigured';
|
|
74
74
|
export type ConfigurationHint = {
|
|
75
75
|
type: ConfigurationHintType;
|
|
76
76
|
identifier: string | RegExp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { FOREIGN_FILE_EXTENSIONS } from
|
|
3
|
-
import { debugLog } from
|
|
4
|
-
import { extname, isInternal } from
|
|
2
|
+
import { FOREIGN_FILE_EXTENSIONS } from '../constants.js';
|
|
3
|
+
import { debugLog } from '../util/debug.js';
|
|
4
|
+
import { extname, isInternal } from '../util/path.js';
|
|
5
5
|
export class SourceFileManager {
|
|
6
6
|
sourceTextCache = new Map();
|
|
7
7
|
syncCompilers;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Visitor } from 'oxc-parser';
|
|
2
2
|
import stripJsonComments from 'strip-json-comments';
|
|
3
|
-
import { extname, isInternal } from
|
|
4
|
-
import { parseFile } from
|
|
3
|
+
import { extname, isInternal } from '../util/path.js';
|
|
4
|
+
import { parseFile } from './visitors/helpers.js';
|
|
5
5
|
const isStringLiteral = (node) => node?.type === 'StringLiteral' || (node?.type === 'Literal' && typeof node.value === 'string');
|
|
6
6
|
const getStringValue = (node) => (isStringLiteral(node) ? node.value : undefined);
|
|
7
7
|
export const getImportMap = (program) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMPORT_FLAGS } from
|
|
1
|
+
import { IMPORT_FLAGS } from '../constants.js';
|
|
2
2
|
const jsDocImportRe = /import\(\s*['"]([^'"]+)['"]\s*\)(?:\.(\w+))?/g;
|
|
3
3
|
const jsDocImportTagRe = /@import\s+(?:\{[^}]*\}|\*\s+as\s+\w+)\s+from\s+['"]([^'"]+)['"]/g;
|
|
4
4
|
const jsxImportSourceRe = /@jsxImportSource\s+(\S+)/;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Visitor } from 'oxc-parser';
|
|
2
|
-
import { isInNodeModules } from
|
|
3
|
-
import { getStringValue, isStringLiteral, stripQuotes } from
|
|
2
|
+
import { isInNodeModules } from '../util/path.js';
|
|
3
|
+
import { getStringValue, isStringLiteral, stripQuotes } from './visitors/helpers.js';
|
|
4
4
|
const _requireSpecs = [];
|
|
5
5
|
const _requireVisitor = new Visitor({
|
|
6
6
|
CallExpression(node) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { isBuiltin } from 'node:module';
|
|
2
|
-
import { IMPORT_FLAGS, IMPORT_STAR, OPAQUE, PROTOCOL_VIRTUAL, SIDE_EFFECTS } from
|
|
3
|
-
import { addNsValue, addValue, createImports } from
|
|
4
|
-
import { getPackageNameFromFilePath, isStartsLikePackageName, sanitizeSpecifier } from
|
|
5
|
-
import { timerify } from
|
|
6
|
-
import { dirname, isInNodeModules, resolve } from
|
|
7
|
-
import { shouldIgnore } from
|
|
8
|
-
import { extractImportsFromComments } from
|
|
9
|
-
import { buildLineStarts, getLineAndCol, parseFile, shouldCountRefs, } from
|
|
10
|
-
import { buildJSDocTagLookup } from
|
|
11
|
-
import { walkAST } from
|
|
2
|
+
import { IMPORT_FLAGS, IMPORT_STAR, OPAQUE, PROTOCOL_VIRTUAL, SIDE_EFFECTS } from '../constants.js';
|
|
3
|
+
import { addNsValue, addValue, createImports } from '../util/module-graph.js';
|
|
4
|
+
import { getPackageNameFromFilePath, isStartsLikePackageName, sanitizeSpecifier } from '../util/modules.js';
|
|
5
|
+
import { timerify } from '../util/Performance.js';
|
|
6
|
+
import { dirname, isInNodeModules, resolve } from '../util/path.js';
|
|
7
|
+
import { shouldIgnore } from '../util/tag.js';
|
|
8
|
+
import { extractImportsFromComments } from './comments.js';
|
|
9
|
+
import { buildLineStarts, getLineAndCol, parseFile, shouldCountRefs, } from './visitors/helpers.js';
|
|
10
|
+
import { buildJSDocTagLookup } from './visitors/jsdoc.js';
|
|
11
|
+
import { walkAST } from './visitors/walk.js';
|
|
12
12
|
const getImportsAndExports = (filePath, sourceText, resolveModule, options, ignoreExportsUsedInFile, skipExportsForFile, visitor, pluginCtx, cachedParseResult) => {
|
|
13
13
|
const skipExports = skipExportsForFile || !options.isReportExports;
|
|
14
14
|
const internal = new Map();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { isBuiltin } from 'node:module';
|
|
3
|
-
import { DEFAULT_EXTENSIONS, DTS_EXTENSIONS } from
|
|
4
|
-
import { sanitizeSpecifier } from
|
|
5
|
-
import { timerify } from
|
|
6
|
-
import { dirname, extname, isAbsolute, isInNodeModules, join } from
|
|
7
|
-
import { _createSyncModuleResolver, _resolveModuleSync } from
|
|
3
|
+
import { DEFAULT_EXTENSIONS, DTS_EXTENSIONS } from '../constants.js';
|
|
4
|
+
import { sanitizeSpecifier } from '../util/modules.js';
|
|
5
|
+
import { timerify } from '../util/Performance.js';
|
|
6
|
+
import { dirname, extname, isAbsolute, isInNodeModules, join } from '../util/path.js';
|
|
7
|
+
import { _createSyncModuleResolver, _resolveModuleSync } from '../util/resolve.js';
|
|
8
8
|
const moduleResolutionCaches = [];
|
|
9
9
|
export function clearModuleResolutionCaches() {
|
|
10
10
|
for (const cache of moduleResolutionCaches)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IMPORT_FLAGS, OPAQUE } from
|
|
2
|
-
import { addValue } from
|
|
3
|
-
import { getStringValue, isStringLiteral } from
|
|
1
|
+
import { IMPORT_FLAGS, OPAQUE } from '../../constants.js';
|
|
2
|
+
import { addValue } from '../../util/module-graph.js';
|
|
3
|
+
import { getStringValue, isStringLiteral } from './helpers.js';
|
|
4
4
|
function extractInlineDirnamePath(node, s) {
|
|
5
5
|
if (node?.type !== 'CallExpression')
|
|
6
6
|
return undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ALIAS_TAG, FIX_FLAGS, IMPORT_FLAGS, IMPORT_STAR, SYMBOL_TYPE } from
|
|
2
|
-
import { addNsValue, addValue } from
|
|
3
|
-
import { extractEnumMembers, extractNamespaceMembers, getLineAndCol, getStringValue, isStringLiteral, } from
|
|
4
|
-
import { EMPTY_TAGS } from
|
|
1
|
+
import { ALIAS_TAG, FIX_FLAGS, IMPORT_FLAGS, IMPORT_STAR, SYMBOL_TYPE } from '../../constants.js';
|
|
2
|
+
import { addNsValue, addValue } from '../../util/module-graph.js';
|
|
3
|
+
import { extractEnumMembers, extractNamespaceMembers, getLineAndCol, getStringValue, isStringLiteral, } from './helpers.js';
|
|
4
|
+
import { EMPTY_TAGS } from './jsdoc.js';
|
|
5
5
|
const getName = (n) => (n?.type === 'Identifier' ? n.name : undefined);
|
|
6
6
|
export function handleExportNamed(node, s) {
|
|
7
7
|
if (s.skipExports || s.isInNamespace(node))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseSync, rawTransferSupported, } from 'oxc-parser';
|
|
2
|
-
import { DEFAULT_EXTENSIONS, FIX_FLAGS, SYMBOL_TYPE } from
|
|
3
|
-
import { extname } from
|
|
4
|
-
import { EMPTY_TAGS } from
|
|
2
|
+
import { DEFAULT_EXTENSIONS, FIX_FLAGS, SYMBOL_TYPE } from '../../constants.js';
|
|
3
|
+
import { extname } from '../../util/path.js';
|
|
4
|
+
import { EMPTY_TAGS } from './jsdoc.js';
|
|
5
5
|
const defaultParseOptions = {
|
|
6
6
|
sourceType: 'unambiguous',
|
|
7
7
|
experimentalRawTransfer: rawTransferSupported(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IMPORT_FLAGS, IMPORT_STAR, OPAQUE } from
|
|
2
|
-
import { addValue } from
|
|
3
|
-
import { isInNodeModules } from
|
|
4
|
-
import { getStringValue, isStringLiteral } from
|
|
1
|
+
import { IMPORT_FLAGS, IMPORT_STAR, OPAQUE } from '../../constants.js';
|
|
2
|
+
import { addValue } from '../../util/module-graph.js';
|
|
3
|
+
import { isInNodeModules } from '../../util/path.js';
|
|
4
|
+
import { getStringValue, isStringLiteral } from './helpers.js';
|
|
5
5
|
export function handleVariableDeclarator(node, s) {
|
|
6
6
|
const init = node.init;
|
|
7
7
|
if (!init)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OPAQUE } from
|
|
2
|
-
import { addValue } from
|
|
3
|
-
import { getStringValue, isStringLiteral } from
|
|
4
|
-
import { isShadowed } from
|
|
1
|
+
import { OPAQUE } from '../../constants.js';
|
|
2
|
+
import { addValue } from '../../util/module-graph.js';
|
|
3
|
+
import { getStringValue, isStringLiteral } from './helpers.js';
|
|
4
|
+
import { isShadowed } from './walk.js';
|
|
5
5
|
export function handleMemberExpression(node, s) {
|
|
6
6
|
if (node.object.type === 'MemberExpression' && node.object.object.type === 'MemberExpression') {
|
|
7
7
|
s.chainedMemberExprs.add(node.object);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Visitor } from 'oxc-parser';
|
|
2
|
-
import { FIX_FLAGS, IMPORT_FLAGS, OPAQUE, SYMBOL_TYPE } from
|
|
3
|
-
import { addValue } from
|
|
4
|
-
import { isInNodeModules } from
|
|
5
|
-
import { getLineAndCol, getStringValue, isStringLiteral } from
|
|
6
|
-
import { EMPTY_TAGS } from
|
|
7
|
-
import { handleCallExpression, handleNewExpression } from
|
|
8
|
-
import { handleExportAssignment, handleExportDefault, handleExportNamed, handleExpressionStatement, } from
|
|
9
|
-
import { handleImportExpression, handleVariableDeclarator } from
|
|
10
|
-
import { handleJSXMemberExpression, handleMemberExpression } from
|
|
2
|
+
import { FIX_FLAGS, IMPORT_FLAGS, OPAQUE, SYMBOL_TYPE } from '../../constants.js';
|
|
3
|
+
import { addValue } from '../../util/module-graph.js';
|
|
4
|
+
import { isInNodeModules } from '../../util/path.js';
|
|
5
|
+
import { getLineAndCol, getStringValue, isStringLiteral } from './helpers.js';
|
|
6
|
+
import { EMPTY_TAGS } from './jsdoc.js';
|
|
7
|
+
import { handleCallExpression, handleNewExpression } from './calls.js';
|
|
8
|
+
import { handleExportAssignment, handleExportDefault, handleExportNamed, handleExpressionStatement, } from './exports.js';
|
|
9
|
+
import { handleImportExpression, handleVariableDeclarator } from './imports.js';
|
|
10
|
+
import { handleJSXMemberExpression, handleMemberExpression } from './members.js';
|
|
11
11
|
let state;
|
|
12
12
|
const _getFix = (start, end, flags) => state.options.isFixExports ? [start, end, flags ?? FIX_FLAGS.NONE] : undefined;
|
|
13
13
|
const _getTypeFix = (start, end) => state.options.isFixTypes ? [start, end, FIX_FLAGS.NONE] : undefined;
|
|
@@ -22,8 +22,8 @@ declare class Performance {
|
|
|
22
22
|
fnObserver?: PerformanceObserver;
|
|
23
23
|
memObserver?: PerformanceObserver;
|
|
24
24
|
constructor({ isTimerifyFunctions, isMemoryUsageEnabled }: {
|
|
25
|
-
isTimerifyFunctions?: boolean | undefined;
|
|
26
25
|
isMemoryUsageEnabled?: boolean | undefined;
|
|
26
|
+
isTimerifyFunctions?: boolean | undefined;
|
|
27
27
|
});
|
|
28
28
|
private setMark;
|
|
29
29
|
private clearMark;
|
package/dist/util/Performance.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PerformanceObserver, performance } from 'node:perf_hooks';
|
|
2
2
|
import { memoryUsage } from 'node:process';
|
|
3
3
|
import { parseArgs } from 'node:util';
|
|
4
|
-
import { getStats } from
|
|
5
|
-
import { Table } from
|
|
4
|
+
import { getStats } from './math.js';
|
|
5
|
+
import { Table } from './table.js';
|
|
6
6
|
const { values } = parseArgs({
|
|
7
7
|
strict: false,
|
|
8
8
|
options: {
|
package/dist/util/catalog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isFile } from
|
|
2
|
-
import { _load } from
|
|
3
|
-
import { basename, join } from
|
|
1
|
+
import { isFile } from './fs.js';
|
|
2
|
+
import { _load } from './loader.js';
|
|
3
|
+
import { basename, join } from './path.js';
|
|
4
4
|
export const DEFAULT_CATALOG = 'default';
|
|
5
5
|
export const getCatalogContainer = async (cwd, manifest, manifestPath, pnpmWorkspacePath, pnpmWorkspace) => {
|
|
6
6
|
const filePath = pnpmWorkspacePath ?? (isFile(cwd, '.yarnrc.yml') ? join(cwd, '.yarnrc.yml') : manifestPath);
|
package/dist/util/codeowners.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import picomatch from 'picomatch';
|
|
3
|
-
import { debugLog } from
|
|
4
|
-
import { convertGitignoreToPicomatchIgnorePatterns } from
|
|
3
|
+
import { debugLog } from './debug.js';
|
|
4
|
+
import { convertGitignoreToPicomatchIgnorePatterns, expandIgnorePatterns } from './parse-and-convert-gitignores.js';
|
|
5
5
|
export function parseCodeowners(content) {
|
|
6
6
|
const matchers = content
|
|
7
7
|
.split(/\r?\n/)
|
|
8
8
|
.filter(line => line && !line.startsWith('#'))
|
|
9
9
|
.map(rule => {
|
|
10
10
|
const [path, ...owners] = rule.split(/\s+/);
|
|
11
|
-
const {
|
|
12
|
-
return { owners, match: picomatch(
|
|
11
|
+
const { pattern } = convertGitignoreToPicomatchIgnorePatterns(path);
|
|
12
|
+
return { owners, match: picomatch(expandIgnorePatterns([pattern])) };
|
|
13
13
|
});
|
|
14
14
|
return (filePath) => {
|
|
15
15
|
for (const matcher of [...matchers].reverse()) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IGNORED_RUNTIME_DEPENDENCIES } from
|
|
2
|
-
import { debugLog } from
|
|
3
|
-
import { fromBinary, isBinary, isConfig, isDeferResolve, isDeferResolveEntry, isDependency, toDebugString, } from
|
|
4
|
-
import { getPackageNameFromSpecifier } from
|
|
5
|
-
import { dirname, isAbsolute, isInNodeModules, isInternal, join } from
|
|
6
|
-
import { _resolveModuleSync, _resolveSync } from
|
|
1
|
+
import { IGNORED_RUNTIME_DEPENDENCIES } from '../constants.js';
|
|
2
|
+
import { debugLog } from './debug.js';
|
|
3
|
+
import { fromBinary, isBinary, isConfig, isDeferResolve, isDeferResolveEntry, isDependency, toDebugString, } from './input.js';
|
|
4
|
+
import { getPackageNameFromSpecifier } from './modules.js';
|
|
5
|
+
import { dirname, isAbsolute, isInNodeModules, isInternal, join } from './path.js';
|
|
6
|
+
import { _resolveModuleSync, _resolveSync } from './resolve.js';
|
|
7
7
|
const isJoinable = (specifier) => {
|
|
8
8
|
const char = specifier.charCodeAt(0);
|
|
9
9
|
return char !== 35 && char !== 126 && char !== 64 && !isAbsolute(specifier);
|
|
@@ -10,7 +10,6 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
10
10
|
configFilePath: string | undefined;
|
|
11
11
|
cwd: string;
|
|
12
12
|
dependencies: boolean;
|
|
13
|
-
experimentalTags: import("../types/options.ts").Tags;
|
|
14
13
|
exports: boolean;
|
|
15
14
|
files: boolean;
|
|
16
15
|
fixTypes: string[];
|
|
@@ -422,6 +421,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
422
421
|
entry?: string | string[] | undefined;
|
|
423
422
|
project?: string | string[] | undefined;
|
|
424
423
|
} | undefined;
|
|
424
|
+
pino?: string | boolean | string[] | {
|
|
425
|
+
config?: string | string[] | undefined;
|
|
426
|
+
entry?: string | string[] | undefined;
|
|
427
|
+
project?: string | string[] | undefined;
|
|
428
|
+
} | undefined;
|
|
425
429
|
playwright?: string | boolean | string[] | {
|
|
426
430
|
config?: string | string[] | undefined;
|
|
427
431
|
entry?: string | string[] | undefined;
|
|
@@ -487,6 +491,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
487
491
|
entry?: string | string[] | undefined;
|
|
488
492
|
project?: string | string[] | undefined;
|
|
489
493
|
} | undefined;
|
|
494
|
+
'react-email'?: string | boolean | string[] | {
|
|
495
|
+
config?: string | string[] | undefined;
|
|
496
|
+
entry?: string | string[] | undefined;
|
|
497
|
+
project?: string | string[] | undefined;
|
|
498
|
+
} | undefined;
|
|
490
499
|
'react-native'?: string | boolean | string[] | {
|
|
491
500
|
config?: string | string[] | undefined;
|
|
492
501
|
entry?: string | string[] | undefined;
|
|
@@ -562,6 +571,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
562
571
|
entry?: string | string[] | undefined;
|
|
563
572
|
project?: string | string[] | undefined;
|
|
564
573
|
} | undefined;
|
|
574
|
+
'serverless-framework'?: string | boolean | string[] | {
|
|
575
|
+
config?: string | string[] | undefined;
|
|
576
|
+
entry?: string | string[] | undefined;
|
|
577
|
+
project?: string | string[] | undefined;
|
|
578
|
+
} | undefined;
|
|
565
579
|
'simple-git-hooks'?: string | boolean | string[] | {
|
|
566
580
|
config?: string | string[] | undefined;
|
|
567
581
|
entry?: string | string[] | undefined;
|
|
@@ -762,6 +776,28 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
762
776
|
entry?: string | string[] | undefined;
|
|
763
777
|
project?: string | string[] | undefined;
|
|
764
778
|
} | undefined;
|
|
779
|
+
$schema?: string | undefined;
|
|
780
|
+
rules?: Partial<Record<"binaries" | "catalog" | "dependencies" | "devDependencies" | "duplicates" | "enumMembers" | "exports" | "files" | "namespaceMembers" | "nsExports" | "nsTypes" | "optionalPeerDependencies" | "types" | "unlisted" | "unresolved", "error" | "off" | "warn">> | undefined;
|
|
781
|
+
entry?: string | string[] | undefined;
|
|
782
|
+
project?: string | string[] | undefined;
|
|
783
|
+
paths?: Record<string, string[]> | undefined;
|
|
784
|
+
ignore?: string | string[] | undefined;
|
|
785
|
+
ignoreFiles?: string | string[] | undefined;
|
|
786
|
+
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
787
|
+
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
788
|
+
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
789
|
+
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
790
|
+
ignoreExportsUsedInFile?: boolean | Record<string, boolean | undefined> | undefined;
|
|
791
|
+
ignoreIssues?: Record<string, ("binaries" | "catalog" | "dependencies" | "devDependencies" | "duplicates" | "enumMembers" | "exports" | "files" | "namespaceMembers" | "nsExports" | "nsTypes" | "optionalPeerDependencies" | "types" | "unlisted" | "unresolved")[]> | undefined;
|
|
792
|
+
ignoreWorkspaces?: string[] | undefined;
|
|
793
|
+
includeEntryExports?: boolean | undefined;
|
|
794
|
+
compilers?: Record<string, true | import("../compilers/types.ts").CompilerAsync | import("../compilers/types.ts").CompilerSync> | undefined;
|
|
795
|
+
syncCompilers?: Record<string, true | import("../compilers/types.ts").CompilerSync> | undefined;
|
|
796
|
+
asyncCompilers?: Record<string, import("../compilers/types.ts").CompilerAsync> | undefined;
|
|
797
|
+
tags?: string[] | undefined;
|
|
798
|
+
treatConfigHintsAsErrors?: boolean | undefined;
|
|
799
|
+
include?: ("binaries" | "catalog" | "dependencies" | "devDependencies" | "duplicates" | "enumMembers" | "exports" | "files" | "namespaceMembers" | "nsExports" | "nsTypes" | "optionalPeerDependencies" | "types" | "unlisted" | "unresolved")[] | undefined;
|
|
800
|
+
exclude?: ("binaries" | "catalog" | "dependencies" | "devDependencies" | "duplicates" | "enumMembers" | "exports" | "files" | "namespaceMembers" | "nsExports" | "nsTypes" | "optionalPeerDependencies" | "types" | "unlisted" | "unresolved")[] | undefined;
|
|
765
801
|
workspaces?: Record<string, {
|
|
766
802
|
angular?: string | boolean | string[] | {
|
|
767
803
|
config?: string | string[] | undefined;
|
|
@@ -1143,6 +1179,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1143
1179
|
entry?: string | string[] | undefined;
|
|
1144
1180
|
project?: string | string[] | undefined;
|
|
1145
1181
|
} | undefined;
|
|
1182
|
+
pino?: string | boolean | string[] | {
|
|
1183
|
+
config?: string | string[] | undefined;
|
|
1184
|
+
entry?: string | string[] | undefined;
|
|
1185
|
+
project?: string | string[] | undefined;
|
|
1186
|
+
} | undefined;
|
|
1146
1187
|
playwright?: string | boolean | string[] | {
|
|
1147
1188
|
config?: string | string[] | undefined;
|
|
1148
1189
|
entry?: string | string[] | undefined;
|
|
@@ -1208,6 +1249,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1208
1249
|
entry?: string | string[] | undefined;
|
|
1209
1250
|
project?: string | string[] | undefined;
|
|
1210
1251
|
} | undefined;
|
|
1252
|
+
'react-email'?: string | boolean | string[] | {
|
|
1253
|
+
config?: string | string[] | undefined;
|
|
1254
|
+
entry?: string | string[] | undefined;
|
|
1255
|
+
project?: string | string[] | undefined;
|
|
1256
|
+
} | undefined;
|
|
1211
1257
|
'react-native'?: string | boolean | string[] | {
|
|
1212
1258
|
config?: string | string[] | undefined;
|
|
1213
1259
|
entry?: string | string[] | undefined;
|
|
@@ -1283,6 +1329,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1283
1329
|
entry?: string | string[] | undefined;
|
|
1284
1330
|
project?: string | string[] | undefined;
|
|
1285
1331
|
} | undefined;
|
|
1332
|
+
'serverless-framework'?: string | boolean | string[] | {
|
|
1333
|
+
config?: string | string[] | undefined;
|
|
1334
|
+
entry?: string | string[] | undefined;
|
|
1335
|
+
project?: string | string[] | undefined;
|
|
1336
|
+
} | undefined;
|
|
1286
1337
|
'simple-git-hooks'?: string | boolean | string[] | {
|
|
1287
1338
|
config?: string | string[] | undefined;
|
|
1288
1339
|
entry?: string | string[] | undefined;
|
|
@@ -1494,45 +1545,23 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1494
1545
|
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
1495
1546
|
includeEntryExports?: boolean | undefined;
|
|
1496
1547
|
}> | undefined;
|
|
1497
|
-
include?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "nsExports" | "types" | "nsTypes" | "enumMembers" | "namespaceMembers" | "duplicates" | "catalog")[] | undefined;
|
|
1498
|
-
exclude?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "nsExports" | "types" | "nsTypes" | "enumMembers" | "namespaceMembers" | "duplicates" | "catalog")[] | undefined;
|
|
1499
|
-
$schema?: string | undefined;
|
|
1500
|
-
rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "nsExports" | "types" | "nsTypes" | "enumMembers" | "namespaceMembers" | "duplicates" | "catalog", "error" | "warn" | "off">> | undefined;
|
|
1501
|
-
entry?: string | string[] | undefined;
|
|
1502
|
-
project?: string | string[] | undefined;
|
|
1503
|
-
paths?: Record<string, string[]> | undefined;
|
|
1504
|
-
ignore?: string | string[] | undefined;
|
|
1505
|
-
ignoreFiles?: string | string[] | undefined;
|
|
1506
|
-
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
1507
|
-
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
1508
|
-
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
1509
|
-
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
1510
|
-
ignoreExportsUsedInFile?: boolean | Record<string, boolean | undefined> | undefined;
|
|
1511
|
-
ignoreIssues?: Record<string, ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "nsExports" | "types" | "nsTypes" | "enumMembers" | "namespaceMembers" | "duplicates" | "catalog")[]> | undefined;
|
|
1512
|
-
ignoreWorkspaces?: string[] | undefined;
|
|
1513
|
-
includeEntryExports?: boolean | undefined;
|
|
1514
|
-
compilers?: Record<string, true | ((filename: string, contents: string) => string) | ((filename: string, contents: string) => Promise<string>)> | undefined;
|
|
1515
|
-
syncCompilers?: Record<string, true | ((filename: string, contents: string) => string)> | undefined;
|
|
1516
|
-
asyncCompilers?: Record<string, (filename: string, contents: string) => Promise<string>> | undefined;
|
|
1517
|
-
tags?: string[] | undefined;
|
|
1518
|
-
treatConfigHintsAsErrors?: boolean | undefined;
|
|
1519
1548
|
};
|
|
1520
1549
|
rules: {
|
|
1521
|
-
|
|
1550
|
+
binaries: import("../types/issues.ts").IssueSeverity;
|
|
1551
|
+
catalog: import("../types/issues.ts").IssueSeverity;
|
|
1522
1552
|
dependencies: import("../types/issues.ts").IssueSeverity;
|
|
1523
1553
|
devDependencies: import("../types/issues.ts").IssueSeverity;
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
binaries: import("../types/issues.ts").IssueSeverity;
|
|
1527
|
-
unresolved: import("../types/issues.ts").IssueSeverity;
|
|
1554
|
+
duplicates: import("../types/issues.ts").IssueSeverity;
|
|
1555
|
+
enumMembers: import("../types/issues.ts").IssueSeverity;
|
|
1528
1556
|
exports: import("../types/issues.ts").IssueSeverity;
|
|
1557
|
+
files: import("../types/issues.ts").IssueSeverity;
|
|
1558
|
+
namespaceMembers: import("../types/issues.ts").IssueSeverity;
|
|
1529
1559
|
nsExports: import("../types/issues.ts").IssueSeverity;
|
|
1530
|
-
types: import("../types/issues.ts").IssueSeverity;
|
|
1531
1560
|
nsTypes: import("../types/issues.ts").IssueSeverity;
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1561
|
+
optionalPeerDependencies: import("../types/issues.ts").IssueSeverity;
|
|
1562
|
+
types: import("../types/issues.ts").IssueSeverity;
|
|
1563
|
+
unlisted: import("../types/issues.ts").IssueSeverity;
|
|
1564
|
+
unresolved: import("../types/issues.ts").IssueSeverity;
|
|
1536
1565
|
};
|
|
1537
1566
|
tags: import("../types/options.ts").Tags;
|
|
1538
1567
|
traceDependency: string | undefined;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { partitionCompilers } from
|
|
2
|
-
import { ISSUE_TYPES, KNIP_CONFIG_LOCATIONS } from
|
|
3
|
-
import { knipConfigurationSchema } from
|
|
4
|
-
import { getCatalogContainer } from
|
|
5
|
-
import { ConfigurationError } from
|
|
6
|
-
import { findFile, loadJSON } from
|
|
7
|
-
import { getIncludedIssueTypes, shorthandDeps, shorthandExports, shorthandFiles } from
|
|
8
|
-
import { defaultRules } from
|
|
9
|
-
import { loadResolvedConfigFile } from
|
|
10
|
-
import { _load } from
|
|
11
|
-
import { logWarning } from
|
|
12
|
-
import { getKeysByValue } from
|
|
13
|
-
import { isAbsolute, join, normalize, toAbsolute, toPosix } from
|
|
14
|
-
import { splitTags } from
|
|
1
|
+
import { partitionCompilers } from '../compilers/index.js';
|
|
2
|
+
import { ISSUE_TYPES, KNIP_CONFIG_LOCATIONS } from '../constants.js';
|
|
3
|
+
import { knipConfigurationSchema } from '../schema/configuration.js';
|
|
4
|
+
import { getCatalogContainer } from './catalog.js';
|
|
5
|
+
import { ConfigurationError } from './errors.js';
|
|
6
|
+
import { findFile, loadJSON } from './fs.js';
|
|
7
|
+
import { getIncludedIssueTypes, shorthandDeps, shorthandExports, shorthandFiles } from './get-included-issue-types.js';
|
|
8
|
+
import { defaultRules } from './issue-initializers.js';
|
|
9
|
+
import { loadResolvedConfigFile } from './load-config.js';
|
|
10
|
+
import { _load } from './loader.js';
|
|
11
|
+
import { logWarning } from './log.js';
|
|
12
|
+
import { getKeysByValue } from './object.js';
|
|
13
|
+
import { isAbsolute, join, normalize, toAbsolute, toPosix } from './path.js';
|
|
14
|
+
import { splitTags } from './tag.js';
|
|
15
15
|
export const createOptions = async (options) => {
|
|
16
16
|
const { args = {} } = options;
|
|
17
17
|
const pcwd = process.cwd();
|
|
@@ -99,7 +99,6 @@ export const createOptions = async (options) => {
|
|
|
99
99
|
configFilePath,
|
|
100
100
|
cwd,
|
|
101
101
|
dependencies: args.dependencies ?? false,
|
|
102
|
-
experimentalTags: tags,
|
|
103
102
|
exports: args.exports ?? false,
|
|
104
103
|
files: args.files ?? false,
|
|
105
104
|
fixTypes,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join } from
|
|
1
|
+
import { join } from './path.js';
|
|
2
2
|
const types = ['peerDependencies', 'devDependencies', 'optionalDependencies', 'dependencies'];
|
|
3
3
|
export function createWorkspaceGraph(cwd, wsNames, wsPkgNames, wsPackages) {
|
|
4
4
|
const graph = new Map();
|