diff --git a/package.json b/package.json index e4c3eda261153d..45d97c17bafb12 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ }, "devDependencies": { "@babel/types": "^7.23.0", - "@microsoft/api-extractor": "^7.38.0", "@rollup/plugin-typescript": "^11.1.5", "@types/babel__core": "^7.20.2", "@types/babel__preset-env": "^7.9.3", diff --git a/packages/vite/api-extractor.json b/packages/vite/api-extractor.json deleted file mode 100644 index 642cef99fecd59..00000000000000 --- a/packages/vite/api-extractor.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - "projectFolder": "./src/node", - - "mainEntryPointFilePath": "./temp/node/index.d.ts", - - "bundledPackages": ["lightningcss"], - - "dtsRollup": { - "enabled": true, - "untrimmedFilePath": "", - "publicTrimmedFilePath": "./dist/node/index.d.ts" - }, - - "apiReport": { - "enabled": false - }, - - "docModel": { - "enabled": false - }, - - "tsdocMetadata": { - "enabled": false - }, - - "messages": { - "compilerMessageReporting": { - "default": { - "logLevel": "warning" - } - }, - - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - "addToApiReportFile": true - }, - - "ae-missing-release-tag": { - "logLevel": "none" - } - }, - - "tsdocMessageReporting": { - "default": { - "logLevel": "warning" - }, - - "tsdoc-undefined-tag": { - "logLevel": "none" - } - } - } -} diff --git a/packages/vite/package.json b/packages/vite/package.json index 46e6531bf56c7c..2a65cabce814e0 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -63,12 +63,10 @@ "dev": "rimraf dist && pnpm run build-bundle -w", "build": "rimraf dist && run-s build-bundle build-types", "build-bundle": "rollup --config rollup.config.ts --configPlugin typescript", - "build-types": "run-s build-types-temp build-types-pre-patch build-types-roll build-types-post-patch build-types-check", + "build-types": "run-s build-types-temp build-types-roll build-types-check", "build-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node", - "build-types-pre-patch": "tsx scripts/prePatchTypes.ts", - "build-types-roll": "tsx scripts/api-extractor.ts run && rimraf temp", - "build-types-post-patch": "tsx scripts/postPatchTypes.ts", - "build-types-check": "tsx scripts/checkBuiltTypes.ts && tsc --project tsconfig.check.json", + "build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp", + "build-types-check": "tsc --project tsconfig.check.json", "typecheck": "tsc --noEmit", "lint": "eslint --cache --ext .ts src/**", "format": "prettier --write --cache --parser typescript \"src/**/*.ts\"", @@ -78,15 +76,13 @@ "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.31", - "rollup": "^3.29.2" + "rollup": "^3.29.4" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "devDependencies": { "@ampproject/remapping": "^2.2.1", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", "@jridgewell/trace-mapping": "^0.3.19", "@rollup/plugin-alias": "^5.0.1", "@rollup/plugin-commonjs": "^25.0.5", @@ -134,6 +130,7 @@ "postcss-load-config": "^4.0.1", "postcss-modules": "^6.0.0", "resolve.exports": "^2.0.2", + "rollup-plugin-dts": "^6.1.0", "rollup-plugin-license": "^3.1.0", "sirv": "^2.0.3", "source-map-support": "^0.5.21", diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index 748440dd8aa029..80222d58184c93 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -167,7 +167,7 @@ function createNodeConfig(isProduction: boolean) { plugins: createNodePlugins( isProduction, !isProduction, - // in production we use api-extractor for dts generation + // in production we use rollup.dts.config.ts for dts generation // in development we need to rely on the rollup ts plugin isProduction ? false : './dist/node', ), diff --git a/packages/vite/rollup.dts.config.ts b/packages/vite/rollup.dts.config.ts new file mode 100644 index 00000000000000..0299f9a95e4e8e --- /dev/null +++ b/packages/vite/rollup.dts.config.ts @@ -0,0 +1,84 @@ +import { readFileSync } from 'node:fs' +import { fileURLToPath } from 'node:url' +import { type Plugin, defineConfig } from 'rollup' +import dts from 'rollup-plugin-dts' + +const depTypesDir = new URL('./src/types/', import.meta.url) +const pkg = JSON.parse( + readFileSync(new URL('./package.json', import.meta.url)).toString(), +) + +export default defineConfig({ + input: './temp/node/index.d.ts', + output: { + file: './dist/node/index.d.ts', + format: 'es', + }, + external: [ + /^node:*/, + ...Object.keys(pkg.dependencies), + // lightningcss types are bundled + ...Object.keys(pkg.devDependencies).filter((d) => d !== 'lightningcss'), + ], + plugins: [patchTypes(), dts({ respectExternal: true })], +}) + +// Taken from https://stackoverflow.com/a/36328890 +const multilineCommentsRE = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g +const singlelineCommentsRE = /\/\/[^/].*/g +const licenseCommentsRE = /MIT License|MIT license|BSD license/ +const consecutiveNewlinesRE = /\n{2,}/g + +/** + * Patch the types files before passing to dts plugin + * 1. Resolve `dep-types/*` and `types/*` imports + * 2. Validate unallowed dependency imports + * 3. Clean unnecessary comments + */ +function patchTypes(): Plugin { + return { + name: 'patch-types', + resolveId(id) { + // Dep types should be bundled + if (id.startsWith('dep-types/')) { + const fileUrl = new URL( + `./${id.slice('dep-types/'.length)}.d.ts`, + depTypesDir, + ) + return fileURLToPath(fileUrl) + } + // Ambient types are unbundled and externalized + if (id.startsWith('types/')) { + return { + id: '../../' + (id.endsWith('.js') ? id : id + '.js'), + external: true, + } + } + }, + renderChunk(code, chunk) { + const deps = new Set(Object.keys(pkg.dependencies)) + // Validate that chunk imports do not import dev deps + for (const id of chunk.imports) { + if ( + !id.startsWith('./') && + !id.startsWith('../') && + !id.startsWith('node:') && + !deps.has(id) + ) { + // If validation failed, only warn and set exit code 1 so that files + // are written to disk for inspection, but the build will fail + this.warn(`${chunk.fileName} imports "${id}" which is not allowed`) + process.exitCode = 1 + } + } + + // Clean unnecessary comments + return code + .replace(singlelineCommentsRE, '') + .replace(multilineCommentsRE, (m) => { + return licenseCommentsRE.test(m) ? '' : m + }) + .replace(consecutiveNewlinesRE, '\n\n') + }, + } +} diff --git a/packages/vite/scripts/api-extractor.ts b/packages/vite/scripts/api-extractor.ts deleted file mode 100644 index 1154830ffa8cd6..00000000000000 --- a/packages/vite/scripts/api-extractor.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Extractor, ExtractorConfig } from '@microsoft/api-extractor' - -const result = Extractor.invoke( - ExtractorConfig.loadFileAndPrepare('./api-extractor.json'), - { - messageCallback: (message) => { - const ignore = () => { - // @ts-expect-error TS requires to use the const enum, which is not available as the named export in tsx - message.logLevel = 'none' - } - if (message.sourceFilePath?.includes('lightningcss')) { - ignore() - } - if (message.messageId === 'ae-forgotten-export') { - if (message.sourceFilePath?.endsWith('/src/types/lightningcss.d.ts')) { - // We only expose LightningCSS types via prefixed types to avoid - // having confusing name like "Targets" in Vite types - ignore() - } - } - }, - }, -) - -if (!result.succeeded) process.exit(1) diff --git a/packages/vite/scripts/checkBuiltTypes.ts b/packages/vite/scripts/checkBuiltTypes.ts deleted file mode 100644 index 5601a1e84fb9cd..00000000000000 --- a/packages/vite/scripts/checkBuiltTypes.ts +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Checks whether the built files depend on devDependencies types. - * We shouldn't depend on them. - */ -import { dirname, resolve } from 'node:path' -import { fileURLToPath } from 'node:url' -import { readFileSync } from 'node:fs' -import colors from 'picocolors' -import type { ParseResult } from '@babel/parser' -import type { File, SourceLocation } from '@babel/types' -import { parse } from '@babel/parser' -import { walkDir } from './util' - -const dir = dirname(fileURLToPath(import.meta.url)) -const distDir = resolve(dir, '../dist') - -const pkgJson = JSON.parse( - readFileSync(resolve(dir, '../package.json'), 'utf-8'), -) -const deps = new Set(Object.keys(pkgJson.dependencies)) - -type SpecifierError = { - loc: SourceLocation | null | undefined - value: string - file: string -} - -const errors: SpecifierError[] = [] -walkDir(distDir, (file) => { - if (!file.endsWith('.d.ts')) return - - const specifiers = collectImportSpecifiers(file) - const notAllowedSpecifiers = specifiers.filter( - ({ value }) => - !( - value.startsWith('./') || - value.startsWith('../') || - value.startsWith('node:') || - deps.has(value) - ), - ) - - errors.push(...notAllowedSpecifiers) -}) - -if (errors.length <= 0) { - console.log(colors.green(colors.bold(`passed built types check`))) -} else { - console.log(colors.red(colors.bold(`failed built types check`))) - console.log() - errors.forEach((error) => { - const pos = error.loc - ? `${colors.yellow(error.loc.start.line)}:${colors.yellow( - error.loc.start.column, - )}` - : '' - console.log( - `${colors.cyan(error.file)}:${pos} - importing from ${colors.bold( - JSON.stringify(error.value), - )} is not allowed in built files`, - ) - }) - - process.exit(1) -} - -function collectImportSpecifiers(file: string) { - const content = readFileSync(file, 'utf-8') - - let ast: ParseResult - try { - ast = parse(content, { - sourceType: 'module', - plugins: ['typescript', 'classProperties'], - }) - } catch (e) { - console.log(colors.red(`failed to parse ${file}`)) - throw e - } - - const result: SpecifierError[] = [] - - for (const statement of ast.program.body) { - if ( - statement.type === 'ImportDeclaration' || - statement.type === 'ExportNamedDeclaration' || - statement.type === 'ExportAllDeclaration' - ) { - const source = statement.source - if (source?.value) { - result.push({ - loc: source.loc, - value: source.value, - file, - }) - } - } - } - - return result -} diff --git a/packages/vite/scripts/postPatchTypes.ts b/packages/vite/scripts/postPatchTypes.ts deleted file mode 100644 index 8d170922fcfa36..00000000000000 --- a/packages/vite/scripts/postPatchTypes.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { dirname, resolve } from 'node:path' -import { fileURLToPath } from 'node:url' -import fs from 'node:fs' -import colors from 'picocolors' -import { rewriteImports, walkDir } from './util' - -const dir = dirname(fileURLToPath(import.meta.url)) -const nodeDts = resolve(dir, '../dist/node/index.d.ts') - -// rewrite `types/*` import to relative import with file extension -rewriteImports(nodeDts, (importPath) => { - if (importPath.startsWith('types/')) { - return ( - '../../' + (importPath.endsWith('.js') ? importPath : importPath + '.js') - ) - } -}) - -console.log(colors.green(colors.bold(`patched types/* imports`))) - -// remove picomatch type import because only the internal property uses it -const picomatchImport = "import type { Matcher as Matcher_2 } from 'picomatch';" - -walkDir(nodeDts, (file) => { - const content = fs.readFileSync(file, 'utf-8') - if (!content.includes(picomatchImport)) { - throw new Error(`Should find picomatch type import in ${file}`) - } - - const replacedContent = content.replace(picomatchImport, '') - fs.writeFileSync(file, replacedContent, 'utf-8') -}) - -console.log(colors.green(colors.bold(`removed picomatch type import`))) diff --git a/packages/vite/scripts/prePatchTypes.ts b/packages/vite/scripts/prePatchTypes.ts deleted file mode 100644 index daa7463a619ca9..00000000000000 --- a/packages/vite/scripts/prePatchTypes.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { dirname, relative, resolve } from 'node:path' -import { fileURLToPath } from 'node:url' -import colors from 'picocolors' -import { rewriteImports, slash } from './util' - -const dir = dirname(fileURLToPath(import.meta.url)) -const tempDir = resolve(dir, '../temp/node') -const depTypesDir = resolve(dir, '../src/types') - -// walk through the temp dts dir, find all import/export of, deps-types/* -// and rewrite them into relative imports - so that api-extractor actually -// includes them in the rolled-up final d.ts file. -rewriteImports(tempDir, (importPath, currentFile) => { - if (importPath.startsWith('dep-types/')) { - const absoluteTypePath = resolve( - depTypesDir, - importPath.slice('dep-types/'.length), - ) - return slash(relative(dirname(currentFile), absoluteTypePath)) - } -}) - -console.log(colors.green(colors.bold(`patched deps-types/* imports`))) diff --git a/packages/vite/scripts/util.ts b/packages/vite/scripts/util.ts deleted file mode 100644 index c742b3338e8717..00000000000000 --- a/packages/vite/scripts/util.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs' -import { resolve } from 'node:path' -import type { ParseResult } from '@babel/parser' -import { parse } from '@babel/parser' -import type { File } from '@babel/types' -import colors from 'picocolors' -import MagicString from 'magic-string' - -export function rewriteImports( - fileOrDir: string, - rewrite: (importPath: string, currentFile: string) => string | void, -): void { - walkDir(fileOrDir, (file) => { - rewriteFileImports(file, (importPath) => { - return rewrite(importPath, file) - }) - }) -} - -const windowsSlashRE = /\\/g -export function slash(p: string): string { - return p.replace(windowsSlashRE, '/') -} - -export function walkDir(dir: string, handleFile: (file: string) => void): void { - if (statSync(dir).isDirectory()) { - const files = readdirSync(dir) - for (const file of files) { - const resolved = resolve(dir, file) - walkDir(resolved, handleFile) - } - } else { - handleFile(dir) - } -} - -function rewriteFileImports( - file: string, - rewrite: (importPath: string) => string | void, -): void { - const content = readFileSync(file, 'utf-8') - const str = new MagicString(content) - let ast: ParseResult - try { - ast = parse(content, { - sourceType: 'module', - plugins: ['typescript', 'classProperties'], - }) - } catch (e) { - console.log(colors.red(`failed to parse ${file}`)) - throw e - } - for (const statement of ast.program.body) { - if ( - statement.type === 'ImportDeclaration' || - statement.type === 'ExportNamedDeclaration' || - statement.type === 'ExportAllDeclaration' - ) { - const source = statement.source - if (source?.value) { - const newImportPath = rewrite(source.value) - if (newImportPath) { - str.overwrite( - source.start!, - source.end!, - JSON.stringify(newImportPath), - ) - } - } - } - } - writeFileSync(file, str.toString()) -} diff --git a/packages/vite/src/node/tsconfig.json b/packages/vite/src/node/tsconfig.json index bfaac1db6cbf00..a7f7890f1d0e7b 100644 --- a/packages/vite/src/node/tsconfig.json +++ b/packages/vite/src/node/tsconfig.json @@ -3,6 +3,7 @@ "include": ["./", "../dep-types", "../types"], "exclude": ["**/__tests__"], "compilerOptions": { - "lib": ["ESNext", "DOM"] + "lib": ["ESNext", "DOM"], + "stripInternal": true } } diff --git a/packages/vite/tsconfig.json b/packages/vite/tsconfig.json index a2dbcaf01f6cc3..afcebbe0e7b69a 100644 --- a/packages/vite/tsconfig.json +++ b/packages/vite/tsconfig.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.base.json", "include": [ "./rollup.config.ts", - "scripts", + "./rollup.dts.config.ts", "src/node/__tests__", "src/types/shims.d.ts" ], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b33cdbd3a847ba..e0406f3389b179 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,9 +27,6 @@ importers: '@babel/types': specifier: ^7.23.0 version: 7.23.0 - '@microsoft/api-extractor': - specifier: ^7.38.0 - version: 7.38.0(@types/node@18.18.4) '@rollup/plugin-typescript': specifier: ^11.1.5 version: 11.1.5(rollup@3.29.2)(tslib@2.6.2)(typescript@5.2.2) @@ -230,8 +227,8 @@ importers: specifier: ^8.4.31 version: 8.4.31 rollup: - specifier: ^3.29.2 - version: 3.29.2 + specifier: ^3.29.4 + version: 3.29.4 optionalDependencies: fsevents: specifier: ~2.3.3 @@ -240,36 +237,30 @@ importers: '@ampproject/remapping': specifier: ^2.2.1 version: 2.2.1 - '@babel/parser': - specifier: ^7.23.0 - version: 7.23.0 - '@babel/types': - specifier: ^7.23.0 - version: 7.23.0 '@jridgewell/trace-mapping': specifier: ^0.3.19 version: 0.3.19 '@rollup/plugin-alias': specifier: ^5.0.1 - version: 5.0.1(rollup@3.29.2) + version: 5.0.1(rollup@3.29.4) '@rollup/plugin-commonjs': specifier: ^25.0.5 - version: 25.0.5(rollup@3.29.2) + version: 25.0.5(rollup@3.29.4) '@rollup/plugin-dynamic-import-vars': specifier: ^2.0.6 - version: 2.0.6(rollup@3.29.2) + version: 2.0.6(rollup@3.29.4) '@rollup/plugin-json': specifier: ^6.0.1 - version: 6.0.1(rollup@3.29.2) + version: 6.0.1(rollup@3.29.4) '@rollup/plugin-node-resolve': specifier: 15.2.3 - version: 15.2.3(rollup@3.29.2) + version: 15.2.3(rollup@3.29.4) '@rollup/plugin-typescript': specifier: ^11.1.5 - version: 11.1.5(rollup@3.29.2)(tslib@2.6.2)(typescript@5.2.2) + version: 11.1.5(rollup@3.29.4)(tslib@2.6.2)(typescript@5.2.2) '@rollup/pluginutils': specifier: ^5.0.5 - version: 5.0.5(rollup@3.29.2) + version: 5.0.5(rollup@3.29.4) '@types/escape-html': specifier: ^1.0.2 version: 1.0.2 @@ -387,9 +378,12 @@ importers: resolve.exports: specifier: ^2.0.2 version: 2.0.2 + rollup-plugin-dts: + specifier: ^6.1.0 + version: 6.1.0(rollup@3.29.4)(typescript@5.2.2) rollup-plugin-license: specifier: ^3.1.0 - version: 3.1.0(rollup@3.29.2) + version: 3.1.0(rollup@3.29.4) sirv: specifier: ^2.0.3 version: 2.0.3(patch_hash=z45f224eewh2pgpijxcc3aboqm) @@ -1966,6 +1960,7 @@ packages: /@babel/highlight@7.22.13: resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} + requiresBuild: true dependencies: '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 @@ -3527,53 +3522,6 @@ packages: - supports-color dev: false - /@microsoft/api-extractor-model@7.28.2(@types/node@18.18.4): - resolution: {integrity: sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==} - dependencies: - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.61.0(@types/node@18.18.4) - transitivePeerDependencies: - - '@types/node' - dev: true - - /@microsoft/api-extractor@7.38.0(@types/node@18.18.4): - resolution: {integrity: sha512-e1LhZYnfw+JEebuY2bzhw0imDCl1nwjSThTrQqBXl40hrVo6xm3j/1EpUr89QyzgjqmAwek2ZkIVZbrhaR+cqg==} - hasBin: true - dependencies: - '@microsoft/api-extractor-model': 7.28.2(@types/node@18.18.4) - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.61.0(@types/node@18.18.4) - '@rushstack/rig-package': 0.5.1 - '@rushstack/ts-command-line': 4.16.1 - colors: 1.2.5 - lodash: 4.17.21 - resolve: 1.22.4 - semver: 7.5.4 - source-map: 0.6.1 - typescript: 5.0.4 - transitivePeerDependencies: - - '@types/node' - dev: true - - /@microsoft/tsdoc-config@0.16.1: - resolution: {integrity: sha512-2RqkwiD4uN6MLnHFljqBlZIXlt/SaUT6cuogU1w2ARw4nKuuppSmR0+s+NC+7kXBQykd9zzu0P4HtBpZT5zBpQ==} - dependencies: - '@microsoft/tsdoc': 0.14.1 - ajv: 6.12.6 - jju: 1.4.0 - resolve: 1.19.0 - dev: true - - /@microsoft/tsdoc@0.14.1: - resolution: {integrity: sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw==} - dev: true - - /@microsoft/tsdoc@0.14.2: - resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} - dev: true - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -3616,7 +3564,7 @@ packages: slash: 4.0.0 dev: true - /@rollup/plugin-alias@5.0.1(rollup@3.29.2): + /@rollup/plugin-alias@5.0.1(rollup@3.29.4): resolution: {integrity: sha512-JObvbWdOHoMy9W7SU0lvGhDtWq9PllP5mjpAy+TUslZG/WzOId9u80Hsqq1vCUn9pFJ0cxpdcnAv+QzU2zFH3Q==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3625,7 +3573,7 @@ packages: rollup: optional: true dependencies: - rollup: 3.29.2 + rollup: 3.29.4 slash: 4.0.0 dev: true @@ -3647,7 +3595,7 @@ packages: rollup: 3.29.2 dev: true - /@rollup/plugin-commonjs@25.0.5(rollup@3.29.2): + /@rollup/plugin-commonjs@25.0.5(rollup@3.29.4): resolution: {integrity: sha512-xY8r/A9oisSeSuLCTfhssyDjo9Vp/eDiRLXkg1MXCcEEgEjPmLU+ZyDB20OOD0NlyDa/8SGbK5uIggF5XTx77w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3656,16 +3604,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.5(rollup@3.29.2) + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.27.0 - rollup: 3.29.2 + rollup: 3.29.4 dev: true - /@rollup/plugin-dynamic-import-vars@2.0.6(rollup@3.29.2): + /@rollup/plugin-dynamic-import-vars@2.0.6(rollup@3.29.4): resolution: {integrity: sha512-MBsToinAS+/aQjjw1vEJCXA3/wy6K4WnN6RLldZybASVvOKjacTLvvXq0gADCczcecmQGMTJMfEgUvOM0K/juA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3674,12 +3622,12 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.5(rollup@3.29.2) + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) astring: 1.8.6 estree-walker: 2.0.2 fast-glob: 3.3.1 magic-string: 0.27.0 - rollup: 3.29.2 + rollup: 3.29.4 dev: true /@rollup/plugin-json@6.0.0(rollup@3.29.2): @@ -3695,7 +3643,7 @@ packages: rollup: 3.29.2 dev: true - /@rollup/plugin-json@6.0.1(rollup@3.29.2): + /@rollup/plugin-json@6.0.1(rollup@3.29.4): resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3704,8 +3652,8 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.5(rollup@3.29.2) - rollup: 3.29.2 + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) + rollup: 3.29.4 dev: true /@rollup/plugin-node-resolve@15.2.1(rollup@3.29.2): @@ -3726,7 +3674,7 @@ packages: rollup: 3.29.2 dev: true - /@rollup/plugin-node-resolve@15.2.3(rollup@3.29.2): + /@rollup/plugin-node-resolve@15.2.3(rollup@3.29.4): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3735,13 +3683,13 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.5(rollup@3.29.2) + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) '@types/resolve': 1.20.2 deepmerge: 4.2.2 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.4 - rollup: 3.29.2 + rollup: 3.29.4 dev: true /@rollup/plugin-replace@5.0.2(rollup@3.29.2): @@ -3778,6 +3726,26 @@ packages: typescript: 5.2.2 dev: true + /@rollup/plugin-typescript@11.1.5(rollup@3.29.4)(tslib@2.6.2)(typescript@5.2.2): + resolution: {integrity: sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0||^4.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) + resolve: 1.22.4 + rollup: 3.29.4 + tslib: 2.6.2 + typescript: 5.2.2 + dev: true + /@rollup/pluginutils@5.0.4(rollup@3.29.2): resolution: {integrity: sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==} engines: {node: '>=14.0.0'} @@ -3808,38 +3776,19 @@ packages: rollup: 3.29.2 dev: true - /@rushstack/node-core-library@3.61.0(@types/node@18.18.4): - resolution: {integrity: sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==} + /@rollup/pluginutils@5.0.5(rollup@3.29.4): + resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} + engines: {node: '>=14.0.0'} peerDependencies: - '@types/node': '*' + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: - '@types/node': + rollup: optional: true dependencies: - '@types/node': 18.18.4 - colors: 1.2.5 - fs-extra: 7.0.1 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.4 - semver: 7.5.4 - z-schema: 5.0.3 - dev: true - - /@rushstack/rig-package@0.5.1: - resolution: {integrity: sha512-pXRYSe29TjRw7rqxD4WS3HN/sRSbfr+tJs4a9uuaSIBAITbUggygdhuG0VrO0EO+QqH91GhYMN4S6KRtOEmGVA==} - dependencies: - resolve: 1.22.4 - strip-json-comments: 3.1.1 - dev: true - - /@rushstack/ts-command-line@4.16.1: - resolution: {integrity: sha512-+OCsD553GYVLEmz12yiFjMOzuPeCiZ3f8wTiFHL30ZVXexTyPmgjwXEhg2K2P0a2lVf+8YBy7WtPoflB2Fp8/A==} - dependencies: - '@types/argparse': 1.0.38 - argparse: 1.0.10 - colors: 1.2.5 - string-argv: 0.3.2 + '@types/estree': 1.0.2 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 3.29.4 dev: true /@sinclair/typebox@0.25.24: @@ -3858,10 +3807,6 @@ packages: /@tsconfig/node16@1.0.2: resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==} - /@types/argparse@1.0.38: - resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} - dev: true - /@types/babel__core@7.20.2: resolution: {integrity: sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==} dependencies: @@ -4514,6 +4459,7 @@ packages: /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} + requiresBuild: true dependencies: color-convert: 1.9.3 @@ -4562,12 +4508,6 @@ packages: /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -4920,6 +4860,7 @@ packages: /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} + requiresBuild: true dependencies: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 @@ -5009,6 +4950,7 @@ packages: /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + requiresBuild: true dependencies: color-name: 1.1.3 @@ -5021,6 +4963,7 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + requiresBuild: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -5035,11 +4978,6 @@ packages: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true - /colors@1.2.5: - resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==} - engines: {node: '>=0.1.90'} - dev: true - /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -5725,6 +5663,7 @@ packages: /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + requiresBuild: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -6227,15 +6166,6 @@ packages: universalify: 2.0.0 dev: true - /fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - dev: true - /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -6557,6 +6487,7 @@ packages: /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + requiresBuild: true /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} @@ -6716,11 +6647,6 @@ packages: resolve-from: 4.0.0 dev: true - /import-lazy@4.0.0: - resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} - engines: {node: '>=8'} - dev: true - /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -6999,10 +6925,6 @@ packages: hasBin: true dev: true - /jju@1.4.0: - resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - dev: true - /js-stringify@1.0.2: resolution: {integrity: sha1-Fzb939lyTyijaCrcYjCufk6Weds=} dev: true @@ -7080,12 +7002,6 @@ packages: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true - /jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - optionalDependencies: - graceful-fs: 4.2.11 - dev: true - /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: @@ -7382,14 +7298,6 @@ packages: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: false - /lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - dev: true - - /lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - dev: true - /lodash.ismatch@4.4.0: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} dev: true @@ -8812,13 +8720,6 @@ packages: engines: {node: '>=10'} dev: true - /resolve@1.19.0: - resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} - dependencies: - is-core-module: 2.13.0 - path-parse: 1.0.7 - dev: true - /resolve@1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true @@ -8887,7 +8788,21 @@ packages: '@babel/code-frame': 7.22.13 dev: true - /rollup-plugin-license@3.1.0(rollup@3.29.2): + /rollup-plugin-dts@6.1.0(rollup@3.29.4)(typescript@5.2.2): + resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} + engines: {node: '>=16'} + peerDependencies: + rollup: ^3.29.4 || ^4 + typescript: ^4.5 || ^5.0 + dependencies: + magic-string: 0.30.4 + rollup: 3.29.4 + typescript: 5.2.2 + optionalDependencies: + '@babel/code-frame': 7.22.13 + dev: true + + /rollup-plugin-license@3.1.0(rollup@3.29.4): resolution: {integrity: sha512-Cny2H2hJ7K+VdcJkH1pNcYRVhqIhZNu/fPusedW53fNZQOIwpXiznJ220EFvDkJbFUEkLqIDsDB5bEr/N9qfqw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -8900,7 +8815,7 @@ packages: mkdirp: 3.0.1 moment: 2.29.3 package-name-regex: 2.0.6 - rollup: 3.29.2 + rollup: 3.29.4 spdx-expression-validate: 2.0.0 spdx-satisfies: 5.0.1 dev: true @@ -8911,6 +8826,14 @@ packages: hasBin: true optionalDependencies: fsevents: 2.3.3 + dev: true + + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -9212,10 +9135,6 @@ packages: through: 2.3.8 dev: true - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true - /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -9392,6 +9311,7 @@ packages: /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} + requiresBuild: true dependencies: has-flag: 3.0.0 @@ -9740,12 +9660,6 @@ packages: is-typed-array: 1.1.10 dev: true - /typescript@5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} - hasBin: true - dev: true - /typescript@5.2.2: resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} @@ -9841,11 +9755,6 @@ packages: engines: {node: '>=4'} dev: false - /universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - dev: true - /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -9915,11 +9824,6 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /validator@13.7.0: - resolution: {integrity: sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==} - engines: {node: '>= 0.10'} - dev: true - /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -10283,18 +10187,6 @@ packages: stacktracey: 2.1.8 dev: true - /z-schema@5.0.3: - resolution: {integrity: sha512-sGvEcBOTNum68x9jCpCVGPFJ6mWnkD0YxOcddDlJHRx3tKdB2q8pCHExMVZo/AV/6geuVJXG7hljDaWG8+5GDw==} - engines: {node: '>=8.0.0'} - hasBin: true - dependencies: - lodash.get: 4.4.2 - lodash.isequal: 4.5.0 - validator: 13.7.0 - optionalDependencies: - commander: 2.20.3 - dev: true - /zimmerframe@1.0.0: resolution: {integrity: sha512-H6qQ6LtjP+kDQwDgol18fPi4OCo7F+73ZBYt2U9c1D3V74bIMKxXvyrN0x+1I7/RYh5YsausflQxQR/qwDLHPQ==} dev: true