diff --git a/client-src/index.ts b/client-src/index.ts index 41960a5..68d4286 100644 --- a/client-src/index.ts +++ b/client-src/index.ts @@ -9,10 +9,10 @@ */ // @ts-expect-error: No type definitions available for '@rspack/core/hot/emitter.js' -import hotEmitter from '@rspack/core/hot/emitter.js'; +import { emitter as hotEmitter } from '@rspack/core/hot/emitter.js'; /* Rspack dev server runtime client */ // @ts-expect-error: No type definitions available for '@rspack/core/hot/log.js' -import webpackHotLog from '@rspack/core/hot/log.js'; +import { log as webpackHotLog } from '@rspack/core/hot/log.js'; import { createOverlay, formatProblem } from './overlay.js'; import socket from './socket.js'; import { defineProgressElement, isProgressSupported } from './progress.js'; diff --git a/package.json b/package.json index a715d7f..e6cc001 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@biomejs/biome": "^1.8.3", "@jest/reporters": "29.7.0", "@jest/test-sequencer": "^29.7.0", - "@rspack/core": "1.7.1", + "@rspack/core": "2.0.0-beta.2", "@rspack/plugin-react-refresh": "1.0.0", "@types/express": "5.0.6", "@types/jest": "29.5.12", @@ -98,7 +98,7 @@ "supertest": "^6.1.3", "tcp-port-used": "^1.0.2", "ts-jest": "29.1.2", - "typescript": "5.0.2", + "typescript": "^5.9.3", "wait-for-expect": "^3.0.2", "webpack": "^5.94.0", "webpack-merge": "^6.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6fdaeab..cba34d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -106,8 +106,8 @@ importers: specifier: ^29.7.0 version: 29.7.0 '@rspack/core': - specifier: 1.7.1 - version: 1.7.1 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 '@rspack/plugin-react-refresh': specifier: 1.0.0 version: 1.0.0(react-refresh@0.14.0) @@ -143,7 +143,7 @@ importers: version: 7.0.3 css-loader: specifier: ^7.1.2 - version: 7.1.2(@rspack/core@1.7.1)(webpack@5.94.0) + version: 7.1.2(@rspack/core@2.0.0-beta.2)(webpack@5.94.0) hono: specifier: ^4.6.8 version: 4.10.3 @@ -170,7 +170,7 @@ importers: version: 3.2.5 puppeteer: specifier: ^24.34.0 - version: 24.34.0(typescript@5.0.2) + version: 24.34.0(typescript@5.9.3) react-refresh: specifier: 0.14.0 version: 0.14.0 @@ -194,10 +194,10 @@ importers: version: 1.0.2 ts-jest: specifier: 29.1.2 - version: 29.1.2(@babel/core@7.25.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@24.10.7))(typescript@5.0.2) + version: 29.1.2(@babel/core@7.25.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@24.10.7))(typescript@5.9.3) typescript: - specifier: 5.0.2 - version: 5.0.2 + specifier: ^5.9.3 + version: 5.9.3 wait-for-expect: specifier: ^3.0.2 version: 3.0.2 @@ -567,24 +567,6 @@ packages: '@leichtgewicht/ip-codec@2.0.5': resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} - '@module-federation/error-codes@0.22.0': - resolution: {integrity: sha512-xF9SjnEy7vTdx+xekjPCV5cIHOGCkdn3pIxo9vU7gEZMIw0SvAEdsy6Uh17xaCpm8V0FWvR0SZoK9Ik6jGOaug==} - - '@module-federation/runtime-core@0.22.0': - resolution: {integrity: sha512-GR1TcD6/s7zqItfhC87zAp30PqzvceoeDGYTgF3Vx2TXvsfDrhP6Qw9T4vudDQL3uJRne6t7CzdT29YyVxlgIA==} - - '@module-federation/runtime-tools@0.22.0': - resolution: {integrity: sha512-4ScUJ/aUfEernb+4PbLdhM/c60VHl698Gn1gY21m9vyC1Ucn69fPCA1y2EwcCB7IItseRMoNhdcWQnzt/OPCNA==} - - '@module-federation/runtime@0.22.0': - resolution: {integrity: sha512-38g5iPju2tPC3KHMPxRKmy4k4onNp6ypFPS1eKGsNLUkXgHsPMBFqAjDw96iEcjri91BrahG4XcdyKi97xZzlA==} - - '@module-federation/sdk@0.22.0': - resolution: {integrity: sha512-x4aFNBKn2KVQRuNVC5A7SnrSCSqyfIWmm1DvubjbO9iKFe7ith5niw8dqSFBekYBg2Fwy+eMg4sEFNVvCAdo6g==} - - '@module-federation/webpack-bundler-runtime@0.22.0': - resolution: {integrity: sha512-aM8gCqXu+/4wBmJtVeMeeMN5guw3chf+2i6HajKtQv7SJfxV/f4IyNQJUeUQu9HfiAZHjqtMV5Lvq/Lvh8LdyA==} - '@napi-rs/wasm-runtime@1.0.7': resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==} @@ -593,70 +575,70 @@ packages: engines: {node: '>=18'} hasBin: true - '@rspack/binding-darwin-arm64@1.7.1': - resolution: {integrity: sha512-3C0w0kfCHfgOH+AP/Dx1bm/b3AR/or5CmU22Abevek0m95ndU3iT902eLcm9JNiMQnDQLBQbolfj5P591t0oPg==} + '@rspack/binding-darwin-arm64@2.0.0-beta.2': + resolution: {integrity: sha512-foDz1asp37tHhjhiqh7CfyBc7jRpK0y4mfyJtpL25SsXwI21Lm/NgjD1XKofFrHu849WEXBkV6vpCpkGXxT7zQ==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@1.7.1': - resolution: {integrity: sha512-HTrBpdw2gWwcpJ3c8h4JF8B1YRNvrFT+K620ycttrlu/HvI4/U770BBJ/ej36R/hdh59JvMCGe+w49FyXv6rzg==} + '@rspack/binding-darwin-x64@2.0.0-beta.2': + resolution: {integrity: sha512-kTB066qqIqbhzrYRy4vTEnREAh6+Dev8L5haHG7pybnq8KoLJGwzOMNi6oKQdWthGrH20klV644/Wu0uraAscQ==} cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@1.7.1': - resolution: {integrity: sha512-BX9yAPCO0WBFyOzKl9bSXT/cH27nnOJp02smIQMxfv7RNfwGkJg5GgakYcuYG+9U1HEFitBSzmwS2+dxDcAxlg==} + '@rspack/binding-linux-arm64-gnu@2.0.0-beta.2': + resolution: {integrity: sha512-kIXEDznt/r0Fyy7ZnFFiv2YfxxlXr+YMlvHELwW5sqHsdgk3wS7jhNF6J2m/aTXT2/K58qSY63BibBX1B+s7pA==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-arm64-musl@1.7.1': - resolution: {integrity: sha512-maBX19XyiVkxzh/NA79ALetCobc4zUyoWkWLeCGyW5xKzhPVFatJp+qCiHqHkqUZcgRo+1i5ihoZ2bXmelIeZg==} + '@rspack/binding-linux-arm64-musl@2.0.0-beta.2': + resolution: {integrity: sha512-FpLD3SmI7P/By7jECqjfMuDU+YTLKMaQX9P6B0MuN/zwXJ8SFQ1TV7W478a64NuezytOhmbO4lkuF7XqZHe/Bg==} cpu: [arm64] os: [linux] - '@rspack/binding-linux-x64-gnu@1.7.1': - resolution: {integrity: sha512-8KJAeBLiWcN7zEc9aaS7LRJPZVtZuQU8mCsn+fRhdQDSc+a9FcTN8b6Lw29z8cejwbU6Gxr/8wk5XGexMWFaZA==} + '@rspack/binding-linux-x64-gnu@2.0.0-beta.2': + resolution: {integrity: sha512-MAS5P8c0sUQ6I6JvvGcyF4sOhsdb7G6+3BSdoERdACDrqTqtSVT6Txil8rKGrNdR/eVG/2jl/tFLWUKtyEn50A==} cpu: [x64] os: [linux] - '@rspack/binding-linux-x64-musl@1.7.1': - resolution: {integrity: sha512-Gn9x5vhKRELvSoZ3ZjquY8eWtCXur0OsYnZ2/ump8mofM6IDaL7Qqu3Hf4Kud31PDH0tfz0jWf9piX32HHPmgg==} + '@rspack/binding-linux-x64-musl@2.0.0-beta.2': + resolution: {integrity: sha512-NNJ4ah2B2HbjH+hnFX5HC8JPN5VbrV3A4CL/v5o9Elm01UxF3zeQr1gBc02MH6vdBo4rM0yrrH1b8lgC/z8r4w==} cpu: [x64] os: [linux] - '@rspack/binding-wasm32-wasi@1.7.1': - resolution: {integrity: sha512-2r9M5iVchmsFkp3sz7A5YnMm2TfpkB71LK3AoaRWKMfvf5oFky0GSGISYd2TCBASO+X2Qskaq+B24Szo8zH5FA==} + '@rspack/binding-wasm32-wasi@2.0.0-beta.2': + resolution: {integrity: sha512-rn2phtFxeDN+Wbf8JEZT2d731Vzl4wFRapW5rGS8wxLaz8PkR6o+5VbB8fBy+OWti7uEFxXEsrB7Hv0aVks/uw==} cpu: [wasm32] - '@rspack/binding-win32-arm64-msvc@1.7.1': - resolution: {integrity: sha512-/WIHp982yqqqAuiz2WLtf1ofo9d1lHDGZJ7flxFllb1iMgnUeSRyX6stxEi11K3Rg6pQa7FdCZGKX/engyj2bw==} + '@rspack/binding-win32-arm64-msvc@2.0.0-beta.2': + resolution: {integrity: sha512-1m6Vt5kNGQXJBj5lxR9ztQCZz1O6ydO5dDw1fNOXSNidK7BD4iqes9odRNkaC8gual6NybfaI6mIdC/iM+6xWA==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@1.7.1': - resolution: {integrity: sha512-Kpela29n+kDGGsss6q/3qTd6n9VW7TOQaiA7t1YLdCCl8qqcdKlz/vWjFMd2MqgcSGC/16PvChE4sgpUvryfCQ==} + '@rspack/binding-win32-ia32-msvc@2.0.0-beta.2': + resolution: {integrity: sha512-EtUwWTP27wEv5C52ZiinA6AXtQkKQJZhML9cHbTwdeZjtD1EYpqpgfL9SF/FsTgwXG1Qiz02NjccvP5HdLlthg==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@1.7.1': - resolution: {integrity: sha512-B/y4MWqP2Xeto1/HV0qtZNOMPSLrEVOqi2b7JSIXG/bhlf+3IAkDzEEoHs+ZikLR4C8hMaS0pVJsDGKFmGzC9A==} + '@rspack/binding-win32-x64-msvc@2.0.0-beta.2': + resolution: {integrity: sha512-CPQDH64D+xz8v1jdv5+0PIIHZ15NJLm8xN8ThlEgWARAJjt+1NXLq8rtuk86j4oxmaVFPle6qmq6QSwAP5PVCQ==} cpu: [x64] os: [win32] - '@rspack/binding@1.7.1': - resolution: {integrity: sha512-qVTV1/UWpMSZktvK5A8+HolgR1Qf0nYR3Gg4Vax5x3/BcHDpwGZ0fbdFRUirGVWH/XwxZ81zoI6F2SZq7xbX+w==} + '@rspack/binding@2.0.0-beta.2': + resolution: {integrity: sha512-02V7uH82c9CqPifH9k4r10DM0gQyaW9aUUOCqwQdV8bjhdP+cta7qbz2iGOWGcJiprQqme635gVmfhsY26Sv0Q==} - '@rspack/core@1.7.1': - resolution: {integrity: sha512-kRxfY8RRa6nU3/viDvAIP6CRpx+0rfXFRonPL0pHBx8u6HhV7m9rLEyaN6MWsLgNIAWkleFGb7tdo4ux2ljRJQ==} - engines: {node: '>=18.12.0'} + '@rspack/core@2.0.0-beta.2': + resolution: {integrity: sha512-UD/LxAi9BCYGWKUMW82gwqYxWF46P5+P2jVSHC3rpv6IJ2EdPfRL1wqxbMGbkslD3YTB56vM18uwo1d5ThqrjA==} + engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: + '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 '@swc/helpers': '>=0.5.1' peerDependenciesMeta: + '@module-federation/runtime-tools': + optional: true '@swc/helpers': optional: true - '@rspack/lite-tapable@1.1.0': - resolution: {integrity: sha512-E2B0JhYFmVAwdDiG14+DW0Di4Ze4Jg10Pc4/lILUrd5DRCaklduz2OvJ5HYQ6G+hd+WTzqQb3QnDNfK4yvAFYw==} - '@rspack/plugin-react-refresh@1.0.0': resolution: {integrity: sha512-WvXkLewW5G0Mlo5H1b251yDh5FFiH4NDAbYlFpvFjcuXX2AchZRf9zdw57BDE/ADyWsJgA8kixN/zZWBTN3iYA==} peerDependencies: @@ -2880,9 +2862,9 @@ packages: typed-query-selector@2.12.0: resolution: {integrity: sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==} - typescript@5.0.2: - resolution: {integrity: sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==} - engines: {node: '>=12.20'} + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} hasBin: true undici-types@7.16.0: @@ -3521,31 +3503,6 @@ snapshots: '@leichtgewicht/ip-codec@2.0.5': {} - '@module-federation/error-codes@0.22.0': {} - - '@module-federation/runtime-core@0.22.0': - dependencies: - '@module-federation/error-codes': 0.22.0 - '@module-federation/sdk': 0.22.0 - - '@module-federation/runtime-tools@0.22.0': - dependencies: - '@module-federation/runtime': 0.22.0 - '@module-federation/webpack-bundler-runtime': 0.22.0 - - '@module-federation/runtime@0.22.0': - dependencies: - '@module-federation/error-codes': 0.22.0 - '@module-federation/runtime-core': 0.22.0 - '@module-federation/sdk': 0.22.0 - - '@module-federation/sdk@0.22.0': {} - - '@module-federation/webpack-bundler-runtime@0.22.0': - dependencies: - '@module-federation/runtime': 0.22.0 - '@module-federation/sdk': 0.22.0 - '@napi-rs/wasm-runtime@1.0.7': dependencies: '@emnapi/core': 1.6.0 @@ -3567,58 +3524,54 @@ snapshots: - bare-buffer - supports-color - '@rspack/binding-darwin-arm64@1.7.1': + '@rspack/binding-darwin-arm64@2.0.0-beta.2': optional: true - '@rspack/binding-darwin-x64@1.7.1': + '@rspack/binding-darwin-x64@2.0.0-beta.2': optional: true - '@rspack/binding-linux-arm64-gnu@1.7.1': + '@rspack/binding-linux-arm64-gnu@2.0.0-beta.2': optional: true - '@rspack/binding-linux-arm64-musl@1.7.1': + '@rspack/binding-linux-arm64-musl@2.0.0-beta.2': optional: true - '@rspack/binding-linux-x64-gnu@1.7.1': + '@rspack/binding-linux-x64-gnu@2.0.0-beta.2': optional: true - '@rspack/binding-linux-x64-musl@1.7.1': + '@rspack/binding-linux-x64-musl@2.0.0-beta.2': optional: true - '@rspack/binding-wasm32-wasi@1.7.1': + '@rspack/binding-wasm32-wasi@2.0.0-beta.2': dependencies: '@napi-rs/wasm-runtime': 1.0.7 optional: true - '@rspack/binding-win32-arm64-msvc@1.7.1': + '@rspack/binding-win32-arm64-msvc@2.0.0-beta.2': optional: true - '@rspack/binding-win32-ia32-msvc@1.7.1': + '@rspack/binding-win32-ia32-msvc@2.0.0-beta.2': optional: true - '@rspack/binding-win32-x64-msvc@1.7.1': + '@rspack/binding-win32-x64-msvc@2.0.0-beta.2': optional: true - '@rspack/binding@1.7.1': + '@rspack/binding@2.0.0-beta.2': optionalDependencies: - '@rspack/binding-darwin-arm64': 1.7.1 - '@rspack/binding-darwin-x64': 1.7.1 - '@rspack/binding-linux-arm64-gnu': 1.7.1 - '@rspack/binding-linux-arm64-musl': 1.7.1 - '@rspack/binding-linux-x64-gnu': 1.7.1 - '@rspack/binding-linux-x64-musl': 1.7.1 - '@rspack/binding-wasm32-wasi': 1.7.1 - '@rspack/binding-win32-arm64-msvc': 1.7.1 - '@rspack/binding-win32-ia32-msvc': 1.7.1 - '@rspack/binding-win32-x64-msvc': 1.7.1 + '@rspack/binding-darwin-arm64': 2.0.0-beta.2 + '@rspack/binding-darwin-x64': 2.0.0-beta.2 + '@rspack/binding-linux-arm64-gnu': 2.0.0-beta.2 + '@rspack/binding-linux-arm64-musl': 2.0.0-beta.2 + '@rspack/binding-linux-x64-gnu': 2.0.0-beta.2 + '@rspack/binding-linux-x64-musl': 2.0.0-beta.2 + '@rspack/binding-wasm32-wasi': 2.0.0-beta.2 + '@rspack/binding-win32-arm64-msvc': 2.0.0-beta.2 + '@rspack/binding-win32-ia32-msvc': 2.0.0-beta.2 + '@rspack/binding-win32-x64-msvc': 2.0.0-beta.2 - '@rspack/core@1.7.1': + '@rspack/core@2.0.0-beta.2': dependencies: - '@module-federation/runtime-tools': 0.22.0 - '@rspack/binding': 1.7.1 - '@rspack/lite-tapable': 1.1.0 - - '@rspack/lite-tapable@1.1.0': {} + '@rspack/binding': 2.0.0-beta.2 '@rspack/plugin-react-refresh@1.0.0(react-refresh@0.14.0)': dependencies: @@ -4254,14 +4207,14 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig@9.0.0(typescript@5.0.2): + cosmiconfig@9.0.0(typescript@5.9.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.0.2 + typescript: 5.9.3 create-jest@29.7.0(@types/node@24.10.7): dependencies: @@ -4288,7 +4241,7 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - css-loader@7.1.2(@rspack/core@1.7.1)(webpack@5.94.0): + css-loader@7.1.2(@rspack/core@2.0.0-beta.2)(webpack@5.94.0): dependencies: icss-utils: 5.1.0(postcss@8.4.47) postcss: 8.4.47 @@ -4299,7 +4252,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: - '@rspack/core': 1.7.1 + '@rspack/core': 2.0.0-beta.2 webpack: 5.94.0 cssesc@3.0.0: {} @@ -5614,11 +5567,11 @@ snapshots: - supports-color - utf-8-validate - puppeteer@24.34.0(typescript@5.0.2): + puppeteer@24.34.0(typescript@5.9.3): dependencies: '@puppeteer/browsers': 2.11.0 chromium-bidi: 12.0.1(devtools-protocol@0.0.1534754) - cosmiconfig: 9.0.0(typescript@5.0.2) + cosmiconfig: 9.0.0(typescript@5.9.3) devtools-protocol: 0.0.1534754 puppeteer-core: 24.34.0 typed-query-selector: 2.12.0 @@ -6092,7 +6045,7 @@ snapshots: dependencies: tslib: 2.7.0 - ts-jest@29.1.2(@babel/core@7.25.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@24.10.7))(typescript@5.0.2): + ts-jest@29.1.2(@babel/core@7.25.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@24.10.7))(typescript@5.9.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -6102,7 +6055,7 @@ snapshots: lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.6.3 - typescript: 5.0.2 + typescript: 5.9.3 yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.25.2 @@ -6124,7 +6077,7 @@ snapshots: typed-query-selector@2.12.0: {} - typescript@5.0.2: {} + typescript@5.9.3: {} undici-types@7.16.0: {} diff --git a/src/server.ts b/src/server.ts index bf2f129..56b3dfd 100644 --- a/src/server.ts +++ b/src/server.ts @@ -965,7 +965,6 @@ class Server< } }; - // @ts-expect-error too complex serverOptions[property] = ( Array.isArray(value) ? value.map((item) => readFile(item as string)) diff --git a/tsconfig.client.json b/tsconfig.client.json index 58d70f4..f1ed1fe 100644 --- a/tsconfig.client.json +++ b/tsconfig.client.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "ES2020", + "moduleResolution": "bundler", "target": "ES5", "outDir": "client", "rootDir": "client-src", diff --git a/tsconfig.json b/tsconfig.json index 9480542..509464d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,8 +18,5 @@ "outDir": "dist", "rootDir": "src" }, - "ts-node": { - "transpileOnly": true - }, "include": ["src/**/*", "src/options.json"] }