diff --git a/package.json b/package.json index f41cfbe0..04615ce3 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,5 @@ }, "packageManager": "pnpm@9.1.0", "dependencies": { - "@vercel/speed-insights": "^1.1.0" } } diff --git a/packages/scan/package.json b/packages/scan/package.json index 67288e54..d894c256 100644 --- a/packages/scan/package.json +++ b/packages/scan/package.json @@ -215,21 +215,17 @@ }, "dependencies": { "@babel/core": "^7.26.0", - "@babel/generator": "^7.26.2", "@babel/types": "^7.26.0", - "@clack/core": "^0.3.5", "@clack/prompts": "^0.8.2", "@preact/signals": "^1.3.1", "@rollup/pluginutils": "^5.1.3", "@types/node": "^20.17.9", "bippy": "0.2.7", "esbuild": "^0.24.0", - "estree-walker": "^3.0.3", "kleur": "^4.1.5", "mri": "^1.2.0", "playwright": "^1.49.0", - "preact": "^10.25.1", - "tsx": "^4.0.0" + "preact": "^10.25.1" }, "devDependencies": { "@esbuild-plugins/tsconfig-paths": "^0.1.2", @@ -237,7 +233,6 @@ "@types/babel__core": "^7.20.5", "@types/react": "^18.0.0", "@types/react-router": "^5.1.0", - "@vercel/style-guide": "^6.0.0", "clsx": "^2.1.1", "es-module-lexer": "^1.5.4", "next": "*", diff --git a/packages/scan/tsup.config.ts b/packages/scan/tsup.config.ts index f8b41576..b6441d39 100644 --- a/packages/scan/tsup.config.ts +++ b/packages/scan/tsup.config.ts @@ -48,12 +48,10 @@ const banner = `/** void (async () => { await init; - if (fs.existsSync(DIST_PATH)) { - fs.rmSync(DIST_PATH, { recursive: true }); - } - fs.mkdirSync(DIST_PATH, { recursive: true }); - - const code = fs.readFileSync('./src/core/index.ts', 'utf8'); + const code = fs.readFileSync( + path.join(__dirname, './src/core/index.ts'), + 'utf8', + ); const [_, allExports] = parse(code); const names: Array = []; for (const exportItem of allExports) { @@ -75,9 +73,15 @@ void (async () => { setTimeout(() => { for (const ext of ['js', 'mjs', 'global.js']) { - fs.writeFileSync(`./dist/rsc-shim.${ext}`, script); + fs.writeFileSync(path.join(__dirname, `./dist/rsc-shim.${ext}`), script); + } + for (const ext of ['d.mts', 'd.ts']) { + fs.writeFileSync( + path.join(__dirname, `./dist/rsc-shim.${ext}`), + `export {}`, + ); } - }, 500); + }, 500); // for some reason it clears the file if we don't wait })(); export default defineConfig([ @@ -105,7 +109,6 @@ export default defineConfig([ 'next', 'next/navigation', 'react-router', - 'react-router-dom', '@remix-run/react', ], esbuildPlugins: [workerPlugin], @@ -163,7 +166,6 @@ export default defineConfig([ 'next', 'next/navigation', 'react-router', - 'react-router-dom', '@remix-run/react', 'preact', '@preact/signals', @@ -215,12 +217,10 @@ export default defineConfig([ target: 'esnext', external: [ 'unplugin', - 'estree-walker', '@rollup/pluginutils', '@babel/types', '@babel/parser', '@babel/traverse', - '@babel/generator', '@babel/core', 'rollup', 'webpack', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e1bf084..544923dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,10 +7,6 @@ settings: importers: .: - dependencies: - '@vercel/speed-insights': - specifier: ^1.1.0 - version: 1.1.0(next@15.0.3(@babel/core@7.26.0)(react@19.0.0))(react@19.0.0) devDependencies: '@biomejs/biome': specifier: ^1.9.4 @@ -162,15 +158,9 @@ importers: '@babel/core': specifier: ^7.26.0 version: 7.26.0 - '@babel/generator': - specifier: ^7.26.2 - version: 7.26.2 '@babel/types': specifier: ^7.26.0 version: 7.26.0 - '@clack/core': - specifier: ^0.3.5 - version: 0.3.5 '@clack/prompts': specifier: ^0.8.2 version: 0.8.2 @@ -189,9 +179,6 @@ importers: esbuild: specifier: ^0.24.0 version: 0.24.0 - estree-walker: - specifier: ^3.0.3 - version: 3.0.3 kleur: specifier: ^4.1.5 version: 4.1.5 @@ -204,9 +191,6 @@ importers: preact: specifier: ^10.25.1 version: 10.25.1 - tsx: - specifier: ^4.0.0 - version: 4.0.0 optionalDependencies: unplugin: specifier: 2.1.0 @@ -227,9 +211,6 @@ importers: '@types/react-router': specifier: ^5.1.0 version: 5.1.20 - '@vercel/style-guide': - specifier: ^6.0.0 - version: 6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@20.17.10)(terser@5.36.0)) clsx: specifier: ^2.1.1 version: 2.1.1 @@ -268,7 +249,7 @@ importers: version: 5.36.0 tsup: specifier: ^8.0.0 - version: 8.2.4(jiti@1.21.6)(postcss@8.4.49)(tsx@4.0.0)(typescript@5.7.3)(yaml@2.6.1) + version: 8.2.4(jiti@1.21.6)(postcss@8.4.49)(typescript@5.7.3)(yaml@2.6.1) vitest: specifier: ^1.0.0 version: 1.0.0(@types/node@20.17.10)(terser@5.36.0) @@ -6454,44 +6435,6 @@ snapshots: next: 15.0.3(@babel/core@7.26.0)(react-dom@19.0.0-rc-66855b96-20241106(react@19.0.0-rc-66855b96-20241106))(react@19.0.0-rc-66855b96-20241106) react: 19.0.0-rc-66855b96-20241106 - '@vercel/speed-insights@1.1.0(next@15.0.3(@babel/core@7.26.0)(react@19.0.0))(react@19.0.0)': - optionalDependencies: - next: 15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - react: 19.0.0 - - '@vercel/style-guide@6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@20.17.10)(terser@5.36.0))': - dependencies: - '@babel/core': 7.26.0 - '@babel/eslint-parser': 7.25.9(@babel/core@7.26.0)(eslint@8.57.1) - '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.3) - eslint-config-prettier: 9.1.0(eslint@8.57.1) - eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1)) - eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.1) - eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) - eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) - eslint-plugin-playwright: 1.8.3(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1) - eslint-plugin-react: 7.37.2(eslint@8.57.1) - eslint-plugin-react-hooks: 4.6.2(eslint@8.57.1) - eslint-plugin-testing-library: 6.5.0(eslint@8.57.1)(typescript@5.7.3) - eslint-plugin-tsdoc: 0.2.17 - eslint-plugin-unicorn: 51.0.1(eslint@8.57.1) - eslint-plugin-vitest: 0.3.26(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)(vitest@1.0.0(@types/node@20.17.10)(terser@5.36.0)) - prettier-plugin-packagejson: 2.5.6(prettier@3.3.3) - optionalDependencies: - eslint: 8.57.1 - prettier: 3.3.3 - typescript: 5.7.3 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - eslint-plugin-import-x - - jest - - supports-color - - vitest - '@vercel/style-guide@6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2))': dependencies: '@babel/core': 7.26.0 @@ -7759,17 +7702,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-vitest@0.3.26(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)(vitest@1.0.0(@types/node@20.17.10)(terser@5.36.0)): - dependencies: - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.3) - eslint: 8.57.1 - optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) - vitest: 1.0.0(@types/node@20.17.10)(terser@5.36.0) - transitivePeerDependencies: - - supports-color - - typescript - eslint-plugin-vitest@0.3.26(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)): dependencies: '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.3) @@ -9093,13 +9025,12 @@ snapshots: optionalDependencies: postcss: 8.4.49 - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.49)(tsx@4.0.0)(yaml@2.6.1): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.49)(yaml@2.6.1): dependencies: lilconfig: 3.1.3 optionalDependencies: jiti: 1.21.6 postcss: 8.4.49 - tsx: 4.0.0 yaml: 2.6.1 postcss-nested@6.2.0(postcss@8.4.49): @@ -9948,7 +9879,7 @@ snapshots: tslib@2.8.1: {} - tsup@8.2.4(jiti@1.21.6)(postcss@8.4.49)(tsx@4.0.0)(typescript@5.7.3)(yaml@2.6.1): + tsup@8.2.4(jiti@1.21.6)(postcss@8.4.49)(typescript@5.7.3)(yaml@2.6.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 @@ -9960,7 +9891,7 @@ snapshots: globby: 11.1.0 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.49)(tsx@4.0.0)(yaml@2.6.1) + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.49)(yaml@2.6.1) resolve-from: 5.0.0 rollup: 4.28.0 source-map: 0.8.0-beta.0