knip 5.84.1 → 5.86.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.d.ts +2 -2
- package/dist/CacheConsultant.js +3 -3
- package/dist/CatalogCounselor.d.ts +3 -3
- package/dist/CatalogCounselor.js +5 -5
- package/dist/ConfigurationChief.d.ts +160 -142
- package/dist/ConfigurationChief.js +15 -16
- package/dist/ConsoleStreamer.d.ts +1 -1
- package/dist/DependencyDeputy.d.ts +6 -6
- package/dist/DependencyDeputy.js +10 -10
- package/dist/IssueCollector.d.ts +7 -7
- package/dist/IssueCollector.js +3 -3
- package/dist/IssueFixer.d.ts +3 -3
- package/dist/IssueFixer.js +17 -6
- package/dist/JsonCatalogPeeker.d.ts +1 -1
- package/dist/JsonCatalogPeeker.js +2 -2
- package/dist/PackagePeeker.d.ts +1 -1
- package/dist/PackagePeeker.js +1 -1
- package/dist/PrincipalFactory.d.ts +3 -3
- package/dist/PrincipalFactory.js +3 -3
- package/dist/ProjectPrincipal.d.ts +9 -9
- package/dist/ProjectPrincipal.js +15 -9
- package/dist/WorkspaceWorker.d.ts +9 -9
- package/dist/WorkspaceWorker.js +17 -17
- package/dist/YamlCatalogPeeker.d.ts +1 -1
- package/dist/YamlCatalogPeeker.js +2 -2
- package/dist/binaries/bash-parser.d.ts +2 -2
- package/dist/binaries/bash-parser.js +82 -48
- package/dist/binaries/fallback.d.ts +1 -1
- package/dist/binaries/fallback.js +4 -6
- package/dist/binaries/index.d.ts +1 -1
- package/dist/binaries/index.js +3 -3
- package/dist/binaries/package-manager/bun.d.ts +1 -1
- package/dist/binaries/package-manager/bun.js +4 -6
- package/dist/binaries/package-manager/bunx.d.ts +2 -2
- package/dist/binaries/package-manager/bunx.js +4 -4
- package/dist/binaries/package-manager/index.d.ts +7 -7
- package/dist/binaries/package-manager/index.js +7 -7
- package/dist/binaries/package-manager/npm.d.ts +1 -1
- package/dist/binaries/package-manager/npx.d.ts +1 -1
- package/dist/binaries/package-manager/npx.js +4 -4
- package/dist/binaries/package-manager/pnpm.d.ts +1 -1
- package/dist/binaries/package-manager/pnpm.js +3 -3
- package/dist/binaries/package-manager/pnpx.d.ts +2 -2
- package/dist/binaries/package-manager/pnpx.js +2 -2
- package/dist/binaries/package-manager/yarn.d.ts +1 -1
- package/dist/binaries/package-manager/yarn.js +4 -4
- package/dist/binaries/plugins.d.ts +1 -1
- package/dist/binaries/plugins.js +6 -6
- package/dist/cli.js +11 -11
- package/dist/compilers/compilers.d.ts +1 -1
- package/dist/compilers/index.d.ts +33 -3
- package/dist/compilers/index.js +2 -2
- package/dist/compilers/mdx.d.ts +1 -1
- package/dist/compilers/mdx.js +9 -2
- package/dist/compilers/scss.d.ts +1 -1
- package/dist/compilers/scss.js +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/graph/analyze.d.ts +8 -8
- package/dist/graph/analyze.js +6 -6
- package/dist/graph/build.d.ts +9 -9
- package/dist/graph/build.js +16 -16
- package/dist/graph-explorer/cache.d.ts +3 -3
- package/dist/graph-explorer/explorer.d.ts +7 -7
- package/dist/graph-explorer/explorer.js +9 -9
- package/dist/graph-explorer/operations/build-exports-tree.d.ts +2 -2
- package/dist/graph-explorer/operations/build-exports-tree.js +2 -2
- package/dist/graph-explorer/operations/find-cycles.d.ts +2 -2
- package/dist/graph-explorer/operations/get-contention.d.ts +2 -2
- package/dist/graph-explorer/operations/get-contention.js +3 -3
- package/dist/graph-explorer/operations/get-dependency-usage.d.ts +1 -1
- package/dist/graph-explorer/operations/get-dependency-usage.js +1 -1
- package/dist/graph-explorer/operations/get-usage.d.ts +2 -2
- package/dist/graph-explorer/operations/get-usage.js +5 -5
- package/dist/graph-explorer/operations/has-strictly-ns-references.d.ts +1 -1
- package/dist/graph-explorer/operations/has-strictly-ns-references.js +1 -1
- package/dist/graph-explorer/operations/is-referenced.d.ts +1 -1
- package/dist/graph-explorer/operations/is-referenced.js +2 -2
- package/dist/graph-explorer/operations/resolve-definition.d.ts +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.d.ts +1 -1
- package/dist/graph-explorer/visitors.js +1 -1
- package/dist/graph-explorer/walk-down.d.ts +1 -1
- package/dist/graph-explorer/walk-down.js +2 -2
- package/dist/graph-explorer/walk-up.d.ts +2 -2
- package/dist/graph-explorer/walk-up.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/manifest/helpers.d.ts +1 -1
- package/dist/manifest/helpers.js +2 -2
- package/dist/manifest/index.d.ts +1 -1
- package/dist/manifest/index.js +3 -3
- package/dist/plugins/_template/index.d.ts +1 -1
- package/dist/plugins/_template/index.js +2 -2
- package/dist/plugins/angular/index.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/plugins/astro/index.js +9 -6
- package/dist/plugins/astro/resolveFromAST.d.ts +1 -0
- package/dist/plugins/astro/resolveFromAST.js +18 -1
- package/dist/plugins/astro-db/index.d.ts +1 -1
- package/dist/plugins/astro-db/index.js +1 -1
- package/dist/plugins/astro-og-canvas/index.d.ts +1 -1
- package/dist/plugins/astro-og-canvas/index.js +2 -2
- package/dist/plugins/ava/index.d.ts +1 -1
- package/dist/plugins/ava/index.js +2 -2
- package/dist/plugins/babel/helpers.js +1 -1
- package/dist/plugins/babel/index.d.ts +3 -3
- package/dist/plugins/babel/index.js +4 -4
- package/dist/plugins/babel/types.d.ts +1 -1
- package/dist/plugins/biome/index.d.ts +1 -1
- package/dist/plugins/biome/index.js +4 -4
- package/dist/plugins/bumpp/index.d.ts +1 -1
- package/dist/plugins/bumpp/index.js +2 -2
- package/dist/plugins/bun/index.d.ts +1 -1
- package/dist/plugins/bun/index.js +8 -2
- package/dist/plugins/c8/index.d.ts +1 -1
- package/dist/plugins/c8/index.js +1 -1
- package/dist/plugins/capacitor/index.d.ts +1 -1
- package/dist/plugins/capacitor/index.js +3 -3
- package/dist/plugins/changelogen/index.d.ts +1 -1
- package/dist/plugins/changelogen/index.js +2 -2
- package/dist/plugins/changelogithub/index.d.ts +1 -1
- package/dist/plugins/changelogithub/index.js +2 -2
- package/dist/plugins/changesets/index.d.ts +1 -1
- package/dist/plugins/changesets/index.js +2 -2
- package/dist/plugins/commitizen/index.d.ts +1 -1
- package/dist/plugins/commitizen/index.js +2 -2
- package/dist/plugins/commitlint/index.d.ts +1 -1
- package/dist/plugins/commitlint/index.js +3 -3
- package/dist/plugins/convex/index.d.ts +1 -1
- package/dist/plugins/convex/index.js +1 -1
- package/dist/plugins/create-typescript-app/index.d.ts +1 -1
- package/dist/plugins/create-typescript-app/index.js +1 -1
- package/dist/plugins/cspell/index.d.ts +1 -1
- package/dist/plugins/cspell/index.js +2 -2
- package/dist/plugins/cucumber/index.d.ts +1 -1
- package/dist/plugins/cucumber/index.js +2 -2
- package/dist/plugins/cypress/helpers.d.ts +2 -2
- package/dist/plugins/cypress/helpers.js +2 -2
- package/dist/plugins/cypress/index.d.ts +1 -1
- package/dist/plugins/cypress/index.js +3 -3
- package/dist/plugins/danger/index.d.ts +1 -1
- package/dist/plugins/danger/index.js +1 -1
- package/dist/plugins/dependency-cruiser/index.d.ts +1 -1
- package/dist/plugins/dependency-cruiser/index.js +1 -1
- package/dist/plugins/docusaurus/helpers.d.ts +3 -3
- package/dist/plugins/docusaurus/helpers.js +2 -2
- package/dist/plugins/docusaurus/index.d.ts +1 -1
- package/dist/plugins/docusaurus/index.js +3 -3
- package/dist/plugins/docusaurus/types.d.ts +1 -1
- package/dist/plugins/dotenv/index.d.ts +1 -1
- package/dist/plugins/dotenv/index.js +1 -1
- package/dist/plugins/drizzle/index.d.ts +1 -1
- package/dist/plugins/drizzle/index.js +2 -2
- package/dist/plugins/eleventy/index.d.ts +1 -1
- package/dist/plugins/eleventy/index.js +6 -6
- package/dist/plugins/eleventy/types.d.ts +1 -1
- package/dist/plugins/eslint/helpers.d.ts +3 -3
- package/dist/plugins/eslint/helpers.js +5 -5
- package/dist/plugins/eslint/index.d.ts +1 -1
- package/dist/plugins/eslint/index.js +3 -3
- package/dist/plugins/execa/index.d.ts +1 -1
- package/dist/plugins/execa/index.js +2 -2
- package/dist/plugins/execa/visitors/execa.d.ts +1 -1
- package/dist/plugins/execa/visitors/execa.js +3 -3
- package/dist/plugins/expo/helpers.d.ts +2 -2
- package/dist/plugins/expo/helpers.js +3 -3
- package/dist/plugins/expo/index.d.ts +1 -1
- package/dist/plugins/expo/index.js +4 -4
- package/dist/plugins/expressive-code/index.d.ts +1 -1
- package/dist/plugins/expressive-code/index.js +1 -1
- package/dist/plugins/gatsby/index.d.ts +1 -1
- package/dist/plugins/gatsby/index.js +2 -2
- package/dist/plugins/github-action/index.d.ts +1 -1
- package/dist/plugins/github-action/index.js +4 -4
- package/dist/plugins/github-actions/index.d.ts +1 -1
- package/dist/plugins/github-actions/index.js +4 -4
- package/dist/plugins/glob/index.d.ts +1 -1
- package/dist/plugins/graphql-codegen/index.d.ts +1 -1
- package/dist/plugins/graphql-codegen/index.js +5 -5
- package/dist/plugins/hardhat/index.d.ts +1 -1
- package/dist/plugins/hardhat/index.js +2 -2
- package/dist/plugins/husky/index.d.ts +1 -1
- package/dist/plugins/husky/index.js +3 -3
- package/dist/plugins/i18next-parser/index.d.ts +1 -1
- package/dist/plugins/i18next-parser/index.js +1 -1
- package/dist/plugins/index.d.ts +138 -135
- package/dist/plugins/index.js +141 -135
- package/dist/plugins/jest/helpers.d.ts +2 -2
- package/dist/plugins/jest/helpers.js +2 -2
- package/dist/plugins/jest/index.d.ts +1 -1
- package/dist/plugins/jest/index.js +4 -4
- package/dist/plugins/karma/helpers.d.ts +2 -2
- package/dist/plugins/karma/helpers.js +2 -2
- package/dist/plugins/karma/index.d.ts +1 -1
- package/dist/plugins/karma/index.js +4 -4
- package/dist/plugins/knex/index.d.ts +1 -1
- package/dist/plugins/knex/index.js +3 -3
- package/dist/plugins/ladle/index.d.ts +1 -1
- package/dist/plugins/ladle/index.js +4 -4
- package/dist/plugins/lefthook/index.d.ts +1 -1
- package/dist/plugins/lefthook/index.js +5 -5
- package/dist/plugins/lint-staged/index.d.ts +1 -1
- package/dist/plugins/lint-staged/index.js +2 -2
- package/dist/plugins/linthtml/index.d.ts +1 -1
- package/dist/plugins/linthtml/index.js +3 -3
- package/dist/plugins/lockfile-lint/index.d.ts +1 -1
- package/dist/plugins/lockfile-lint/index.js +2 -2
- package/dist/plugins/lost-pixel/index.d.ts +1 -1
- package/dist/plugins/lost-pixel/index.js +1 -1
- package/dist/plugins/markdownlint/index.d.ts +1 -1
- package/dist/plugins/markdownlint/index.js +3 -3
- package/dist/plugins/mdx/index.d.ts +1 -1
- package/dist/plugins/mdx/index.js +2 -2
- package/dist/plugins/mdxlint/index.d.ts +1 -1
- package/dist/plugins/mdxlint/index.js +3 -3
- package/dist/plugins/metro/index.d.ts +1 -1
- package/dist/plugins/metro/index.js +4 -4
- package/dist/plugins/mocha/index.d.ts +1 -1
- package/dist/plugins/mocha/index.js +2 -2
- package/dist/plugins/moonrepo/index.d.ts +1 -1
- package/dist/plugins/moonrepo/index.js +1 -1
- package/dist/plugins/msw/index.d.ts +1 -1
- package/dist/plugins/msw/index.js +3 -3
- package/dist/plugins/nano-staged/index.d.ts +1 -1
- package/dist/plugins/nano-staged/index.js +1 -1
- package/dist/plugins/nest/index.d.ts +1 -1
- package/dist/plugins/nest/index.js +2 -2
- package/dist/plugins/netlify/helpers.d.ts +1 -1
- package/dist/plugins/netlify/index.d.ts +1 -1
- package/dist/plugins/netlify/index.js +4 -4
- package/dist/plugins/next/index.d.ts +1 -1
- package/dist/plugins/next/index.js +14 -12
- package/dist/plugins/next/resolveFromAST.js +1 -1
- package/dist/plugins/next-intl/index.d.ts +1 -1
- package/dist/plugins/next-intl/index.js +1 -1
- package/dist/plugins/next-mdx/index.d.ts +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.d.ts +1 -1
- package/dist/plugins/nitro/index.js +3 -3
- package/dist/plugins/node/index.d.ts +1 -1
- package/dist/plugins/node/index.js +1 -1
- package/dist/plugins/node-modules-inspector/index.d.ts +1 -1
- package/dist/plugins/node-modules-inspector/index.js +2 -2
- package/dist/plugins/nodemon/index.d.ts +1 -1
- package/dist/plugins/npm-package-json-lint/index.d.ts +1 -1
- package/dist/plugins/npm-package-json-lint/index.js +3 -3
- package/dist/plugins/nuxt/helpers.d.ts +15 -0
- package/dist/plugins/nuxt/helpers.js +133 -0
- package/dist/plugins/nuxt/index.d.ts +1 -4
- package/dist/plugins/nuxt/index.js +177 -35
- package/dist/plugins/nuxt/types.d.ts +50 -0
- package/dist/plugins/nx/index.d.ts +1 -1
- package/dist/plugins/nx/index.js +3 -3
- package/dist/plugins/nyc/index.d.ts +1 -1
- package/dist/plugins/nyc/index.js +2 -2
- package/dist/plugins/oclif/index.d.ts +1 -1
- package/dist/plugins/oclif/index.js +2 -2
- package/dist/plugins/openapi-ts/index.d.ts +3 -0
- package/dist/plugins/openapi-ts/index.js +22 -0
- package/dist/plugins/openapi-ts/types.d.ts +8 -0
- package/dist/plugins/openapi-ts/types.js +1 -0
- package/dist/plugins/oxlint/index.d.ts +1 -1
- package/dist/plugins/oxlint/index.js +1 -1
- package/dist/plugins/parcel/index.d.ts +1 -1
- package/dist/plugins/parcel/index.js +2 -2
- package/dist/plugins/payload/index.d.ts +3 -0
- package/dist/plugins/payload/index.js +29 -0
- package/dist/plugins/payload/types.d.ts +10 -0
- package/dist/plugins/payload/types.js +1 -0
- package/dist/plugins/playwright/index.d.ts +2 -2
- package/dist/plugins/playwright/index.js +5 -5
- package/dist/plugins/playwright-ct/index.d.ts +1 -1
- package/dist/plugins/playwright-ct/index.js +3 -3
- package/dist/plugins/playwright-test/index.d.ts +1 -1
- package/dist/plugins/playwright-test/index.js +1 -1
- package/dist/plugins/plop/index.d.ts +1 -1
- package/dist/plugins/plop/index.js +1 -1
- package/dist/plugins/pm2/index.d.ts +1 -1
- package/dist/plugins/pm2/index.js +3 -3
- package/dist/plugins/pnpm/index.d.ts +1 -1
- package/dist/plugins/pnpm/index.js +1 -1
- package/dist/plugins/postcss/index.d.ts +1 -1
- package/dist/plugins/postcss/index.js +3 -3
- package/dist/plugins/preconstruct/index.d.ts +1 -1
- package/dist/plugins/preconstruct/index.js +3 -3
- package/dist/plugins/prettier/index.d.ts +1 -1
- package/dist/plugins/prettier/index.js +2 -2
- package/dist/plugins/prisma/index.d.ts +1 -1
- package/dist/plugins/prisma/index.js +5 -5
- package/dist/plugins/qwik/index.d.ts +3 -0
- package/dist/plugins/qwik/index.js +47 -0
- package/dist/plugins/qwik/resolveFromAST.d.ts +3 -0
- package/dist/plugins/qwik/resolveFromAST.js +37 -0
- package/dist/plugins/react-cosmos/index.d.ts +1 -1
- package/dist/plugins/react-cosmos/index.js +3 -3
- package/dist/plugins/react-native/index.d.ts +1 -1
- package/dist/plugins/react-native/index.js +2 -2
- package/dist/plugins/react-router/index.d.ts +1 -1
- package/dist/plugins/react-router/index.js +5 -5
- package/dist/plugins/relay/index.d.ts +1 -1
- package/dist/plugins/relay/index.js +3 -3
- package/dist/plugins/release-it/index.d.ts +1 -1
- package/dist/plugins/release-it/index.js +2 -2
- package/dist/plugins/remark/index.d.ts +1 -1
- package/dist/plugins/remark/index.js +3 -3
- package/dist/plugins/remix/index.d.ts +1 -1
- package/dist/plugins/remix/index.js +1 -1
- package/dist/plugins/rollup/index.d.ts +1 -1
- package/dist/plugins/rollup/index.js +1 -1
- package/dist/plugins/rsbuild/index.d.ts +1 -1
- package/dist/plugins/rsbuild/index.js +2 -2
- package/dist/plugins/rslib/index.d.ts +1 -1
- package/dist/plugins/rslib/index.js +1 -1
- package/dist/plugins/rspack/index.d.ts +1 -1
- package/dist/plugins/rspack/index.js +2 -2
- package/dist/plugins/rstest/index.d.ts +1 -1
- package/dist/plugins/rstest/index.js +2 -2
- package/dist/plugins/semantic-release/index.d.ts +1 -1
- package/dist/plugins/semantic-release/index.js +3 -3
- package/dist/plugins/sentry/index.d.ts +1 -1
- package/dist/plugins/sentry/index.js +1 -1
- package/dist/plugins/simple-git-hooks/index.d.ts +1 -1
- package/dist/plugins/simple-git-hooks/index.js +2 -2
- package/dist/plugins/size-limit/index.d.ts +1 -1
- package/dist/plugins/size-limit/index.js +3 -3
- package/dist/plugins/sst/index.d.ts +1 -1
- package/dist/plugins/sst/index.js +2 -2
- package/dist/plugins/sst/resolveFromAST.d.ts +1 -1
- package/dist/plugins/sst/resolveFromAST.js +4 -4
- package/dist/plugins/starlight/index.d.ts +1 -1
- package/dist/plugins/starlight/index.js +4 -4
- package/dist/plugins/starlight/resolveFromAST.js +1 -1
- package/dist/plugins/storybook/index.d.ts +1 -1
- package/dist/plugins/storybook/index.js +3 -3
- package/dist/plugins/stryker/index.d.ts +1 -1
- package/dist/plugins/stryker/index.js +2 -2
- package/dist/plugins/stylelint/index.d.ts +1 -1
- package/dist/plugins/stylelint/index.js +3 -3
- package/dist/plugins/svelte/compiler.d.ts +1 -1
- package/dist/plugins/svelte/compiler.js +1 -1
- package/dist/plugins/svelte/index.d.ts +1 -1
- package/dist/plugins/svelte/index.js +3 -3
- package/dist/plugins/sveltekit/index.d.ts +1 -1
- package/dist/plugins/sveltekit/index.js +3 -3
- package/dist/plugins/svgo/index.d.ts +1 -1
- package/dist/plugins/svgo/index.js +1 -1
- package/dist/plugins/svgr/index.d.ts +1 -1
- package/dist/plugins/svgr/index.js +2 -2
- package/dist/plugins/swc/index.d.ts +1 -1
- package/dist/plugins/swc/index.js +5 -3
- package/dist/plugins/swc/types.d.ts +1 -0
- package/dist/plugins/syncpack/index.d.ts +1 -1
- package/dist/plugins/syncpack/index.js +2 -2
- package/dist/plugins/tailwind/index.d.ts +1 -1
- package/dist/plugins/tailwind/index.js +2 -2
- package/dist/plugins/tanstack-router/index.d.ts +1 -1
- package/dist/plugins/tanstack-router/index.js +3 -3
- package/dist/plugins/taskfile/index.d.ts +1 -1
- package/dist/plugins/taskfile/index.js +3 -3
- package/dist/plugins/travis/index.d.ts +1 -1
- package/dist/plugins/travis/index.js +1 -1
- package/dist/plugins/ts-node/index.d.ts +1 -1
- package/dist/plugins/tsdown/index.d.ts +1 -1
- package/dist/plugins/tsdown/index.js +14 -9
- package/dist/plugins/tsdown/types.d.ts +1 -1
- package/dist/plugins/tsup/index.d.ts +1 -1
- package/dist/plugins/tsup/index.js +2 -2
- package/dist/plugins/tsx/index.d.ts +1 -1
- package/dist/plugins/tsx/index.js +2 -2
- package/dist/plugins/typedoc/index.d.ts +1 -1
- package/dist/plugins/typedoc/index.js +2 -2
- package/dist/plugins/typescript/index.d.ts +1 -1
- package/dist/plugins/typescript/index.js +10 -4
- package/dist/plugins/unbuild/index.d.ts +1 -1
- package/dist/plugins/unbuild/index.js +2 -2
- package/dist/plugins/unocss/index.d.ts +1 -1
- package/dist/plugins/unocss/index.js +2 -2
- package/dist/plugins/vercel-og/index.d.ts +1 -1
- package/dist/plugins/vercel-og/index.js +1 -1
- package/dist/plugins/vike/index.d.ts +1 -1
- package/dist/plugins/vike/index.js +1 -1
- package/dist/plugins/vite/helpers.d.ts +1 -1
- package/dist/plugins/vite/helpers.js +4 -4
- package/dist/plugins/vite/index.d.ts +1 -1
- package/dist/plugins/vite/index.js +5 -5
- package/dist/plugins/vite/visitors/importMetaGlob.d.ts +1 -1
- package/dist/plugins/vite/visitors/importMetaGlob.js +4 -4
- package/dist/plugins/vitepress/index.d.ts +1 -1
- package/dist/plugins/vitepress/index.js +1 -1
- package/dist/plugins/vitest/helpers.d.ts +1 -1
- package/dist/plugins/vitest/index.d.ts +2 -2
- package/dist/plugins/vitest/index.js +19 -12
- package/dist/plugins/vitest/types.d.ts +1 -0
- package/dist/plugins/vue/compiler.d.ts +1 -1
- package/dist/plugins/vue/compiler.js +1 -1
- package/dist/plugins/vue/index.d.ts +1 -1
- package/dist/plugins/vue/index.js +4 -4
- package/dist/plugins/webdriver-io/index.d.ts +1 -1
- package/dist/plugins/webdriver-io/index.js +2 -2
- package/dist/plugins/webpack/index.d.ts +2 -2
- package/dist/plugins/webpack/index.js +5 -5
- package/dist/plugins/webpack/visitors/requireContext.d.ts +1 -1
- package/dist/plugins/webpack/visitors/requireContext.js +6 -5
- package/dist/plugins/wireit/index.d.ts +1 -1
- package/dist/plugins/wireit/index.js +1 -1
- package/dist/plugins/wrangler/index.d.ts +1 -1
- package/dist/plugins/wrangler/index.js +3 -3
- package/dist/plugins/xo/index.d.ts +1 -1
- package/dist/plugins/xo/index.js +2 -2
- package/dist/plugins/xo/types.d.ts +1 -1
- package/dist/plugins/yarn/index.d.ts +1 -1
- package/dist/plugins/yarn/index.js +5 -4
- package/dist/plugins/yorkie/index.d.ts +1 -1
- package/dist/plugins/yorkie/index.js +2 -2
- package/dist/plugins/zx/index.d.ts +1 -1
- package/dist/plugins/zx/index.js +2 -2
- package/dist/plugins/zx/visitors/zx.d.ts +1 -1
- package/dist/plugins/zx/visitors/zx.js +2 -2
- package/dist/plugins.d.ts +3 -3
- package/dist/plugins.js +2 -2
- package/dist/reporters/codeclimate.d.ts +1 -1
- package/dist/reporters/codeclimate.js +2 -2
- package/dist/reporters/codeowners.d.ts +1 -1
- package/dist/reporters/codeowners.js +3 -3
- package/dist/reporters/compact.d.ts +1 -1
- package/dist/reporters/compact.js +2 -2
- package/dist/reporters/disclosure.d.ts +1 -1
- package/dist/reporters/disclosure.js +1 -1
- package/dist/reporters/github-actions.d.ts +1 -1
- package/dist/reporters/github-actions.js +4 -4
- package/dist/reporters/index.d.ts +8 -8
- package/dist/reporters/index.js +8 -8
- package/dist/reporters/json.d.ts +1 -1
- package/dist/reporters/json.js +4 -4
- package/dist/reporters/markdown.d.ts +1 -1
- package/dist/reporters/markdown.js +2 -2
- package/dist/reporters/symbols.d.ts +1 -1
- package/dist/reporters/symbols.js +2 -2
- package/dist/reporters/trace.d.ts +4 -4
- package/dist/reporters/trace.js +4 -4
- package/dist/reporters/util/configuration-hints.d.ts +2 -2
- package/dist/reporters/util/configuration-hints.js +4 -4
- package/dist/reporters/util/util.d.ts +3 -3
- package/dist/reporters/util/util.js +3 -3
- package/dist/reporters/watch.d.ts +3 -3
- package/dist/reporters/watch.js +3 -3
- package/dist/run.d.ts +12 -12
- package/dist/run.js +13 -13
- package/dist/schema/configuration.d.ts +45 -0
- 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.d.ts +3 -3
- package/dist/session/build-maps.js +3 -3
- package/dist/session/file-descriptor.d.ts +2 -2
- package/dist/session/file-descriptor.js +3 -3
- package/dist/session/index.d.ts +12 -12
- package/dist/session/index.js +7 -7
- package/dist/session/package-json-descriptor.d.ts +2 -2
- package/dist/session/package-json-descriptor.js +1 -1
- package/dist/session/session.d.ts +7 -7
- package/dist/session/session.js +3 -3
- package/dist/session/types.d.ts +2 -2
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +3 -0
- package/dist/types/args.d.ts +1 -1
- package/dist/types/config.d.ts +11 -11
- package/dist/types/exports.d.ts +1 -1
- package/dist/types/issues.d.ts +2 -2
- package/dist/types/module-graph.d.ts +2 -2
- package/dist/types/package-json.d.ts +1 -1
- package/dist/types/project.d.ts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/typescript/SourceFileManager.d.ts +1 -1
- package/dist/typescript/SourceFileManager.js +4 -4
- package/dist/typescript/ast-helpers.d.ts +3 -3
- package/dist/typescript/ast-helpers.js +7 -8
- package/dist/typescript/create-hosts.d.ts +3 -3
- package/dist/typescript/create-hosts.js +2 -2
- package/dist/typescript/get-imports-and-exports.d.ts +3 -3
- package/dist/typescript/get-imports-and-exports.js +24 -15
- package/dist/typescript/has-refs-in-file.d.ts +1 -1
- package/dist/typescript/has-refs-in-file.js +2 -2
- package/dist/typescript/pragmas/custom.d.ts +2 -2
- package/dist/typescript/pragmas/custom.js +4 -4
- package/dist/typescript/pragmas/index.d.ts +2 -2
- package/dist/typescript/pragmas/index.js +2 -2
- package/dist/typescript/pragmas/typescript.d.ts +2 -2
- package/dist/typescript/pragmas/typescript.js +1 -1
- package/dist/typescript/resolve-module-names.d.ts +1 -1
- package/dist/typescript/resolve-module-names.js +6 -6
- package/dist/typescript/visitors/dynamic-imports/importCall.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/importCall.js +3 -3
- package/dist/typescript/visitors/dynamic-imports/importType.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/importType.js +2 -2
- package/dist/typescript/visitors/dynamic-imports/index.d.ts +2 -2
- package/dist/typescript/visitors/dynamic-imports/index.js +7 -7
- package/dist/typescript/visitors/dynamic-imports/jsDocType.d.ts +2 -2
- package/dist/typescript/visitors/dynamic-imports/jsDocType.js +2 -2
- package/dist/typescript/visitors/dynamic-imports/moduleRegister.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/moduleRegister.js +3 -3
- package/dist/typescript/visitors/dynamic-imports/requireCall.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/requireCall.js +4 -4
- package/dist/typescript/visitors/dynamic-imports/resolveCall.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/resolveCall.js +3 -3
- package/dist/typescript/visitors/dynamic-imports/urlConstructor.d.ts +1 -1
- package/dist/typescript/visitors/dynamic-imports/urlConstructor.js +2 -2
- package/dist/typescript/visitors/exports/exportAssignment.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportAssignment.js +4 -4
- package/dist/typescript/visitors/exports/exportDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportDeclaration.js +3 -3
- package/dist/typescript/visitors/exports/exportKeyword.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportKeyword.js +5 -5
- package/dist/typescript/visitors/exports/exportsAccessExpression.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportsAccessExpression.js +3 -3
- package/dist/typescript/visitors/exports/index.d.ts +1 -1
- package/dist/typescript/visitors/exports/index.js +5 -5
- package/dist/typescript/visitors/exports/moduleExportsAccessExpression.d.ts +1 -1
- package/dist/typescript/visitors/exports/moduleExportsAccessExpression.js +4 -4
- package/dist/typescript/visitors/helpers.d.ts +1 -1
- package/dist/typescript/visitors/imports/importDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/imports/importDeclaration.js +3 -3
- package/dist/typescript/visitors/imports/importEqualsDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/imports/importEqualsDeclaration.js +3 -3
- package/dist/typescript/visitors/imports/index.d.ts +1 -1
- package/dist/typescript/visitors/imports/index.js +3 -3
- package/dist/typescript/visitors/imports/reExportDeclaration.d.ts +1 -1
- package/dist/typescript/visitors/imports/reExportDeclaration.js +2 -2
- package/dist/typescript/visitors/index.d.ts +3 -3
- package/dist/typescript/visitors/scripts/bun.d.ts +1 -1
- package/dist/typescript/visitors/scripts/bun.js +3 -3
- package/dist/typescript/visitors/scripts/index.d.ts +2 -2
- package/dist/typescript/visitors/scripts/index.js +1 -1
- package/dist/util/Performance.js +2 -2
- package/dist/util/catalog.d.ts +2 -2
- package/dist/util/catalog.js +3 -3
- package/dist/util/codeowners.js +2 -2
- package/dist/util/create-input-handler.d.ts +6 -6
- package/dist/util/create-input-handler.js +7 -7
- package/dist/util/create-options.d.ts +52 -22
- package/dist/util/create-options.js +13 -13
- package/dist/util/create-workspace-graph.d.ts +1 -1
- package/dist/util/create-workspace-graph.js +1 -1
- package/dist/util/file-entry-cache.js +4 -4
- package/dist/util/fs.d.ts +2 -2
- package/dist/util/fs.js +4 -4
- package/dist/util/get-included-issue-types.d.ts +1 -1
- package/dist/util/get-included-issue-types.js +2 -2
- package/dist/util/git.js +1 -1
- package/dist/util/glob-core.d.ts +2 -2
- package/dist/util/glob-core.js +58 -40
- package/dist/util/glob.js +4 -4
- package/dist/util/input.d.ts +2 -2
- package/dist/util/input.js +1 -1
- package/dist/util/issue-initializers.d.ts +1 -1
- package/dist/util/issue-initializers.js +1 -1
- package/dist/util/jiti.js +1 -1
- package/dist/util/load-config.d.ts +1 -1
- package/dist/util/load-config.js +3 -3
- package/dist/util/load-tsconfig.js +2 -2
- package/dist/util/loader.js +14 -6
- package/dist/util/map-workspaces.d.ts +1 -1
- package/dist/util/map-workspaces.js +4 -4
- package/dist/util/module-graph.d.ts +1 -1
- package/dist/util/modules.js +2 -2
- package/dist/util/package-json.d.ts +1 -1
- package/dist/util/package-json.js +10 -0
- package/dist/util/package-name.d.ts +1 -1
- package/dist/util/package-name.js +1 -1
- package/dist/util/plugin.d.ts +2 -2
- package/dist/util/plugin.js +5 -5
- package/dist/util/remove-export.js +1 -1
- package/dist/util/reporter.d.ts +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/table.js +1 -1
- package/dist/util/tag.d.ts +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 +5 -5
- package/dist/util/trace.d.ts +1 -1
- package/dist/util/watch.d.ts +10 -10
- package/dist/util/watch.js +8 -7
- package/dist/util/workspace-file-filter.js +2 -2
- package/dist/util/workspace-selectors.d.ts +1 -1
- package/dist/util/workspace-selectors.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +65 -65
- package/schema.json +12 -0
- package/vendor/bash-parser/README.md +0 -7
- package/vendor/bash-parser/index.d.ts +0 -79
- package/vendor/bash-parser/index.js +0 -58
package/dist/IssueFixer.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
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
|
|
8
|
-
export const fix = async (issues, options) => {
|
|
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
|
+
export const fix = async (issues, counters, options) => {
|
|
9
9
|
const fixer = new IssueFixer(options);
|
|
10
10
|
const touchedFiles = await fixer.fixIssues(issues);
|
|
11
|
+
for (const type in issues) {
|
|
12
|
+
const group = issues[type];
|
|
13
|
+
if (group instanceof Set)
|
|
14
|
+
continue;
|
|
15
|
+
for (const filePath in group)
|
|
16
|
+
for (const key in group[filePath])
|
|
17
|
+
if (group[filePath][key].isFixed)
|
|
18
|
+
counters[type]--;
|
|
19
|
+
}
|
|
11
20
|
if (options.isFormat) {
|
|
12
21
|
const report = await formatly(Array.from(touchedFiles));
|
|
13
22
|
if (report.ran && report.result && (report.result.runner === 'virtual' || report.result.code === 0)) {
|
|
@@ -60,6 +69,8 @@ class IssueFixer {
|
|
|
60
69
|
}
|
|
61
70
|
}
|
|
62
71
|
for (const [filePath, fixes] of allFixes) {
|
|
72
|
+
if (fixes.length === 0)
|
|
73
|
+
continue;
|
|
63
74
|
const absFilePath = join(this.options.cwd, filePath);
|
|
64
75
|
const sourceFileText = fixes
|
|
65
76
|
.sort((a, b) => b[0] - a[0])
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DEFAULT_CATALOG } from
|
|
1
|
+
import { DEFAULT_CATALOG } from "./util/catalog.js";
|
|
2
2
|
export class JsonCatalogPeeker {
|
|
3
|
-
fileContent;
|
|
4
3
|
lines = [];
|
|
5
4
|
sections = {};
|
|
6
5
|
ready = false;
|
|
6
|
+
fileContent;
|
|
7
7
|
constructor(fileContent) {
|
|
8
8
|
this.fileContent = fileContent;
|
|
9
9
|
}
|
package/dist/PackagePeeker.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare class PackagePeeker {
|
|
2
|
-
private manifestStr;
|
|
3
2
|
private lines;
|
|
4
3
|
private sections;
|
|
5
4
|
private ready;
|
|
5
|
+
private manifestStr;
|
|
6
6
|
constructor(manifestStr: string);
|
|
7
7
|
private init;
|
|
8
8
|
getLocation(type: 'dependencies' | 'devDependencies' | 'optionalPeerDependencies', packageName: string): {
|
package/dist/PackagePeeker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProjectPrincipal } from './ProjectPrincipal.
|
|
2
|
-
import type { PrincipalOptions } from './types/project.
|
|
3
|
-
import type { MainOptions } from './util/create-options.
|
|
1
|
+
import { ProjectPrincipal } from './ProjectPrincipal.ts';
|
|
2
|
+
import type { PrincipalOptions } from './types/project.ts';
|
|
3
|
+
import type { MainOptions } from './util/create-options.ts';
|
|
4
4
|
export declare class PrincipalFactory {
|
|
5
5
|
private principals;
|
|
6
6
|
getPrincipalCount(): number;
|
package/dist/PrincipalFactory.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import { ProjectPrincipal } from
|
|
3
|
-
import { debugLog } from
|
|
4
|
-
import { toRelative } from
|
|
2
|
+
import { ProjectPrincipal } from "./ProjectPrincipal.js";
|
|
3
|
+
import { debugLog } from "./util/debug.js";
|
|
4
|
+
import { toRelative } from "./util/path.js";
|
|
5
5
|
export class PrincipalFactory {
|
|
6
6
|
principals = new Set();
|
|
7
7
|
getPrincipalCount() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import { CacheConsultant } from './CacheConsultant.
|
|
3
|
-
import type { AsyncCompilers, SyncCompilers } from './compilers/types.
|
|
4
|
-
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile, Visitors } from './types/config.
|
|
5
|
-
import type { Export, ExportMember, FileNode, ModuleGraph } from './types/module-graph.
|
|
6
|
-
import type { Paths, PrincipalOptions } from './types/project.
|
|
7
|
-
import type { ResolveModuleNames } from './typescript/resolve-module-names.
|
|
8
|
-
import { SourceFileManager } from './typescript/SourceFileManager.
|
|
9
|
-
import type { MainOptions } from './util/create-options.
|
|
10
|
-
import type { ToSourceFilePath } from './util/to-source-path.
|
|
2
|
+
import { CacheConsultant } from './CacheConsultant.ts';
|
|
3
|
+
import type { AsyncCompilers, SyncCompilers } from './compilers/types.ts';
|
|
4
|
+
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile, Visitors } from './types/config.ts';
|
|
5
|
+
import type { Export, ExportMember, FileNode, ModuleGraph } from './types/module-graph.ts';
|
|
6
|
+
import type { Paths, PrincipalOptions } from './types/project.ts';
|
|
7
|
+
import type { ResolveModuleNames } from './typescript/resolve-module-names.ts';
|
|
8
|
+
import { SourceFileManager } from './typescript/SourceFileManager.ts';
|
|
9
|
+
import type { MainOptions } from './util/create-options.ts';
|
|
10
|
+
import type { ToSourceFilePath } from './util/to-source-path.ts';
|
|
11
11
|
export declare class ProjectPrincipal {
|
|
12
12
|
entryPaths: Set<string>;
|
|
13
13
|
projectPaths: Set<string>;
|
package/dist/ProjectPrincipal.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import { CacheConsultant } from
|
|
3
|
-
import { getCompilerExtensions } from
|
|
4
|
-
import { ANONYMOUS, DEFAULT_EXTENSIONS, MEMBER_FLAGS, PUBLIC_TAG } from
|
|
5
|
-
import { createHosts } from
|
|
6
|
-
import { _getImportsAndExports } from
|
|
7
|
-
import { SourceFileManager } from
|
|
8
|
-
import { compact } from
|
|
9
|
-
import { timerify } from
|
|
10
|
-
import { extname, isInNodeModules, toAbsolute } from
|
|
2
|
+
import { CacheConsultant } from "./CacheConsultant.js";
|
|
3
|
+
import { getCompilerExtensions } from "./compilers/index.js";
|
|
4
|
+
import { ANONYMOUS, DEFAULT_EXTENSIONS, MEMBER_FLAGS, PUBLIC_TAG } from "./constants.js";
|
|
5
|
+
import { createHosts } from "./typescript/create-hosts.js";
|
|
6
|
+
import { _getImportsAndExports } from "./typescript/get-imports-and-exports.js";
|
|
7
|
+
import { SourceFileManager } from "./typescript/SourceFileManager.js";
|
|
8
|
+
import { compact } from "./util/array.js";
|
|
9
|
+
import { timerify } from "./util/Performance.js";
|
|
10
|
+
import { extname, isInNodeModules, toAbsolute } from "./util/path.js";
|
|
11
11
|
const baseCompilerOptions = {
|
|
12
12
|
allowJs: true,
|
|
13
13
|
allowSyntheticDefaultImports: true,
|
|
@@ -165,6 +165,12 @@ export class ProjectPrincipal {
|
|
|
165
165
|
if (!sourceFile)
|
|
166
166
|
throw new Error(`Unable to find ${filePath}`);
|
|
167
167
|
const skipExports = this.skipExportsAnalysis.has(filePath);
|
|
168
|
+
if (options.isFixExports || options.isFixTypes) {
|
|
169
|
+
const ext = extname(filePath);
|
|
170
|
+
if (!DEFAULT_EXTENSIONS.includes(ext) && (this.syncCompilers.has(ext) || this.asyncCompilers.has(ext))) {
|
|
171
|
+
options = { ...options, isFixExports: false, isFixTypes: false };
|
|
172
|
+
}
|
|
173
|
+
}
|
|
168
174
|
const resolve = (specifier) => this.backend.resolveModuleNames([specifier], sourceFile.fileName)[0];
|
|
169
175
|
return _getImportsAndExports(sourceFile, resolve, typeChecker, options, ignoreExportsUsedInFile, skipExports, this.visitors);
|
|
170
176
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { CacheConsultant } from './CacheConsultant.
|
|
2
|
-
import { type Workspace } from './ConfigurationChief.
|
|
3
|
-
import type { GetSourceFile, HandleInput, RegisterCompiler, RegisterVisitor, WorkspaceConfiguration } from './types/config.
|
|
4
|
-
import type { ConfigurationHint } from './types/issues.
|
|
5
|
-
import type { PluginName } from './types/PluginNames.
|
|
6
|
-
import type { PackageJson } from './types/package-json.
|
|
7
|
-
import type { DependencySet } from './types/workspace.
|
|
8
|
-
import type { MainOptions } from './util/create-options.
|
|
9
|
-
import { type Input } from './util/input.
|
|
1
|
+
import { CacheConsultant } from './CacheConsultant.ts';
|
|
2
|
+
import { type Workspace } from './ConfigurationChief.ts';
|
|
3
|
+
import type { GetSourceFile, HandleInput, RegisterCompiler, RegisterVisitor, WorkspaceConfiguration } from './types/config.ts';
|
|
4
|
+
import type { ConfigurationHint } from './types/issues.ts';
|
|
5
|
+
import type { PluginName } from './types/PluginNames.ts';
|
|
6
|
+
import type { PackageJson } from './types/package-json.ts';
|
|
7
|
+
import type { DependencySet } from './types/workspace.ts';
|
|
8
|
+
import type { MainOptions } from './util/create-options.ts';
|
|
9
|
+
import { type Input } from './util/input.ts';
|
|
10
10
|
type WorkspaceManagerOptions = {
|
|
11
11
|
name: string;
|
|
12
12
|
dir: string;
|
package/dist/WorkspaceWorker.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import picomatch from 'picomatch';
|
|
2
|
-
import { _getInputsFromScripts } from
|
|
3
|
-
import { CacheConsultant } from
|
|
4
|
-
import { isDefaultPattern } from
|
|
5
|
-
import { ROOT_WORKSPACE_NAME } from
|
|
6
|
-
import { getFilteredScripts } from
|
|
7
|
-
import { PluginEntries, Plugins } from
|
|
8
|
-
import { collectStringLiterals, isExternalReExportsOnly } from
|
|
9
|
-
import { compact } from
|
|
10
|
-
import { debugLogArray, debugLogObject } from
|
|
11
|
-
import { _glob, hasNoProductionSuffix, hasProductionSuffix, negate } from
|
|
12
|
-
import { isConfig, isDeferResolve, isDependency, toConfig, toDebugString, toEntry, toProductionEntry, } from
|
|
13
|
-
import { getPackageNameFromSpecifier } from
|
|
14
|
-
import { getKeysByValue } from
|
|
15
|
-
import { timerify } from
|
|
16
|
-
import { basename, dirname, extname, isInternal, join } from
|
|
17
|
-
import { loadConfigForPlugin } from
|
|
18
|
-
import { ELLIPSIS } from
|
|
2
|
+
import { _getInputsFromScripts } from "./binaries/index.js";
|
|
3
|
+
import { CacheConsultant } from "./CacheConsultant.js";
|
|
4
|
+
import { isDefaultPattern } from "./ConfigurationChief.js";
|
|
5
|
+
import { 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 { compact } from "./util/array.js";
|
|
10
|
+
import { debugLogArray, debugLogObject } from "./util/debug.js";
|
|
11
|
+
import { _glob, hasNoProductionSuffix, hasProductionSuffix, negate } from "./util/glob.js";
|
|
12
|
+
import { isConfig, isDeferResolve, isDependency, toConfig, toDebugString, toEntry, toProductionEntry, } from "./util/input.js";
|
|
13
|
+
import { getPackageNameFromSpecifier } from "./util/modules.js";
|
|
14
|
+
import { getKeysByValue } from "./util/object.js";
|
|
15
|
+
import { timerify } from "./util/Performance.js";
|
|
16
|
+
import { basename, dirname, extname, isInternal, join } from "./util/path.js";
|
|
17
|
+
import { loadConfigForPlugin } from "./util/plugin.js";
|
|
18
|
+
import { ELLIPSIS } from "./util/string.js";
|
|
19
19
|
const nullConfig = { config: null, entry: null, project: null };
|
|
20
20
|
const initEnabledPluginsMap = () => Object.keys(Plugins).reduce((enabled, pluginName) => ({ ...enabled, [pluginName]: false }), {});
|
|
21
21
|
export class WorkspaceWorker {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { DEFAULT_CATALOG } from
|
|
1
|
+
import { DEFAULT_CATALOG } from "./util/catalog.js";
|
|
2
2
|
function matchesKey(line, indent, key) {
|
|
3
3
|
return (line.startsWith(`${indent}${key}:`) ||
|
|
4
4
|
line.startsWith(`${indent}"${key}":`) ||
|
|
5
5
|
line.startsWith(`${indent}'${key}':`));
|
|
6
6
|
}
|
|
7
7
|
export class YamlCatalogPeeker {
|
|
8
|
-
fileContent;
|
|
9
8
|
lines = [];
|
|
10
9
|
sections = {};
|
|
11
10
|
ready = false;
|
|
11
|
+
fileContent;
|
|
12
12
|
constructor(fileContent) {
|
|
13
13
|
this.fileContent = fileContent;
|
|
14
14
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { GetInputsFromScriptsOptions } from '../types/config.
|
|
2
|
-
import { type Input } from '../util/input.
|
|
1
|
+
import type { GetInputsFromScriptsOptions } from '../types/config.ts';
|
|
2
|
+
import { type Input } from '../util/input.ts';
|
|
3
3
|
export declare const getDependenciesFromScript: (script: string, options: GetInputsFromScriptsOptions) => Input[];
|
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
import parse
|
|
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 PackageManagerResolvers from
|
|
10
|
-
import { resolve as resolverFromPlugins } from
|
|
11
|
-
import { parseNodeArgs } from
|
|
1
|
+
import { parse } from 'unbash';
|
|
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 PackageManagerResolvers from "./package-manager/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
|
-
const
|
|
14
|
-
|
|
13
|
+
const collectExpansionScripts = (word, out) => {
|
|
14
|
+
if (!word.parts)
|
|
15
|
+
return;
|
|
16
|
+
for (const part of word.parts) {
|
|
17
|
+
if ((part.type === 'CommandExpansion' || part.type === 'ProcessSubstitution') && part.script) {
|
|
18
|
+
out.push(part.script);
|
|
19
|
+
}
|
|
20
|
+
else if (part.type === 'DoubleQuoted' || part.type === 'LocaleString') {
|
|
21
|
+
for (const child of part.parts) {
|
|
22
|
+
if (child.type === 'CommandExpansion' && child.script)
|
|
23
|
+
out.push(child.script);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
15
28
|
export const getDependenciesFromScript = (script, options) => {
|
|
16
29
|
if (!script)
|
|
17
30
|
return [];
|
|
@@ -25,40 +38,47 @@ export const getDependenciesFromScript = (script, options) => {
|
|
|
25
38
|
});
|
|
26
39
|
};
|
|
27
40
|
const definedFunctions = new Set();
|
|
28
|
-
const collectFunctionNames = (
|
|
29
|
-
for (const
|
|
30
|
-
if (
|
|
31
|
-
definedFunctions.add(
|
|
41
|
+
const collectFunctionNames = (statements) => {
|
|
42
|
+
for (const stmt of statements)
|
|
43
|
+
if (stmt.command.type === 'Function')
|
|
44
|
+
definedFunctions.add(stmt.command.name.text);
|
|
45
|
+
};
|
|
46
|
+
const processScript = (s) => {
|
|
47
|
+
collectFunctionNames(s.commands);
|
|
48
|
+
const pending = [];
|
|
49
|
+
const mainDeps = getDependenciesFromStatements(s.commands, pending);
|
|
50
|
+
const expansionDeps = pending.flatMap(inner => processScript(inner));
|
|
51
|
+
return [...mainDeps, ...expansionDeps];
|
|
32
52
|
};
|
|
33
|
-
const
|
|
53
|
+
const getDependenciesFromStatements = (statements, pending) => statements.flatMap(stmt => getDependenciesFromNode(stmt.command, pending));
|
|
54
|
+
const getDependenciesFromNode = (node, pending) => {
|
|
34
55
|
switch (node.type) {
|
|
35
56
|
case 'Command': {
|
|
36
|
-
const text = node.name?.
|
|
57
|
+
const text = node.name?.value;
|
|
37
58
|
const binary = text ? extractBinary(text) : text;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
if (node.name)
|
|
60
|
+
collectExpansionScripts(node.name, pending);
|
|
61
|
+
for (const prefix of node.prefix)
|
|
62
|
+
if (prefix.value)
|
|
63
|
+
collectExpansionScripts(prefix.value, pending);
|
|
64
|
+
for (const suffix of node.suffix)
|
|
65
|
+
collectExpansionScripts(suffix, pending);
|
|
45
66
|
if (!binary || binary === '.' || binary === 'source' || binary === '[')
|
|
46
67
|
return [];
|
|
47
|
-
if (binary.startsWith('-') || binary.startsWith('
|
|
68
|
+
if (binary.startsWith('-') || binary.startsWith('..'))
|
|
48
69
|
return [];
|
|
49
70
|
if (definedFunctions.has(binary))
|
|
50
71
|
return [];
|
|
51
|
-
const args = node.suffix
|
|
72
|
+
const args = node.suffix.map(w => w.value);
|
|
52
73
|
if (['!', 'test'].includes(binary))
|
|
53
74
|
return fromArgs(args);
|
|
54
75
|
const fromNodeOptions = node.prefix
|
|
55
|
-
|
|
56
|
-
.
|
|
57
|
-
.flatMap(node => node.text.split('=')[1])
|
|
76
|
+
.filter(a => a.name === 'NODE_OPTIONS' && a.value)
|
|
77
|
+
.map(a => a.value.value)
|
|
58
78
|
.map(arg => parseNodeArgs(arg.split(' ')))
|
|
59
79
|
.filter(args => args.require)
|
|
60
80
|
.flatMap(arg => arg.require)
|
|
61
|
-
.map(id => toDeferResolve(id))
|
|
81
|
+
.map(id => toDeferResolve(id));
|
|
62
82
|
if (binary in PackageManagerResolvers) {
|
|
63
83
|
const resolver = PackageManagerResolvers[binary];
|
|
64
84
|
return resolver(binary, args, { ...options, fromArgs });
|
|
@@ -67,8 +87,11 @@ export const getDependenciesFromScript = (script, options) => {
|
|
|
67
87
|
return [...resolverFromPlugins(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
68
88
|
}
|
|
69
89
|
if (spawningBinaries.includes(binary)) {
|
|
70
|
-
const
|
|
71
|
-
|
|
90
|
+
const rest = node.suffix
|
|
91
|
+
.filter(w => w.text !== '--')
|
|
92
|
+
.map(w => w.text)
|
|
93
|
+
.join(' ');
|
|
94
|
+
return [toBinary(binary), ...getDependenciesFromScript(rest, options)];
|
|
72
95
|
}
|
|
73
96
|
if (binary in Plugins) {
|
|
74
97
|
return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
@@ -77,30 +100,41 @@ export const getDependenciesFromScript = (script, options) => {
|
|
|
77
100
|
return [];
|
|
78
101
|
return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
79
102
|
}
|
|
80
|
-
case '
|
|
81
|
-
|
|
103
|
+
case 'AndOr':
|
|
104
|
+
case 'Pipeline':
|
|
105
|
+
return node.commands.flatMap(n => getDependenciesFromNode(n, pending));
|
|
82
106
|
case 'If':
|
|
83
|
-
return
|
|
107
|
+
return [
|
|
108
|
+
...getDependenciesFromStatements(node.clause.commands, pending),
|
|
109
|
+
...getDependenciesFromStatements(node.then.commands, pending),
|
|
110
|
+
...(node.else ? getDependenciesFromNode(node.else, pending) : []),
|
|
111
|
+
];
|
|
112
|
+
case 'While':
|
|
113
|
+
return [
|
|
114
|
+
...getDependenciesFromStatements(node.clause.commands, pending),
|
|
115
|
+
...getDependenciesFromStatements(node.body.commands, pending),
|
|
116
|
+
];
|
|
84
117
|
case 'For':
|
|
85
|
-
|
|
118
|
+
case 'Select':
|
|
119
|
+
case 'Subshell':
|
|
120
|
+
case 'BraceGroup':
|
|
121
|
+
return getDependenciesFromStatements(node.body.commands, pending);
|
|
86
122
|
case 'CompoundList':
|
|
87
|
-
return
|
|
88
|
-
case 'Pipeline':
|
|
89
|
-
return getDependenciesFromNodes(node.commands);
|
|
123
|
+
return getDependenciesFromStatements(node.commands, pending);
|
|
90
124
|
case 'Function':
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
case 'Coproc':
|
|
126
|
+
return getDependenciesFromNode(node.body, pending);
|
|
127
|
+
case 'Statement':
|
|
128
|
+
return getDependenciesFromNode(node.command, pending);
|
|
94
129
|
default:
|
|
95
130
|
return [];
|
|
96
131
|
}
|
|
97
|
-
}
|
|
132
|
+
};
|
|
98
133
|
try {
|
|
99
134
|
const parsed = parse(script);
|
|
100
|
-
if (!parsed
|
|
135
|
+
if (!parsed.commands)
|
|
101
136
|
return [];
|
|
102
|
-
|
|
103
|
-
return getDependenciesFromNodes(parsed.commands);
|
|
137
|
+
return processScript(parsed);
|
|
104
138
|
}
|
|
105
139
|
catch (error) {
|
|
106
140
|
const msg = `Warning: failed to parse and ignoring script in ${relative(options.cwd, options.containingFilePath)} (${truncate(script, 30)})`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BinaryResolver } from '../types/config.
|
|
1
|
+
import type { BinaryResolver } from '../types/config.ts';
|
|
2
2
|
export declare const resolve: BinaryResolver;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { compact } from
|
|
3
|
-
import { toBinary, toDeferResolve, toEntry } from
|
|
4
|
-
import { isValidBinary } from
|
|
5
|
-
const spawningBinaries = ['cross-env', 'retry-cli'];
|
|
2
|
+
import { compact } from "../util/array.js";
|
|
3
|
+
import { toBinary, toDeferResolve, toEntry } from "../util/input.js";
|
|
4
|
+
import { isValidBinary } from "../util/modules.js";
|
|
6
5
|
const endOfCommandBinaries = ['dotenvx', 'env-cmd', 'op'];
|
|
7
6
|
const positionals = new Set(['babel-node', 'esbuild', 'execa', 'jiti', 'oxnode', 'vite-node', 'zx']);
|
|
8
7
|
const positionalBinaries = new Set(['concurrently']);
|
|
9
8
|
export const resolve = (binary, args, { fromArgs }) => {
|
|
10
9
|
const parsed = parseArgs(args, { boolean: ['quiet', 'verbose'], '--': endOfCommandBinaries.includes(binary) });
|
|
11
10
|
const bin = binary.startsWith('.') ? toEntry(binary) : isValidBinary(binary) ? toBinary(binary) : undefined;
|
|
12
|
-
const shiftedArgs = spawningBinaries.includes(binary) ? fromArgs(args) : [];
|
|
13
11
|
const pos = positionals.has(binary) ? [toDeferResolve(parsed._[0])] : [];
|
|
14
12
|
const newCommand = parsed['--'] && parsed['--'].length > 0 ? fromArgs(parsed['--']) : [];
|
|
15
13
|
const commands = positionalBinaries.has(binary) ? parsed._.flatMap(cmd => fromArgs([cmd])) : [];
|
|
16
|
-
return compact([bin, ...
|
|
14
|
+
return compact([bin, ...pos, ...newCommand, ...commands]);
|
|
17
15
|
};
|
package/dist/binaries/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { GetInputsFromScripts } from '../types/config.
|
|
1
|
+
import type { GetInputsFromScripts } from '../types/config.ts';
|
|
2
2
|
export declare const _getInputsFromScripts: GetInputsFromScripts;
|
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));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BinaryResolver } from '../../types/config.
|
|
1
|
+
import type { BinaryResolver } from '../../types/config.ts';
|
|
2
2
|
export declare const resolve: BinaryResolver;
|
|
@@ -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',
|
|
@@ -62,8 +62,6 @@ export const resolve = (_binary, args, options) => {
|
|
|
62
62
|
return [];
|
|
63
63
|
if (manifestScriptNames.has(command))
|
|
64
64
|
return [];
|
|
65
|
-
if (command === 'test')
|
|
66
|
-
return parsed._.filter(id => id !== command).map(toEntry);
|
|
67
65
|
if (command !== 'run' && commands.has(command))
|
|
68
66
|
return [];
|
|
69
67
|
const filePath = command === 'run' ? script : command;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { BinaryResolver, BinaryResolverOptions } from '../../types/config.
|
|
2
|
-
export declare const resolveX: (args: string[], options: BinaryResolverOptions) => import("../../util/input.
|
|
1
|
+
import type { BinaryResolver, BinaryResolverOptions } from '../../types/config.ts';
|
|
2
|
+
export declare const resolveX: (args: string[], options: BinaryResolverOptions) => import("../../util/input.ts").Input[];
|
|
3
3
|
export declare const resolve: BinaryResolver;
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
bun: import("../../types/config.
|
|
3
|
-
bunx: import("../../types/config.
|
|
4
|
-
npm: import("../../types/config.
|
|
5
|
-
npx: import("../../types/config.
|
|
6
|
-
pnpm: import("../../types/config.
|
|
7
|
-
pnpx: import("../../types/config.
|
|
8
|
-
yarn: import("../../types/config.
|
|
2
|
+
bun: import("../../types/config.ts").BinaryResolver;
|
|
3
|
+
bunx: import("../../types/config.ts").BinaryResolver;
|
|
4
|
+
npm: import("../../types/config.ts").BinaryResolver;
|
|
5
|
+
npx: import("../../types/config.ts").BinaryResolver;
|
|
6
|
+
pnpm: import("../../types/config.ts").BinaryResolver;
|
|
7
|
+
pnpx: import("../../types/config.ts").BinaryResolver;
|
|
8
|
+
yarn: import("../../types/config.ts").BinaryResolver;
|
|
9
9
|
};
|
|
10
10
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as bun from
|
|
2
|
-
import * as bunx from
|
|
3
|
-
import * as npm from
|
|
4
|
-
import * as npx from
|
|
5
|
-
import * as pnpm from
|
|
6
|
-
import * as pnpx from
|
|
7
|
-
import * as yarn from
|
|
1
|
+
import * as bun from "./bun.js";
|
|
2
|
+
import * as bunx from "./bunx.js";
|
|
3
|
+
import * as npm from "./npm.js";
|
|
4
|
+
import * as npx from "./npx.js";
|
|
5
|
+
import * as pnpm from "./pnpm.js";
|
|
6
|
+
import * as pnpx from "./pnpx.js";
|
|
7
|
+
import * as yarn from "./yarn.js";
|
|
8
8
|
export default {
|
|
9
9
|
bun: bun.resolve,
|
|
10
10
|
bunx: bunx.resolve,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BinaryResolver } from '../../types/config.
|
|
1
|
+
import type { BinaryResolver } from '../../types/config.ts';
|
|
2
2
|
export declare const resolve: BinaryResolver;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { BinaryResolver } from '../../types/config.
|
|
1
|
+
import type { BinaryResolver } from '../../types/config.ts';
|
|
2
2
|
export declare const resolve: BinaryResolver;
|
|
@@ -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,2 +1,2 @@
|
|
|
1
|
-
import type { BinaryResolver } from '../../types/config.
|
|
1
|
+
import type { BinaryResolver } from '../../types/config.ts';
|
|
2
2
|
export declare const resolve: BinaryResolver;
|