knip 0.0.0-angular.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/README.md +907 -0
- package/dist/ConfigurationChief.d.ts +53 -0
- package/dist/ConfigurationChief.js +297 -0
- package/dist/ConfigurationValidator.d.ts +2325 -0
- package/dist/ConfigurationValidator.js +119 -0
- package/dist/ConsoleStreamer.d.ts +12 -0
- package/dist/ConsoleStreamer.js +34 -0
- package/dist/DependencyDeputy.d.ts +64 -0
- package/dist/DependencyDeputy.js +254 -0
- package/dist/IssueCollector.d.ts +27 -0
- package/dist/IssueCollector.js +52 -0
- package/dist/PrincipalFactory.d.ts +25 -0
- package/dist/PrincipalFactory.js +56 -0
- package/dist/ProjectPrincipal.d.ts +64 -0
- package/dist/ProjectPrincipal.js +197 -0
- package/dist/WorkspaceWorker.d.ts +56 -0
- package/dist/WorkspaceWorker.js +244 -0
- package/dist/binaries/bash-parser.d.ts +6 -0
- package/dist/binaries/bash-parser.js +58 -0
- package/dist/binaries/index.d.ts +2 -0
- package/dist/binaries/index.js +18 -0
- package/dist/binaries/resolvers/c8.d.ts +2 -0
- package/dist/binaries/resolvers/c8.js +10 -0
- package/dist/binaries/resolvers/dotenv.d.ts +2 -0
- package/dist/binaries/resolvers/dotenv.js +6 -0
- package/dist/binaries/resolvers/fallback.d.ts +2 -0
- package/dist/binaries/resolvers/fallback.js +22 -0
- package/dist/binaries/resolvers/index.d.ts +8 -0
- package/dist/binaries/resolvers/index.js +8 -0
- package/dist/binaries/resolvers/node.d.ts +2 -0
- package/dist/binaries/resolvers/node.js +10 -0
- package/dist/binaries/resolvers/nodemon.d.ts +2 -0
- package/dist/binaries/resolvers/nodemon.js +15 -0
- package/dist/binaries/resolvers/npx.d.ts +2 -0
- package/dist/binaries/resolvers/npx.js +20 -0
- package/dist/binaries/resolvers/pnpm.d.ts +2 -0
- package/dist/binaries/resolvers/pnpm.js +63 -0
- package/dist/binaries/resolvers/rollup.d.ts +2 -0
- package/dist/binaries/resolvers/rollup.js +11 -0
- package/dist/binaries/resolvers/yarn.d.ts +2 -0
- package/dist/binaries/resolvers/yarn.js +48 -0
- package/dist/binaries/types.d.ts +15 -0
- package/dist/binaries/types.js +1 -0
- package/dist/binaries/util.d.ts +8 -0
- package/dist/binaries/util.js +33 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +72 -0
- package/dist/constants.d.ts +12 -0
- package/dist/constants.js +90 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +334 -0
- package/dist/issues/initializers.d.ts +4 -0
- package/dist/issues/initializers.js +11 -0
- package/dist/manifest/helpers.d.ts +7 -0
- package/dist/manifest/helpers.js +16 -0
- package/dist/manifest/index.d.ts +16 -0
- package/dist/manifest/index.js +56 -0
- package/dist/plugins/_template/index.d.ts +9 -0
- package/dist/plugins/_template/index.js +14 -0
- package/dist/plugins/_template/types.d.ts +3 -0
- package/dist/plugins/_template/types.js +1 -0
- package/dist/plugins/angular/index.d.ts +6 -0
- package/dist/plugins/angular/index.js +36 -0
- package/dist/plugins/angular/types.d.ts +745 -0
- package/dist/plugins/angular/types.js +1 -0
- package/dist/plugins/ava/index.d.ts +7 -0
- package/dist/plugins/ava/index.js +20 -0
- package/dist/plugins/ava/types.d.ts +4 -0
- package/dist/plugins/ava/types.js +1 -0
- package/dist/plugins/babel/helpers.d.ts +15 -0
- package/dist/plugins/babel/helpers.js +34 -0
- package/dist/plugins/babel/index.d.ts +8 -0
- package/dist/plugins/babel/index.js +30 -0
- package/dist/plugins/babel/types.d.ts +9 -0
- package/dist/plugins/babel/types.js +1 -0
- package/dist/plugins/capacitor/index.d.ts +6 -0
- package/dist/plugins/capacitor/index.js +11 -0
- package/dist/plugins/capacitor/types.d.ts +3 -0
- package/dist/plugins/capacitor/types.js +1 -0
- package/dist/plugins/changesets/index.d.ts +6 -0
- package/dist/plugins/changesets/index.js +15 -0
- package/dist/plugins/commitizen/index.d.ts +6 -0
- package/dist/plugins/commitizen/index.js +14 -0
- package/dist/plugins/commitizen/types.d.ts +3 -0
- package/dist/plugins/commitizen/types.js +1 -0
- package/dist/plugins/commitlint/index.d.ts +6 -0
- package/dist/plugins/commitlint/index.js +18 -0
- package/dist/plugins/cspell/index.d.ts +6 -0
- package/dist/plugins/cspell/index.js +17 -0
- package/dist/plugins/cspell/types.d.ts +3 -0
- package/dist/plugins/cspell/types.js +1 -0
- package/dist/plugins/cypress/index.d.ts +5 -0
- package/dist/plugins/cypress/index.js +10 -0
- package/dist/plugins/eslint/fallback.d.ts +1 -0
- package/dist/plugins/eslint/fallback.js +13 -0
- package/dist/plugins/eslint/helpers.d.ts +14 -0
- package/dist/plugins/eslint/helpers.js +83 -0
- package/dist/plugins/eslint/index.d.ts +7 -0
- package/dist/plugins/eslint/index.js +15 -0
- package/dist/plugins/eslint/types.d.ts +27 -0
- package/dist/plugins/eslint/types.js +1 -0
- package/dist/plugins/gatsby/index.d.ts +7 -0
- package/dist/plugins/gatsby/index.js +30 -0
- package/dist/plugins/gatsby/types.d.ts +15 -0
- package/dist/plugins/gatsby/types.js +1 -0
- package/dist/plugins/github-actions/index.d.ts +6 -0
- package/dist/plugins/github-actions/index.js +21 -0
- package/dist/plugins/husky/index.d.ts +6 -0
- package/dist/plugins/husky/index.js +19 -0
- package/dist/plugins/index.d.ts +41 -0
- package/dist/plugins/index.js +41 -0
- package/dist/plugins/jest/index.d.ts +7 -0
- package/dist/plugins/jest/index.js +68 -0
- package/dist/plugins/lefthook/index.d.ts +6 -0
- package/dist/plugins/lefthook/index.js +28 -0
- package/dist/plugins/lint-staged/index.d.ts +6 -0
- package/dist/plugins/lint-staged/index.js +32 -0
- package/dist/plugins/lint-staged/types.d.ts +5 -0
- package/dist/plugins/lint-staged/types.js +1 -0
- package/dist/plugins/markdownlint/helpers.d.ts +1 -0
- package/dist/plugins/markdownlint/helpers.js +6 -0
- package/dist/plugins/markdownlint/index.d.ts +6 -0
- package/dist/plugins/markdownlint/index.js +19 -0
- package/dist/plugins/markdownlint/types.d.ts +3 -0
- package/dist/plugins/markdownlint/types.js +1 -0
- package/dist/plugins/mocha/index.d.ts +6 -0
- package/dist/plugins/mocha/index.js +15 -0
- package/dist/plugins/next/index.d.ts +6 -0
- package/dist/plugins/next/index.js +11 -0
- package/dist/plugins/npm-package-json-lint/index.d.ts +6 -0
- package/dist/plugins/npm-package-json-lint/index.js +13 -0
- package/dist/plugins/npm-package-json-lint/types.d.ts +3 -0
- package/dist/plugins/npm-package-json-lint/types.js +1 -0
- package/dist/plugins/nx/index.d.ts +6 -0
- package/dist/plugins/nx/index.js +24 -0
- package/dist/plugins/nx/types.d.ts +11 -0
- package/dist/plugins/nx/types.js +1 -0
- package/dist/plugins/nyc/index.d.ts +6 -0
- package/dist/plugins/nyc/index.js +11 -0
- package/dist/plugins/playwright/index.d.ts +5 -0
- package/dist/plugins/playwright/index.js +5 -0
- package/dist/plugins/postcss/index.d.ts +6 -0
- package/dist/plugins/postcss/index.js +23 -0
- package/dist/plugins/postcss/types.d.ts +3 -0
- package/dist/plugins/postcss/types.js +1 -0
- package/dist/plugins/prettier/index.d.ts +6 -0
- package/dist/plugins/prettier/index.js +20 -0
- package/dist/plugins/release-it/index.d.ts +6 -0
- package/dist/plugins/release-it/index.js +30 -0
- package/dist/plugins/release-it/types.d.ts +10 -0
- package/dist/plugins/release-it/types.js +1 -0
- package/dist/plugins/remark/index.d.ts +6 -0
- package/dist/plugins/remark/index.js +18 -0
- package/dist/plugins/remix/index.d.ts +6 -0
- package/dist/plugins/remix/index.js +11 -0
- package/dist/plugins/rollup/index.d.ts +5 -0
- package/dist/plugins/rollup/index.js +5 -0
- package/dist/plugins/semantic-release/index.d.ts +6 -0
- package/dist/plugins/semantic-release/index.js +17 -0
- package/dist/plugins/semantic-release/types.d.ts +3 -0
- package/dist/plugins/semantic-release/types.js +1 -0
- package/dist/plugins/sentry/index.d.ts +5 -0
- package/dist/plugins/sentry/index.js +5 -0
- package/dist/plugins/storybook/index.d.ts +8 -0
- package/dist/plugins/storybook/index.js +19 -0
- package/dist/plugins/storybook/types.d.ts +11 -0
- package/dist/plugins/storybook/types.js +1 -0
- package/dist/plugins/stryker/index.d.ts +6 -0
- package/dist/plugins/stryker/index.js +17 -0
- package/dist/plugins/stryker/types.d.ts +5 -0
- package/dist/plugins/stryker/types.js +1 -0
- package/dist/plugins/stylelint/index.d.ts +6 -0
- package/dist/plugins/stylelint/index.js +22 -0
- package/dist/plugins/stylelint/types.d.ts +4 -0
- package/dist/plugins/stylelint/types.js +1 -0
- package/dist/plugins/svelte/index.d.ts +7 -0
- package/dist/plugins/svelte/index.js +9 -0
- package/dist/plugins/tailwind/index.d.ts +5 -0
- package/dist/plugins/tailwind/index.js +5 -0
- package/dist/plugins/typedoc/index.d.ts +6 -0
- package/dist/plugins/typedoc/index.js +22 -0
- package/dist/plugins/typedoc/types.d.ts +3 -0
- package/dist/plugins/typedoc/types.js +1 -0
- package/dist/plugins/typescript/index.d.ts +7 -0
- package/dist/plugins/typescript/index.js +42 -0
- package/dist/plugins/vite/index.d.ts +6 -0
- package/dist/plugins/vite/index.js +12 -0
- package/dist/plugins/vite/types.d.ts +4 -0
- package/dist/plugins/vite/types.js +1 -0
- package/dist/plugins/vitest/helpers.d.ts +6 -0
- package/dist/plugins/vitest/helpers.js +22 -0
- package/dist/plugins/vitest/index.d.ts +9 -0
- package/dist/plugins/vitest/index.js +25 -0
- package/dist/plugins/vitest/types.d.ts +11 -0
- package/dist/plugins/vitest/types.js +1 -0
- package/dist/plugins/webpack/index.d.ts +6 -0
- package/dist/plugins/webpack/index.js +82 -0
- package/dist/plugins/webpack/types.d.ts +10 -0
- package/dist/plugins/webpack/types.js +1 -0
- package/dist/reporters/codeowners.d.ts +3 -0
- package/dist/reporters/codeowners.js +62 -0
- package/dist/reporters/compact.d.ts +3 -0
- package/dist/reporters/compact.js +36 -0
- package/dist/reporters/index.d.ts +7 -0
- package/dist/reporters/index.js +10 -0
- package/dist/reporters/json.d.ts +3 -0
- package/dist/reporters/json.js +67 -0
- package/dist/reporters/symbols.d.ts +3 -0
- package/dist/reporters/symbols.js +54 -0
- package/dist/reporters/util.d.ts +15 -0
- package/dist/reporters/util.js +17 -0
- package/dist/types/cli.d.ts +10 -0
- package/dist/types/cli.js +1 -0
- package/dist/types/compilers.d.ts +6 -0
- package/dist/types/compilers.js +1 -0
- package/dist/types/config.d.ts +39 -0
- package/dist/types/config.js +3 -0
- package/dist/types/exports.d.ts +20 -0
- package/dist/types/exports.js +1 -0
- package/dist/types/imports.d.ts +13 -0
- package/dist/types/imports.js +1 -0
- package/dist/types/issues.d.ts +62 -0
- package/dist/types/issues.js +10 -0
- package/dist/types/plugins.d.ts +19 -0
- package/dist/types/plugins.js +1 -0
- package/dist/types/workspace.d.ts +17 -0
- package/dist/types/workspace.js +1 -0
- package/dist/typescript/SourceFile.d.ts +18 -0
- package/dist/typescript/SourceFile.js +1 -0
- package/dist/typescript/SourceFileManager.d.ts +13 -0
- package/dist/typescript/SourceFileManager.js +57 -0
- package/dist/typescript/ast-helpers.d.ts +27 -0
- package/dist/typescript/ast-helpers.js +101 -0
- package/dist/typescript/createHosts.d.ts +15 -0
- package/dist/typescript/createHosts.js +39 -0
- package/dist/typescript/getImportsAndExports.d.ts +29 -0
- package/dist/typescript/getImportsAndExports.js +159 -0
- package/dist/typescript/resolveModuleNames.d.ts +2 -0
- package/dist/typescript/resolveModuleNames.js +27 -0
- package/dist/typescript/sys.d.ts +35 -0
- package/dist/typescript/sys.js +16 -0
- package/dist/typescript/utils.d.ts +2 -0
- package/dist/typescript/utils.js +9 -0
- package/dist/typescript/visitors/exports/exportAssignment.d.ts +3 -0
- package/dist/typescript/visitors/exports/exportAssignment.js +9 -0
- package/dist/typescript/visitors/exports/exportDeclaration.d.ts +3 -0
- package/dist/typescript/visitors/exports/exportDeclaration.js +13 -0
- package/dist/typescript/visitors/exports/exportKeyword.d.ts +3 -0
- package/dist/typescript/visitors/exports/exportKeyword.js +77 -0
- package/dist/typescript/visitors/exports/index.d.ts +3 -0
- package/dist/typescript/visitors/exports/index.js +7 -0
- package/dist/typescript/visitors/exports/moduleExportsAccessExpression.d.ts +3 -0
- package/dist/typescript/visitors/exports/moduleExportsAccessExpression.js +31 -0
- package/dist/typescript/visitors/helpers.d.ts +4 -0
- package/dist/typescript/visitors/helpers.js +10 -0
- package/dist/typescript/visitors/imports/importCall.d.ts +3 -0
- package/dist/typescript/visitors/imports/importCall.js +11 -0
- package/dist/typescript/visitors/imports/importDeclaration.d.ts +3 -0
- package/dist/typescript/visitors/imports/importDeclaration.js +32 -0
- package/dist/typescript/visitors/imports/importEqualsDeclaration.d.ts +3 -0
- package/dist/typescript/visitors/imports/importEqualsDeclaration.js +11 -0
- package/dist/typescript/visitors/imports/index.d.ts +3 -0
- package/dist/typescript/visitors/imports/index.js +18 -0
- package/dist/typescript/visitors/imports/jsDocType.d.ts +3 -0
- package/dist/typescript/visitors/imports/jsDocType.js +11 -0
- package/dist/typescript/visitors/imports/reExportDeclaration.d.ts +3 -0
- package/dist/typescript/visitors/imports/reExportDeclaration.js +21 -0
- package/dist/typescript/visitors/imports/requireCall.d.ts +3 -0
- package/dist/typescript/visitors/imports/requireCall.js +45 -0
- package/dist/typescript/visitors/imports/requireResolveCall.d.ts +3 -0
- package/dist/typescript/visitors/imports/requireResolveCall.js +12 -0
- package/dist/typescript/visitors/index.d.ts +10 -0
- package/dist/typescript/visitors/index.js +16 -0
- package/dist/typescript/visitors/scripts/execa.d.ts +3 -0
- package/dist/typescript/visitors/scripts/execa.js +18 -0
- package/dist/typescript/visitors/scripts/index.d.ts +3 -0
- package/dist/typescript/visitors/scripts/index.js +5 -0
- package/dist/typescript/visitors/scripts/zx.d.ts +3 -0
- package/dist/typescript/visitors/scripts/zx.js +8 -0
- package/dist/util/Performance.d.ts +23 -0
- package/dist/util/Performance.js +80 -0
- package/dist/util/array.d.ts +2 -0
- package/dist/util/array.js +2 -0
- package/dist/util/cli-arguments.d.ts +28 -0
- package/dist/util/cli-arguments.js +83 -0
- package/dist/util/compilers.d.ts +426 -0
- package/dist/util/compilers.js +20 -0
- package/dist/util/debug.d.ts +3 -0
- package/dist/util/debug.js +34 -0
- package/dist/util/errors.d.ts +12 -0
- package/dist/util/errors.js +14 -0
- package/dist/util/fs.d.ts +7 -0
- package/dist/util/fs.js +42 -0
- package/dist/util/get-included-issue-types.d.ts +16 -0
- package/dist/util/get-included-issue-types.js +37 -0
- package/dist/util/git.d.ts +1 -0
- package/dist/util/git.js +20 -0
- package/dist/util/glob.d.ts +19 -0
- package/dist/util/glob.js +59 -0
- package/dist/util/loader.d.ts +1 -0
- package/dist/util/loader.js +31 -0
- package/dist/util/map.d.ts +1 -0
- package/dist/util/map.js +6 -0
- package/dist/util/modules.d.ts +8 -0
- package/dist/util/modules.js +52 -0
- package/dist/util/object.d.ts +3 -0
- package/dist/util/object.js +37 -0
- package/dist/util/path.d.ts +11 -0
- package/dist/util/path.js +13 -0
- package/dist/util/plugin.d.ts +3 -0
- package/dist/util/plugin.js +14 -0
- package/dist/util/register.d.ts +1 -0
- package/dist/util/register.js +14 -0
- package/dist/util/reporter.d.ts +3 -0
- package/dist/util/reporter.js +16 -0
- package/dist/util/require.d.ts +5 -0
- package/dist/util/require.js +34 -0
- package/dist/util/tsconfig-loader.d.ts +2 -0
- package/dist/util/tsconfig-loader.js +11 -0
- package/dist/util/workspace.d.ts +1 -0
- package/dist/util/workspace.js +11 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/license +12 -0
- package/package.json +150 -0
- package/schema.json +403 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export * as angular from './angular/index.js';
|
|
2
|
+
export * as ava from './ava/index.js';
|
|
3
|
+
export * as babel from './babel/index.js';
|
|
4
|
+
export * as capacitor from './capacitor/index.js';
|
|
5
|
+
export * as changesets from './changesets/index.js';
|
|
6
|
+
export * as commitizen from './commitizen/index.js';
|
|
7
|
+
export * as commitlint from './commitlint/index.js';
|
|
8
|
+
export * as cspell from './cspell/index.js';
|
|
9
|
+
export * as cypress from './cypress/index.js';
|
|
10
|
+
export * as eslint from './eslint/index.js';
|
|
11
|
+
export * as gatsby from './gatsby/index.js';
|
|
12
|
+
export * as githubActions from './github-actions/index.js';
|
|
13
|
+
export * as husky from './husky/index.js';
|
|
14
|
+
export * as jest from './jest/index.js';
|
|
15
|
+
export * as lefthook from './lefthook/index.js';
|
|
16
|
+
export * as lintStaged from './lint-staged/index.js';
|
|
17
|
+
export * as markdownlint from './markdownlint/index.js';
|
|
18
|
+
export * as mocha from './mocha/index.js';
|
|
19
|
+
export * as next from './next/index.js';
|
|
20
|
+
export * as npmPackageJsonLint from './npm-package-json-lint/index.js';
|
|
21
|
+
export * as nx from './nx/index.js';
|
|
22
|
+
export * as nyc from './nyc/index.js';
|
|
23
|
+
export * as playwright from './playwright/index.js';
|
|
24
|
+
export * as postcss from './postcss/index.js';
|
|
25
|
+
export * as prettier from './prettier/index.js';
|
|
26
|
+
export * as releaseIt from './release-it/index.js';
|
|
27
|
+
export * as remark from './remark/index.js';
|
|
28
|
+
export * as remix from './remix/index.js';
|
|
29
|
+
export * as rollup from './rollup/index.js';
|
|
30
|
+
export * as semanticRelease from './semantic-release/index.js';
|
|
31
|
+
export * as sentry from './sentry/index.js';
|
|
32
|
+
export * as storybook from './storybook/index.js';
|
|
33
|
+
export * as stryker from './stryker/index.js';
|
|
34
|
+
export * as stylelint from './stylelint/index.js';
|
|
35
|
+
export * as svelte from './svelte/index.js';
|
|
36
|
+
export * as tailwind from './tailwind/index.js';
|
|
37
|
+
export * as typedoc from './typedoc/index.js';
|
|
38
|
+
export * as typescript from './typescript/index.js';
|
|
39
|
+
export * as vite from './vite/index.js';
|
|
40
|
+
export * as vitest from './vitest/index.js';
|
|
41
|
+
export * as webpack from './webpack/index.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export * as angular from './angular/index.js';
|
|
2
|
+
export * as ava from './ava/index.js';
|
|
3
|
+
export * as babel from './babel/index.js';
|
|
4
|
+
export * as capacitor from './capacitor/index.js';
|
|
5
|
+
export * as changesets from './changesets/index.js';
|
|
6
|
+
export * as commitizen from './commitizen/index.js';
|
|
7
|
+
export * as commitlint from './commitlint/index.js';
|
|
8
|
+
export * as cspell from './cspell/index.js';
|
|
9
|
+
export * as cypress from './cypress/index.js';
|
|
10
|
+
export * as eslint from './eslint/index.js';
|
|
11
|
+
export * as gatsby from './gatsby/index.js';
|
|
12
|
+
export * as githubActions from './github-actions/index.js';
|
|
13
|
+
export * as husky from './husky/index.js';
|
|
14
|
+
export * as jest from './jest/index.js';
|
|
15
|
+
export * as lefthook from './lefthook/index.js';
|
|
16
|
+
export * as lintStaged from './lint-staged/index.js';
|
|
17
|
+
export * as markdownlint from './markdownlint/index.js';
|
|
18
|
+
export * as mocha from './mocha/index.js';
|
|
19
|
+
export * as next from './next/index.js';
|
|
20
|
+
export * as npmPackageJsonLint from './npm-package-json-lint/index.js';
|
|
21
|
+
export * as nx from './nx/index.js';
|
|
22
|
+
export * as nyc from './nyc/index.js';
|
|
23
|
+
export * as playwright from './playwright/index.js';
|
|
24
|
+
export * as postcss from './postcss/index.js';
|
|
25
|
+
export * as prettier from './prettier/index.js';
|
|
26
|
+
export * as releaseIt from './release-it/index.js';
|
|
27
|
+
export * as remark from './remark/index.js';
|
|
28
|
+
export * as remix from './remix/index.js';
|
|
29
|
+
export * as rollup from './rollup/index.js';
|
|
30
|
+
export * as semanticRelease from './semantic-release/index.js';
|
|
31
|
+
export * as sentry from './sentry/index.js';
|
|
32
|
+
export * as storybook from './storybook/index.js';
|
|
33
|
+
export * as stryker from './stryker/index.js';
|
|
34
|
+
export * as stylelint from './stylelint/index.js';
|
|
35
|
+
export * as svelte from './svelte/index.js';
|
|
36
|
+
export * as tailwind from './tailwind/index.js';
|
|
37
|
+
export * as typedoc from './typedoc/index.js';
|
|
38
|
+
export * as typescript from './typescript/index.js';
|
|
39
|
+
export * as vite from './vite/index.js';
|
|
40
|
+
export * as vitest from './vitest/index.js';
|
|
41
|
+
export * as webpack from './webpack/index.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Jest";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const ENTRY_FILE_PATTERNS: never[];
|
|
7
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { join, isInternal, toAbsolute, dirname } from '../../util/path.js';
|
|
2
|
+
import { timerify } from '../../util/Performance.js';
|
|
3
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
4
|
+
export const NAME = 'Jest';
|
|
5
|
+
export const ENABLERS = ['jest'];
|
|
6
|
+
export const isEnabled = ({ dependencies, manifest }) => hasDependency(dependencies, ENABLERS) || Boolean(manifest.name?.startsWith('jest-presets'));
|
|
7
|
+
export const CONFIG_FILE_PATTERNS = ['jest.config.{js,ts,mjs,cjs,json}', 'package.json'];
|
|
8
|
+
export const ENTRY_FILE_PATTERNS = [];
|
|
9
|
+
const resolveExtensibleConfig = async (configFilePath) => {
|
|
10
|
+
const config = await load(configFilePath);
|
|
11
|
+
if (config?.preset) {
|
|
12
|
+
const { preset } = config;
|
|
13
|
+
if (isInternal(preset)) {
|
|
14
|
+
const presetConfigPath = toAbsolute(preset, dirname(configFilePath));
|
|
15
|
+
const presetConfig = await resolveExtensibleConfig(presetConfigPath);
|
|
16
|
+
Object.assign(config, presetConfig);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return config;
|
|
20
|
+
};
|
|
21
|
+
const resolveDependencies = (config) => {
|
|
22
|
+
const presets = (config.preset ? [config.preset] : []).map(preset => isInternal(preset) ? preset : join(preset, 'jest-preset'));
|
|
23
|
+
const projects = Array.isArray(config.projects)
|
|
24
|
+
? config.projects.map(config => (typeof config === 'string' ? config : resolveDependencies(config))).flat()
|
|
25
|
+
: [];
|
|
26
|
+
const runner = config.runner ? [config.runner] : [];
|
|
27
|
+
const environments = config.testEnvironment === 'jsdom' ? ['jest-environment-jsdom'] : [];
|
|
28
|
+
const resolvers = config.resolver ? [config.resolver] : [];
|
|
29
|
+
const reporters = config.reporters
|
|
30
|
+
? config.reporters
|
|
31
|
+
.map(reporter => (typeof reporter === 'string' ? reporter : reporter[0]))
|
|
32
|
+
.filter(reporter => !['default', 'github-actions', 'summary'].includes(reporter))
|
|
33
|
+
: [];
|
|
34
|
+
const watchPlugins = config.watchPlugins?.map(watchPlugin => (typeof watchPlugin === 'string' ? watchPlugin : watchPlugin[0])) ?? [];
|
|
35
|
+
const setupFiles = config.setupFiles ?? [];
|
|
36
|
+
const setupFilesAfterEnv = config.setupFilesAfterEnv ?? [];
|
|
37
|
+
const transform = config.transform
|
|
38
|
+
? Object.values(config.transform).map(transform => (typeof transform === 'string' ? transform : transform[0]))
|
|
39
|
+
: [];
|
|
40
|
+
const moduleNameMapper = (config.moduleNameMapper
|
|
41
|
+
? Object.values(config.moduleNameMapper).map(mapper => (typeof mapper === 'string' ? mapper : mapper[0]))
|
|
42
|
+
: []).filter(value => !/\$[0-9]/.test(value));
|
|
43
|
+
return [
|
|
44
|
+
...presets,
|
|
45
|
+
...projects,
|
|
46
|
+
...runner,
|
|
47
|
+
...environments,
|
|
48
|
+
...resolvers,
|
|
49
|
+
...reporters,
|
|
50
|
+
...watchPlugins,
|
|
51
|
+
...setupFiles,
|
|
52
|
+
...setupFilesAfterEnv,
|
|
53
|
+
...transform,
|
|
54
|
+
...moduleNameMapper,
|
|
55
|
+
];
|
|
56
|
+
};
|
|
57
|
+
const findJestDependencies = async (configFilePath, { cwd, manifest }) => {
|
|
58
|
+
let config = configFilePath.endsWith('package.json')
|
|
59
|
+
? manifest.jest
|
|
60
|
+
: await resolveExtensibleConfig(configFilePath);
|
|
61
|
+
if (typeof config === 'function')
|
|
62
|
+
config = await config();
|
|
63
|
+
if (!config)
|
|
64
|
+
return [];
|
|
65
|
+
const replaceRootDir = (name) => name.includes('<rootDir>') ? join(cwd, name.replace(/^.*<rootDir>/, '')) : name;
|
|
66
|
+
return resolveDependencies(config).map(replaceRootDir);
|
|
67
|
+
};
|
|
68
|
+
export const findDependencies = timerify(findJestDependencies);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Lefthook";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
2
|
+
import { _getDependenciesFromScripts } from '../../binaries/index.js';
|
|
3
|
+
import { fromBinary } from '../../binaries/util.js';
|
|
4
|
+
import { getGitHookPaths } from '../../util/git.js';
|
|
5
|
+
import { getValuesByKeyDeep } from '../../util/object.js';
|
|
6
|
+
import { timerify } from '../../util/Performance.js';
|
|
7
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
8
|
+
export const NAME = 'Lefthook';
|
|
9
|
+
export const ENABLERS = ['lefthook', '@arkweid/lefthook', '@evilmartians/lefthook'];
|
|
10
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
11
|
+
const gitHookPaths = getGitHookPaths();
|
|
12
|
+
export const CONFIG_FILE_PATTERNS = ['lefthook.yml', ...gitHookPaths];
|
|
13
|
+
const findLefthookDependencies = async (configFilePath, { cwd, manifest }) => {
|
|
14
|
+
const dependencies = manifest.devDependencies ? Object.keys(manifest.devDependencies) : [];
|
|
15
|
+
if (configFilePath.endsWith('.yml')) {
|
|
16
|
+
const config = await load(configFilePath);
|
|
17
|
+
if (!config)
|
|
18
|
+
return [];
|
|
19
|
+
const scripts = getValuesByKeyDeep(config, 'run').filter((value) => typeof value === 'string');
|
|
20
|
+
const lefthook = process.env.CI ? ENABLERS.filter(dependency => dependencies.includes(dependency)) : [];
|
|
21
|
+
return [...lefthook, ..._getDependenciesFromScripts(scripts, { cwd, manifest, knownGlobalsOnly: true })];
|
|
22
|
+
}
|
|
23
|
+
const script = readFileSync(configFilePath, 'utf8');
|
|
24
|
+
const scriptDependencies = _getDependenciesFromScripts([script], { cwd, manifest, knownGlobalsOnly: false });
|
|
25
|
+
const matches = scriptDependencies.find(dep => dependencies.includes(fromBinary(dep)));
|
|
26
|
+
return matches ? [matches] : [];
|
|
27
|
+
};
|
|
28
|
+
export const findDependencies = timerify(findLefthookDependencies);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "lint-staged";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { _getDependenciesFromScripts } from '../../binaries/index.js';
|
|
2
|
+
import { timerify } from '../../util/Performance.js';
|
|
3
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
4
|
+
export const NAME = 'lint-staged';
|
|
5
|
+
export const ENABLERS = ['lint-staged'];
|
|
6
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
7
|
+
export const CONFIG_FILE_PATTERNS = [
|
|
8
|
+
'.lintstagedrc',
|
|
9
|
+
'.lintstagedrc.json',
|
|
10
|
+
'.lintstagedrc.{yml,yaml}',
|
|
11
|
+
'.lintstagedrc.{js,mjs,cjs}',
|
|
12
|
+
'lint-staged.config.{js,mjs,cjs}',
|
|
13
|
+
'package.json',
|
|
14
|
+
];
|
|
15
|
+
const findLintStagedDependencies = async (configFilePath, { cwd, manifest }) => {
|
|
16
|
+
let config = configFilePath.endsWith('package.json')
|
|
17
|
+
? manifest['lint-staged']
|
|
18
|
+
: await load(configFilePath);
|
|
19
|
+
if (!config)
|
|
20
|
+
return [];
|
|
21
|
+
if (typeof config === 'function') {
|
|
22
|
+
config = config();
|
|
23
|
+
}
|
|
24
|
+
const dependencies = new Set();
|
|
25
|
+
for (const entry of Object.values(config).flat()) {
|
|
26
|
+
const scripts = [typeof entry === 'function' ? await entry([]) : entry].flat();
|
|
27
|
+
const options = { cwd, manifest };
|
|
28
|
+
_getDependenciesFromScripts(scripts, options).forEach(identifier => dependencies.add(identifier));
|
|
29
|
+
}
|
|
30
|
+
return Array.from(dependencies);
|
|
31
|
+
};
|
|
32
|
+
export const findDependencies = timerify(findLintStagedDependencies);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getArgumentValues: (value: string, matcher: RegExp) => string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "markdownlint";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { timerify } from '../../util/Performance.js';
|
|
2
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
3
|
+
import { getArgumentValues } from './helpers.js';
|
|
4
|
+
export const NAME = 'markdownlint';
|
|
5
|
+
export const ENABLERS = ['markdownlint-cli'];
|
|
6
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
7
|
+
export const CONFIG_FILE_PATTERNS = ['.markdownlint.{json,jsonc}', '.markdownlint.{yml,yaml}'];
|
|
8
|
+
const findMarkdownlintConfigDependencies = async (configFilePath, { manifest }) => {
|
|
9
|
+
const config = await load(configFilePath);
|
|
10
|
+
const extend = config?.extends ? [config.extends] : [];
|
|
11
|
+
const scripts = manifest.scripts
|
|
12
|
+
? Object.values(manifest.scripts).filter((script) => typeof script === 'string')
|
|
13
|
+
: [];
|
|
14
|
+
const uses = scripts
|
|
15
|
+
.filter(script => script.includes('markdownlint '))
|
|
16
|
+
.flatMap(script => getArgumentValues(script, / (--rules|-r)[ =]([^ ]+)/g));
|
|
17
|
+
return [...extend, ...uses];
|
|
18
|
+
};
|
|
19
|
+
export const findDependencies = timerify(findMarkdownlintConfigDependencies);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Mocha";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { timerify } from '../../util/Performance.js';
|
|
2
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
3
|
+
export const NAME = 'Mocha';
|
|
4
|
+
export const ENABLERS = ['mocha'];
|
|
5
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
6
|
+
export const CONFIG_FILE_PATTERNS = ['.mocharc.{js,cjs,json,jsonc,yml,yaml}', 'package.json'];
|
|
7
|
+
const findMochaDependencies = async (configFilePath, { manifest }) => {
|
|
8
|
+
const config = configFilePath.endsWith('package.json') ? manifest.mocha : await load(configFilePath);
|
|
9
|
+
if (config) {
|
|
10
|
+
const require = config.require;
|
|
11
|
+
return require ? [require].flat() : [];
|
|
12
|
+
}
|
|
13
|
+
return [];
|
|
14
|
+
};
|
|
15
|
+
export const findDependencies = timerify(findMochaDependencies);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Next.js";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const ENTRY_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const PRODUCTION_ENTRY_FILE_PATTERNS: string[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
export const NAME = 'Next.js';
|
|
3
|
+
export const ENABLERS = ['next'];
|
|
4
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
5
|
+
export const ENTRY_FILE_PATTERNS = ['next.config.{js,ts,cjs,mjs}'];
|
|
6
|
+
export const PRODUCTION_ENTRY_FILE_PATTERNS = [
|
|
7
|
+
'{app,pages}/**/*.{js,jsx,ts,tsx}',
|
|
8
|
+
'src/{app,pages}/**/*.{js,jsx,ts,tsx}',
|
|
9
|
+
'middleware.{js,ts}',
|
|
10
|
+
'src/middleware.{js,ts}',
|
|
11
|
+
];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "npm-package-json-lint";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { timerify } from '../../util/Performance.js';
|
|
2
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
3
|
+
export const NAME = 'npm-package-json-lint';
|
|
4
|
+
export const ENABLERS = ['npm-package-json-lint'];
|
|
5
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
6
|
+
export const CONFIG_FILE_PATTERNS = ['.npmpackagejsonlintrc.json', 'npmpackagejsonlint.config.js', 'package.json'];
|
|
7
|
+
const findNpmPkgJsonLintConfigDependencies = async (configFilePath, { manifest }) => {
|
|
8
|
+
const config = configFilePath.endsWith('package.json')
|
|
9
|
+
? manifest.npmpackagejsonlint
|
|
10
|
+
: await load(configFilePath);
|
|
11
|
+
return config?.extends ? [config.extends] : [];
|
|
12
|
+
};
|
|
13
|
+
export const findDependencies = timerify(findNpmPkgJsonLintConfigDependencies);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Nx";
|
|
3
|
+
export declare const ENABLERS: (string | RegExp)[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { _getDependenciesFromScripts } from '../../binaries/index.js';
|
|
2
|
+
import { compact } from '../../util/array.js';
|
|
3
|
+
import { timerify } from '../../util/Performance.js';
|
|
4
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
5
|
+
export const NAME = 'Nx';
|
|
6
|
+
export const ENABLERS = ['nx', /^@nrwl\//];
|
|
7
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
8
|
+
export const CONFIG_FILE_PATTERNS = ['project.json', '{apps,libs}/**/project.json'];
|
|
9
|
+
const findNxDependencies = async (configFilePath, { cwd, manifest }) => {
|
|
10
|
+
const config = await load(configFilePath);
|
|
11
|
+
if (!config)
|
|
12
|
+
return [];
|
|
13
|
+
const targets = config.targets ? Object.values(config.targets) : [];
|
|
14
|
+
const executors = compact(targets
|
|
15
|
+
.map(target => target?.executor)
|
|
16
|
+
.filter(executor => executor && !executor.startsWith('.'))
|
|
17
|
+
.map(executor => executor?.split(':')[0]));
|
|
18
|
+
const scripts = compact(targets
|
|
19
|
+
.filter(target => target.executor === 'nx:run-commands')
|
|
20
|
+
.flatMap(target => target.options?.commands ?? (target.options?.command ? [target.options.command] : [])));
|
|
21
|
+
const dependencies = _getDependenciesFromScripts(scripts, { cwd, manifest });
|
|
22
|
+
return [...executors, ...dependencies];
|
|
23
|
+
};
|
|
24
|
+
export const findDependencies = timerify(findNxDependencies);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "nyc";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { timerify } from '../../util/Performance.js';
|
|
2
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
3
|
+
export const NAME = 'nyc';
|
|
4
|
+
export const ENABLERS = ['nyc'];
|
|
5
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
6
|
+
export const CONFIG_FILE_PATTERNS = ['.nycrc', '.nycrc.json', '.nycrc.{yml,yaml}', 'nyc.config.js'];
|
|
7
|
+
const findNycDependencies = async (configFilePath) => {
|
|
8
|
+
const config = await load(configFilePath);
|
|
9
|
+
return config.extends ? [config.extends].flat() : [];
|
|
10
|
+
};
|
|
11
|
+
export const findDependencies = timerify(findNycDependencies);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
export const NAME = 'Playwright';
|
|
3
|
+
export const ENABLERS = ['@playwright/test'];
|
|
4
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
5
|
+
export const ENTRY_FILE_PATTERNS = ['playwright.config.{js,ts}'];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "PostCSS";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { timerify } from '../../util/Performance.js';
|
|
2
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
3
|
+
export const NAME = 'PostCSS';
|
|
4
|
+
export const ENABLERS = ['postcss', 'next'];
|
|
5
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
6
|
+
export const CONFIG_FILE_PATTERNS = ['postcss.config.js', 'postcss.config.json', 'package.json'];
|
|
7
|
+
const findPostCSSDependencies = async (configFilePath, { manifest }) => {
|
|
8
|
+
const config = configFilePath.endsWith('package.json')
|
|
9
|
+
? manifest?.postcss
|
|
10
|
+
: await load(configFilePath);
|
|
11
|
+
return config?.plugins
|
|
12
|
+
? (Array.isArray(config.plugins) ? config.plugins : Object.keys(config.plugins)).flatMap(plugin => {
|
|
13
|
+
if (typeof plugin === 'string') {
|
|
14
|
+
return plugin;
|
|
15
|
+
}
|
|
16
|
+
if (Array.isArray(plugin) && typeof plugin[0] === 'string') {
|
|
17
|
+
return plugin[0];
|
|
18
|
+
}
|
|
19
|
+
return [];
|
|
20
|
+
})
|
|
21
|
+
: [];
|
|
22
|
+
};
|
|
23
|
+
export const findDependencies = timerify(findPostCSSDependencies);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Prettier";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { timerify } from '../../util/Performance.js';
|
|
2
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
3
|
+
export const NAME = 'Prettier';
|
|
4
|
+
export const ENABLERS = ['prettier'];
|
|
5
|
+
export const isEnabled = ({ dependencies, config }) => hasDependency(dependencies, ENABLERS) || 'prettier' in config;
|
|
6
|
+
export const CONFIG_FILE_PATTERNS = [
|
|
7
|
+
'.prettierrc',
|
|
8
|
+
'.prettierrc.{json,js,cjs,yml,yaml}',
|
|
9
|
+
'prettier.config.{js,cjs}',
|
|
10
|
+
'package.json',
|
|
11
|
+
];
|
|
12
|
+
const findPrettierDependencies = async (configFilePath, { manifest }) => {
|
|
13
|
+
const config = configFilePath.endsWith('package.json')
|
|
14
|
+
? manifest.prettier
|
|
15
|
+
: await load(configFilePath);
|
|
16
|
+
return config && Array.isArray(config.plugins)
|
|
17
|
+
? config.plugins.filter((plugin) => typeof plugin === 'string')
|
|
18
|
+
: [];
|
|
19
|
+
};
|
|
20
|
+
export const findDependencies = timerify(findPrettierDependencies);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Release It";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { _getDependenciesFromScripts } from '../../binaries/index.js';
|
|
2
|
+
import { timerify } from '../../util/Performance.js';
|
|
3
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
4
|
+
export const NAME = 'Release It';
|
|
5
|
+
export const ENABLERS = ['release-it'];
|
|
6
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
7
|
+
export const CONFIG_FILE_PATTERNS = [
|
|
8
|
+
'.release-it.json',
|
|
9
|
+
'.release-it.{js,cjs}',
|
|
10
|
+
'.release-it.{yml,yaml}',
|
|
11
|
+
'package.json',
|
|
12
|
+
];
|
|
13
|
+
const findReleaseItDependencies = async (configFilePath, { cwd, manifest }) => {
|
|
14
|
+
const config = configFilePath.endsWith('package.json')
|
|
15
|
+
? manifest['release-it']
|
|
16
|
+
: await load(configFilePath);
|
|
17
|
+
if (!config)
|
|
18
|
+
return [];
|
|
19
|
+
const plugins = config.plugins ? Object.keys(config.plugins) : [];
|
|
20
|
+
const scripts = config.hooks ? Object.values(config.hooks).flat() : [];
|
|
21
|
+
if (typeof config.github?.releaseNotes === 'string') {
|
|
22
|
+
scripts.push(config.github.releaseNotes);
|
|
23
|
+
}
|
|
24
|
+
if (typeof config.gitlab?.releaseNotes === 'string') {
|
|
25
|
+
scripts.push(config.gitlab.releaseNotes);
|
|
26
|
+
}
|
|
27
|
+
const dependencies = _getDependenciesFromScripts(scripts, { cwd, manifest });
|
|
28
|
+
return [...plugins, ...dependencies];
|
|
29
|
+
};
|
|
30
|
+
export const findDependencies = timerify(findReleaseItDependencies);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Remark";
|
|
3
|
+
export declare const ENABLERS: string[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { timerify } from '../../util/Performance.js';
|
|
2
|
+
import { hasDependency, load } from '../../util/plugin.js';
|
|
3
|
+
export const NAME = 'Remark';
|
|
4
|
+
export const ENABLERS = ['remark-cli'];
|
|
5
|
+
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
6
|
+
export const CONFIG_FILE_PATTERNS = [
|
|
7
|
+
'package.json',
|
|
8
|
+
'.remarkrc',
|
|
9
|
+
'.remarkrc.json',
|
|
10
|
+
'.remarkrc.{js,cjs,mjs}',
|
|
11
|
+
'.remarkrc.{yml,yaml}',
|
|
12
|
+
];
|
|
13
|
+
const findRemarkDependencies = async (configFilePath, { manifest }) => {
|
|
14
|
+
const config = configFilePath.endsWith('package.json') ? manifest.remarkConfig : await load(configFilePath);
|
|
15
|
+
const plugins = config?.plugins?.map(plugin => `remark-${plugin}`) ?? [];
|
|
16
|
+
return [...plugins];
|
|
17
|
+
};
|
|
18
|
+
export const findDependencies = timerify(findRemarkDependencies);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsPluginEnabledCallback } from '../../types/plugins.js';
|
|
2
|
+
export declare const NAME = "Remix";
|
|
3
|
+
export declare const ENABLERS: RegExp[];
|
|
4
|
+
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
|
+
export declare const ENTRY_FILE_PATTERNS: string[];
|
|
6
|
+
export declare const PRODUCTION_ENTRY_FILE_PATTERNS: string[];
|