From 108a0ef12ba52aec265fba4b6e538f31e796a5fc Mon Sep 17 00:00:00 2001 From: Benno <57860196+bennodev19@users.noreply.github.com> Date: Fri, 14 Jul 2023 07:08:25 +0200 Subject: [PATCH 1/3] #15 added basic tsconfig extends support --- index.ts | 300 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 180 insertions(+), 120 deletions(-) diff --git a/index.ts b/index.ts index 6ea0890..bf1b23a 100644 --- a/index.ts +++ b/index.ts @@ -1,139 +1,199 @@ -import { join } from 'path'; +import path from 'path'; import { Plugin } from 'rollup'; import { - CompilerOptions, - findConfigFile, - nodeModuleNameResolver, - parseConfigFileTextToJson, - sys, + CompilerOptions, + findConfigFile, + nodeModuleNameResolver, + parseConfigFileTextToJson, + sys, } from 'typescript'; export const typescriptPaths = ({ - absolute = true, - nonRelative = false, - preserveExtensions = false, - tsConfigPath = findConfigFile('./', sys.fileExists), - transform, + absolute = true, + nonRelative = false, + preserveExtensions = false, + tsConfigPath = findConfigFile('./', sys.fileExists), + transform, }: Options = {}): Plugin => { - const { compilerOptions, outDir } = getTsConfig(tsConfigPath); - - return { - name: 'resolve-typescript-paths', - resolveId: (importee: string, importer?: string) => { - const enabled = Boolean( - compilerOptions.paths || (compilerOptions.baseUrl && nonRelative), - ); - - if ( - typeof importer === 'undefined' || - importee.startsWith('\0') || - !enabled - ) { - return null; - } - - const hasMatchingPath = - !!compilerOptions.paths && - Object.keys(compilerOptions.paths).some((path) => - new RegExp('^' + path.replace('*', '.+') + '$').test(importee), - ); - - if (!hasMatchingPath && !nonRelative) { - return null; - } - - if (importee.startsWith('.')) { - return null; // never resolve relative modules, only non-relative - } - - const { resolvedModule } = nodeModuleNameResolver( - importee, - importer, - compilerOptions, - sys, - ); - - if (!resolvedModule) { - return null; - } - - const { resolvedFileName } = resolvedModule; - - if (!resolvedFileName || resolvedFileName.endsWith('.d.ts')) { - return null; - } - - const targetFileName = join( - outDir, - preserveExtensions - ? resolvedFileName - : resolvedFileName.replace(/\.tsx?$/i, '.js'), - ); - - const resolved = absolute - ? sys.resolvePath(targetFileName) - : targetFileName; - - return transform ? transform(resolved) : resolved; - }, - }; + const { compilerOptions } = getTsConfig(tsConfigPath); + const outDir = compilerOptions.outDir ?? '.'; + + return { + name: 'resolve-typescript-paths', + resolveId: (importee: string, importer?: string) => { + const enabled = Boolean( + compilerOptions.paths || (compilerOptions.baseUrl && nonRelative) + ); + + if ( + typeof importer === 'undefined' || + importee.startsWith('\0') || + !enabled + ) { + return null; + } + + const hasMatchingPath = + !!compilerOptions.paths && + Object.keys(compilerOptions.paths).some((path) => + new RegExp('^' + path.replace('*', '.+') + '$').test(importee) + ); + + if (!hasMatchingPath && !nonRelative) { + return null; + } + + if (importee.startsWith('.')) { + return null; // never resolve relative modules, only non-relative + } + + const { resolvedModule } = nodeModuleNameResolver( + importee, + importer, + compilerOptions, + sys + ); + + if (!resolvedModule) { + return null; + } + + const { resolvedFileName } = resolvedModule; + + if (!resolvedFileName || resolvedFileName.endsWith('.d.ts')) { + return null; + } + + const targetFileName = path.join( + outDir, + preserveExtensions + ? resolvedFileName + : resolvedFileName.replace(/\.tsx?$/i, '.js') + ); + + const resolved = absolute + ? sys.resolvePath(targetFileName) + : targetFileName; + + return transform ? transform(resolved) : resolved; + }, + }; }; const getTsConfig = (configPath?: string): TsConfig => { - const defaults: TsConfig = { compilerOptions: {}, outDir: '.' }; - - if (!configPath) { - return defaults; - } - - const configJson = sys.readFile(configPath); - - if (!configJson) { - return defaults; - } - - const { config } = parseConfigFileTextToJson(configPath, configJson); + const defaults: TsConfig = { compilerOptions: { outDir: '.' } }; + if (typeof configPath !== 'string') { + return defaults; + } + + // Read in tsconfig.json + const configJson = sys.readFile(configPath); + if (configJson == null) { + return defaults; + } + + const { config: rootConfig } = parseConfigFileTextToJson( + configPath, + configJson + ); + const rootConfigWithDefaults = { + ...rootConfig, + ...defaults, + compilerOptions: { + ...defaults.compilerOptions, + ...(rootConfig.compilerOptions ?? {}), + }, + }; + const resolvedConfig = handleTsConfigExtends( + rootConfigWithDefaults, + configPath + ); + + return resolvedConfig; +}; - return { ...defaults, ...config }; +const handleTsConfigExtends = ( + config: TsConfig, + rootConfigPath: string +): TsConfig => { + if (!('extends' in config) || typeof config.extends !== 'string') { + return config; + } + + let extendedConfigPath; + try { + // Try to resolve as a module (npm) + extendedConfigPath = require.resolve(config.extends); + } catch (e) { + // Try to resolve as a file relative to the current config + extendedConfigPath = path.join( + path.dirname(rootConfigPath), + config.extends + ); + } + + // Read in extended tsconfig.json + const extendedConfig = getTsConfig(extendedConfigPath); + + // Merge base config and current config. + // This does not handle array concatenation or nested objects, + // besides 'compilerOptions' paths as the other options are not relevant + config = { + ...extendedConfig, + ...config, + compilerOptions: { + ...extendedConfig.compilerOptions, + ...config.compilerOptions, + paths: { + ...(extendedConfig.compilerOptions.paths ?? {}), + ...(config.compilerOptions.paths ?? {}), + }, + }, + }; + + // Remove the "extends" field + delete config.extends; + + return config; }; export interface Options { - /** - * Whether to resolve to absolute paths; defaults to `true`. - */ - absolute?: boolean; - - /** - * Whether to resolve non-relative paths based on tsconfig's `baseUrl`, even - * if none of the `paths` are matched; defaults to `false`. - * - * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#relative-vs-non-relative-module-imports - * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#base-url - */ - nonRelative?: boolean; - - /** - * Whether to preserve `.ts` and `.tsx` file extensions instead of having them - * changed to `.js`; defaults to `false`. - */ - preserveExtensions?: boolean; - - /** - * Custom path to your `tsconfig.json`. Use this if the plugin can't seem to - * find the correct one by itself. - */ - tsConfigPath?: string; - - /** - * If the plugin successfully resolves a path, this function allows you to - * hook into the process and transform that path before it is returned. - */ - transform?(path: string): string; + /** + * Whether to resolve to absolute paths; defaults to `true`. + */ + absolute?: boolean; + + /** + * Whether to resolve non-relative paths based on tsconfig's `baseUrl`, even + * if none of the `paths` are matched; defaults to `false`. + * + * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#relative-vs-non-relative-module-imports + * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#base-url + */ + nonRelative?: boolean; + + /** + * Whether to preserve `.ts` and `.tsx` file extensions instead of having them + * changed to `.js`; defaults to `false`. + */ + preserveExtensions?: boolean; + + /** + * Custom path to your `tsconfig.json`. Use this if the plugin can't seem to + * find the correct one by itself. + */ + tsConfigPath?: string; + + /** + * If the plugin successfully resolves a path, this function allows you to + * hook into the process and transform that path before it is returned. + */ + transform?(path: string): string; } interface TsConfig { - compilerOptions: CompilerOptions; - outDir: string; + compilerOptions: CompilerOptions; + extends?: string; } /** From 0c313507885181c9773b0ee81802286c112590d4 Mon Sep 17 00:00:00 2001 From: BennoDev <57860196+bennodev19@users.noreply.github.com> Date: Tue, 18 Jul 2023 07:29:49 +0200 Subject: [PATCH 2/3] #15 fixed formatting and added shx for cross platform rm command and improve ts config read in --- index.ts | 326 +++++++++++++++++++++---------------------------- package.json | 4 +- pnpm-lock.yaml | 204 +++++++++++++++++++++++++++++++ 3 files changed, 349 insertions(+), 185 deletions(-) create mode 100644 pnpm-lock.yaml diff --git a/index.ts b/index.ts index bf1b23a..89f3f44 100644 --- a/index.ts +++ b/index.ts @@ -1,200 +1,158 @@ import path from 'path'; import { Plugin } from 'rollup'; -import { - CompilerOptions, - findConfigFile, - nodeModuleNameResolver, - parseConfigFileTextToJson, - sys, -} from 'typescript'; +import * as ts from 'typescript'; export const typescriptPaths = ({ - absolute = true, - nonRelative = false, - preserveExtensions = false, - tsConfigPath = findConfigFile('./', sys.fileExists), - transform, + absolute = true, + nonRelative = false, + preserveExtensions = false, + tsConfigPath = ts.findConfigFile('./', ts.sys.fileExists), + transform, }: Options = {}): Plugin => { - const { compilerOptions } = getTsConfig(tsConfigPath); - const outDir = compilerOptions.outDir ?? '.'; - - return { - name: 'resolve-typescript-paths', - resolveId: (importee: string, importer?: string) => { - const enabled = Boolean( - compilerOptions.paths || (compilerOptions.baseUrl && nonRelative) - ); - - if ( - typeof importer === 'undefined' || - importee.startsWith('\0') || - !enabled - ) { - return null; - } - - const hasMatchingPath = - !!compilerOptions.paths && - Object.keys(compilerOptions.paths).some((path) => - new RegExp('^' + path.replace('*', '.+') + '$').test(importee) - ); - - if (!hasMatchingPath && !nonRelative) { - return null; - } - - if (importee.startsWith('.')) { - return null; // never resolve relative modules, only non-relative - } - - const { resolvedModule } = nodeModuleNameResolver( - importee, - importer, - compilerOptions, - sys - ); - - if (!resolvedModule) { - return null; - } - - const { resolvedFileName } = resolvedModule; - - if (!resolvedFileName || resolvedFileName.endsWith('.d.ts')) { - return null; - } - - const targetFileName = path.join( - outDir, - preserveExtensions - ? resolvedFileName - : resolvedFileName.replace(/\.tsx?$/i, '.js') - ); - - const resolved = absolute - ? sys.resolvePath(targetFileName) - : targetFileName; - - return transform ? transform(resolved) : resolved; - }, - }; + const compilerOptions = getTsConfig(tsConfigPath); + + return { + name: 'resolve-typescript-paths', + resolveId: (importee: string, importer?: string) => { + const enabled = Boolean( + compilerOptions.paths || (compilerOptions.baseUrl && nonRelative), + ); + + if ( + typeof importer === 'undefined' || + importee.startsWith('\0') || + !enabled + ) { + return null; + } + + const hasMatchingPath = + !!compilerOptions.paths && + Object.keys(compilerOptions.paths).some((path) => + new RegExp('^' + path.replace('*', '.+') + '$').test(importee), + ); + + if (!hasMatchingPath && !nonRelative) { + return null; + } + + if (importee.startsWith('.')) { + return null; // never resolve relative modules, only non-relative + } + + const { resolvedModule } = ts.nodeModuleNameResolver( + importee, + importer, + compilerOptions, + ts.sys, + ); + + if (!resolvedModule) { + return null; + } + + const { resolvedFileName } = resolvedModule; + + if (!resolvedFileName || resolvedFileName.endsWith('.d.ts')) { + return null; + } + + // TODO: Do we need outDir as "resolvedFileName" is already correct absolute path + const targetFileName = path.join( + compilerOptions.outDir, + preserveExtensions + ? resolvedFileName + : resolvedFileName.replace(/\.tsx?$/i, '.js'), + ); + + const resolved = absolute + ? ts.sys.resolvePath(targetFileName) + : targetFileName; + + return transform ? transform(resolved) : resolved; + }, + }; }; const getTsConfig = (configPath?: string): TsConfig => { - const defaults: TsConfig = { compilerOptions: { outDir: '.' } }; - if (typeof configPath !== 'string') { - return defaults; - } - - // Read in tsconfig.json - const configJson = sys.readFile(configPath); - if (configJson == null) { - return defaults; - } - - const { config: rootConfig } = parseConfigFileTextToJson( - configPath, - configJson - ); - const rootConfigWithDefaults = { - ...rootConfig, - ...defaults, - compilerOptions: { - ...defaults.compilerOptions, - ...(rootConfig.compilerOptions ?? {}), - }, - }; - const resolvedConfig = handleTsConfigExtends( - rootConfigWithDefaults, - configPath - ); - - return resolvedConfig; -}; - -const handleTsConfigExtends = ( - config: TsConfig, - rootConfigPath: string -): TsConfig => { - if (!('extends' in config) || typeof config.extends !== 'string') { - return config; - } - - let extendedConfigPath; - try { - // Try to resolve as a module (npm) - extendedConfigPath = require.resolve(config.extends); - } catch (e) { - // Try to resolve as a file relative to the current config - extendedConfigPath = path.join( - path.dirname(rootConfigPath), - config.extends - ); - } - - // Read in extended tsconfig.json - const extendedConfig = getTsConfig(extendedConfigPath); - - // Merge base config and current config. - // This does not handle array concatenation or nested objects, - // besides 'compilerOptions' paths as the other options are not relevant - config = { - ...extendedConfig, - ...config, - compilerOptions: { - ...extendedConfig.compilerOptions, - ...config.compilerOptions, - paths: { - ...(extendedConfig.compilerOptions.paths ?? {}), - ...(config.compilerOptions.paths ?? {}), - }, - }, - }; - - // Remove the "extends" field - delete config.extends; - - return config; + const defaults: TsConfig = { outDir: '.' }; + if (typeof configPath !== 'string') { + return defaults; + } + + // Define a host object that implements ParseConfigFileHost. + // The host provides file system operations and error handling for parsing the configuration file. + const host: ts.ParseConfigFileHost = { + fileExists: ts.sys.fileExists, + readFile: ts.sys.readFile, + readDirectory: ts.sys.readDirectory, + useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, + getCurrentDirectory: ts.sys.getCurrentDirectory, + onUnRecoverableConfigFileDiagnostic: (diagnostic) => { + console.error( + 'Unrecoverable error in config file:', + diagnostic.messageText, + ); + process.exit(1); + }, + }; + + // Read in tsconfig.json + const parsedCommandLine = ts.getParsedCommandLineOfConfigFile( + configPath, + {}, + host, + ); + + // Access the parsed tsconfig.json file options + let resolvedConfig = {}; + if (parsedCommandLine != null) { + resolvedConfig = parsedCommandLine.options; + } else { + console.error('Failed to parse TypeScript configuration file:', configPath); + process.exit(1); + } + + return { ...defaults, ...resolvedConfig }; }; export interface Options { - /** - * Whether to resolve to absolute paths; defaults to `true`. - */ - absolute?: boolean; - - /** - * Whether to resolve non-relative paths based on tsconfig's `baseUrl`, even - * if none of the `paths` are matched; defaults to `false`. - * - * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#relative-vs-non-relative-module-imports - * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#base-url - */ - nonRelative?: boolean; - - /** - * Whether to preserve `.ts` and `.tsx` file extensions instead of having them - * changed to `.js`; defaults to `false`. - */ - preserveExtensions?: boolean; - - /** - * Custom path to your `tsconfig.json`. Use this if the plugin can't seem to - * find the correct one by itself. - */ - tsConfigPath?: string; - - /** - * If the plugin successfully resolves a path, this function allows you to - * hook into the process and transform that path before it is returned. - */ - transform?(path: string): string; + /** + * Whether to resolve to absolute paths; defaults to `true`. + */ + absolute?: boolean; + + /** + * Whether to resolve non-relative paths based on tsconfig's `baseUrl`, even + * if none of the `paths` are matched; defaults to `false`. + * + * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#relative-vs-non-relative-module-imports + * @see https://www.typescriptlang.org/docs/handbook/module-resolution.html#base-url + */ + nonRelative?: boolean; + + /** + * Whether to preserve `.ts` and `.tsx` file extensions instead of having them + * changed to `.js`; defaults to `false`. + */ + preserveExtensions?: boolean; + + /** + * Custom path to your `tsconfig.json`. Use this if the plugin can't seem to + * find the correct one by itself. + */ + tsConfigPath?: string; + + /** + * If the plugin successfully resolves a path, this function allows you to + * hook into the process and transform that path before it is returned. + */ + transform?(path: string): string; } -interface TsConfig { - compilerOptions: CompilerOptions; - extends?: string; -} +type TsConfig = { + outDir: string; +} & Omit; /** * For backwards compatibility. diff --git a/package.json b/package.json index be3282d..c706a1c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "scripts": { "test": "npm run prepare && node test", "preversion": "npm test", - "prepare": "rm -rf dist && tsc" + "prepare": "shx rm -rf dist && tsc", + "format": "prettier --write \"**/*.{js,ts,tsx,md}\"" }, "author": "Simon Haenisch (https://github.com/simonhaenisch)", "repository": "simonhaenisch/rollup-plugin-typescript-paths", @@ -28,6 +29,7 @@ "prettier": "2.8.8", "prettier-plugin-organize-imports": "3.2.2", "rollup": "2.79.1", + "shx": "^0.3.4", "typescript": "5.1.3" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..79b870d --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,204 @@ +lockfileVersion: '6.0' + +devDependencies: + '@types/node': + specifier: 18.16.18 + version: 18.16.18 + prettier: + specifier: 2.8.8 + version: 2.8.8 + prettier-plugin-organize-imports: + specifier: 3.2.2 + version: 3.2.2(prettier@2.8.8)(typescript@5.1.3) + rollup: + specifier: 2.79.1 + version: 2.79.1 + shx: + specifier: ^0.3.4 + version: 0.3.4 + typescript: + specifier: 5.1.3 + version: 5.1.3 + +packages: + + /@types/node@18.16.18: + resolution: {integrity: sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==} + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind@1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /interpret@1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + dev: true + + /is-core-module@2.12.1: + resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + dependencies: + has: 1.0.3 + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /prettier-plugin-organize-imports@3.2.2(prettier@2.8.8)(typescript@5.1.3): + resolution: {integrity: sha512-e97lE6odGSiHonHJMTYC0q0iLXQyw0u5z/PJpvP/3vRy6/Zi9kLBwFAbEGjDzIowpjQv8b+J04PDamoUSQbzGA==} + peerDependencies: + '@volar/vue-language-plugin-pug': ^1.0.4 + '@volar/vue-typescript': ^1.0.4 + prettier: '>=2.0' + typescript: '>=2.9' + peerDependenciesMeta: + '@volar/vue-language-plugin-pug': + optional: true + '@volar/vue-typescript': + optional: true + dependencies: + prettier: 2.8.8 + typescript: 5.1.3 + dev: true + + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + + /rechoir@0.6.2: + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} + dependencies: + resolve: 1.22.2 + dev: true + + /resolve@1.22.2: + resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + hasBin: true + dependencies: + is-core-module: 2.12.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /rollup@2.79.1: + resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /shelljs@0.8.5: + resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} + engines: {node: '>=4'} + hasBin: true + dependencies: + glob: 7.2.3 + interpret: 1.4.0 + rechoir: 0.6.2 + dev: true + + /shx@0.3.4: + resolution: {integrity: sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==} + engines: {node: '>=6'} + hasBin: true + dependencies: + minimist: 1.2.8 + shelljs: 0.8.5 + dev: true + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /typescript@5.1.3: + resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true From 2eb3a43a459a83ac300db8d5e98009c3f63e8f29 Mon Sep 17 00:00:00 2001 From: BennoDev <57860196+bennodev19@users.noreply.github.com> Date: Tue, 18 Jul 2023 07:30:47 +0200 Subject: [PATCH 3/3] #15 removed pnpm-lock again oops --- pnpm-lock.yaml | 204 ------------------------------------------------- 1 file changed, 204 deletions(-) delete mode 100644 pnpm-lock.yaml diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index 79b870d..0000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,204 +0,0 @@ -lockfileVersion: '6.0' - -devDependencies: - '@types/node': - specifier: 18.16.18 - version: 18.16.18 - prettier: - specifier: 2.8.8 - version: 2.8.8 - prettier-plugin-organize-imports: - specifier: 3.2.2 - version: 3.2.2(prettier@2.8.8)(typescript@5.1.3) - rollup: - specifier: 2.79.1 - version: 2.79.1 - shx: - specifier: ^0.3.4 - version: 0.3.4 - typescript: - specifier: 5.1.3 - version: 5.1.3 - -packages: - - /@types/node@18.16.18: - resolution: {integrity: sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==} - dev: true - - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true - - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true - - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: true - - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /interpret@1.4.0: - resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} - engines: {node: '>= 0.10'} - dev: true - - /is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} - dependencies: - has: 1.0.3 - dev: true - - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true - - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true - - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /prettier-plugin-organize-imports@3.2.2(prettier@2.8.8)(typescript@5.1.3): - resolution: {integrity: sha512-e97lE6odGSiHonHJMTYC0q0iLXQyw0u5z/PJpvP/3vRy6/Zi9kLBwFAbEGjDzIowpjQv8b+J04PDamoUSQbzGA==} - peerDependencies: - '@volar/vue-language-plugin-pug': ^1.0.4 - '@volar/vue-typescript': ^1.0.4 - prettier: '>=2.0' - typescript: '>=2.9' - peerDependenciesMeta: - '@volar/vue-language-plugin-pug': - optional: true - '@volar/vue-typescript': - optional: true - dependencies: - prettier: 2.8.8 - typescript: 5.1.3 - dev: true - - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - dev: true - - /rechoir@0.6.2: - resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} - engines: {node: '>= 0.10'} - dependencies: - resolve: 1.22.2 - dev: true - - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} - hasBin: true - dependencies: - is-core-module: 2.12.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /rollup@2.79.1: - resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} - engines: {node: '>=10.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /shelljs@0.8.5: - resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} - engines: {node: '>=4'} - hasBin: true - dependencies: - glob: 7.2.3 - interpret: 1.4.0 - rechoir: 0.6.2 - dev: true - - /shx@0.3.4: - resolution: {integrity: sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==} - engines: {node: '>=6'} - hasBin: true - dependencies: - minimist: 1.2.8 - shelljs: 0.8.5 - dev: true - - /supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true - - /typescript@5.1.3: - resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} - engines: {node: '>=14.17'} - hasBin: true - dev: true - - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true