diff --git a/.env.yarn b/.env.yarn index 74efe00..0c5a645 100644 --- a/.env.yarn +++ b/.env.yarn @@ -1,2 +1 @@ CONFIG_PREFER_PRETTIER=1 -NODE_OPTIONS="--no-warnings=ESLintRCWarning" diff --git a/.lintstagedrc.js b/.lintstagedrc.js index d996faf..5aff04d 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1 +1,7 @@ -export { default } from '@1stg/lint-staged/tsc' +import base from '@1stg/lint-staged/tsc' + +export default { + ...base, + 'tests/e2e/absoluteAlias/**/*.ts?(x)': () => + 'tsc -p tests/e2e/absoluteAlias --noEmit', +} diff --git a/.prettierignore b/.prettierignore index 70d01c6..9bfd86f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,5 @@ .yarn +/auto-imports.d.ts /pnpm-lock.yaml -/tests/pnp/.pnp.* -**/*.svg +.pnp.* +*.svg diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 07388b7..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "eslint.useFlatConfig": false -} diff --git a/auto-imports.d.ts b/auto-imports.d.ts new file mode 100644 index 0000000..a122e6a --- /dev/null +++ b/auto-imports.d.ts @@ -0,0 +1,22 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +// biome-ignore lint: disable +export {} +declare global { + const afterAll: typeof import('vitest')['afterAll'] + const afterEach: typeof import('vitest')['afterEach'] + const assert: typeof import('vitest')['assert'] + const beforeAll: typeof import('vitest')['beforeAll'] + const beforeEach: typeof import('vitest')['beforeEach'] + const chai: typeof import('vitest')['chai'] + const describe: typeof import('vitest')['describe'] + const expect: typeof import('vitest')['expect'] + const it: typeof import('vitest')['it'] + const suite: typeof import('vitest')['suite'] + const test: typeof import('vitest')['test'] + const vi: typeof import('vitest')['vi'] + const vitest: typeof import('vitest')['vitest'] +} diff --git a/eslint.config.js b/eslint.config.js index 6faeac9..e007fa0 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,6 @@ // @ts-check -import recommended from '@1stg/eslint-config' +import base from '@1stg/eslint-config' /** * @import {TSESLint} from '@typescript-eslint/utils' @@ -10,7 +10,7 @@ const config = [ { ignores: ['tests'], }, - ...recommended, + ...base, { files: ['dummy.js/*'], languageOptions: { diff --git a/package.json b/package.json index 1052a62..aca3903 100644 --- a/package.json +++ b/package.json @@ -54,30 +54,13 @@ "build": "run-p -c 'build:*'", "build:r": "r -f cjs", "build:ts": "tsc -b", - "eslint": "ESLINT_USE_FLAT_CONFIG=false eslint", "format": "prettier --write .", "lint": "run-p 'lint:*'", "lint:es": "eslint . --cache", "lint:tsc": "tsc -b --noEmit", - "prepare": "simple-git-hooks && yarn-berry-deduplicate && cd tests/nestedPackageJson && yarn || exit 0", + "prepare": "simple-git-hooks && yarn-berry-deduplicate || exit 0", "release": "clean-pkg-json && changeset publish", - "test": "run-p 'test:*'", - "test:absoluteAlias": "yarn eslint --ext ts,tsx tests/absoluteAlias", - "test:dotInclude": "yarn eslint --ext ts,tsx tests/dotInclude --ignore-pattern \"!.dot\"", - "test:dotPaths": "yarn eslint --ext ts,tsx tests/dotPaths --ignore-pattern \"!.dot\"", - "test:dotProject": "yarn eslint --ext ts,tsx tests/dotProject --ignore-pattern \"!.dot\"", - "test:importXResolverV3": "eslint --config=tests/importXResolverV3/eslint.config.cjs tests/importXResolverV3", - "test:multipleEslintrcs": "yarn eslint --ext ts,tsx tests/multipleEslintrcs", - "test:multipleTsconfigs": "yarn eslint --ext ts,tsx tests/multipleTsconfigs", - "test:nearestTsconfig": "yarn eslint --ext ts,tsx tests/nearestTsconfig", - "test:nestedPackageJson": "yarn eslint --ext ts,tsx tests/nestedPackageJson", - "test:unit": "vitest --run", - "test:withJsExtension": "node tests/withJsExtension/test.js && yarn eslint --ext ts,tsx tests/withJsExtension", - "test:withJsconfig": "yarn eslint --ext js tests/withJsconfig", - "test:withPaths": "yarn eslint --ext ts,tsx tests/withPaths", - "test:withPathsAndNestedBaseUrl": "yarn eslint --ext ts,tsx tests/withPathsAndNestedBaseUrl", - "test:withQuerystring": "yarn eslint --ext ts,tsx tests/withQuerystring", - "test:withoutPaths": "yarn eslint --ext ts,tsx tests/withoutPaths", + "test": "node tests/e2e/withJsExtension/test.cjs && vitest run", "typecov": "type-coverage" }, "peerDependencies": { @@ -107,6 +90,7 @@ "@changesets/cli": "^2.28.1", "@commitlint/cli": "^19.8.0", "@mozilla/glean": "^5.0.3", + "@pkgr/core": "^0.2.0", "@pkgr/rollup": "^6.0.1", "@total-typescript/ts-reset": "^0.6.1", "@types/debug": "^4.1.12", @@ -130,6 +114,7 @@ "tinyexec": "^1.0.1", "type-coverage": "^2.29.7", "typescript": "~5.8.2", + "unplugin-auto-import": "^19.1.2", "vitest": "^3.0.9", "yarn-berry-deduplicate": "^6.1.1" }, diff --git a/tests/e2e/__snapshots__/e2e.spec.ts.snap b/tests/e2e/__snapshots__/e2e.spec.ts.snap new file mode 100644 index 0000000..ba1d6f9 --- /dev/null +++ b/tests/e2e/__snapshots__/e2e.spec.ts.snap @@ -0,0 +1,121 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`e2e cases > should exec eslint successfully > absoluteAlias 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > dotInclude 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > dotPaths 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > dotProject 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > importXResolverV3 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > multipleEslintrcs 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > multipleTsconfigs 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > nearestTsconfig 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > nestedPackageJson 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > withJsExtension 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > withJsconfig 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > withPaths 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > withPathsAndNestedBaseUrl 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > withQuerystring 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; + +exports[`e2e cases > should exec eslint successfully > withoutPaths 1`] = ` +{ + "exitCode": 0, + "stderr": "", + "stdout": "", +} +`; diff --git a/tests/absoluteAlias/.eslintrc.cjs b/tests/e2e/absoluteAlias/.eslintrc.cjs similarity index 100% rename from tests/absoluteAlias/.eslintrc.cjs rename to tests/e2e/absoluteAlias/.eslintrc.cjs diff --git a/tests/absoluteAlias/public/images/foo.ts b/tests/e2e/absoluteAlias/public/images/foo.ts similarity index 100% rename from tests/absoluteAlias/public/images/foo.ts rename to tests/e2e/absoluteAlias/public/images/foo.ts diff --git a/tests/absoluteAlias/test.ts b/tests/e2e/absoluteAlias/test.ts similarity index 100% rename from tests/absoluteAlias/test.ts rename to tests/e2e/absoluteAlias/test.ts diff --git a/tests/absoluteAlias/tsconfig.json b/tests/e2e/absoluteAlias/tsconfig.json similarity index 66% rename from tests/absoluteAlias/tsconfig.json rename to tests/e2e/absoluteAlias/tsconfig.json index 130457a..280394f 100644 --- a/tests/absoluteAlias/tsconfig.json +++ b/tests/e2e/absoluteAlias/tsconfig.json @@ -1,4 +1,5 @@ { + "extends": "../../../tsconfig.base", "compilerOptions": { "paths": { "/*": ["./public/*"] diff --git a/tests/base.eslintrc.cjs b/tests/e2e/base.eslintrc.cjs similarity index 83% rename from tests/base.eslintrc.cjs rename to tests/e2e/base.eslintrc.cjs index 4b5bd21..882bed8 100644 --- a/tests/base.eslintrc.cjs +++ b/tests/e2e/base.eslintrc.cjs @@ -32,12 +32,19 @@ const base = project => ({ tsx: 'never', }, ], - 'node/no-extraneous-import': 0, - 'node/no-missing-import': 0, + 'import-x/order': [ + 2, + { + alphabetize: { + order: 'asc', + }, + 'newlines-between': 'always', + }, + ], }, overrides: [ { - files: '**/.*.cjs', + files: '**/*.{cjs,cts}', env: { node: true, }, diff --git a/tests/dotInclude/.dot/index.ts b/tests/e2e/dotInclude/.dot/index.ts similarity index 100% rename from tests/dotInclude/.dot/index.ts rename to tests/e2e/dotInclude/.dot/index.ts diff --git a/tests/dotInclude/.dot/module/module.d.ts b/tests/e2e/dotInclude/.dot/module/module.d.ts similarity index 100% rename from tests/dotInclude/.dot/module/module.d.ts rename to tests/e2e/dotInclude/.dot/module/module.d.ts diff --git a/tests/dotInclude/.dot/module/package.json b/tests/e2e/dotInclude/.dot/module/package.json similarity index 100% rename from tests/dotInclude/.dot/module/package.json rename to tests/e2e/dotInclude/.dot/module/package.json diff --git a/tests/dotInclude/.dot/subfolder/tsImportee.ts b/tests/e2e/dotInclude/.dot/subfolder/tsImportee.ts similarity index 100% rename from tests/dotInclude/.dot/subfolder/tsImportee.ts rename to tests/e2e/dotInclude/.dot/subfolder/tsImportee.ts diff --git a/tests/dotInclude/.dot/subfolder/tsxImportee.tsx b/tests/e2e/dotInclude/.dot/subfolder/tsxImportee.tsx similarity index 100% rename from tests/dotInclude/.dot/subfolder/tsxImportee.tsx rename to tests/e2e/dotInclude/.dot/subfolder/tsxImportee.tsx diff --git a/tests/dotInclude/.dot/tsImportee.ts b/tests/e2e/dotInclude/.dot/tsImportee.ts similarity index 100% rename from tests/dotInclude/.dot/tsImportee.ts rename to tests/e2e/dotInclude/.dot/tsImportee.ts diff --git a/tests/dotInclude/.dot/tsxImportee.tsx b/tests/e2e/dotInclude/.dot/tsxImportee.tsx similarity index 100% rename from tests/dotInclude/.dot/tsxImportee.tsx rename to tests/e2e/dotInclude/.dot/tsxImportee.tsx diff --git a/tests/dotInclude/.eslintrc.cjs b/tests/e2e/dotInclude/.eslintrc.cjs similarity index 100% rename from tests/dotInclude/.eslintrc.cjs rename to tests/e2e/dotInclude/.eslintrc.cjs diff --git a/tests/dotInclude/tsconfig.json b/tests/e2e/dotInclude/tsconfig.json similarity index 100% rename from tests/dotInclude/tsconfig.json rename to tests/e2e/dotInclude/tsconfig.json diff --git a/tests/dotPaths/.dot/module/module.d.ts b/tests/e2e/dotPaths/.dot/module/module.d.ts similarity index 100% rename from tests/dotPaths/.dot/module/module.d.ts rename to tests/e2e/dotPaths/.dot/module/module.d.ts diff --git a/tests/dotPaths/.dot/module/package.json b/tests/e2e/dotPaths/.dot/module/package.json similarity index 100% rename from tests/dotPaths/.dot/module/package.json rename to tests/e2e/dotPaths/.dot/module/package.json diff --git a/tests/dotPaths/.dot/subfolder/tsImportee.ts b/tests/e2e/dotPaths/.dot/subfolder/tsImportee.ts similarity index 100% rename from tests/dotPaths/.dot/subfolder/tsImportee.ts rename to tests/e2e/dotPaths/.dot/subfolder/tsImportee.ts diff --git a/tests/dotPaths/.dot/subfolder/tsxImportee.tsx b/tests/e2e/dotPaths/.dot/subfolder/tsxImportee.tsx similarity index 100% rename from tests/dotPaths/.dot/subfolder/tsxImportee.tsx rename to tests/e2e/dotPaths/.dot/subfolder/tsxImportee.tsx diff --git a/tests/dotPaths/.dot/tsImportee.ts b/tests/e2e/dotPaths/.dot/tsImportee.ts similarity index 100% rename from tests/dotPaths/.dot/tsImportee.ts rename to tests/e2e/dotPaths/.dot/tsImportee.ts diff --git a/tests/dotPaths/.dot/tsxImportee.tsx b/tests/e2e/dotPaths/.dot/tsxImportee.tsx similarity index 100% rename from tests/dotPaths/.dot/tsxImportee.tsx rename to tests/e2e/dotPaths/.dot/tsxImportee.tsx diff --git a/tests/dotPaths/.eslintrc.cjs b/tests/e2e/dotPaths/.eslintrc.cjs similarity index 100% rename from tests/dotPaths/.eslintrc.cjs rename to tests/e2e/dotPaths/.eslintrc.cjs diff --git a/tests/dotPaths/index.ts b/tests/e2e/dotPaths/index.ts similarity index 100% rename from tests/dotPaths/index.ts rename to tests/e2e/dotPaths/index.ts diff --git a/tests/dotPaths/tsconfig.json b/tests/e2e/dotPaths/tsconfig.json similarity index 100% rename from tests/dotPaths/tsconfig.json rename to tests/e2e/dotPaths/tsconfig.json diff --git a/tests/dotProject/.eslintrc.cjs b/tests/e2e/dotProject/.eslintrc.cjs similarity index 100% rename from tests/dotProject/.eslintrc.cjs rename to tests/e2e/dotProject/.eslintrc.cjs diff --git a/tests/dotProject/packages/module-a/.dot/tsconfig.json b/tests/e2e/dotProject/packages/module-a/.dot/tsconfig.json similarity index 100% rename from tests/dotProject/packages/module-a/.dot/tsconfig.json rename to tests/e2e/dotProject/packages/module-a/.dot/tsconfig.json diff --git a/tests/dotProject/packages/module-a/index.ts b/tests/e2e/dotProject/packages/module-a/index.ts similarity index 100% rename from tests/dotProject/packages/module-a/index.ts rename to tests/e2e/dotProject/packages/module-a/index.ts diff --git a/tests/dotProject/packages/module-a/subfolder/tsImportee.ts b/tests/e2e/dotProject/packages/module-a/subfolder/tsImportee.ts similarity index 100% rename from tests/dotProject/packages/module-a/subfolder/tsImportee.ts rename to tests/e2e/dotProject/packages/module-a/subfolder/tsImportee.ts diff --git a/tests/dotProject/packages/module-a/subfolder/tsxImportee.tsx b/tests/e2e/dotProject/packages/module-a/subfolder/tsxImportee.tsx similarity index 100% rename from tests/dotProject/packages/module-a/subfolder/tsxImportee.tsx rename to tests/e2e/dotProject/packages/module-a/subfolder/tsxImportee.tsx diff --git a/tests/dotProject/packages/module-a/tsImportee.ts b/tests/e2e/dotProject/packages/module-a/tsImportee.ts similarity index 100% rename from tests/dotProject/packages/module-a/tsImportee.ts rename to tests/e2e/dotProject/packages/module-a/tsImportee.ts diff --git a/tests/dotProject/packages/module-a/tsxImportee.tsx b/tests/e2e/dotProject/packages/module-a/tsxImportee.tsx similarity index 100% rename from tests/dotProject/packages/module-a/tsxImportee.tsx rename to tests/e2e/dotProject/packages/module-a/tsxImportee.tsx diff --git a/tests/dotProject/packages/module-b/.dot/tsconfig.json b/tests/e2e/dotProject/packages/module-b/.dot/tsconfig.json similarity index 100% rename from tests/dotProject/packages/module-b/.dot/tsconfig.json rename to tests/e2e/dotProject/packages/module-b/.dot/tsconfig.json diff --git a/tests/dotProject/packages/module-b/index.ts b/tests/e2e/dotProject/packages/module-b/index.ts similarity index 100% rename from tests/dotProject/packages/module-b/index.ts rename to tests/e2e/dotProject/packages/module-b/index.ts diff --git a/tests/dotProject/packages/module-b/subfolder/tsImportee.ts b/tests/e2e/dotProject/packages/module-b/subfolder/tsImportee.ts similarity index 100% rename from tests/dotProject/packages/module-b/subfolder/tsImportee.ts rename to tests/e2e/dotProject/packages/module-b/subfolder/tsImportee.ts diff --git a/tests/dotProject/packages/module-b/subfolder/tsxImportee.tsx b/tests/e2e/dotProject/packages/module-b/subfolder/tsxImportee.tsx similarity index 100% rename from tests/dotProject/packages/module-b/subfolder/tsxImportee.tsx rename to tests/e2e/dotProject/packages/module-b/subfolder/tsxImportee.tsx diff --git a/tests/dotProject/packages/module-b/tsImportee.ts b/tests/e2e/dotProject/packages/module-b/tsImportee.ts similarity index 100% rename from tests/dotProject/packages/module-b/tsImportee.ts rename to tests/e2e/dotProject/packages/module-b/tsImportee.ts diff --git a/tests/dotProject/packages/module-b/tsxImportee.tsx b/tests/e2e/dotProject/packages/module-b/tsxImportee.tsx similarity index 100% rename from tests/dotProject/packages/module-b/tsxImportee.tsx rename to tests/e2e/dotProject/packages/module-b/tsxImportee.tsx diff --git a/tests/e2e/e2e.spec.ts b/tests/e2e/e2e.spec.ts new file mode 100644 index 0000000..680a693 --- /dev/null +++ b/tests/e2e/e2e.spec.ts @@ -0,0 +1,56 @@ +import fs from 'node:fs/promises' +import path from 'node:path' + +import { tryFile } from '@pkgr/core' +import { exec } from 'tinyexec' + +describe('e2e cases', async () => { + const { dirname } = import.meta + + const dirents = await fs.readdir(dirname, { withFileTypes: true }) + + for (const dirent of dirents) { + const dirName = dirent.name + + if (!dirent.isDirectory() || dirName === '__snapshots__') { + continue + } + + const absoluteDir = path.resolve(dirname, dirName) + + if (tryFile('yarn.lock', false, absoluteDir)) { + await exec('yarn', ['--immutable'], { + nodeOptions: { + cwd: absoluteDir, + }, + }) + } + + it('should exec eslint successfully', async () => { + const eslintConfig = tryFile('eslint.config.js', false, absoluteDir) + expect( + await exec( + 'yarn', + [ + 'eslint', + ...(eslintConfig + ? ['-c', eslintConfig] + : ['--ignore-pattern', '!.dot']), + '--ext', + 'cjs,cts,js,jsx,mjs,mts,ts,tsx', + '--report-unused-disable-directives', + absoluteDir, + ], + { + nodeOptions: { + env: { + ESLINT_USE_FLAT_CONFIG: eslintConfig ? undefined : 'false', + NODE_OPTIONS: '--no-warnings=ESLintRCWarning', + }, + }, + }, + ), + ).toMatchSnapshot(dirName) + }) + } +}) diff --git a/tests/e2e/importXResolverV3/eslint.config.js b/tests/e2e/importXResolverV3/eslint.config.js new file mode 100644 index 0000000..08dd04f --- /dev/null +++ b/tests/e2e/importXResolverV3/eslint.config.js @@ -0,0 +1,35 @@ +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' +import importX, { flatConfigs } from 'eslint-plugin-import-x' + +import base from '../base.eslintrc.cjs' + +const globPattern = './packages/*/tsconfig.json' + +// in normal cases this is not needed because the `dirname` would be the root +const absoluteGlobPath = path.resolve( + fileURLToPath(import.meta.url), + '..', + globPattern, +) + +export default +process.versions.node.split('.')[0] <= 16 + ? {} + : { + files: ['**/*.ts', '**/*.tsx'], + plugins: { + 'import-x': importX, + }, + settings: { + ...flatConfigs.typescript.settings, + 'import-x/resolver-next': [ + createTypeScriptImportResolver({ + project: absoluteGlobPath, + noWarnOnMultipleProjects: true, + }), + ], + }, + rules: base().rules, + } diff --git a/tests/importXResolverV3/packages/module-a/index.ts b/tests/e2e/importXResolverV3/packages/module-a/index.ts similarity index 100% rename from tests/importXResolverV3/packages/module-a/index.ts rename to tests/e2e/importXResolverV3/packages/module-a/index.ts diff --git a/tests/importXResolverV3/packages/module-a/subfolder/tsImportee.ts b/tests/e2e/importXResolverV3/packages/module-a/subfolder/tsImportee.ts similarity index 100% rename from tests/importXResolverV3/packages/module-a/subfolder/tsImportee.ts rename to tests/e2e/importXResolverV3/packages/module-a/subfolder/tsImportee.ts diff --git a/tests/importXResolverV3/packages/module-a/subfolder/tsxImportee.tsx b/tests/e2e/importXResolverV3/packages/module-a/subfolder/tsxImportee.tsx similarity index 100% rename from tests/importXResolverV3/packages/module-a/subfolder/tsxImportee.tsx rename to tests/e2e/importXResolverV3/packages/module-a/subfolder/tsxImportee.tsx diff --git a/tests/importXResolverV3/packages/module-a/tsImportee.ts b/tests/e2e/importXResolverV3/packages/module-a/tsImportee.ts similarity index 100% rename from tests/importXResolverV3/packages/module-a/tsImportee.ts rename to tests/e2e/importXResolverV3/packages/module-a/tsImportee.ts diff --git a/tests/importXResolverV3/packages/module-a/tsconfig.json b/tests/e2e/importXResolverV3/packages/module-a/tsconfig.json similarity index 100% rename from tests/importXResolverV3/packages/module-a/tsconfig.json rename to tests/e2e/importXResolverV3/packages/module-a/tsconfig.json diff --git a/tests/importXResolverV3/packages/module-a/tsxImportee.tsx b/tests/e2e/importXResolverV3/packages/module-a/tsxImportee.tsx similarity index 100% rename from tests/importXResolverV3/packages/module-a/tsxImportee.tsx rename to tests/e2e/importXResolverV3/packages/module-a/tsxImportee.tsx diff --git a/tests/importXResolverV3/packages/module-b/index.ts b/tests/e2e/importXResolverV3/packages/module-b/index.ts similarity index 100% rename from tests/importXResolverV3/packages/module-b/index.ts rename to tests/e2e/importXResolverV3/packages/module-b/index.ts diff --git a/tests/importXResolverV3/packages/module-b/subfolder/tsImportee.ts b/tests/e2e/importXResolverV3/packages/module-b/subfolder/tsImportee.ts similarity index 100% rename from tests/importXResolverV3/packages/module-b/subfolder/tsImportee.ts rename to tests/e2e/importXResolverV3/packages/module-b/subfolder/tsImportee.ts diff --git a/tests/importXResolverV3/packages/module-b/subfolder/tsxImportee.tsx b/tests/e2e/importXResolverV3/packages/module-b/subfolder/tsxImportee.tsx similarity index 100% rename from tests/importXResolverV3/packages/module-b/subfolder/tsxImportee.tsx rename to tests/e2e/importXResolverV3/packages/module-b/subfolder/tsxImportee.tsx diff --git a/tests/importXResolverV3/packages/module-b/tsImportee.ts b/tests/e2e/importXResolverV3/packages/module-b/tsImportee.ts similarity index 100% rename from tests/importXResolverV3/packages/module-b/tsImportee.ts rename to tests/e2e/importXResolverV3/packages/module-b/tsImportee.ts diff --git a/tests/importXResolverV3/packages/module-b/tsconfig.json b/tests/e2e/importXResolverV3/packages/module-b/tsconfig.json similarity index 100% rename from tests/importXResolverV3/packages/module-b/tsconfig.json rename to tests/e2e/importXResolverV3/packages/module-b/tsconfig.json diff --git a/tests/importXResolverV3/packages/module-b/tsxImportee.tsx b/tests/e2e/importXResolverV3/packages/module-b/tsxImportee.tsx similarity index 100% rename from tests/importXResolverV3/packages/module-b/tsxImportee.tsx rename to tests/e2e/importXResolverV3/packages/module-b/tsxImportee.tsx diff --git a/tests/multipleEslintrcs/module-a/.eslintrc.cjs b/tests/e2e/multipleEslintrcs/module-a/.eslintrc.cjs similarity index 100% rename from tests/multipleEslintrcs/module-a/.eslintrc.cjs rename to tests/e2e/multipleEslintrcs/module-a/.eslintrc.cjs diff --git a/tests/multipleEslintrcs/module-a/index.ts b/tests/e2e/multipleEslintrcs/module-a/index.ts similarity index 100% rename from tests/multipleEslintrcs/module-a/index.ts rename to tests/e2e/multipleEslintrcs/module-a/index.ts diff --git a/tests/multipleEslintrcs/module-a/subfolder/tsImportee.ts b/tests/e2e/multipleEslintrcs/module-a/subfolder/tsImportee.ts similarity index 100% rename from tests/multipleEslintrcs/module-a/subfolder/tsImportee.ts rename to tests/e2e/multipleEslintrcs/module-a/subfolder/tsImportee.ts diff --git a/tests/multipleEslintrcs/module-a/subfolder/tsxImportee.tsx b/tests/e2e/multipleEslintrcs/module-a/subfolder/tsxImportee.tsx similarity index 100% rename from tests/multipleEslintrcs/module-a/subfolder/tsxImportee.tsx rename to tests/e2e/multipleEslintrcs/module-a/subfolder/tsxImportee.tsx diff --git a/tests/multipleEslintrcs/module-a/tsImportee.ts b/tests/e2e/multipleEslintrcs/module-a/tsImportee.ts similarity index 100% rename from tests/multipleEslintrcs/module-a/tsImportee.ts rename to tests/e2e/multipleEslintrcs/module-a/tsImportee.ts diff --git a/tests/multipleEslintrcs/module-a/tsconfig.json b/tests/e2e/multipleEslintrcs/module-a/tsconfig.json similarity index 100% rename from tests/multipleEslintrcs/module-a/tsconfig.json rename to tests/e2e/multipleEslintrcs/module-a/tsconfig.json diff --git a/tests/multipleEslintrcs/module-a/tsxImportee.tsx b/tests/e2e/multipleEslintrcs/module-a/tsxImportee.tsx similarity index 100% rename from tests/multipleEslintrcs/module-a/tsxImportee.tsx rename to tests/e2e/multipleEslintrcs/module-a/tsxImportee.tsx diff --git a/tests/multipleEslintrcs/module-b/.eslintrc.cjs b/tests/e2e/multipleEslintrcs/module-b/.eslintrc.cjs similarity index 100% rename from tests/multipleEslintrcs/module-b/.eslintrc.cjs rename to tests/e2e/multipleEslintrcs/module-b/.eslintrc.cjs diff --git a/tests/multipleEslintrcs/module-b/index.ts b/tests/e2e/multipleEslintrcs/module-b/index.ts similarity index 100% rename from tests/multipleEslintrcs/module-b/index.ts rename to tests/e2e/multipleEslintrcs/module-b/index.ts diff --git a/tests/multipleEslintrcs/module-b/subfolder/tsImportee.ts b/tests/e2e/multipleEslintrcs/module-b/subfolder/tsImportee.ts similarity index 100% rename from tests/multipleEslintrcs/module-b/subfolder/tsImportee.ts rename to tests/e2e/multipleEslintrcs/module-b/subfolder/tsImportee.ts diff --git a/tests/multipleEslintrcs/module-b/subfolder/tsxImportee.tsx b/tests/e2e/multipleEslintrcs/module-b/subfolder/tsxImportee.tsx similarity index 100% rename from tests/multipleEslintrcs/module-b/subfolder/tsxImportee.tsx rename to tests/e2e/multipleEslintrcs/module-b/subfolder/tsxImportee.tsx diff --git a/tests/multipleEslintrcs/module-b/tsImportee.ts b/tests/e2e/multipleEslintrcs/module-b/tsImportee.ts similarity index 100% rename from tests/multipleEslintrcs/module-b/tsImportee.ts rename to tests/e2e/multipleEslintrcs/module-b/tsImportee.ts diff --git a/tests/multipleEslintrcs/module-b/tsconfig.json b/tests/e2e/multipleEslintrcs/module-b/tsconfig.json similarity index 100% rename from tests/multipleEslintrcs/module-b/tsconfig.json rename to tests/e2e/multipleEslintrcs/module-b/tsconfig.json diff --git a/tests/multipleEslintrcs/module-b/tsxImportee.tsx b/tests/e2e/multipleEslintrcs/module-b/tsxImportee.tsx similarity index 100% rename from tests/multipleEslintrcs/module-b/tsxImportee.tsx rename to tests/e2e/multipleEslintrcs/module-b/tsxImportee.tsx diff --git a/tests/multipleTsconfigs/.eslintrc.cjs b/tests/e2e/multipleTsconfigs/.eslintrc.cjs similarity index 100% rename from tests/multipleTsconfigs/.eslintrc.cjs rename to tests/e2e/multipleTsconfigs/.eslintrc.cjs diff --git a/tests/multipleTsconfigs/packages/module-a/index.ts b/tests/e2e/multipleTsconfigs/packages/module-a/index.ts similarity index 100% rename from tests/multipleTsconfigs/packages/module-a/index.ts rename to tests/e2e/multipleTsconfigs/packages/module-a/index.ts diff --git a/tests/multipleTsconfigs/packages/module-a/subfolder/tsImportee.ts b/tests/e2e/multipleTsconfigs/packages/module-a/subfolder/tsImportee.ts similarity index 100% rename from tests/multipleTsconfigs/packages/module-a/subfolder/tsImportee.ts rename to tests/e2e/multipleTsconfigs/packages/module-a/subfolder/tsImportee.ts diff --git a/tests/multipleTsconfigs/packages/module-a/subfolder/tsxImportee.tsx b/tests/e2e/multipleTsconfigs/packages/module-a/subfolder/tsxImportee.tsx similarity index 100% rename from tests/multipleTsconfigs/packages/module-a/subfolder/tsxImportee.tsx rename to tests/e2e/multipleTsconfigs/packages/module-a/subfolder/tsxImportee.tsx diff --git a/tests/multipleTsconfigs/packages/module-a/tsImportee.ts b/tests/e2e/multipleTsconfigs/packages/module-a/tsImportee.ts similarity index 100% rename from tests/multipleTsconfigs/packages/module-a/tsImportee.ts rename to tests/e2e/multipleTsconfigs/packages/module-a/tsImportee.ts diff --git a/tests/multipleTsconfigs/packages/module-a/tsconfig.json b/tests/e2e/multipleTsconfigs/packages/module-a/tsconfig.json similarity index 100% rename from tests/multipleTsconfigs/packages/module-a/tsconfig.json rename to tests/e2e/multipleTsconfigs/packages/module-a/tsconfig.json diff --git a/tests/multipleTsconfigs/packages/module-a/tsxImportee.tsx b/tests/e2e/multipleTsconfigs/packages/module-a/tsxImportee.tsx similarity index 100% rename from tests/multipleTsconfigs/packages/module-a/tsxImportee.tsx rename to tests/e2e/multipleTsconfigs/packages/module-a/tsxImportee.tsx diff --git a/tests/multipleTsconfigs/packages/module-b/index.ts b/tests/e2e/multipleTsconfigs/packages/module-b/index.ts similarity index 100% rename from tests/multipleTsconfigs/packages/module-b/index.ts rename to tests/e2e/multipleTsconfigs/packages/module-b/index.ts diff --git a/tests/multipleTsconfigs/packages/module-b/subfolder/tsImportee.ts b/tests/e2e/multipleTsconfigs/packages/module-b/subfolder/tsImportee.ts similarity index 100% rename from tests/multipleTsconfigs/packages/module-b/subfolder/tsImportee.ts rename to tests/e2e/multipleTsconfigs/packages/module-b/subfolder/tsImportee.ts diff --git a/tests/multipleTsconfigs/packages/module-b/subfolder/tsxImportee.tsx b/tests/e2e/multipleTsconfigs/packages/module-b/subfolder/tsxImportee.tsx similarity index 100% rename from tests/multipleTsconfigs/packages/module-b/subfolder/tsxImportee.tsx rename to tests/e2e/multipleTsconfigs/packages/module-b/subfolder/tsxImportee.tsx diff --git a/tests/multipleTsconfigs/packages/module-b/tsImportee.ts b/tests/e2e/multipleTsconfigs/packages/module-b/tsImportee.ts similarity index 100% rename from tests/multipleTsconfigs/packages/module-b/tsImportee.ts rename to tests/e2e/multipleTsconfigs/packages/module-b/tsImportee.ts diff --git a/tests/multipleTsconfigs/packages/module-b/tsconfig.json b/tests/e2e/multipleTsconfigs/packages/module-b/tsconfig.json similarity index 100% rename from tests/multipleTsconfigs/packages/module-b/tsconfig.json rename to tests/e2e/multipleTsconfigs/packages/module-b/tsconfig.json diff --git a/tests/multipleTsconfigs/packages/module-b/tsxImportee.tsx b/tests/e2e/multipleTsconfigs/packages/module-b/tsxImportee.tsx similarity index 100% rename from tests/multipleTsconfigs/packages/module-b/tsxImportee.tsx rename to tests/e2e/multipleTsconfigs/packages/module-b/tsxImportee.tsx diff --git a/tests/nearestTsconfig/.eslintrc.cjs b/tests/e2e/nearestTsconfig/.eslintrc.cjs similarity index 100% rename from tests/nearestTsconfig/.eslintrc.cjs rename to tests/e2e/nearestTsconfig/.eslintrc.cjs diff --git a/tests/nearestTsconfig/a/app/app.ts b/tests/e2e/nearestTsconfig/a/app/app.ts similarity index 100% rename from tests/nearestTsconfig/a/app/app.ts rename to tests/e2e/nearestTsconfig/a/app/app.ts diff --git a/tests/nearestTsconfig/a/b/app/app.ts b/tests/e2e/nearestTsconfig/a/b/app/app.ts similarity index 100% rename from tests/nearestTsconfig/a/b/app/app.ts rename to tests/e2e/nearestTsconfig/a/b/app/app.ts diff --git a/tests/nearestTsconfig/a/b/c/app/app.ts b/tests/e2e/nearestTsconfig/a/b/c/app/app.ts similarity index 100% rename from tests/nearestTsconfig/a/b/c/app/app.ts rename to tests/e2e/nearestTsconfig/a/b/c/app/app.ts diff --git a/tests/nearestTsconfig/a/b/c/components/c.ts b/tests/e2e/nearestTsconfig/a/b/c/components/c.ts similarity index 100% rename from tests/nearestTsconfig/a/b/c/components/c.ts rename to tests/e2e/nearestTsconfig/a/b/c/components/c.ts diff --git a/tests/nearestTsconfig/a/b/c/tsconfig.json b/tests/e2e/nearestTsconfig/a/b/c/tsconfig.json similarity index 100% rename from tests/nearestTsconfig/a/b/c/tsconfig.json rename to tests/e2e/nearestTsconfig/a/b/c/tsconfig.json diff --git a/tests/nearestTsconfig/a/b/components/b.ts b/tests/e2e/nearestTsconfig/a/b/components/b.ts similarity index 100% rename from tests/nearestTsconfig/a/b/components/b.ts rename to tests/e2e/nearestTsconfig/a/b/components/b.ts diff --git a/tests/nearestTsconfig/a/b/tsconfig.json b/tests/e2e/nearestTsconfig/a/b/tsconfig.json similarity index 100% rename from tests/nearestTsconfig/a/b/tsconfig.json rename to tests/e2e/nearestTsconfig/a/b/tsconfig.json diff --git a/tests/nearestTsconfig/a/components/a.ts b/tests/e2e/nearestTsconfig/a/components/a.ts similarity index 100% rename from tests/nearestTsconfig/a/components/a.ts rename to tests/e2e/nearestTsconfig/a/components/a.ts diff --git a/tests/nearestTsconfig/a/tsconfig.json b/tests/e2e/nearestTsconfig/a/tsconfig.json similarity index 100% rename from tests/nearestTsconfig/a/tsconfig.json rename to tests/e2e/nearestTsconfig/a/tsconfig.json diff --git a/tests/nearestTsconfig/app/app.ts b/tests/e2e/nearestTsconfig/app/app.ts similarity index 100% rename from tests/nearestTsconfig/app/app.ts rename to tests/e2e/nearestTsconfig/app/app.ts diff --git a/tests/nearestTsconfig/components/root.ts b/tests/e2e/nearestTsconfig/components/root.ts similarity index 100% rename from tests/nearestTsconfig/components/root.ts rename to tests/e2e/nearestTsconfig/components/root.ts diff --git a/tests/nearestTsconfig/tsconfig.json b/tests/e2e/nearestTsconfig/tsconfig.json similarity index 100% rename from tests/nearestTsconfig/tsconfig.json rename to tests/e2e/nearestTsconfig/tsconfig.json diff --git a/tests/withPaths/.eslintrc.cjs b/tests/e2e/nestedPackageJson/.eslintrc.cjs similarity index 100% rename from tests/withPaths/.eslintrc.cjs rename to tests/e2e/nestedPackageJson/.eslintrc.cjs diff --git a/tests/nestedPackageJson/.gitignore b/tests/e2e/nestedPackageJson/.gitignore similarity index 100% rename from tests/nestedPackageJson/.gitignore rename to tests/e2e/nestedPackageJson/.gitignore diff --git a/tests/nestedPackageJson/package.json b/tests/e2e/nestedPackageJson/package.json similarity index 100% rename from tests/nestedPackageJson/package.json rename to tests/e2e/nestedPackageJson/package.json diff --git a/tests/nestedPackageJson/test.ts b/tests/e2e/nestedPackageJson/test.ts similarity index 100% rename from tests/nestedPackageJson/test.ts rename to tests/e2e/nestedPackageJson/test.ts diff --git a/tests/nestedPackageJson/tsconfig.json b/tests/e2e/nestedPackageJson/tsconfig.json similarity index 100% rename from tests/nestedPackageJson/tsconfig.json rename to tests/e2e/nestedPackageJson/tsconfig.json diff --git a/tests/nestedPackageJson/yarn.lock b/tests/e2e/nestedPackageJson/yarn.lock similarity index 100% rename from tests/nestedPackageJson/yarn.lock rename to tests/e2e/nestedPackageJson/yarn.lock diff --git a/tests/package.json b/tests/e2e/package.json similarity index 50% rename from tests/package.json rename to tests/e2e/package.json index 53820f7..094aa89 100644 --- a/tests/package.json +++ b/tests/e2e/package.json @@ -1,4 +1,4 @@ { - "type": "commonjs", + "type": "module", "private": true } diff --git a/tests/withJsExtension/.eslintrc.cjs b/tests/e2e/withJsExtension/.eslintrc.cjs similarity index 92% rename from tests/withJsExtension/.eslintrc.cjs rename to tests/e2e/withJsExtension/.eslintrc.cjs index 266e6da..8191fe8 100644 --- a/tests/withJsExtension/.eslintrc.cjs +++ b/tests/e2e/withJsExtension/.eslintrc.cjs @@ -1,4 +1,3 @@ -/* eslint-env node */ const config = require('../base.eslintrc.cjs')(__dirname) module.exports = { diff --git a/tests/withJsExtension/bar/index.tsx b/tests/e2e/withJsExtension/bar/index.tsx similarity index 100% rename from tests/withJsExtension/bar/index.tsx rename to tests/e2e/withJsExtension/bar/index.tsx diff --git a/tests/withJsExtension/cjsImportee.cjs b/tests/e2e/withJsExtension/cjsImportee.cjs similarity index 100% rename from tests/withJsExtension/cjsImportee.cjs rename to tests/e2e/withJsExtension/cjsImportee.cjs diff --git a/tests/withJsExtension/ctsImportee.cts b/tests/e2e/withJsExtension/ctsImportee.cts similarity index 100% rename from tests/withJsExtension/ctsImportee.cts rename to tests/e2e/withJsExtension/ctsImportee.cts diff --git a/tests/withJsExtension/d-ctsImportee.d.cts b/tests/e2e/withJsExtension/d-ctsImportee.d.cts similarity index 100% rename from tests/withJsExtension/d-ctsImportee.d.cts rename to tests/e2e/withJsExtension/d-ctsImportee.d.cts diff --git a/tests/withJsExtension/d-mtsImportee.d.mts b/tests/e2e/withJsExtension/d-mtsImportee.d.mts similarity index 100% rename from tests/withJsExtension/d-mtsImportee.d.mts rename to tests/e2e/withJsExtension/d-mtsImportee.d.mts diff --git a/tests/withJsExtension/dtsImportee.d.ts b/tests/e2e/withJsExtension/dtsImportee.d.ts similarity index 100% rename from tests/withJsExtension/dtsImportee.d.ts rename to tests/e2e/withJsExtension/dtsImportee.d.ts diff --git a/tests/withJsExtension/foo.cjs/index.ts b/tests/e2e/withJsExtension/foo.cjs/index.ts similarity index 100% rename from tests/withJsExtension/foo.cjs/index.ts rename to tests/e2e/withJsExtension/foo.cjs/index.ts diff --git a/tests/withJsExtension/foo.js/index.ts b/tests/e2e/withJsExtension/foo.js/index.ts similarity index 100% rename from tests/withJsExtension/foo.js/index.ts rename to tests/e2e/withJsExtension/foo.js/index.ts diff --git a/tests/withJsExtension/foo.jsx/index.ts b/tests/e2e/withJsExtension/foo.jsx/index.ts similarity index 100% rename from tests/withJsExtension/foo.jsx/index.ts rename to tests/e2e/withJsExtension/foo.jsx/index.ts diff --git a/tests/withJsExtension/foo.mjs/index.ts b/tests/e2e/withJsExtension/foo.mjs/index.ts similarity index 100% rename from tests/withJsExtension/foo.mjs/index.ts rename to tests/e2e/withJsExtension/foo.mjs/index.ts diff --git a/tests/withJsExtension/foo/index.ts b/tests/e2e/withJsExtension/foo/index.ts similarity index 100% rename from tests/withJsExtension/foo/index.ts rename to tests/e2e/withJsExtension/foo/index.ts diff --git a/tests/withJsExtension/index.ts b/tests/e2e/withJsExtension/index.ts similarity index 96% rename from tests/withJsExtension/index.ts rename to tests/e2e/withJsExtension/index.ts index 5406006..d4c450f 100644 --- a/tests/withJsExtension/index.ts +++ b/tests/e2e/withJsExtension/index.ts @@ -1,5 +1,6 @@ // import relative import './tsImportee.js' +import './tsxImportee.js' import './tsxImportee.jsx' import './dtsImportee.js' import './dtsImportee.jsx' diff --git a/tests/withJsExtension/jsImportee.js b/tests/e2e/withJsExtension/jsImportee.js similarity index 100% rename from tests/withJsExtension/jsImportee.js rename to tests/e2e/withJsExtension/jsImportee.js diff --git a/tests/withJsExtension/jsxImportee.jsx b/tests/e2e/withJsExtension/jsxImportee.jsx similarity index 100% rename from tests/withJsExtension/jsxImportee.jsx rename to tests/e2e/withJsExtension/jsxImportee.jsx diff --git a/tests/withJsExtension/mjsImportee.mjs b/tests/e2e/withJsExtension/mjsImportee.mjs similarity index 100% rename from tests/withJsExtension/mjsImportee.mjs rename to tests/e2e/withJsExtension/mjsImportee.mjs diff --git a/tests/withJsExtension/mtsImportee.mts b/tests/e2e/withJsExtension/mtsImportee.mts similarity index 100% rename from tests/withJsExtension/mtsImportee.mts rename to tests/e2e/withJsExtension/mtsImportee.mts diff --git a/tests/withJsExtension/test.js b/tests/e2e/withJsExtension/test.cjs similarity index 92% rename from tests/withJsExtension/test.js rename to tests/e2e/withJsExtension/test.cjs index fd76548..448ad68 100644 --- a/tests/withJsExtension/test.js +++ b/tests/e2e/withJsExtension/test.cjs @@ -1,10 +1,7 @@ -/* eslint-env node */ -/* eslint-disable @typescript-eslint/no-var-requires */ +const assert = require('node:assert') +const path = require('node:path') -const path = require('path') -const assert = require('assert') - -const { resolve } = require('../../') +const { resolve } = require('../../..') const config = { project: path.join(__dirname, 'tsconfig.json'), @@ -128,4 +125,4 @@ assertResolve( ) // resolves symlinks by default -assertResolve('dummy.js', '../../dummy.js/index.js') +assertResolve('dummy.js', '../../../dummy.js/index.js') diff --git a/tests/withJsExtension/tsImportee.ts b/tests/e2e/withJsExtension/tsImportee.ts similarity index 100% rename from tests/withJsExtension/tsImportee.ts rename to tests/e2e/withJsExtension/tsImportee.ts diff --git a/tests/withJsExtension/tsconfig.json b/tests/e2e/withJsExtension/tsconfig.json similarity index 100% rename from tests/withJsExtension/tsconfig.json rename to tests/e2e/withJsExtension/tsconfig.json diff --git a/tests/withJsExtension/tsxImportee.tsx b/tests/e2e/withJsExtension/tsxImportee.tsx similarity index 100% rename from tests/withJsExtension/tsxImportee.tsx rename to tests/e2e/withJsExtension/tsxImportee.tsx diff --git a/tests/withPathsAndNestedBaseUrl/.eslintrc.cjs b/tests/e2e/withJsconfig/.eslintrc.cjs similarity index 100% rename from tests/withPathsAndNestedBaseUrl/.eslintrc.cjs rename to tests/e2e/withJsconfig/.eslintrc.cjs diff --git a/tests/withJsconfig/importee.js b/tests/e2e/withJsconfig/importee.js similarity index 100% rename from tests/withJsconfig/importee.js rename to tests/e2e/withJsconfig/importee.js diff --git a/tests/withJsconfig/index.js b/tests/e2e/withJsconfig/index.js similarity index 100% rename from tests/withJsconfig/index.js rename to tests/e2e/withJsconfig/index.js diff --git a/tests/withJsconfig/jsconfig.json b/tests/e2e/withJsconfig/jsconfig.json similarity index 100% rename from tests/withJsconfig/jsconfig.json rename to tests/e2e/withJsconfig/jsconfig.json diff --git a/tests/withQuerystring/.eslintrc.cjs b/tests/e2e/withPaths/.eslintrc.cjs similarity index 100% rename from tests/withQuerystring/.eslintrc.cjs rename to tests/e2e/withPaths/.eslintrc.cjs diff --git a/tests/withPaths/index.ts b/tests/e2e/withPaths/index.ts similarity index 100% rename from tests/withPaths/index.ts rename to tests/e2e/withPaths/index.ts diff --git a/tests/withPaths/module/module.d.ts b/tests/e2e/withPaths/module/module.d.ts similarity index 100% rename from tests/withPaths/module/module.d.ts rename to tests/e2e/withPaths/module/module.d.ts diff --git a/tests/withPaths/module/package.json b/tests/e2e/withPaths/module/package.json similarity index 100% rename from tests/withPaths/module/package.json rename to tests/e2e/withPaths/module/package.json diff --git a/tests/withPaths/subfolder/tsImportee.ts b/tests/e2e/withPaths/subfolder/tsImportee.ts similarity index 100% rename from tests/withPaths/subfolder/tsImportee.ts rename to tests/e2e/withPaths/subfolder/tsImportee.ts diff --git a/tests/withPaths/subfolder/tsxImportee.tsx b/tests/e2e/withPaths/subfolder/tsxImportee.tsx similarity index 100% rename from tests/withPaths/subfolder/tsxImportee.tsx rename to tests/e2e/withPaths/subfolder/tsxImportee.tsx diff --git a/tests/withPaths/tsImportee.ts b/tests/e2e/withPaths/tsImportee.ts similarity index 100% rename from tests/withPaths/tsImportee.ts rename to tests/e2e/withPaths/tsImportee.ts diff --git a/tests/withPaths/tsconfig.json b/tests/e2e/withPaths/tsconfig.json similarity index 100% rename from tests/withPaths/tsconfig.json rename to tests/e2e/withPaths/tsconfig.json diff --git a/tests/withPaths/tsxImportee.tsx b/tests/e2e/withPaths/tsxImportee.tsx similarity index 100% rename from tests/withPaths/tsxImportee.tsx rename to tests/e2e/withPaths/tsxImportee.tsx diff --git a/tests/withoutPaths/.eslintrc.cjs b/tests/e2e/withPathsAndNestedBaseUrl/.eslintrc.cjs similarity index 100% rename from tests/withoutPaths/.eslintrc.cjs rename to tests/e2e/withPathsAndNestedBaseUrl/.eslintrc.cjs diff --git a/tests/withPathsAndNestedBaseUrl/other/bar.ts b/tests/e2e/withPathsAndNestedBaseUrl/other/bar.ts similarity index 100% rename from tests/withPathsAndNestedBaseUrl/other/bar.ts rename to tests/e2e/withPathsAndNestedBaseUrl/other/bar.ts diff --git a/tests/withPathsAndNestedBaseUrl/root/foo.ts b/tests/e2e/withPathsAndNestedBaseUrl/root/foo.ts similarity index 100% rename from tests/withPathsAndNestedBaseUrl/root/foo.ts rename to tests/e2e/withPathsAndNestedBaseUrl/root/foo.ts diff --git a/tests/withPathsAndNestedBaseUrl/tsconfig.json b/tests/e2e/withPathsAndNestedBaseUrl/tsconfig.json similarity index 100% rename from tests/withPathsAndNestedBaseUrl/tsconfig.json rename to tests/e2e/withPathsAndNestedBaseUrl/tsconfig.json diff --git a/tests/e2e/withQuerystring/.eslintrc.cjs b/tests/e2e/withQuerystring/.eslintrc.cjs new file mode 100644 index 0000000..3d3a72f --- /dev/null +++ b/tests/e2e/withQuerystring/.eslintrc.cjs @@ -0,0 +1 @@ +module.exports = require('../base.eslintrc.cjs')(__dirname) diff --git a/tests/withQuerystring/image.svg b/tests/e2e/withQuerystring/image.svg similarity index 100% rename from tests/withQuerystring/image.svg rename to tests/e2e/withQuerystring/image.svg diff --git a/tests/withQuerystring/index.ts b/tests/e2e/withQuerystring/index.ts similarity index 100% rename from tests/withQuerystring/index.ts rename to tests/e2e/withQuerystring/index.ts diff --git a/tests/withQuerystring/subfolder/image.svg b/tests/e2e/withQuerystring/subfolder/image.svg similarity index 100% rename from tests/withQuerystring/subfolder/image.svg rename to tests/e2e/withQuerystring/subfolder/image.svg diff --git a/tests/withQuerystring/tsconfig.json b/tests/e2e/withQuerystring/tsconfig.json similarity index 100% rename from tests/withQuerystring/tsconfig.json rename to tests/e2e/withQuerystring/tsconfig.json diff --git a/tests/e2e/withoutPaths/.eslintrc.cjs b/tests/e2e/withoutPaths/.eslintrc.cjs new file mode 100644 index 0000000..3d3a72f --- /dev/null +++ b/tests/e2e/withoutPaths/.eslintrc.cjs @@ -0,0 +1 @@ +module.exports = require('../base.eslintrc.cjs')(__dirname) diff --git a/tests/withoutPaths/dtsImportee.d.ts b/tests/e2e/withoutPaths/dtsImportee.d.ts similarity index 100% rename from tests/withoutPaths/dtsImportee.d.ts rename to tests/e2e/withoutPaths/dtsImportee.d.ts diff --git a/tests/withoutPaths/index.ts b/tests/e2e/withoutPaths/index.ts similarity index 100% rename from tests/withoutPaths/index.ts rename to tests/e2e/withoutPaths/index.ts diff --git a/tests/withoutPaths/subfolder/dtsImportee.d.ts b/tests/e2e/withoutPaths/subfolder/dtsImportee.d.ts similarity index 100% rename from tests/withoutPaths/subfolder/dtsImportee.d.ts rename to tests/e2e/withoutPaths/subfolder/dtsImportee.d.ts diff --git a/tests/withoutPaths/subfolder/tsImportee.ts b/tests/e2e/withoutPaths/subfolder/tsImportee.ts similarity index 100% rename from tests/withoutPaths/subfolder/tsImportee.ts rename to tests/e2e/withoutPaths/subfolder/tsImportee.ts diff --git a/tests/withoutPaths/subfolder/tsxImportee.tsx b/tests/e2e/withoutPaths/subfolder/tsxImportee.tsx similarity index 100% rename from tests/withoutPaths/subfolder/tsxImportee.tsx rename to tests/e2e/withoutPaths/subfolder/tsxImportee.tsx diff --git a/tests/withoutPaths/tsImportee.ts b/tests/e2e/withoutPaths/tsImportee.ts similarity index 100% rename from tests/withoutPaths/tsImportee.ts rename to tests/e2e/withoutPaths/tsImportee.ts diff --git a/tests/withoutPaths/tsconfig.json b/tests/e2e/withoutPaths/tsconfig.json similarity index 100% rename from tests/withoutPaths/tsconfig.json rename to tests/e2e/withoutPaths/tsconfig.json diff --git a/tests/withoutPaths/tsxImportee.tsx b/tests/e2e/withoutPaths/tsxImportee.tsx similarity index 100% rename from tests/withoutPaths/tsxImportee.tsx rename to tests/e2e/withoutPaths/tsxImportee.tsx diff --git a/tests/importXResolverV3/eslint.config.cjs b/tests/importXResolverV3/eslint.config.cjs deleted file mode 100644 index 5623bd4..0000000 --- a/tests/importXResolverV3/eslint.config.cjs +++ /dev/null @@ -1,33 +0,0 @@ -const path = require('node:path') - -const { - createTypeScriptImportResolver, -} = require('eslint-import-resolver-typescript') -const importX = require('eslint-plugin-import-x') - -const globPattern = './packages/*/tsconfig.json' - -// in normal cases this is not needed because the __dirname would be the root -const absoluteGlobPath = path.join(__dirname, globPattern) - -const base = require('../base.eslintrc.cjs')() - -module.exports = - +process.versions.node.split('.')[0] <= 16 - ? {} - : { - files: ['**/*.ts', '**/*.tsx'], - plugins: { - 'import-x': importX, - }, - settings: { - ...importX.flatConfigs.typescript.settings, - 'import-x/resolver-next': [ - createTypeScriptImportResolver({ - project: absoluteGlobPath, - noWarnOnMultipleProjects: true, - }), - ], - }, - rules: base.rules, - } diff --git a/tests/nestedPackageJson/.eslintrc.cjs b/tests/nestedPackageJson/.eslintrc.cjs deleted file mode 100644 index 10eb58e..0000000 --- a/tests/nestedPackageJson/.eslintrc.cjs +++ /dev/null @@ -1,5 +0,0 @@ -const path = require('node:path') - -module.exports = require('../base.eslintrc.cjs')( - path.resolve(__dirname, 'tsconfig.json'), -) diff --git a/tests/pnp/pnp.spec.ts b/tests/pnp/pnp.spec.ts deleted file mode 100644 index 3368489..0000000 --- a/tests/pnp/pnp.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { exec } from 'tinyexec' - -import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' - -describe('createTypeScriptImportResolver', () => { - it('should work with pnp', async () => { - await exec('yarn', ['install'], { - nodeOptions: { - cwd: import.meta.dirname, - }, - }) - - const resolver = createTypeScriptImportResolver() - - expect(resolver.resolve('pnpapi', import.meta.filename)) - .toMatchInlineSnapshot(` - { - "found": true, - "path": "/tests/pnp/.pnp.cjs", - } - `) - - expect(resolver.resolve('lodash.zip', import.meta.filename)) - .toMatchInlineSnapshot(` - { - "found": true, - "path": "/tests/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-cb06530d81.zip/node_modules/lodash.zip/index.js", - } - `) - }, 10_000) -}) diff --git a/tests/tsconfig.json b/tests/tsconfig.json new file mode 100644 index 0000000..e012059 --- /dev/null +++ b/tests/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.base", + "compilerOptions": { + "rootDir": "." + }, + "include": [".", "../auto-imports.d.ts"] +} diff --git a/tests/unit/malformed-references/tsconfig.json b/tests/unit/malformed-references/tsconfig.json new file mode 100644 index 0000000..e69de29 diff --git a/tests/pnp/.editorconfig b/tests/unit/pnp/.editorconfig similarity index 100% rename from tests/pnp/.editorconfig rename to tests/unit/pnp/.editorconfig diff --git a/tests/pnp/.gitattributes b/tests/unit/pnp/.gitattributes similarity index 100% rename from tests/pnp/.gitattributes rename to tests/unit/pnp/.gitattributes diff --git a/tests/pnp/.gitignore b/tests/unit/pnp/.gitignore similarity index 100% rename from tests/pnp/.gitignore rename to tests/unit/pnp/.gitignore diff --git a/tests/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-cb06530d81.zip b/tests/unit/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-cb06530d81.zip similarity index 100% rename from tests/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-cb06530d81.zip rename to tests/unit/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-cb06530d81.zip diff --git a/tests/pnp/.yarn/releases/yarn-4.8.0.cjs b/tests/unit/pnp/.yarn/releases/yarn-4.8.0.cjs similarity index 100% rename from tests/pnp/.yarn/releases/yarn-4.8.0.cjs rename to tests/unit/pnp/.yarn/releases/yarn-4.8.0.cjs diff --git a/tests/pnp/.yarnrc.yml b/tests/unit/pnp/.yarnrc.yml similarity index 100% rename from tests/pnp/.yarnrc.yml rename to tests/unit/pnp/.yarnrc.yml diff --git a/tests/pnp/README.md b/tests/unit/pnp/README.md similarity index 100% rename from tests/pnp/README.md rename to tests/unit/pnp/README.md diff --git a/tests/pnp/package.json b/tests/unit/pnp/package.json similarity index 100% rename from tests/pnp/package.json rename to tests/unit/pnp/package.json diff --git a/tests/pnp/yarn.lock b/tests/unit/pnp/yarn.lock similarity index 100% rename from tests/pnp/yarn.lock rename to tests/unit/pnp/yarn.lock diff --git a/tests/unit/unit.spec.ts b/tests/unit/unit.spec.ts new file mode 100644 index 0000000..d64a991 --- /dev/null +++ b/tests/unit/unit.spec.ts @@ -0,0 +1,35 @@ +import path from 'node:path' + +import { exec } from 'tinyexec' + +import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' + +describe('createTypeScriptImportResolver', async () => { + const pnpDir = path.resolve(import.meta.dirname, 'pnp') + + await exec('yarn', [], { + nodeOptions: { + cwd: pnpDir, + }, + }) + + const resolver = createTypeScriptImportResolver() + + it('should work with pnp', async () => { + const testfile = path.resolve(pnpDir, '__test__.js') + + expect(resolver.resolve('pnpapi', testfile)).toMatchInlineSnapshot(` + { + "found": true, + "path": "/tests/unit/pnp/.pnp.cjs", + } + `) + + expect(resolver.resolve('lodash.zip', testfile)).toMatchInlineSnapshot(` + { + "found": true, + "path": "/tests/unit/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-cb06530d81.zip/node_modules/lodash.zip/index.js", + } + `) + }) +}) diff --git a/tests/withJsconfig/.eslintrc.cjs b/tests/withJsconfig/.eslintrc.cjs deleted file mode 100644 index c656bbe..0000000 --- a/tests/withJsconfig/.eslintrc.cjs +++ /dev/null @@ -1,5 +0,0 @@ -const path = require('node:path') - -const configPath = path.join(__dirname, 'jsconfig.json') - -module.exports = require('../base.eslintrc.cjs')(configPath) diff --git a/tsconfig.base.json b/tsconfig.base.json index e1fc093..5f7fdfd 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,10 +1,6 @@ { "extends": "@1stg/tsconfig/node16", "compilerOptions": { - "module": "Node16", - "outDir": "./lib", - "allowSyntheticDefaultImports": true, - "esModuleInterop": true - }, - "exclude": ["tests"] + "verbatimModuleSyntax": false + } } diff --git a/tsconfig.json b/tsconfig.json index ff413cf..3eccfe5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,8 @@ { "extends": "./tsconfig.base", + "compilerOptions": { + "outDir": "./lib", + "verbatimModuleSyntax": true + }, "include": ["src", "eslint.config.js"] } diff --git a/tsconfig.staged.json b/tsconfig.staged.json new file mode 100644 index 0000000..cad5df7 --- /dev/null +++ b/tsconfig.staged.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base", + "compilerOptions": { + "rootDir": "." + }, + "exclude": ["tests/e2e/absoluteAlias"] +} diff --git a/vitest.config.ts b/vitest.config.ts index 10a25a7..a4cba2c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,6 +1,20 @@ +import autoImport from 'unplugin-auto-import/vite' import { defineConfig } from 'vitest/config' export default defineConfig({ + resolve: { + alias: { + 'eslint-import-resolver-typescript': new URL( + 'src/index.ts', + import.meta.url, + ).pathname, + }, + }, + plugins: [ + autoImport({ + imports: ['vitest'], + }), + ], test: { coverage: { enabled: true, diff --git a/yarn.lock b/yarn.lock index 874ef6f..9c0232e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5766,6 +5766,20 @@ __metadata: languageName: node linkType: hard +"confbox@npm:^0.1.8": + version: 0.1.8 + resolution: "confbox@npm:0.1.8" + checksum: 10/4ebcfb1c6a3b25276734ec5722e88768eb61fc02f98e11960b845c5c62bc27fd05f493d2a8244d9675b24ef95afe4c0d511cdcad02c72f5eeea463cc26687999 + languageName: node + linkType: hard + +"confbox@npm:^0.2.1": + version: 0.2.1 + resolution: "confbox@npm:0.2.1" + checksum: 10/f8becc828d35a45b8ec3cb157837e30f6a47839fc5178dda6ea75b5cfc4049abdc7a13527e2f4af41c72cef75ad54ed39151327d196846d209e44b365f436f7e + languageName: node + linkType: hard + "conventional-changelog-angular@npm:^7.0.0": version: 7.0.0 resolution: "conventional-changelog-angular@npm:7.0.0" @@ -6635,6 +6649,7 @@ __metadata: "@changesets/cli": "npm:^2.28.1" "@commitlint/cli": "npm:^19.8.0" "@mozilla/glean": "npm:^5.0.3" + "@pkgr/core": "npm:^0.2.0" "@pkgr/rollup": "npm:^6.0.1" "@total-typescript/ts-reset": "npm:^0.6.1" "@types/debug": "npm:^4.1.12" @@ -6663,6 +6678,7 @@ __metadata: tinyglobby: "npm:^0.2.12" type-coverage: "npm:^2.29.7" typescript: "npm:~5.8.2" + unplugin-auto-import: "npm:^19.1.2" unrs-resolver: "npm:^1.3.2" vitest: "npm:^3.0.9" yarn-berry-deduplicate: "npm:^6.1.1" @@ -7514,6 +7530,13 @@ __metadata: languageName: node linkType: hard +"exsolve@npm:^1.0.1": + version: 1.0.4 + resolution: "exsolve@npm:1.0.4" + checksum: 10/1cef4fee4c1ec2a2d316731e7df856cd835791c0e18a2ef74a39921e4e09653ddee3be5d6a589f92d81b0e7b776d96100459780a7727715021c189aa9ceed920 + languageName: node + linkType: hard + "ext@npm:^1.7.0": version: 1.7.0 resolution: "ext@npm:1.7.0" @@ -9056,6 +9079,13 @@ __metadata: languageName: node linkType: hard +"js-tokens@npm:^9.0.1": + version: 9.0.1 + resolution: "js-tokens@npm:9.0.1" + checksum: 10/3288ba73bb2023adf59501979fb4890feb6669cc167b13771b226814fde96a1583de3989249880e3f4d674040d1815685db9a9880db9153307480d39dc760365 + languageName: node + linkType: hard + "js-yaml@npm:^3.10.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.6.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" @@ -9382,6 +9412,17 @@ __metadata: languageName: node linkType: hard +"local-pkg@npm:^1.1.1": + version: 1.1.1 + resolution: "local-pkg@npm:1.1.1" + dependencies: + mlly: "npm:^1.7.4" + pkg-types: "npm:^2.0.1" + quansync: "npm:^0.2.8" + checksum: 10/e04aedda8fe30b69d763100aa0485a32815d37478e76a97d2d792138607ebfdde20db3da9f301c260117e24340d4ab4731191bcae825dc94d3f6a4960ad11706 + languageName: node + linkType: hard + "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -10656,6 +10697,18 @@ __metadata: languageName: node linkType: hard +"mlly@npm:^1.7.4": + version: 1.7.4 + resolution: "mlly@npm:1.7.4" + dependencies: + acorn: "npm:^8.14.0" + pathe: "npm:^2.0.1" + pkg-types: "npm:^1.3.0" + ufo: "npm:^1.5.4" + checksum: 10/1b36163d38c2331f8ae480e6a11da3d15927a2148d729fcd9df6d0059ca74869aa693931bd1f762f82eb534b84c921bdfbc036eb0e4da4faeb55f1349d254f35 + languageName: node + linkType: hard + "mri@npm:^1.1.0, mri@npm:^1.2.0": version: 1.2.0 resolution: "mri@npm:1.2.0" @@ -11368,7 +11421,7 @@ __metadata: languageName: node linkType: hard -"pathe@npm:^2.0.2, pathe@npm:^2.0.3": +"pathe@npm:^2.0.1, pathe@npm:^2.0.2, pathe@npm:^2.0.3": version: 2.0.3 resolution: "pathe@npm:2.0.3" checksum: 10/01e9a69928f39087d96e1751ce7d6d50da8c39abf9a12e0ac2389c42c83bc76f78c45a475bd9026a02e6a6f79be63acc75667df855862fe567d99a00a540d23d @@ -11419,6 +11472,28 @@ __metadata: languageName: node linkType: hard +"pkg-types@npm:^1.3.0": + version: 1.3.1 + resolution: "pkg-types@npm:1.3.1" + dependencies: + confbox: "npm:^0.1.8" + mlly: "npm:^1.7.4" + pathe: "npm:^2.0.1" + checksum: 10/6d491f2244597b24fb59a50e3c258f27da3839555d2a4e112b31bcf536e9359fc4edc98639cd74d2cf16fcd4269e5a09d99fc05d89e2acc896a2f027c2f6ec44 + languageName: node + linkType: hard + +"pkg-types@npm:^2.0.1, pkg-types@npm:^2.1.0": + version: 2.1.0 + resolution: "pkg-types@npm:2.1.0" + dependencies: + confbox: "npm:^0.2.1" + exsolve: "npm:^1.0.1" + pathe: "npm:^2.0.3" + checksum: 10/10c9038113d2ada3cfc1fde19b6f367d50d80990f27337e78d86583c96ff2b2ce13fd19cca6bf57a59aa5230ed23e384ec92a4da4c1995c80ea75abe9a8e5dbd + languageName: node + linkType: hard + "pluralize@npm:^8.0.0": version: 8.0.0 resolution: "pluralize@npm:8.0.0" @@ -11641,6 +11716,13 @@ __metadata: languageName: node linkType: hard +"quansync@npm:^0.2.8": + version: 0.2.10 + resolution: "quansync@npm:0.2.10" + checksum: 10/b54d955de867e104025f2666d52b2b67befe4e0f184a96acc9adcbdc572e46dce49c69d1e79f99413beae8a974a576383806a05f85f9a826865dc589ee1bcaf2 + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -13105,6 +13187,13 @@ __metadata: languageName: node linkType: hard +"scule@npm:^1.3.0": + version: 1.3.0 + resolution: "scule@npm:1.3.0" + checksum: 10/f2968b292e33c0eddca4a68b5c70f08dfc8479e492461c248f72873deaf77ae87c9f27dde7a342b3cb6394d2fae9665890b07a2243f79cff5cba65c9525ccf7e + languageName: node + linkType: hard + "semver@npm:7.7.1, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.5, semver@npm:^7.3.6, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3, semver@npm:^7.7.1": version: 7.7.1 resolution: "semver@npm:7.7.1" @@ -13716,6 +13805,15 @@ __metadata: languageName: node linkType: hard +"strip-literal@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-literal@npm:3.0.0" + dependencies: + js-tokens: "npm:^9.0.1" + checksum: 10/da1616f654f3ff481e078597b4565373a5eeed78b83de4a11a1a1b98292a9036f2474e528eff19b6eed93370428ff957a473827057c117495086436725d7efad + languageName: node + linkType: hard + "stylus@npm:^0.57.0": version: 0.57.0 resolution: "stylus@npm:0.57.0" @@ -14195,6 +14293,13 @@ __metadata: languageName: node linkType: hard +"ufo@npm:^1.5.4": + version: 1.5.4 + resolution: "ufo@npm:1.5.4" + checksum: 10/a885ed421e656aea6ca64e9727b8118a9488715460b6f1a0f0427118adfe2f2830fe7c1d5bd9c5c754a332e6807516551cd663ea67ce9ed6a4e3edc739916335 + languageName: node + linkType: hard + "unassert@npm:^2.0.0, unassert@npm:^2.0.2": version: 2.0.2 resolution: "unassert@npm:2.0.2" @@ -14333,6 +14438,28 @@ __metadata: languageName: node linkType: hard +"unimport@npm:^4.1.2": + version: 4.1.3 + resolution: "unimport@npm:4.1.3" + dependencies: + acorn: "npm:^8.14.1" + escape-string-regexp: "npm:^5.0.0" + estree-walker: "npm:^3.0.3" + local-pkg: "npm:^1.1.1" + magic-string: "npm:^0.30.17" + mlly: "npm:^1.7.4" + pathe: "npm:^2.0.3" + picomatch: "npm:^4.0.2" + pkg-types: "npm:^2.1.0" + scule: "npm:^1.3.0" + strip-literal: "npm:^3.0.0" + tinyglobby: "npm:^0.2.12" + unplugin: "npm:^2.2.2" + unplugin-utils: "npm:^0.2.4" + checksum: 10/f1b15daa1fbe7d7e46e29452d7063adae6052546ce934a7b5b38c3ba920682fdcea80de7543f0c80caee3294cef8a3f32b5252976188e5d5afea7280d170c5cb + languageName: node + linkType: hard + "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0" @@ -14424,6 +14551,28 @@ __metadata: languageName: node linkType: hard +"unplugin-auto-import@npm:^19.1.2": + version: 19.1.2 + resolution: "unplugin-auto-import@npm:19.1.2" + dependencies: + local-pkg: "npm:^1.1.1" + magic-string: "npm:^0.30.17" + picomatch: "npm:^4.0.2" + unimport: "npm:^4.1.2" + unplugin: "npm:^2.2.2" + unplugin-utils: "npm:^0.2.4" + peerDependencies: + "@nuxt/kit": ^3.2.2 + "@vueuse/core": "*" + peerDependenciesMeta: + "@nuxt/kit": + optional: true + "@vueuse/core": + optional: true + checksum: 10/81fe867197295f8ae9e8d94eabc498b47f27a7602a669263080d0e08244df9f1340c1e5e125c1d8a6d70f9f795f2d7db129a08a78793838401b983134c96c9d9 + languageName: node + linkType: hard + "unplugin-utils@npm:^0.2.4": version: 0.2.4 resolution: "unplugin-utils@npm:0.2.4" @@ -14434,6 +14583,16 @@ __metadata: languageName: node linkType: hard +"unplugin@npm:^2.2.2": + version: 2.2.2 + resolution: "unplugin@npm:2.2.2" + dependencies: + acorn: "npm:^8.14.1" + webpack-virtual-modules: "npm:^0.6.2" + checksum: 10/e9a107f75a1e38f31f2a02993712f8bd6f618b0844faa4c355189d130e17b056b45eead99a1ecd632d96a465da0eda81cea43e546735443503573cad2d9742c9 + languageName: node + linkType: hard + "unrs-resolver@npm:^1.3.1, unrs-resolver@npm:^1.3.2": version: 1.3.2 resolution: "unrs-resolver@npm:1.3.2" @@ -14793,6 +14952,13 @@ __metadata: languageName: node linkType: hard +"webpack-virtual-modules@npm:^0.6.2": + version: 0.6.2 + resolution: "webpack-virtual-modules@npm:0.6.2" + checksum: 10/d9a0d035f7ec0c7f1055aaf88bfe48b7f96458043916a1b2926d9012fd61de3810a6b768e31a8cd4b3c84a9b6d55824361a9dd20aaf9f5ccfb6f017af216a178 + languageName: node + linkType: hard + "whatwg-mimetype@npm:4.0.0": version: 4.0.0 resolution: "whatwg-mimetype@npm:4.0.0"