knip 6.4.1 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CacheConsultant.js +3 -3
- package/dist/CatalogCounselor.js +5 -5
- package/dist/ConfigurationChief.d.ts +39 -16
- package/dist/ConfigurationChief.js +15 -15
- package/dist/DependencyDeputy.d.ts +1 -1
- package/dist/DependencyDeputy.js +5 -5
- package/dist/IssueCollector.js +3 -3
- package/dist/IssueFixer.js +5 -5
- package/dist/JsonCatalogPeeker.js +1 -1
- package/dist/ProjectPrincipal.js +13 -13
- package/dist/WorkspaceWorker.d.ts +3 -2
- package/dist/WorkspaceWorker.js +39 -26
- package/dist/YamlCatalogPeeker.js +1 -1
- package/dist/binaries/bash-parser.js +10 -10
- package/dist/binaries/fallback.js +3 -3
- package/dist/binaries/index.js +3 -3
- package/dist/binaries/plugins.js +6 -6
- package/dist/binaries/resolvers/bun.js +4 -4
- package/dist/binaries/resolvers/bunx.js +4 -4
- package/dist/binaries/resolvers/find.js +1 -1
- package/dist/binaries/resolvers/index.js +8 -8
- package/dist/binaries/resolvers/npx.js +4 -4
- package/dist/binaries/resolvers/pnpm.js +3 -3
- package/dist/binaries/resolvers/pnpx.js +2 -2
- package/dist/binaries/resolvers/yarn.js +4 -4
- package/dist/cli.js +10 -10
- package/dist/compilers/index.d.ts +62 -22
- package/dist/compilers/index.js +2 -2
- package/dist/compilers/mdx.js +1 -1
- package/dist/compilers/scss.js +1 -1
- package/dist/constants.d.ts +25 -25
- package/dist/constants.js +1 -1
- package/dist/graph/analyze.js +7 -7
- package/dist/graph/build.d.ts +2 -2
- package/dist/graph/build.js +34 -26
- package/dist/graph-explorer/constants.d.ts +5 -5
- package/dist/graph-explorer/explorer.js +9 -9
- package/dist/graph-explorer/operations/build-exports-tree.js +2 -2
- package/dist/graph-explorer/operations/get-contention.js +3 -3
- package/dist/graph-explorer/operations/get-dependency-usage.js +1 -1
- package/dist/graph-explorer/operations/get-usage.js +5 -5
- package/dist/graph-explorer/operations/has-strictly-ns-references.js +1 -1
- package/dist/graph-explorer/operations/is-referenced.js +2 -2
- package/dist/graph-explorer/operations/resolve-definition.js +3 -3
- package/dist/graph-explorer/utils.d.ts +1 -1
- package/dist/graph-explorer/utils.js +2 -2
- package/dist/graph-explorer/visitors.js +1 -1
- package/dist/graph-explorer/walk-down.js +2 -2
- package/dist/graph-explorer/walk-up.js +2 -2
- package/dist/index.js +2 -2
- package/dist/manifest/helpers.js +2 -2
- package/dist/manifest/index.js +3 -3
- package/dist/plugins/_template/index.js +2 -2
- package/dist/plugins/angular/index.js +4 -4
- package/dist/plugins/astro/compiler-mdx.js +1 -1
- package/dist/plugins/astro/compiler.js +1 -1
- package/dist/plugins/astro/index.js +8 -6
- package/dist/plugins/astro/resolveFromAST.d.ts +1 -0
- package/dist/plugins/astro/resolveFromAST.js +40 -1
- package/dist/plugins/astro-db/index.js +1 -1
- package/dist/plugins/astro-og-canvas/index.js +2 -2
- package/dist/plugins/ava/index.js +2 -2
- package/dist/plugins/babel/helpers.d.ts +44 -6
- package/dist/plugins/babel/helpers.js +1 -1
- package/dist/plugins/babel/index.js +4 -4
- package/dist/plugins/biome/index.js +4 -4
- package/dist/plugins/bumpp/index.js +2 -2
- package/dist/plugins/bun/index.js +1 -1
- package/dist/plugins/c8/index.js +1 -1
- package/dist/plugins/capacitor/index.js +3 -3
- package/dist/plugins/changelogen/index.js +2 -2
- package/dist/plugins/changelogithub/index.js +2 -2
- package/dist/plugins/changesets/index.js +3 -3
- package/dist/plugins/commitizen/index.js +2 -2
- package/dist/plugins/commitlint/index.js +3 -3
- package/dist/plugins/convex/index.js +1 -1
- package/dist/plugins/create-typescript-app/index.js +1 -1
- package/dist/plugins/cspell/index.js +2 -2
- package/dist/plugins/cucumber/index.js +2 -2
- package/dist/plugins/cypress/helpers.js +2 -2
- package/dist/plugins/cypress/index.js +3 -3
- package/dist/plugins/danger/index.js +1 -1
- package/dist/plugins/dependency-cruiser/index.js +1 -1
- package/dist/plugins/docusaurus/helpers.js +2 -2
- package/dist/plugins/docusaurus/index.js +4 -4
- package/dist/plugins/dotenv/index.js +1 -1
- package/dist/plugins/drizzle/index.js +2 -2
- package/dist/plugins/eleventy/index.js +6 -6
- package/dist/plugins/eslint/helpers.js +5 -5
- package/dist/plugins/eslint/index.js +4 -4
- package/dist/plugins/eslint/resolveFromAST.js +3 -3
- package/dist/plugins/execa/index.js +2 -2
- package/dist/plugins/execa/visitors/execa.js +1 -1
- package/dist/plugins/expo/helpers.d.ts +3 -3
- package/dist/plugins/expo/helpers.js +3 -3
- package/dist/plugins/expo/index.js +4 -4
- package/dist/plugins/expressive-code/index.js +1 -1
- package/dist/plugins/gatsby/index.js +2 -2
- package/dist/plugins/github-action/index.js +4 -4
- package/dist/plugins/github-actions/index.js +4 -4
- package/dist/plugins/graphql-codegen/index.js +5 -5
- package/dist/plugins/hardhat/index.js +2 -2
- package/dist/plugins/husky/index.js +3 -3
- package/dist/plugins/i18next-parser/index.js +1 -1
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.js +152 -144
- package/dist/plugins/jest/helpers.js +2 -2
- package/dist/plugins/jest/index.js +4 -4
- package/dist/plugins/karma/helpers.d.ts +1 -1
- package/dist/plugins/karma/helpers.js +2 -2
- package/dist/plugins/karma/index.js +4 -4
- package/dist/plugins/knex/index.js +3 -3
- package/dist/plugins/ladle/index.js +4 -4
- package/dist/plugins/lefthook/index.js +5 -5
- package/dist/plugins/lint-staged/index.js +2 -2
- package/dist/plugins/linthtml/index.js +3 -3
- package/dist/plugins/lockfile-lint/index.js +2 -2
- package/dist/plugins/lost-pixel/index.js +1 -1
- package/dist/plugins/markdownlint/index.js +3 -3
- package/dist/plugins/mdx/index.js +2 -2
- package/dist/plugins/mdxlint/index.js +3 -3
- package/dist/plugins/metro/index.js +4 -4
- package/dist/plugins/mocha/index.js +2 -2
- package/dist/plugins/moonrepo/index.js +1 -1
- package/dist/plugins/msw/index.js +3 -3
- package/dist/plugins/nano-staged/index.js +1 -1
- package/dist/plugins/nest/index.js +2 -2
- package/dist/plugins/netlify/index.js +4 -4
- package/dist/plugins/next/index.js +3 -3
- package/dist/plugins/next/resolveFromAST.js +1 -1
- package/dist/plugins/next-intl/index.js +1 -1
- package/dist/plugins/next-mdx/index.js +3 -3
- package/dist/plugins/next-mdx/resolveFromAST.js +1 -1
- package/dist/plugins/nitro/index.js +3 -3
- package/dist/plugins/node/index.js +1 -1
- package/dist/plugins/node-modules-inspector/index.js +2 -2
- package/dist/plugins/npm-package-json-lint/index.js +3 -3
- package/dist/plugins/nuxt/helpers.js +3 -3
- package/dist/plugins/nuxt/index.js +10 -11
- package/dist/plugins/nx/index.js +4 -4
- package/dist/plugins/nyc/index.js +2 -2
- package/dist/plugins/oclif/index.js +2 -2
- package/dist/plugins/openapi-ts/index.js +2 -2
- package/dist/plugins/oxfmt/index.js +1 -1
- package/dist/plugins/oxlint/index.js +3 -3
- package/dist/plugins/panda-css/index.js +2 -2
- package/dist/plugins/parcel/index.js +2 -2
- package/dist/plugins/payload/index.js +2 -2
- package/dist/plugins/pino/index.d.ts +3 -0
- package/dist/plugins/pino/index.js +15 -0
- package/dist/plugins/pino/visitors/transportCall.d.ts +2 -0
- package/dist/plugins/pino/visitors/transportCall.js +87 -0
- package/dist/plugins/playwright/index.js +4 -4
- package/dist/plugins/playwright-ct/index.js +3 -3
- package/dist/plugins/playwright-test/index.js +1 -1
- package/dist/plugins/plop/index.js +1 -1
- package/dist/plugins/pm2/index.js +3 -3
- package/dist/plugins/pnpm/index.js +1 -1
- package/dist/plugins/postcss/index.js +3 -3
- package/dist/plugins/preconstruct/index.js +3 -3
- package/dist/plugins/prettier/index.js +6 -2
- package/dist/plugins/prisma/index.js +5 -5
- package/dist/plugins/qwik/index.js +5 -5
- package/dist/plugins/qwik/resolveFromAST.js +1 -1
- package/dist/plugins/raycast/index.js +3 -3
- package/dist/plugins/react-cosmos/index.js +3 -3
- package/dist/plugins/react-email/index.d.ts +3 -0
- package/dist/plugins/react-email/index.js +26 -0
- package/dist/plugins/react-native/index.js +2 -2
- package/dist/plugins/react-router/index.js +6 -10
- package/dist/plugins/relay/index.js +3 -3
- package/dist/plugins/release-it/index.js +2 -2
- package/dist/plugins/remark/index.js +3 -3
- package/dist/plugins/remix/index.js +1 -1
- package/dist/plugins/rolldown/index.js +3 -3
- package/dist/plugins/rolldown/resolveFromAST.js +1 -1
- package/dist/plugins/rollup/index.js +3 -3
- package/dist/plugins/rollup/resolveFromAST.js +1 -1
- package/dist/plugins/rsbuild/index.js +2 -2
- package/dist/plugins/rslib/index.js +1 -1
- package/dist/plugins/rspack/index.js +2 -2
- package/dist/plugins/rstest/index.js +2 -2
- package/dist/plugins/sanity/index.js +1 -1
- package/dist/plugins/semantic-release/index.js +3 -3
- package/dist/plugins/sentry/index.js +1 -1
- package/dist/plugins/serverless-framework/index.d.ts +3 -0
- package/dist/plugins/serverless-framework/index.js +23 -0
- package/dist/plugins/serverless-framework/types.d.ts +7 -0
- package/dist/plugins/serverless-framework/types.js +1 -0
- package/dist/plugins/simple-git-hooks/index.js +2 -2
- package/dist/plugins/size-limit/index.js +3 -3
- package/dist/plugins/sst/index.js +2 -2
- package/dist/plugins/sst/resolveFromAST.js +5 -5
- package/dist/plugins/starlight/index.js +4 -4
- package/dist/plugins/starlight/resolveFromAST.js +1 -1
- package/dist/plugins/stencil/index.js +3 -3
- package/dist/plugins/storybook/index.js +3 -3
- package/dist/plugins/stryker/index.js +2 -2
- package/dist/plugins/stylelint/index.js +3 -3
- package/dist/plugins/svelte/compiler.js +1 -1
- package/dist/plugins/svelte/index.js +3 -3
- package/dist/plugins/sveltejs-package/helpers.d.ts +8 -0
- package/dist/plugins/sveltejs-package/helpers.js +65 -0
- package/dist/plugins/sveltejs-package/index.d.ts +3 -0
- package/dist/plugins/sveltejs-package/index.js +27 -0
- package/dist/plugins/sveltekit/index.js +3 -3
- package/dist/plugins/svgo/index.js +1 -1
- package/dist/plugins/svgr/index.js +2 -2
- package/dist/plugins/swc/index.js +3 -3
- package/dist/plugins/syncpack/index.js +2 -2
- package/dist/plugins/tailwind/index.js +2 -2
- package/dist/plugins/tanstack-router/index.js +3 -3
- package/dist/plugins/taskfile/index.js +3 -3
- package/dist/plugins/travis/index.js +1 -1
- package/dist/plugins/tsdown/index.js +3 -3
- package/dist/plugins/tsdown/resolveFromAST.js +1 -1
- package/dist/plugins/tsup/index.js +3 -3
- package/dist/plugins/tsup/resolveFromAST.js +1 -1
- package/dist/plugins/tsx/index.js +2 -2
- package/dist/plugins/typedoc/index.js +2 -2
- package/dist/plugins/typescript/index.js +4 -4
- package/dist/plugins/unbuild/index.js +2 -2
- package/dist/plugins/unocss/index.js +2 -2
- package/dist/plugins/vercel-og/index.js +1 -1
- package/dist/plugins/vike/index.js +1 -1
- package/dist/plugins/vite/helpers.js +4 -4
- package/dist/plugins/vite/index.js +5 -5
- package/dist/plugins/vite/visitors/importMetaGlob.js +4 -4
- package/dist/plugins/vitepress/index.js +1 -1
- package/dist/plugins/vitest/helpers.d.ts +4 -2
- package/dist/plugins/vitest/helpers.js +18 -0
- package/dist/plugins/vitest/index.js +9 -23
- package/dist/plugins/vue/compiler.js +1 -1
- package/dist/plugins/vue/index.js +4 -4
- package/dist/plugins/webdriver-io/index.js +2 -2
- package/dist/plugins/webpack/index.js +5 -5
- package/dist/plugins/webpack/visitors/requireContext.js +6 -7
- package/dist/plugins/wireit/index.js +1 -1
- package/dist/plugins/wrangler/index.js +2 -2
- package/dist/plugins/xo/index.js +2 -2
- package/dist/plugins/yarn/index.js +2 -2
- package/dist/plugins/yorkie/index.js +2 -2
- package/dist/plugins/zx/index.js +2 -2
- package/dist/plugins.js +2 -2
- package/dist/reporters/codeclimate.js +2 -2
- package/dist/reporters/codeowners.js +3 -3
- package/dist/reporters/compact.js +1 -1
- package/dist/reporters/disclosure.js +1 -1
- package/dist/reporters/github-actions.js +4 -4
- package/dist/reporters/index.js +8 -8
- package/dist/reporters/json.js +4 -4
- package/dist/reporters/markdown.js +2 -2
- package/dist/reporters/symbols.js +2 -2
- package/dist/reporters/trace.js +7 -7
- package/dist/reporters/util/configuration-hints.d.ts +2 -2
- package/dist/reporters/util/configuration-hints.js +7 -10
- package/dist/reporters/util/util.d.ts +3 -3
- package/dist/reporters/util/util.js +16 -15
- package/dist/reporters/watch.js +7 -7
- package/dist/run.js +14 -14
- package/dist/schema/configuration.d.ts +89 -31
- package/dist/schema/configuration.js +2 -2
- package/dist/schema/plugins.d.ts +20 -0
- package/dist/schema/plugins.js +4 -0
- package/dist/session/build-maps.js +3 -3
- package/dist/session/file-descriptor.js +3 -3
- package/dist/session/index.js +7 -7
- package/dist/session/package-json-descriptor.js +1 -1
- package/dist/session/session.js +3 -3
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +4 -0
- package/dist/types/config.d.ts +13 -0
- package/dist/types/issues.d.ts +1 -1
- package/dist/typescript/SourceFileManager.js +3 -3
- package/dist/typescript/ast-helpers.d.ts +2 -0
- package/dist/typescript/ast-helpers.js +5 -5
- package/dist/typescript/comments.js +1 -1
- package/dist/typescript/follow-imports.js +2 -2
- package/dist/typescript/get-imports-and-exports.js +10 -10
- package/dist/typescript/resolve-module-names.js +5 -5
- package/dist/typescript/visitors/calls.js +3 -3
- package/dist/typescript/visitors/exports.js +4 -4
- package/dist/typescript/visitors/helpers.js +3 -3
- package/dist/typescript/visitors/imports.js +4 -4
- package/dist/typescript/visitors/members.js +4 -4
- package/dist/typescript/visitors/walk.js +9 -9
- package/dist/util/Performance.d.ts +1 -1
- package/dist/util/Performance.js +2 -2
- package/dist/util/catalog.js +3 -3
- package/dist/util/codeowners.js +4 -4
- package/dist/util/colors.d.ts +18 -0
- package/dist/util/colors.js +24 -0
- package/dist/util/create-input-handler.js +6 -6
- package/dist/util/create-options.d.ts +72 -33
- package/dist/util/create-options.js +14 -15
- package/dist/util/create-workspace-graph.js +1 -1
- package/dist/util/debug.js +2 -4
- package/dist/util/file-entry-cache.js +4 -4
- package/dist/util/fs.js +2 -2
- package/dist/util/get-included-issue-types.js +2 -2
- package/dist/util/git.js +1 -1
- package/dist/util/glob-cache.js +4 -4
- package/dist/util/glob-core.d.ts +3 -3
- package/dist/util/glob-core.js +80 -64
- package/dist/util/glob.d.ts +1 -1
- package/dist/util/glob.js +14 -7
- package/dist/util/input.js +1 -1
- package/dist/util/issue-initializers.js +1 -1
- package/dist/util/jiti.js +1 -1
- package/dist/util/load-config.js +3 -3
- package/dist/util/load-tsconfig.js +62 -50
- package/dist/util/loader.js +5 -5
- package/dist/util/log.js +3 -3
- package/dist/util/map-workspaces.js +6 -6
- package/dist/util/modules.js +2 -2
- package/dist/util/package-name.js +1 -1
- package/dist/util/parse-and-convert-gitignores.d.ts +4 -2
- package/dist/util/parse-and-convert-gitignores.js +19 -7
- package/dist/util/plugin.js +5 -5
- package/dist/util/remove-export.js +1 -1
- package/dist/util/reporter.js +3 -3
- package/dist/util/require.js +1 -1
- package/dist/util/resolve.js +3 -3
- package/dist/util/string.d.ts +1 -1
- package/dist/util/table.js +1 -1
- package/dist/util/tag.js +1 -1
- package/dist/util/to-source-path.d.ts +4 -2
- package/dist/util/to-source-path.js +46 -22
- package/dist/util/trace.js +8 -8
- package/dist/util/watch.js +8 -8
- package/dist/util/workspace-file-filter.js +2 -2
- package/dist/util/workspace-selectors.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +12 -19
- package/schema.json +13 -1
package/dist/manifest/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isDefinitelyTyped } from
|
|
2
|
-
import { timerify } from
|
|
3
|
-
import { loadPackageManifest } from
|
|
1
|
+
import { isDefinitelyTyped } from '../util/modules.js';
|
|
2
|
+
import { timerify } from '../util/Performance.js';
|
|
3
|
+
import { loadPackageManifest } from './helpers.js';
|
|
4
4
|
const getMetaDataFromPackageJson = ({ cwd, dir, packageNames }) => {
|
|
5
5
|
const hostDependencies = new Map();
|
|
6
6
|
const installedBinaries = new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDeferResolve } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toDeferResolve } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = '__PLUGIN_NAME__';
|
|
4
4
|
const enablers = ['__PLUGIN_NAME__'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { toConfig, toDeferResolve, toDependency, toEntry, toProductionEntry } from
|
|
3
|
-
import { isInternal, join } from
|
|
4
|
-
import { hasDependency } from
|
|
5
|
-
import * as karma from
|
|
2
|
+
import { toConfig, toDeferResolve, toDependency, toEntry, toProductionEntry } from '../../util/input.js';
|
|
3
|
+
import { isInternal, join } from '../../util/path.js';
|
|
4
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
5
|
+
import * as karma from '../karma/helpers.js';
|
|
6
6
|
const title = 'Angular';
|
|
7
7
|
const enablers = ['@angular/cli'];
|
|
8
8
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fencedCodeBlockMatcher, importMatcher, importsWithinFrontmatter, inlineCodeMatcher, } from
|
|
1
|
+
import { fencedCodeBlockMatcher, importMatcher, importsWithinFrontmatter, inlineCodeMatcher, } from '../../compilers/compilers.js';
|
|
2
2
|
const frontmatterImportFields = ['layout'];
|
|
3
3
|
const compiler = (text) => {
|
|
4
4
|
const imports = text.replace(fencedCodeBlockMatcher, '').replace(inlineCodeMatcher, '').matchAll(importMatcher);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { frontmatterMatcher, scriptBodies } from
|
|
1
|
+
import { frontmatterMatcher, scriptBodies } from '../../compilers/compilers.js';
|
|
2
2
|
const compiler = (text, path) => {
|
|
3
3
|
const scripts = [];
|
|
4
4
|
const frontmatter = text.match(frontmatterMatcher);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { toDependency, toEntry, toProductionEntry } from
|
|
2
|
-
import { hasDependency } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { toDependency, toEntry, toProductionEntry } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { getAliasInputs } from '../vitest/helpers.js';
|
|
4
|
+
import compiler from './compiler.js';
|
|
5
|
+
import mdxCompiler from './compiler-mdx.js';
|
|
6
|
+
import { getSrcDir, getViteAliases, usesPassthroughImageService } from './resolveFromAST.js';
|
|
6
7
|
const title = 'Astro';
|
|
7
8
|
const enablers = ['astro'];
|
|
8
9
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -16,12 +17,13 @@ const production = [
|
|
|
16
17
|
'src/middleware.{js,ts}',
|
|
17
18
|
'src/actions/index.{js,ts}',
|
|
18
19
|
];
|
|
19
|
-
const resolveFromAST = program => {
|
|
20
|
+
const resolveFromAST = (program, options) => {
|
|
20
21
|
const srcDir = getSrcDir(program);
|
|
21
22
|
const setSrcDir = (entry) => entry.replace(/^src\//, `${srcDir}/`);
|
|
22
23
|
const inputs = [
|
|
23
24
|
...entry.map(setSrcDir).map(path => toEntry(path)),
|
|
24
25
|
...production.map(setSrcDir).map(path => toProductionEntry(path)),
|
|
26
|
+
...getAliasInputs(getViteAliases(program), options.cwd),
|
|
25
27
|
];
|
|
26
28
|
if (!usesPassthroughImageService(program))
|
|
27
29
|
inputs.push(toDependency('sharp', { optional: true }));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Program } from 'oxc-parser';
|
|
2
2
|
export declare const getSrcDir: (program: Program) => string;
|
|
3
3
|
export declare const usesPassthroughImageService: (program: Program) => boolean;
|
|
4
|
+
export declare const getViteAliases: (program: Program) => Record<string, string>;
|
|
@@ -1,6 +1,45 @@
|
|
|
1
|
-
import { collectPropertyValues, hasImportSpecifier } from
|
|
1
|
+
import { collectPropertyValues, findProperty, getPropertyKey, getStringValue, hasImportSpecifier, } from '../../typescript/ast-helpers.js';
|
|
2
2
|
export const getSrcDir = (program) => {
|
|
3
3
|
const values = collectPropertyValues(program, 'srcDir');
|
|
4
4
|
return values.size > 0 ? Array.from(values)[0] : 'src';
|
|
5
5
|
};
|
|
6
6
|
export const usesPassthroughImageService = (program) => hasImportSpecifier(program, 'astro/config', 'passthroughImageService');
|
|
7
|
+
const findFirstStringArg = (node) => {
|
|
8
|
+
const literal = getStringValue(node);
|
|
9
|
+
if (literal)
|
|
10
|
+
return literal;
|
|
11
|
+
if (node?.type === 'CallExpression' || node?.type === 'NewExpression') {
|
|
12
|
+
for (const arg of node.arguments ?? []) {
|
|
13
|
+
const found = findFirstStringArg(arg);
|
|
14
|
+
if (found)
|
|
15
|
+
return found;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const getViteAliases = (program) => {
|
|
20
|
+
const aliases = {};
|
|
21
|
+
for (const node of program.body ?? []) {
|
|
22
|
+
if (node.type !== 'ExportDefaultDeclaration')
|
|
23
|
+
continue;
|
|
24
|
+
const decl = node.declaration;
|
|
25
|
+
const root = decl?.type === 'ObjectExpression'
|
|
26
|
+
? decl
|
|
27
|
+
: decl?.type === 'CallExpression' && decl.arguments?.[0]?.type === 'ObjectExpression'
|
|
28
|
+
? decl.arguments[0]
|
|
29
|
+
: undefined;
|
|
30
|
+
const aliasNode = findProperty(findProperty(findProperty(root, 'vite'), 'resolve'), 'alias');
|
|
31
|
+
if (aliasNode?.type !== 'ObjectExpression')
|
|
32
|
+
continue;
|
|
33
|
+
for (const prop of aliasNode.properties ?? []) {
|
|
34
|
+
if (prop.type !== 'Property')
|
|
35
|
+
continue;
|
|
36
|
+
const key = getPropertyKey(prop);
|
|
37
|
+
if (!key)
|
|
38
|
+
continue;
|
|
39
|
+
const raw = findFirstStringArg(prop.value);
|
|
40
|
+
if (raw)
|
|
41
|
+
aliases[key] = raw;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return aliases;
|
|
45
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDependency } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toDependency } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = 'astro-og-canvas';
|
|
4
4
|
const enablers = ['astro-og-canvas'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toEntry } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toEntry } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = 'Ava';
|
|
4
4
|
const enablers = ['ava'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,14 +1,52 @@
|
|
|
1
|
-
export declare const resolveName: (identifier: string, namespace:
|
|
1
|
+
export declare const resolveName: (identifier: string, namespace: 'preset' | 'plugin') => string;
|
|
2
|
+
declare function cacheFn(): undefined;
|
|
3
|
+
declare namespace cacheFn {
|
|
4
|
+
var forever: () => {
|
|
5
|
+
(): undefined;
|
|
6
|
+
forever: any;
|
|
7
|
+
never: () => any;
|
|
8
|
+
using: () => any;
|
|
9
|
+
invalidate: () => any;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare namespace cacheFn {
|
|
13
|
+
var never: () => {
|
|
14
|
+
(): undefined;
|
|
15
|
+
forever: () => any;
|
|
16
|
+
never: any;
|
|
17
|
+
using: () => any;
|
|
18
|
+
invalidate: () => any;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
declare namespace cacheFn {
|
|
22
|
+
var using: () => {
|
|
23
|
+
(): undefined;
|
|
24
|
+
forever: () => any;
|
|
25
|
+
never: () => any;
|
|
26
|
+
using: any;
|
|
27
|
+
invalidate: () => any;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
declare namespace cacheFn {
|
|
31
|
+
var invalidate: () => {
|
|
32
|
+
(): undefined;
|
|
33
|
+
forever: () => any;
|
|
34
|
+
never: () => any;
|
|
35
|
+
using: () => any;
|
|
36
|
+
invalidate: any;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
2
39
|
export declare const api: {
|
|
3
40
|
assertVersion: () => boolean;
|
|
4
41
|
cache: {
|
|
5
42
|
(): undefined;
|
|
6
|
-
forever()
|
|
7
|
-
never()
|
|
8
|
-
using()
|
|
9
|
-
invalidate()
|
|
43
|
+
forever: () => any;
|
|
44
|
+
never: () => any;
|
|
45
|
+
using: () => any;
|
|
46
|
+
invalidate: () => any;
|
|
10
47
|
};
|
|
11
48
|
caller: () => boolean;
|
|
12
|
-
env: (env?: string) =>
|
|
49
|
+
env: (env?: string) => "development" | true;
|
|
13
50
|
version: string;
|
|
14
51
|
};
|
|
52
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { compact } from
|
|
2
|
-
import { toDeferResolve } from
|
|
3
|
-
import { hasDependency } from
|
|
4
|
-
import { api, resolveName } from
|
|
1
|
+
import { compact } from '../../util/array.js';
|
|
2
|
+
import { toDeferResolve } from '../../util/input.js';
|
|
3
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
4
|
+
import { api, resolveName } from './helpers.js';
|
|
5
5
|
const title = 'Babel';
|
|
6
6
|
const enablers = [/^@babel\//];
|
|
7
7
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { arrayify } from
|
|
2
|
-
import { toConfig } from
|
|
3
|
-
import { join } from
|
|
4
|
-
import { hasDependency } from
|
|
1
|
+
import { arrayify } from '../../util/array.js';
|
|
2
|
+
import { toConfig } from '../../util/input.js';
|
|
3
|
+
import { join } from '../../util/path.js';
|
|
4
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
5
5
|
const title = 'Biome';
|
|
6
6
|
const enablers = ['@biomejs/biome'];
|
|
7
7
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasDependency } from
|
|
2
|
-
import { toC12config } from
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toC12config } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'bumpp';
|
|
4
4
|
const enablers = ['bumpp'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import parseArgs from 'minimist';
|
|
2
|
-
import { toDeferResolve, toEntry } from
|
|
2
|
+
import { toDeferResolve, toEntry } from '../../util/input.js';
|
|
3
3
|
const title = 'Bun';
|
|
4
4
|
const enablers = ['bun'];
|
|
5
5
|
const hasBunTest = (scripts) => scripts && Object.values(scripts).some(script => /(?<=^|\s)bun test/.test(script));
|
package/dist/plugins/c8/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isFile } from
|
|
2
|
-
import { toDependency } from
|
|
3
|
-
import { hasDependency } from
|
|
1
|
+
import { isFile } from '../../util/fs.js';
|
|
2
|
+
import { toDependency } from '../../util/input.js';
|
|
3
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
4
4
|
const title = 'Capacitor';
|
|
5
5
|
const enablers = [/^@capacitor\//];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasDependency } from
|
|
2
|
-
import { toC12config } from
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toC12config } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'Changelogen';
|
|
4
4
|
const enablers = ['changelogen'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasDependency } from
|
|
2
|
-
import { toC12config } from
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toC12config } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'Changelogithub';
|
|
4
4
|
const enablers = ['changelogithub'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toDependency } from
|
|
2
|
-
import { getPackageNameFromFilePath } from
|
|
3
|
-
import { hasDependency } from
|
|
1
|
+
import { toDependency } from '../../util/input.js';
|
|
2
|
+
import { getPackageNameFromFilePath } from '../../util/modules.js';
|
|
3
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
4
4
|
const title = 'Changesets';
|
|
5
5
|
const enablers = ['@changesets/cli'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDependency } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toDependency } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = 'Commitizen';
|
|
4
4
|
const enablers = ['commitizen'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toDependency } from
|
|
2
|
-
import { hasDependency } from
|
|
3
|
-
import { toCosmiconfig } from
|
|
1
|
+
import { toDependency } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'commitlint';
|
|
5
5
|
const enablers = ['@commitlint/cli'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasDependency } from
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
2
|
const title = 'create-typescript-app';
|
|
3
3
|
const enablers = ['create-typescript-app'];
|
|
4
4
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDeferResolve } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toDeferResolve } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = 'CSpell';
|
|
4
4
|
const enablers = ['cspell'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDeferResolve, toEntry } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toDeferResolve, toEntry } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = 'Cucumber';
|
|
4
4
|
const enablers = ['@cucumber/cucumber'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isInternal, toAbsolute } from
|
|
2
|
-
import { load } from
|
|
1
|
+
import { isInternal, toAbsolute } from '../../util/path.js';
|
|
2
|
+
import { load } from '../../util/plugin.js';
|
|
3
3
|
export const resolveDependencies = async (config, options) => {
|
|
4
4
|
const { reporter } = config;
|
|
5
5
|
const { configFileDir } = options;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toDeferResolve, toEntry } from
|
|
2
|
-
import { hasDependency } from
|
|
3
|
-
import { resolveDependencies } from
|
|
1
|
+
import { toDeferResolve, toEntry } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { resolveDependencies } from './helpers.js';
|
|
4
4
|
const title = 'Cypress';
|
|
5
5
|
const enablers = ['cypress'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDeferResolve, toProductionEntry } from
|
|
2
|
-
import { findWebpackDependenciesFromConfig } from
|
|
1
|
+
import { toDeferResolve, toProductionEntry } from '../../util/input.js';
|
|
2
|
+
import { findWebpackDependenciesFromConfig } from '../webpack/index.js';
|
|
3
3
|
const FIRST_PARTY_MODULES = new Set([
|
|
4
4
|
'content-docs',
|
|
5
5
|
'content-blog',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { toAlias, toDependency, toEntry, toIgnore, toProductionEntry } from
|
|
2
|
-
import { join } from
|
|
3
|
-
import { hasDependency } from
|
|
4
|
-
import { CORE_CLIENT_API, resolveConfigItems } from
|
|
1
|
+
import { toAlias, toDependency, toEntry, toIgnore, toProductionEntry } from '../../util/input.js';
|
|
2
|
+
import { join } from '../../util/path.js';
|
|
3
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
4
|
+
import { CORE_CLIENT_API, resolveConfigItems } from './helpers.js';
|
|
5
5
|
const title = 'Docusaurus';
|
|
6
6
|
const enablers = ['@docusaurus/core'];
|
|
7
7
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toProductionEntry } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toProductionEntry } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = 'Drizzle';
|
|
4
4
|
const enablers = ['drizzle-kit'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DEFAULT_EXTENSIONS } from
|
|
2
|
-
import { isDirectory } from
|
|
3
|
-
import { toDeferResolve, toProductionEntry } from
|
|
4
|
-
import { isInNodeModules, join } from
|
|
5
|
-
import { hasDependency } from
|
|
6
|
-
import { DummyEleventyConfig, defaultEleventyConfig } from
|
|
1
|
+
import { DEFAULT_EXTENSIONS } from '../../constants.js';
|
|
2
|
+
import { isDirectory } from '../../util/fs.js';
|
|
3
|
+
import { toDeferResolve, toProductionEntry } from '../../util/input.js';
|
|
4
|
+
import { isInNodeModules, join } from '../../util/path.js';
|
|
5
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
6
|
+
import { DummyEleventyConfig, defaultEleventyConfig } from './helpers.js';
|
|
7
7
|
const title = 'Eleventy';
|
|
8
8
|
const enablers = ['@11ty/eleventy'];
|
|
9
9
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { compact } from
|
|
2
|
-
import { toConfig, toDeferResolve, toDependency } from
|
|
3
|
-
import { getPackageNameFromFilePath, getPackageNameFromModuleSpecifier } from
|
|
4
|
-
import { extname, isAbsolute, isInternal } from
|
|
5
|
-
import { getDependenciesFromConfig } from
|
|
1
|
+
import { compact } from '../../util/array.js';
|
|
2
|
+
import { toConfig, toDeferResolve, toDependency } from '../../util/input.js';
|
|
3
|
+
import { getPackageNameFromFilePath, getPackageNameFromModuleSpecifier } from '../../util/modules.js';
|
|
4
|
+
import { extname, isAbsolute, isInternal } from '../../util/path.js';
|
|
5
|
+
import { getDependenciesFromConfig } from '../babel/index.js';
|
|
6
6
|
export const isFlatConfig = (fileName) => /eslint\.config/.test(fileName);
|
|
7
7
|
export const getInputs = (config, options) => {
|
|
8
8
|
const { configFileName } = options;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { toDependency } from
|
|
2
|
-
import { hasDependency } from
|
|
3
|
-
import { getInputs, isFlatConfig, resolveFormatters } from
|
|
4
|
-
import { getInputsFromFlatConfigAST } from
|
|
1
|
+
import { toDependency } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { getInputs, isFlatConfig, resolveFormatters } from './helpers.js';
|
|
4
|
+
import { getInputsFromFlatConfigAST } from './resolveFromAST.js';
|
|
5
5
|
const title = 'ESLint';
|
|
6
6
|
const enablers = ['eslint', '@eslint/js'];
|
|
7
7
|
const isEnabled = ({ dependencies, manifest }) => hasDependency(dependencies, enablers) ||
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Visitor } from 'oxc-parser';
|
|
2
|
-
import { toDeferResolve } from
|
|
3
|
-
import { findProperty } from
|
|
4
|
-
import { isInternal } from
|
|
2
|
+
import { toDeferResolve } from '../../util/input.js';
|
|
3
|
+
import { findProperty } from '../../typescript/ast-helpers.js';
|
|
4
|
+
import { isInternal } from '../../util/path.js';
|
|
5
5
|
export const getInputsFromFlatConfigAST = (program) => {
|
|
6
6
|
const inputs = [];
|
|
7
7
|
const visitor = new Visitor({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasDependency } from
|
|
2
|
-
import { createExecaVisitor } from
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { createExecaVisitor } from './visitors/execa.js';
|
|
3
3
|
const title = 'execa';
|
|
4
4
|
const enablers = ['execa'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getStringValue, isStringLiteral } from
|
|
1
|
+
import { getStringValue, isStringLiteral } from '../../../typescript/visitors/helpers.js';
|
|
2
2
|
const tags = new Set(['$', '$sync']);
|
|
3
3
|
const methods = new Set(['execa', 'execaSync', 'execaCommand', 'execaCommandSync', '$sync']);
|
|
4
4
|
export function createExecaVisitor(ctx) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { PluginOptions, ResolveConfig } from '../../types/config.ts';
|
|
2
2
|
import type { ExpoConfig } from './types.ts';
|
|
3
3
|
export declare const getConfig: (localConfig: ExpoConfig, options: PluginOptions) => {
|
|
4
|
-
platforms?: (
|
|
4
|
+
platforms?: ('ios' | 'android' | 'web')[];
|
|
5
5
|
notification?: Record<string, unknown>;
|
|
6
6
|
updates?: {
|
|
7
7
|
enabled?: boolean;
|
|
8
8
|
};
|
|
9
9
|
backgroundColor?: string;
|
|
10
|
-
userInterfaceStyle?:
|
|
10
|
+
userInterfaceStyle?: 'automatic' | 'light' | 'dark';
|
|
11
11
|
ios?: {
|
|
12
12
|
backgroundColor?: string;
|
|
13
13
|
};
|
|
14
14
|
android?: {
|
|
15
|
-
userInterfaceStyle?:
|
|
15
|
+
userInterfaceStyle?: 'automatic' | 'light' | 'dark';
|
|
16
16
|
};
|
|
17
17
|
androidNavigationBar?: Record<string, unknown>;
|
|
18
18
|
plugins?: (string | [string, Record<string, unknown>])[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toDependency, toProductionDependency } from
|
|
2
|
-
import { getPackageNameFromModuleSpecifier } from
|
|
3
|
-
import { join } from
|
|
1
|
+
import { toDependency, toProductionDependency } from '../../util/input.js';
|
|
2
|
+
import { getPackageNameFromModuleSpecifier } from '../../util/modules.js';
|
|
3
|
+
import { join } from '../../util/path.js';
|
|
4
4
|
const getDummyConfigContext = (options) => ({
|
|
5
5
|
projectRoot: options.cwd,
|
|
6
6
|
staticConfigPath: null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { toProductionEntry } from
|
|
2
|
-
import { join } from
|
|
3
|
-
import { hasDependency } from
|
|
4
|
-
import { getConfig, getDependencies } from
|
|
1
|
+
import { toProductionEntry } from '../../util/input.js';
|
|
2
|
+
import { join } from '../../util/path.js';
|
|
3
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
4
|
+
import { getConfig, getDependencies } from './helpers.js';
|
|
5
5
|
const title = 'Expo';
|
|
6
6
|
const enablers = ['expo'];
|
|
7
7
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDeferResolve, toDependency } from
|
|
2
|
-
import { hasDependency } from
|
|
1
|
+
import { toDeferResolve, toDependency } from '../../util/input.js';
|
|
2
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
const title = 'Gatsby';
|
|
4
4
|
const enablers = ['gatsby', 'gatsby-cli'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { toEntry, toProject } from
|
|
2
|
-
import { relative } from
|
|
3
|
-
import { hasDependency } from
|
|
4
|
-
import { getActionDependencies } from
|
|
1
|
+
import { toEntry, toProject } from '../../util/input.js';
|
|
2
|
+
import { relative } from '../../util/path.js';
|
|
3
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
4
|
+
import { getActionDependencies } from '../github-actions/index.js';
|
|
5
5
|
const title = 'GitHub Action';
|
|
6
6
|
const enablers = ['@actions/core'];
|
|
7
7
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|