Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/dom/fixtures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react-dom": "^19.2.0"
},
"devDependencies": {
"@rsbuild/core": "1.6.0-beta.1",
"@rsbuild/core": "1.6.7-canary-57e2a56d-20251120152633",
"@rsbuild/plugin-react": "^1.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/dom": "^10.4.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@rsbuild/core": "1.6.0-beta.1",
"@rsbuild/core": "1.6.7-canary-57e2a56d-20251120152633",
"@rslib/core": "0.17.1",
"@rstest/core": "workspace:*",
"@rstest/tsconfig": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion e2e/projects/fixtures/packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react-dom": "^19.2.0"
},
"devDependencies": {
"@rsbuild/core": "1.6.0-beta.1",
"@rsbuild/core": "1.6.7-canary-57e2a56d-20251120152633",
"@rsbuild/plugin-react": "^1.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/dom": "^10.4.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/vue/fixtures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@rstest/core": "workspace:*",
"@rsbuild/core": "1.6.0-beta.1",
"@rsbuild/core": "1.6.7-canary-57e2a56d-20251120152633",
"@rsbuild/plugin-babel": "^1.0.6",
"@rsbuild/plugin-vue": "^1.2.0",
"@rsbuild/plugin-vue-jsx": "^1.1.1",
Expand Down
11 changes: 8 additions & 3 deletions e2e/wasm/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { expect, test } from '@rstest/core';
import * as wasm from './src/factorial.wasm';

// TODO: need to fix below error after bump rspack 1.6.2+
// WebAssemb ly.instantiate(): length overflow while decoding section length @+13
test.fails('WASM factorial', async () => {
test('WASM factorial', async () => {
expect(wasm._Z4facti(1)).toBe(1);
expect(wasm._Z4facti(2)).toBe(2);
expect(wasm._Z4facti(3)).toBe(6);
});

test('dynamic import WASM', async () => {
const { _Z4facti: AsyncFactorial } = await import('./src/factorial.wasm');

expect(AsyncFactorial(1)).toBe(1);
Expand Down
2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react-dom": "^19.2.0"
},
"devDependencies": {
"@rsbuild/core": "1.6.0-beta.1",
"@rsbuild/core": "1.6.7-canary-57e2a56d-20251120152633",
"@rsbuild/plugin-react": "^1.4.1",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"dependencies": {
"@types/chai": "^5.2.3",
"@rsbuild/core": "1.6.0-beta.1",
"@rsbuild/core": "1.6.7-canary-57e2a56d-20251120152633",
"tinypool": "^1.1.1"
},
"devDependencies": {
Expand Down
14 changes: 12 additions & 2 deletions packages/core/src/core/rsbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,14 @@ export const createRsbuildServer = async ({
if (err) {
reject(err);
}
resolve(typeof data === 'string' ? data : data!.toString());
const content =
typeof data === 'string'
? data
: fileName.endsWith('.wasm')
? data!.toString('base64')
: data!.toString('utf-8');

resolve(content);
});
});
};
Expand Down Expand Up @@ -395,10 +402,13 @@ export const createRsbuildServer = async ({

for (const entry of Object.keys(entrypoints!)) {
const e = entrypoints![entry]!;
const filteredAssets = e.assets!.filter(
(asset) => !asset.name.endsWith('.wasm'),
);

const distPath = path.join(
outputPath!,
e.assets![e.assets!.length - 1]!.name,
filteredAssets[filteredAssets.length - 1]!.name,
);

if (setupFiles[environmentName]![entry]) {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/runtime/worker/loadModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ export const loadModule = ({
? path.join(path.dirname(distPath), wasmPath)
: wasmPath;
const content = assetFiles[path.normalize(joinedPath)];

if (content) {
callback(null, Buffer.from(content, 'utf-8'));
callback(null, Buffer.from(content, 'base64'));
} else {
callback(
new Error(`WASM file ${joinedPath} not found in asset files.`),
Expand Down
2 changes: 0 additions & 2 deletions packages/core/tests/__snapshots__/config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ exports[`mergeRstestConfig > should merge config correctly with default config 1
],
"reportsDirectory": "<ROOT>/packages/core/tests/coverage",
},
"dev": undefined,
"disableConsoleIntercept": false,
"env": {},
"exclude": {
Expand All @@ -54,7 +53,6 @@ exports[`mergeRstestConfig > should merge config correctly with default config 1
"logHeapUsage": false,
"maxConcurrency": 5,
"name": "rstest",
"output": undefined,
"passWithNoTests": false,
"pool": {
"type": "forks",
Expand Down
100 changes: 95 additions & 5 deletions packages/core/tests/core/__snapshots__/rsbuild.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,20 @@ exports[`prepareRsbuild > should generate rspack config correctly (jsdom) 1`] =
"loader": "<ROOT>/node_modules/<PNPM_INNER>/@rsbuild/core/compiled/css-loader/index.js",
"options": {
"exportType": "string",
"importLoaders": 0,
"importLoaders": 1,
"modules": false,
"sourceMap": false,
},
},
{
"loader": "builtin:lightningcss-loader",
"options": {
"errorRecovery": true,
"targets": [
"node >= 16",
],
},
},
],
},
{
Expand Down Expand Up @@ -358,6 +367,15 @@ exports[`prepareRsbuild > should generate rspack config correctly (jsdom) 1`] =
],
"test": /\\\\\\.\\(\\?:woff\\|woff2\\|eot\\|ttf\\|otf\\|ttc\\)\\$/i,
},
{
"oneOf": [
{
"resourceQuery": /\\[\\?&\\]raw\\(\\?:&\\|=\\|\\$\\)/,
"type": "asset/source",
},
],
"test": /\\\\\\.json\\$/i,
},
{
"dependency": "url",
"generator": {
Expand Down Expand Up @@ -634,11 +652,20 @@ exports[`prepareRsbuild > should generate rspack config correctly (node) 1`] = `
"loader": "<ROOT>/node_modules/<PNPM_INNER>/@rsbuild/core/compiled/css-loader/index.js",
"options": {
"exportType": "string",
"importLoaders": 0,
"importLoaders": 1,
"modules": false,
"sourceMap": false,
},
},
{
"loader": "builtin:lightningcss-loader",
"options": {
"errorRecovery": true,
"targets": [
"node >= 16",
],
},
},
],
},
{
Expand Down Expand Up @@ -878,6 +905,15 @@ exports[`prepareRsbuild > should generate rspack config correctly (node) 1`] = `
],
"test": /\\\\\\.\\(\\?:woff\\|woff2\\|eot\\|ttf\\|otf\\|ttc\\)\\$/i,
},
{
"oneOf": [
{
"resourceQuery": /\\[\\?&\\]raw\\(\\?:&\\|=\\|\\$\\)/,
"type": "asset/source",
},
],
"test": /\\\\\\.json\\$/i,
},
{
"dependency": "url",
"generator": {
Expand Down Expand Up @@ -1145,11 +1181,20 @@ exports[`prepareRsbuild > should generate rspack config correctly in watch mode
"loader": "<ROOT>/node_modules/<PNPM_INNER>/@rsbuild/core/compiled/css-loader/index.js",
"options": {
"exportType": "string",
"importLoaders": 0,
"importLoaders": 1,
"modules": false,
"sourceMap": false,
},
},
{
"loader": "builtin:lightningcss-loader",
"options": {
"errorRecovery": true,
"targets": [
"node >= 16",
],
},
},
],
},
{
Expand Down Expand Up @@ -1389,6 +1434,15 @@ exports[`prepareRsbuild > should generate rspack config correctly in watch mode
],
"test": /\\\\\\.\\(\\?:woff\\|woff2\\|eot\\|ttf\\|otf\\|ttc\\)\\$/i,
},
{
"oneOf": [
{
"resourceQuery": /\\[\\?&\\]raw\\(\\?:&\\|=\\|\\$\\)/,
"type": "asset/source",
},
],
"test": /\\\\\\.json\\$/i,
},
{
"dependency": "url",
"generator": {
Expand Down Expand Up @@ -1663,11 +1717,20 @@ exports[`prepareRsbuild > should generate rspack config correctly with projects
"loader": "<ROOT>/node_modules/<PNPM_INNER>/@rsbuild/core/compiled/css-loader/index.js",
"options": {
"exportType": "string",
"importLoaders": 0,
"importLoaders": 1,
"modules": false,
"sourceMap": false,
},
},
{
"loader": "builtin:lightningcss-loader",
"options": {
"errorRecovery": true,
"targets": [
"node >= 16",
],
},
},
],
},
{
Expand Down Expand Up @@ -1907,6 +1970,15 @@ exports[`prepareRsbuild > should generate rspack config correctly with projects
],
"test": /\\\\\\.\\(\\?:woff\\|woff2\\|eot\\|ttf\\|otf\\|ttc\\)\\$/i,
},
{
"oneOf": [
{
"resourceQuery": /\\[\\?&\\]raw\\(\\?:&\\|=\\|\\$\\)/,
"type": "asset/source",
},
],
"test": /\\\\\\.json\\$/i,
},
{
"dependency": "url",
"generator": {
Expand Down Expand Up @@ -2183,11 +2255,20 @@ exports[`prepareRsbuild > should generate rspack config correctly with projects
"loader": "<ROOT>/node_modules/<PNPM_INNER>/@rsbuild/core/compiled/css-loader/index.js",
"options": {
"exportType": "string",
"importLoaders": 0,
"importLoaders": 1,
"modules": false,
"sourceMap": false,
},
},
{
"loader": "builtin:lightningcss-loader",
"options": {
"errorRecovery": true,
"targets": [
"node >= 16",
],
},
},
],
},
{
Expand Down Expand Up @@ -2427,6 +2508,15 @@ exports[`prepareRsbuild > should generate rspack config correctly with projects
],
"test": /\\\\\\.\\(\\?:woff\\|woff2\\|eot\\|ttf\\|otf\\|ttc\\)\\$/i,
},
{
"oneOf": [
{
"resourceQuery": /\\[\\?&\\]raw\\(\\?:&\\|=\\|\\$\\)/,
"type": "asset/source",
},
],
"test": /\\\\\\.json\\$/i,
},
{
"dependency": "url",
"generator": {
Expand Down
6 changes: 0 additions & 6 deletions packages/core/tests/core/__snapshots__/rstest.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ exports[`rstest context > should generate rstest context correctly 1`] = `
],
"reportsDirectory": "<ROOT>/packages/core/coverage",
},
"dev": undefined,
"disableConsoleIntercept": false,
"env": {},
"exclude": {
Expand All @@ -53,7 +52,6 @@ exports[`rstest context > should generate rstest context correctly 1`] = `
"logHeapUsage": false,
"maxConcurrency": 5,
"name": "rstest",
"output": undefined,
"passWithNoTests": false,
"pool": {
"type": "forks",
Expand Down Expand Up @@ -107,7 +105,6 @@ exports[`rstest context > should generate rstest context correctly with multiple
],
"reportsDirectory": "<ROOT>/packages/core/coverage",
},
"dev": undefined,
"disableConsoleIntercept": false,
"env": {},
"exclude": {
Expand All @@ -130,7 +127,6 @@ exports[`rstest context > should generate rstest context correctly with multiple
"logHeapUsage": false,
"maxConcurrency": 5,
"name": "test-project",
"output": undefined,
"passWithNoTests": false,
"pool": {
"type": "forks",
Expand Down Expand Up @@ -187,7 +183,6 @@ exports[`rstest context > should generate rstest context correctly with multiple
],
"reportsDirectory": "<ROOT>/packages/core/coverage",
},
"dev": undefined,
"disableConsoleIntercept": false,
"env": {},
"exclude": {
Expand All @@ -210,7 +205,6 @@ exports[`rstest context > should generate rstest context correctly with multiple
"logHeapUsage": false,
"maxConcurrency": 5,
"name": "test-project1",
"output": undefined,
"passWithNoTests": false,
"pool": {
"type": "forks",
Expand Down
2 changes: 1 addition & 1 deletion packages/coverage-istanbul/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@rstest/core": "workspace:~"
},
"dependencies": {
"swc-plugin-coverage-instrument": "^0.0.31",
"swc-plugin-coverage-instrument": "0.0.32",
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version specifier for swc-plugin-coverage-instrument was changed from a caret range (^0.0.31) to an exact version (0.0.32). This is inconsistent with other dependencies in this file (e.g., istanbul-lib-coverage: ^3.2.2). Consider using ^0.0.32 to allow for patch updates, unless an exact version is specifically required.

Suggested change
"swc-plugin-coverage-instrument": "0.0.32",
"swc-plugin-coverage-instrument": "^0.0.32",

Copilot uses AI. Check for mistakes.
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-report": "^3.0.1",
"istanbul-reports": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"package:vsce": "npm run build && vsce package"
},
"devDependencies": {
"@rsbuild/core": "1.6.0-beta.1",
"@rsbuild/core": "1.6.7-canary-57e2a56d-20251120152633",
"@rslib/core": "0.17.1",
"@rstest/core": "workspace:*",
"@swc/core": "^1.13.5",
Expand Down
Loading
Loading