knip 6.35.0 → 6.36.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.
Files changed (82) hide show
  1. package/dist/ConfigurationChief.d.ts +12 -0
  2. package/dist/IssueCollector.d.ts +3 -0
  3. package/dist/IssueCollector.js +5 -0
  4. package/dist/WorkspaceWorker.d.ts +3 -1
  5. package/dist/WorkspaceWorker.js +10 -5
  6. package/dist/binaries/command.js +2 -2
  7. package/dist/cli.js +4 -0
  8. package/dist/compilers/compilers.js +1 -1
  9. package/dist/compilers/scss.js +2 -2
  10. package/dist/graph/build.js +1 -0
  11. package/dist/graph-explorer/cache.d.ts +3 -0
  12. package/dist/graph-explorer/cache.js +6 -0
  13. package/dist/graph-explorer/explorer.d.ts +1 -0
  14. package/dist/graph-explorer/explorer.js +2 -0
  15. package/dist/graph-explorer/operations/build-exports-tree.js +14 -2
  16. package/dist/graph-explorer/operations/get-ambiguous-star-export.d.ts +8 -0
  17. package/dist/graph-explorer/operations/get-ambiguous-star-export.js +11 -0
  18. package/dist/graph-explorer/operations/get-contention.js +265 -122
  19. package/dist/graph-explorer/operations/resolve-export-origins.d.ts +32 -0
  20. package/dist/graph-explorer/operations/resolve-export-origins.js +255 -0
  21. package/dist/graph-explorer/utils.js +8 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/plugins/eslint/helpers.js +31 -6
  24. package/dist/plugins/eslint/resolveFromAST.js +17 -11
  25. package/dist/plugins/eslint/types.d.ts +3 -3
  26. package/dist/plugins/index.d.ts +2 -0
  27. package/dist/plugins/index.js +4 -0
  28. package/dist/plugins/next/index.js +39 -5
  29. package/dist/plugins/node/index.js +6 -0
  30. package/dist/plugins/tailwind/compiler.js +2 -2
  31. package/dist/plugins/tailwind/index.js +7 -1
  32. package/dist/plugins/textlint/helpers.d.ts +4 -0
  33. package/dist/plugins/textlint/helpers.js +39 -0
  34. package/dist/plugins/textlint/index.d.ts +3 -0
  35. package/dist/plugins/textlint/index.js +52 -0
  36. package/dist/plugins/textlint/types.d.ts +5 -0
  37. package/dist/plugins/textlint/types.js +1 -0
  38. package/dist/plugins/typedoc/index.js +3 -2
  39. package/dist/plugins/typedoc/types.d.ts +2 -2
  40. package/dist/plugins/varlock/index.d.ts +3 -0
  41. package/dist/plugins/varlock/index.js +31 -0
  42. package/dist/plugins/varlock/parse.d.ts +11 -0
  43. package/dist/plugins/varlock/parse.js +185 -0
  44. package/dist/plugins/varlock/scan.d.ts +2 -0
  45. package/dist/plugins/varlock/scan.js +78 -0
  46. package/dist/plugins/vitest/index.js +4 -2
  47. package/dist/reporters/trace.js +30 -1
  48. package/dist/reporters/util/configuration-hints.d.ts +1 -1
  49. package/dist/reporters/util/configuration-hints.js +11 -2
  50. package/dist/run.d.ts +2 -0
  51. package/dist/run.js +2 -1
  52. package/dist/schema/configuration.d.ts +30 -0
  53. package/dist/schema/plugins.d.ts +10 -0
  54. package/dist/schema/plugins.js +2 -0
  55. package/dist/session/build-maps.js +9 -1
  56. package/dist/session/file-descriptor.js +0 -2
  57. package/dist/session/index.d.ts +1 -1
  58. package/dist/session/types.d.ts +18 -0
  59. package/dist/types/PluginNames.d.ts +2 -2
  60. package/dist/types/PluginNames.js +2 -0
  61. package/dist/types/config.d.ts +1 -0
  62. package/dist/types/issues.d.ts +1 -0
  63. package/dist/types/module-graph.d.ts +3 -0
  64. package/dist/typescript/get-imports-and-exports.js +43 -9
  65. package/dist/typescript/resolve-module-names.js +7 -27
  66. package/dist/typescript/visitors/exports.js +9 -4
  67. package/dist/typescript/visitors/walk.d.ts +1 -1
  68. package/dist/typescript/visitors/walk.js +4 -1
  69. package/dist/util/array.d.ts +1 -1
  70. package/dist/util/array.js +5 -1
  71. package/dist/util/create-options.d.ts +20 -0
  72. package/dist/util/file-entry-cache.js +1 -1
  73. package/dist/util/glob-core.d.ts +1 -0
  74. package/dist/util/glob-core.js +11 -3
  75. package/dist/util/package-json.d.ts +2 -0
  76. package/dist/util/url.d.ts +1 -0
  77. package/dist/util/url.js +2 -0
  78. package/dist/util/watch.d.ts +1 -0
  79. package/dist/version.d.ts +1 -1
  80. package/dist/version.js +1 -1
  81. package/package.json +1 -1
  82. package/schema.json +8 -0
@@ -156,6 +156,7 @@ export const pluginsSchema = z.object({
156
156
  taskfile: pluginSchema,
157
157
  tauri: pluginSchema,
158
158
  temporal: pluginSchema,
159
+ textlint: pluginSchema,
159
160
  travis: pluginSchema,
160
161
  'ts-node': pluginSchema,
161
162
  tsd: pluginSchema,
@@ -172,6 +173,7 @@ export const pluginsSchema = z.object({
172
173
  'unplugin-vue-i18n': pluginSchema,
173
174
  'unplugin-vue-markdown': pluginSchema,
174
175
  'unplugin-vue-router': pluginSchema,
176
+ varlock: pluginSchema,
175
177
  vercel: pluginSchema,
176
178
  'vercel-og': pluginSchema,
177
179
  vike: pluginSchema,
@@ -1,4 +1,4 @@
1
- import { IMPORT_STAR } from '../constants.js';
1
+ import { IMPORT_FLAGS, IMPORT_STAR } from '../constants.js';
2
2
  import { getExportedIdentifiers } from '../graph-explorer/utils.js';
3
3
  import { forEachAliasReExport, forEachNamespaceReExport, forEachPassThroughReExport, getStarReExportSources, } from '../graph-explorer/visitors.js';
4
4
  import { compareStrings } from '../util/string.js';
@@ -52,6 +52,14 @@ export const buildExportsMap = (fileNode, filePath, graph, entryPaths, explorer,
52
52
  for (const _export of fileNode.exports.values()) {
53
53
  addExport(_export.identifier, filePath, _export.pos, _export.line, _export.col, undefined);
54
54
  }
55
+ for (const _import of fileNode.imports.imports) {
56
+ if (!_import.filePath &&
57
+ _import.modifiers & IMPORT_FLAGS.RE_EXPORT &&
58
+ _import.identifier === IMPORT_STAR &&
59
+ _import.alias) {
60
+ addExport(_import.alias, filePath, _import.pos, _import.line, _import.col, undefined);
61
+ }
62
+ }
55
63
  for (const [importedFilePath, importMaps] of fileNode.imports.internal) {
56
64
  forEachPassThroughReExport(importMaps, (id, _sources) => {
57
65
  if (exportsMap.has(id))
@@ -27,8 +27,6 @@ export const buildFileDescriptor = (filePath, cwd, graph, entryPaths, options =
27
27
  const details = contentionMap.get(identifier);
28
28
  if (!details)
29
29
  continue;
30
- if (details.branching.length === 0 && details.conflict.length === 0)
31
- continue;
32
30
  contention[identifier] = details;
33
31
  }
34
32
  }
@@ -9,4 +9,4 @@ export { createOptions, type MainOptions } from '../util/create-options.ts';
9
9
  export { buildFileDescriptor, type FileDescriptorOptions } from './file-descriptor.ts';
10
10
  export { buildPackageJsonDescriptor, type PackageJsonFile } from './package-json-descriptor.ts';
11
11
  export { createSession, type Session } from './session.ts';
12
- export type { ContentionDetails, Export, File, SourceLocation } from './types.ts';
12
+ export type { ContentionDetails, ContentionKind, ContentionOrigin, ContentionSite, Export, File, SourceLocation, } from './types.ts';
@@ -13,9 +13,27 @@ export interface Export extends SourceLocation {
13
13
  entryPaths: Set<string>;
14
14
  exports: Export[] | undefined;
15
15
  }
16
+ export type ContentionKind = 'ambiguous' | 'shadowed' | 'converged';
17
+ export interface ContentionOrigin {
18
+ filePath: string;
19
+ identifier: string;
20
+ line?: number;
21
+ col?: number;
22
+ }
23
+ export interface ContentionSite {
24
+ kind: ContentionKind;
25
+ filePath: string;
26
+ identifier: string;
27
+ line?: number;
28
+ col?: number;
29
+ origins: ContentionOrigin[];
30
+ winner?: ContentionOrigin;
31
+ sources: string[];
32
+ }
16
33
  export interface ContentionDetails {
17
34
  branching: string[];
18
35
  conflict: string[];
36
+ sites: ContentionSite[];
19
37
  }
20
38
  export interface FileMetrics {
21
39
  imports: number;
@@ -1,2 +1,2 @@
1
- export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'borp' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'marko' | 'mdx' | 'mdxlint' | 'metro' | 'mise' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'openclaw' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'pre-commit' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'tauri' | 'temporal' | 'travis' | 'ts-node' | 'tsd' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
2
- export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'borp', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'marko', 'mdx', 'mdxlint', 'metro', 'mise', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'openclaw', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'pre-commit', 'preconstruct', 'prettier', 'prisma', 'quasar', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'tauri', 'temporal', 'travis', 'ts-node', 'tsd', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
1
+ export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'borp' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'marko' | 'mdx' | 'mdxlint' | 'metro' | 'mise' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'openclaw' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'pre-commit' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'tauri' | 'temporal' | 'textlint' | 'travis' | 'ts-node' | 'tsd' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'varlock' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
2
+ export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'borp', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'marko', 'mdx', 'mdxlint', 'metro', 'mise', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'openclaw', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'pre-commit', 'preconstruct', 'prettier', 'prisma', 'quasar', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'tauri', 'temporal', 'textlint', 'travis', 'ts-node', 'tsd', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'varlock', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
@@ -145,6 +145,7 @@ export const pluginNames = [
145
145
  'taskfile',
146
146
  'tauri',
147
147
  'temporal',
148
+ 'textlint',
148
149
  'travis',
149
150
  'ts-node',
150
151
  'tsd',
@@ -161,6 +162,7 @@ export const pluginNames = [
161
162
  'unplugin-vue-i18n',
162
163
  'unplugin-vue-markdown',
163
164
  'unplugin-vue-router',
165
+ 'varlock',
164
166
  'vercel',
165
167
  'vercel-og',
166
168
  'vike',
@@ -97,6 +97,7 @@ export interface PluginOptions extends BaseOptions {
97
97
  configFileDir: string;
98
98
  configFileName: string;
99
99
  configFilePath: string;
100
+ isResolvedConfigFile: boolean;
100
101
  isProduction: boolean;
101
102
  enabledPlugins: string[];
102
103
  getInputsFromScripts: GetInputsFromScriptsPartial;
@@ -56,6 +56,7 @@ export type ReporterOptions = {
56
56
  counters: Counters;
57
57
  tagHints: TagHints;
58
58
  configurationHints: ConfigurationHint[];
59
+ hasConfigLoadErrors: boolean;
59
60
  enabledPlugins: Record<string, string[]>;
60
61
  isDisableConfigHints: boolean;
61
62
  isDisableTagHints: boolean;
@@ -28,6 +28,7 @@ export interface Import extends Position {
28
28
  readonly specifier: string;
29
29
  readonly filePath: string | undefined;
30
30
  readonly identifier: string | undefined;
31
+ readonly alias: string | undefined;
31
32
  readonly isTypeOnly: boolean;
32
33
  readonly modifiers: number;
33
34
  readonly jsDocTags: Tags | undefined;
@@ -38,6 +39,7 @@ export interface ExternalRef {
38
39
  }
39
40
  export interface Export extends Position {
40
41
  readonly identifier: Identifier;
42
+ readonly binding: Identifier;
41
43
  readonly type: SymbolType;
42
44
  readonly members: ExportMember[];
43
45
  jsDocTags: Tags;
@@ -46,6 +48,7 @@ export interface Export extends Position {
46
48
  referencedIn: Set<string> | undefined;
47
49
  readonly fixes: Fixes;
48
50
  isReExport: boolean;
51
+ isBindingReExport: boolean;
49
52
  }
50
53
  export interface ExportMember extends Position {
51
54
  readonly identifier: Identifier;
@@ -35,6 +35,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
35
35
  importAliases.set(aliasName, new Set([{ id, filePath: importFilePath }]));
36
36
  };
37
37
  const localImportMap = new Map();
38
+ let builtinImports;
38
39
  const localDeclarationTypes = new Map();
39
40
  const referencedInExport = new Map();
40
41
  const destructuredExports = new Set();
@@ -57,6 +58,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
57
58
  filePath: importFilePath,
58
59
  specifier,
59
60
  identifier: namespace ?? opts.identifier,
61
+ alias: opts.alias,
60
62
  pos: opts.pos,
61
63
  line: opts.line,
62
64
  col: opts.col,
@@ -95,8 +97,26 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
95
97
  }
96
98
  };
97
99
  const addImport = (specifier, identifier, alias, namespace, pos, modifiers, specifierPos, jsDocTags, preResolvedModule) => {
98
- if (!specifier || isBuiltin(specifier))
100
+ if (!specifier)
99
101
  return;
102
+ if (isBuiltin(specifier)) {
103
+ const { line, col } = getLineAndCol(lineStarts, pos);
104
+ const _import = {
105
+ filePath: undefined,
106
+ specifier: specifier.startsWith('node:') ? specifier : `node:${specifier}`,
107
+ identifier: identifier ?? SIDE_EFFECTS,
108
+ alias: namespace ?? alias,
109
+ pos,
110
+ line,
111
+ col,
112
+ isTypeOnly: isDts || !!(modifiers & IMPORT_FLAGS.TYPE_ONLY),
113
+ modifiers,
114
+ jsDocTags,
115
+ };
116
+ if (modifiers & IMPORT_FLAGS.RE_EXPORT)
117
+ imports.add(_import);
118
+ return _import;
119
+ }
100
120
  const module = preResolvedModule ?? resolveModule(specifier, filePath);
101
121
  if (modifiers & IMPORT_FLAGS.AUGMENT &&
102
122
  (!module || module.isExternalLibraryImport || isInNodeModules(module.resolvedFileName))) {
@@ -142,6 +162,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
142
162
  filePath: resolvedFileName,
143
163
  specifier: sanitizedSpecifier,
144
164
  identifier: identifier ?? SIDE_EFFECTS,
165
+ alias,
145
166
  pos: ePos,
146
167
  line,
147
168
  col,
@@ -168,6 +189,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
168
189
  filePath: undefined,
169
190
  specifier,
170
191
  identifier: identifier ?? SIDE_EFFECTS,
192
+ alias,
171
193
  pos: uPos,
172
194
  line,
173
195
  col,
@@ -210,26 +232,25 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
210
232
  : undefined;
211
233
  for (const entry of _imports.entries) {
212
234
  const modifiers = entry.isType ? IMPORT_FLAGS.TYPE_ONLY : IMPORT_FLAGS.NONE;
235
+ const localName = entry.localName.value;
236
+ let builtinImport;
213
237
  if (entry.importName.kind === 'NamespaceObject') {
214
- const localName = entry.localName.value;
215
238
  if (isChildProcessImport)
216
239
  (childProcessNamespaces ??= new Set()).add(localName);
217
- addImport(specifier, IMPORT_STAR, localName, undefined, entry.localName.start, modifiers, pos, jsdocTags, resolved);
240
+ builtinImport = addImport(specifier, IMPORT_STAR, localName, undefined, entry.localName.start, modifiers, pos, jsdocTags, resolved);
218
241
  if (internalPath)
219
242
  localImportMap.set(localName, { importedName: IMPORT_STAR, filePath: internalPath, isNamespace: true });
220
243
  }
221
244
  else if (entry.importName.kind === 'Default') {
222
- const localName = entry.localName.value;
223
245
  if (isChildProcessImport)
224
246
  (childProcessNamespaces ??= new Set()).add(localName);
225
247
  const alias = localName !== 'default' ? localName : undefined;
226
- addImport(specifier, 'default', alias, undefined, entry.localName.start, modifiers, pos, jsdocTags, resolved);
248
+ builtinImport = addImport(specifier, 'default', alias, undefined, entry.localName.start, modifiers, pos, jsdocTags, resolved);
227
249
  if (internalPath)
228
250
  localImportMap.set(localName, { importedName: 'default', filePath: internalPath, isNamespace: false });
229
251
  }
230
252
  else {
231
253
  const importedName = entry.importName.name;
232
- const localName = entry.localName.value;
233
254
  const alias = localName !== importedName ? localName : undefined;
234
255
  if (isChildProcessImport)
235
256
  (childProcessMethods ??= new Map()).set(localName, importedName);
@@ -239,10 +260,12 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
239
260
  else if (importedName === 'resolve')
240
261
  hasPathResolveImport = true;
241
262
  }
242
- addImport(specifier, importedName, alias, undefined, entry.localName.start, modifiers, pos, jsdocTags, resolved);
263
+ builtinImport = addImport(specifier, importedName, alias, undefined, entry.localName.start, modifiers, pos, jsdocTags, resolved);
243
264
  if (internalPath)
244
265
  localImportMap.set(localName, { importedName, filePath: internalPath, isNamespace: false });
245
266
  }
267
+ if (builtinImport)
268
+ (builtinImports ??= new Map()).set(localName, builtinImport);
246
269
  }
247
270
  }
248
271
  for (const se of result.module.staticExports) {
@@ -267,9 +290,11 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
267
290
  }
268
291
  else if (entry.importName.kind === 'Name') {
269
292
  const importedName = entry.importName.name;
293
+ const builtinImport = builtinImports?.get(importedName);
294
+ const sourceName = builtinImport && builtinImport.pos === entry.importName.start ? builtinImport.identifier : importedName;
270
295
  const exportedName = entry.exportName.name;
271
- const alias = exportedName && exportedName !== importedName ? exportedName : undefined;
272
- addImport(specifier, importedName, alias, undefined, entry.start, modifiers, pos, undefined, reExportResolved);
296
+ const alias = exportedName && exportedName !== sourceName ? exportedName : undefined;
297
+ addImport(specifier, sourceName, alias, undefined, entry.start, modifiers, pos, undefined, reExportResolved);
273
298
  }
274
299
  continue;
275
300
  }
@@ -323,6 +348,15 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
323
348
  const firstStmtStart = result.program.body[0]?.start ?? Number.POSITIVE_INFINITY;
324
349
  extractImportsFromComments(result.comments, firstStmtStart, addImport);
325
350
  for (const [id, item] of exports) {
351
+ const builtinImport = specifierExportNames.has(id) ? builtinImports?.get(item.binding) : undefined;
352
+ if (builtinImport) {
353
+ item.isReExport = true;
354
+ item.isBindingReExport = true;
355
+ if (builtinImport.identifier === IMPORT_STAR) {
356
+ const isTypeOnly = builtinImport.isTypeOnly || item.type === 'type';
357
+ addImport(builtinImport.specifier, IMPORT_STAR, id, undefined, item.pos, IMPORT_FLAGS.RE_EXPORT | (isTypeOnly ? IMPORT_FLAGS.TYPE_ONLY : IMPORT_FLAGS.NONE));
358
+ }
359
+ }
326
360
  item.referencedIn = referencedInExport.get(id);
327
361
  if (localRefs && shouldCountRefs(ignoreExportsUsedInFile, item.type) && localRefs.has(id)) {
328
362
  item.hasRefsInFile = true;
@@ -1,11 +1,11 @@
1
- import { existsSync, realpathSync } from 'node:fs';
1
+ import { existsSync } from 'node:fs';
2
2
  import { isBuiltin } from 'node:module';
3
3
  import { DEFAULT_EXTENSIONS, DTS_EXTENSIONS, IS_DTS } from '../constants.js';
4
4
  import { isFile } from '../util/fs.js';
5
5
  import { getPackageNameFromFilePath, getPackageNameFromModuleSpecifier, sanitizeSpecifier } from '../util/modules.js';
6
6
  import { timerify } from '../util/Performance.js';
7
7
  import { dirname, extname, isAbsolute, isInNodeModules, join, toPosix } from '../util/path.js';
8
- import { _createSyncModuleResolver, _resolveModuleSync } from '../util/resolve.js';
8
+ import { _createSyncModuleResolver, _resolveModuleSync, resolvePackageManifestPath } from '../util/resolve.js';
9
9
  function pickStringTarget(value) {
10
10
  if (typeof value === 'string')
11
11
  return value;
@@ -64,40 +64,20 @@ function pickExistingPackageTarget(value, dir, patternMatch, moduleExtensions) {
64
64
  }
65
65
  }
66
66
  const moduleResolutionCaches = [];
67
- const installedPackageRootCache = new Map();
68
67
  export function clearModuleResolutionCaches() {
69
68
  for (const cache of moduleResolutionCaches)
70
69
  cache.clear();
71
- installedPackageRootCache.clear();
72
- }
73
- function getInstalledPackageRoot(candidate) {
74
- if (installedPackageRootCache.has(candidate))
75
- return installedPackageRootCache.get(candidate);
76
- let packageRoot;
77
- try {
78
- packageRoot = toPosix(realpathSync(candidate));
79
- }
80
- catch { }
81
- installedPackageRootCache.set(candidate, packageRoot);
82
- return packageRoot;
83
70
  }
84
71
  function getAttributedPackageName(specifier, containingFile, resolvedFileName) {
85
72
  const packageName = getPackageNameFromFilePath(resolvedFileName);
86
73
  const specifierPackageName = getPackageNameFromModuleSpecifier(specifier);
87
74
  if (!specifierPackageName || specifierPackageName === packageName)
88
75
  return packageName;
89
- let dir = dirname(containingFile);
90
- while (true) {
91
- const packageRoot = getInstalledPackageRoot(join(dir, 'node_modules', specifierPackageName));
92
- if (packageRoot) {
93
- const isResolvedInstall = resolvedFileName === packageRoot || resolvedFileName.startsWith(`${packageRoot}/`);
94
- return isResolvedInstall ? specifierPackageName : packageName;
95
- }
96
- const parent = dirname(dir);
97
- if (parent === dir)
98
- return packageName;
99
- dir = parent;
100
- }
76
+ const manifestPath = resolvePackageManifestPath(specifierPackageName, dirname(containingFile));
77
+ if (!manifestPath)
78
+ return packageName;
79
+ const packageRoot = dirname(manifestPath);
80
+ return resolvedFileName.startsWith(`${packageRoot}/`) ? specifierPackageName : packageName;
101
81
  }
102
82
  function compilePathMappings(scopedPaths) {
103
83
  if (!scopedPaths)
@@ -30,7 +30,7 @@ export function handleExportNamed(node, s) {
30
30
  : undefined;
31
31
  const specTags = s.getJSDocTags(spec.start);
32
32
  const tags = specTags.size ? new Set([...declTags, ...specTags]) : declTags;
33
- s.addExport(exportedName, type, spec.exported?.start ?? spec.start, [], fix, true, tags);
33
+ s.addExport(exportedName, type, spec.exported?.start ?? spec.start, [], fix, true, tags, exportedName, true);
34
34
  }
35
35
  }
36
36
  return;
@@ -208,6 +208,7 @@ export function handleExportNamed(node, s) {
208
208
  : undefined;
209
209
  const _import = localName ? s.localImportMap.get(localName) : undefined;
210
210
  const isReExport = !!_import;
211
+ const isBindingReExport = !!_import && !_import.isDynamicImport;
211
212
  if (_import) {
212
213
  const internalImport = s.internal.get(_import.filePath);
213
214
  if (internalImport) {
@@ -222,7 +223,7 @@ export function handleExportNamed(node, s) {
222
223
  }
223
224
  }
224
225
  }
225
- s.addExport(exportedName, type, spec.exported?.start ?? spec.start, [], fix, isReExport, s.getJSDocTags(node.start));
226
+ s.addExport(exportedName, type, spec.exported?.start ?? spec.start, [], fix, isReExport, s.getJSDocTags(node.start), localName, isBindingReExport);
226
227
  if (exportedName)
227
228
  s.specifierExportNames.add(exportedName);
228
229
  if (localName && exportedName)
@@ -243,14 +244,17 @@ export function handleExportDefault(node, s) {
243
244
  let type = SYMBOL_TYPE.UNKNOWN;
244
245
  let pos = decl.start;
245
246
  let members = [];
246
- if (decl.type === 'FunctionDeclaration') {
247
+ let binding = 'default';
248
+ if (decl.type === 'FunctionDeclaration' || decl.type === 'TSDeclareFunction') {
247
249
  type = SYMBOL_TYPE.FUNCTION;
248
250
  pos = decl.id?.start ?? decl.start;
251
+ binding = decl.id?.name ?? binding;
249
252
  s.collectRefsInType(decl, 'default', hasExplicitFunctionReturnType(decl));
250
253
  }
251
254
  else if (decl.type === 'ClassDeclaration') {
252
255
  type = SYMBOL_TYPE.CLASS;
253
256
  pos = decl.id?.start ?? decl.start;
257
+ binding = decl.id?.name ?? binding;
254
258
  members = [];
255
259
  s.collectRefsInType(decl, 'default', true);
256
260
  if (decl.id)
@@ -259,6 +263,7 @@ export function handleExportDefault(node, s) {
259
263
  else if (decl.type === 'TSInterfaceDeclaration') {
260
264
  type = SYMBOL_TYPE.INTERFACE;
261
265
  pos = decl.id.start;
266
+ binding = decl.id.name;
262
267
  s.collectRefsInType(decl.body, 'default', false);
263
268
  }
264
269
  else if (decl.type === 'Identifier') {
@@ -294,7 +299,7 @@ export function handleExportDefault(node, s) {
294
299
  }
295
300
  }
296
301
  }
297
- s.addExport('default', type, pos, members, fix, false, s.getJSDocTags(node.start));
302
+ s.addExport('default', type, pos, members, fix, false, s.getJSDocTags(node.start), binding);
298
303
  }
299
304
  export function handleExportAssignment(node, s) {
300
305
  if (s.skipExports || s.isInNamespace(node))
@@ -84,7 +84,7 @@ export interface WalkState extends WalkContext {
84
84
  customElementRegistries: Set<string>;
85
85
  classNameStack: string[];
86
86
  staticBlockDepth: number;
87
- addExport: (identifier: string, type: SymbolType, pos: number, members: ExportMember[], fix: Fix, isReExport: boolean, jsDocTags: Set<string>) => void;
87
+ addExport: (identifier: string, type: SymbolType, pos: number, members: ExportMember[], fix: Fix, isReExport: boolean, jsDocTags: Set<string>, binding?: string, isBindingReExport?: boolean) => void;
88
88
  getFix: (start: number, end: number, flags?: number) => Fix;
89
89
  getTypeFix: (start: number, end: number) => Fix;
90
90
  collectRefsInType: (node: any, exportName: string, signatureOnly: boolean) => void;
@@ -12,7 +12,7 @@ import { handleJSXMemberExpression, handleMemberExpression } from './members.js'
12
12
  let state;
13
13
  const _getFix = (start, end, flags) => state.options.isFixExports ? [start, end, flags ?? FIX_FLAGS.NONE] : undefined;
14
14
  const _getTypeFix = (start, end) => state.options.isFixTypes ? [start, end, FIX_FLAGS.NONE] : undefined;
15
- const _addExport = (identifier, type, pos, members, fix, isReExport, jsDocTags) => {
15
+ const _addExport = (identifier, type, pos, members, fix, isReExport, jsDocTags, binding = identifier, isBindingReExport = false) => {
16
16
  const item = state.exports.get(identifier);
17
17
  if (item) {
18
18
  if (members.length)
@@ -30,11 +30,13 @@ const _addExport = (identifier, type, pos, members, fix, isReExport, jsDocTags)
30
30
  }
31
31
  }
32
32
  item.isReExport = isReExport;
33
+ item.isBindingReExport = isBindingReExport;
33
34
  }
34
35
  else {
35
36
  const { line, col } = getLineAndCol(state.lineStarts, pos);
36
37
  state.exports.set(identifier, {
37
38
  identifier,
39
+ binding,
38
40
  type,
39
41
  members,
40
42
  jsDocTags,
@@ -46,6 +48,7 @@ const _addExport = (identifier, type, pos, members, fix, isReExport, jsDocTags)
46
48
  referencedIn: undefined,
47
49
  fixes: fix ? [fix] : [],
48
50
  isReExport,
51
+ isBindingReExport,
49
52
  });
50
53
  }
51
54
  };
@@ -1,5 +1,5 @@
1
1
  type Collection<T> = Array<T> | Set<T>;
2
2
  export declare const compact: <T>(collection: Collection<T | undefined>) => T[];
3
- export declare const arrayify: (value?: string[] | string) => string[];
3
+ export declare const arrayify: (value: unknown) => string[];
4
4
  export declare const partition: <T>(collection: Collection<T>, predicate: (item: T) => unknown) => [T[], T[]];
5
5
  export {};
@@ -1,5 +1,9 @@
1
1
  export const compact = (collection) => Array.from(new Set(collection)).filter((value) => Boolean(value));
2
- export const arrayify = (value) => Array.isArray(value) ? value : typeof value === 'string' ? [value] : [];
2
+ export const arrayify = (value) => Array.isArray(value)
3
+ ? value.filter((item) => typeof item === 'string')
4
+ : typeof value === 'string'
5
+ ? [value]
6
+ : [];
3
7
  export const partition = (collection, predicate) => {
4
8
  const results = [[], []];
5
9
  for (const item of collection)
@@ -776,6 +776,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
776
776
  entry?: string | string[] | undefined;
777
777
  project?: string | string[] | undefined;
778
778
  } | undefined;
779
+ textlint?: string | boolean | string[] | {
780
+ config?: string | string[] | undefined;
781
+ entry?: string | string[] | undefined;
782
+ project?: string | string[] | undefined;
783
+ } | undefined;
779
784
  travis?: string | boolean | string[] | {
780
785
  config?: string | string[] | undefined;
781
786
  entry?: string | string[] | undefined;
@@ -856,6 +861,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
856
861
  entry?: string | string[] | undefined;
857
862
  project?: string | string[] | undefined;
858
863
  } | undefined;
864
+ varlock?: string | boolean | string[] | {
865
+ config?: string | string[] | undefined;
866
+ entry?: string | string[] | undefined;
867
+ project?: string | string[] | undefined;
868
+ } | undefined;
859
869
  vercel?: string | boolean | string[] | {
860
870
  config?: string | string[] | undefined;
861
871
  entry?: string | string[] | undefined;
@@ -1720,6 +1730,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1720
1730
  entry?: string | string[] | undefined;
1721
1731
  project?: string | string[] | undefined;
1722
1732
  } | undefined;
1733
+ textlint?: string | boolean | string[] | {
1734
+ config?: string | string[] | undefined;
1735
+ entry?: string | string[] | undefined;
1736
+ project?: string | string[] | undefined;
1737
+ } | undefined;
1723
1738
  travis?: string | boolean | string[] | {
1724
1739
  config?: string | string[] | undefined;
1725
1740
  entry?: string | string[] | undefined;
@@ -1800,6 +1815,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1800
1815
  entry?: string | string[] | undefined;
1801
1816
  project?: string | string[] | undefined;
1802
1817
  } | undefined;
1818
+ varlock?: string | boolean | string[] | {
1819
+ config?: string | string[] | undefined;
1820
+ entry?: string | string[] | undefined;
1821
+ project?: string | string[] | undefined;
1822
+ } | undefined;
1803
1823
  vercel?: string | boolean | string[] | {
1804
1824
  config?: string | string[] | undefined;
1805
1825
  entry?: string | string[] | undefined;
@@ -21,7 +21,7 @@ export class FileEntryCache {
21
21
  constructor(cacheId, _path) {
22
22
  this.filePath = path.resolve(_path, cacheId);
23
23
  if (isFile(this.filePath))
24
- this.cache = create(this.filePath);
24
+ this.cache = create(this.filePath) ?? this.cache;
25
25
  }
26
26
  getFileDescriptor(filePath) {
27
27
  if (!isAbsolute(filePath))
@@ -13,6 +13,7 @@ export type Gitignores = {
13
13
  ignores: Set<string>;
14
14
  unignores: Set<string>;
15
15
  };
16
+ export declare const isGitIgnored: (filePath: string) => boolean;
16
17
  export declare const getGitignoreFingerprint: () => string;
17
18
  export declare const findAndParseGitignores: (cwd: string, workspaceDirs?: Set<string>) => Promise<{
18
19
  gitignoreFiles: string[];
@@ -11,10 +11,12 @@ import { isDirectory, isFile } from './fs.js';
11
11
  import { getCachedGitignore, isGitignoreCacheEnabled, setCachedGitignore } from './gitignore-cache.js';
12
12
  import { timerify } from './Performance.js';
13
13
  import { expandIgnorePatterns, parseAndConvertGitignorePatterns } from './parse-and-convert-gitignores.js';
14
- import { dirname, isAbsolute, join, relative, toPosix } from './path.js';
14
+ import { dirname, isAbsolute, join, relative, toAbsolute, toPosix } from './path.js';
15
15
  const cachedGitIgnores = new Map();
16
16
  const cachedGlobIgnores = new Map();
17
17
  let gitignoreReconciler;
18
+ let gitignoreMatcher = (_filePath) => false;
19
+ export const isGitIgnored = (filePath) => gitignoreMatcher(filePath);
18
20
  let gitignoreFingerprint = '';
19
21
  export const getGitignoreFingerprint = () => gitignoreFingerprint;
20
22
  const hashIgnores = (ignores, unignores) => {
@@ -39,7 +41,7 @@ const getGitDir = (cwd) => {
39
41
  const content = readFileSync(dotGit, 'utf8').trim();
40
42
  const match = content.match(/^gitdir:\s*(.+)$/);
41
43
  if (match)
42
- return join(cwd, match[1]);
44
+ return toAbsolute(toPosix(match[1]), cwd);
43
45
  }
44
46
  return undefined;
45
47
  };
@@ -155,7 +157,11 @@ export const findAndParseGitignores = async (cwd, workspaceDirs) => {
155
157
  addFile(filePath);
156
158
  const gitDir = getGitDir(cwd);
157
159
  if (gitDir) {
158
- const excludePath = join(gitDir, 'info/exclude');
160
+ const commonDirPath = join(gitDir, 'commondir');
161
+ const commonDir = isFile(commonDirPath)
162
+ ? toAbsolute(toPosix(readFileSync(commonDirPath, 'utf8').trim()), gitDir)
163
+ : gitDir;
164
+ const excludePath = join(commonDir, 'info/exclude');
159
165
  if (isFile(excludePath))
160
166
  addFile(excludePath, cwd);
161
167
  }
@@ -296,6 +302,7 @@ export function reconcileGitignoredPaths(paths, cwd) {
296
302
  export async function getGitIgnoredHandler(options, workspaceDirs) {
297
303
  cachedGitIgnores.clear();
298
304
  gitignoreReconciler = undefined;
305
+ gitignoreMatcher = () => false;
299
306
  gitignoreFingerprint = '';
300
307
  if (options.gitignore === false)
301
308
  return () => false;
@@ -313,6 +320,7 @@ export async function getGitIgnoredHandler(options, workspaceDirs) {
313
320
  }
314
321
  return result;
315
322
  };
323
+ gitignoreMatcher = isGitIgnored;
316
324
  if (unignores.size > 0)
317
325
  gitignoreReconciler = isGitIgnored;
318
326
  return isGitIgnored;
@@ -312,6 +312,7 @@ export declare const getPublishedTypeManifest: (manifest: PackageJson) => {
312
312
  taskfile: unknown;
313
313
  tauri: unknown;
314
314
  temporal: unknown;
315
+ textlint: unknown;
315
316
  travis: unknown;
316
317
  "ts-node": unknown;
317
318
  tsd: unknown;
@@ -328,6 +329,7 @@ export declare const getPublishedTypeManifest: (manifest: PackageJson) => {
328
329
  "unplugin-vue-i18n": unknown;
329
330
  "unplugin-vue-markdown": unknown;
330
331
  "unplugin-vue-router": unknown;
332
+ varlock: unknown;
331
333
  vercel: unknown;
332
334
  "vercel-og": unknown;
333
335
  vike: unknown;
@@ -0,0 +1 @@
1
+ export declare const hasUrlScheme: (value: string) => boolean;
@@ -0,0 +1,2 @@
1
+ const urlSchemeMatcher = /^[a-z][a-z\d+.-]*:/i;
2
+ export const hasUrlScheme = (value) => urlSchemeMatcher.test(value);