Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/gold-pots-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lynx-js/rspeedy": minor
---

Bump Rsbuild v1.6.7 with Rspack v1.6.4.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@tsconfig/node20": "^20.1.6",
"@tsconfig/strictest": "^2.0.6",
"@types/node": "^24.6.1",
"@typescript/native-preview": "7.0.0-dev.20251001.1",
"@typescript/native-preview": "7.0.0-dev.20251106.1",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/eslint-plugin": "^1.3.13",
"@vitest/ui": "^3.2.4",
Expand Down
10 changes: 6 additions & 4 deletions packages/rspeedy/core/test/config/rsbuild.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,11 @@ describe('Config - toRsBuildConfig', () => {
})

expect(rsbuildConfig.environments).toHaveProperty('web')
expect(rsbuildConfig.environments?.['web']?.output?.distPath?.root).toBe(
'web',
)
expect(rsbuildConfig.environments?.['web']?.output?.distPath)
.toHaveProperty(
'root',
'web',
)
expect(rsbuildConfig.environments).toHaveProperty('lynx')
})
})
Expand Down Expand Up @@ -409,7 +411,7 @@ describe('Config - toRsBuildConfig', () => {
},
})

expect(rsbuildConfig.output?.distPath?.root).toBe('foo')
expect(rsbuildConfig.output?.distPath).toHaveProperty('root', 'foo')
})

test('transform output.inlineScripts', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`Plugins - Output > defaults - Production 1`] = `
"chunkFilename": "static/js/async/[name].[contenthash:8].js",
"chunkFormat": "commonjs",
"chunkLoading": "lynx",
"devtoolModuleFilenameTemplate": "[absolute-resource-path]",
"filename": "static/js/[name].[contenthash:8].js",
"hashFunction": "xxhash64",
"path": "<WORKSPACE>/dist",
Expand All @@ -21,6 +22,7 @@ exports[`Plugins - Output > defaults 1`] = `
"chunkFilename": "static/js/async/[name].js",
"chunkFormat": "commonjs",
"chunkLoading": "lynx",
"devtoolModuleFilenameTemplate": "[absolute-resource-path]",
"filename": "static/js/[name].js",
"hashFunction": "xxhash64",
"path": "<WORKSPACE>/dist",
Expand All @@ -36,6 +38,7 @@ exports[`Plugins - Output > output.filename 1`] = `
"chunkFilename": "static/js/async/[name].js",
"chunkFormat": "commonjs",
"chunkLoading": "lynx",
"devtoolModuleFilenameTemplate": "[absolute-resource-path]",
"filename": "static/js/[name].js",
"hashFunction": "xxhash64",
"path": "<WORKSPACE>/dist",
Expand All @@ -51,6 +54,7 @@ exports[`Plugins - Output > output.filename.js 1`] = `
"chunkFilename": "static/js/async/[name].js",
"chunkFormat": "commonjs",
"chunkLoading": "lynx",
"devtoolModuleFilenameTemplate": "[absolute-resource-path]",
"filename": "static/js/[name].js",
"hashFunction": "xxhash64",
"path": "<WORKSPACE>/dist",
Expand Down
15 changes: 10 additions & 5 deletions packages/rspeedy/plugin-react/test/sourcemap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import path from 'node:path'

import type { RsbuildPlugin } from '@rsbuild/core'
import { SourceMapConsumer } from 'source-map'
import type { RawSourceMap } from 'source-map'
import type { NullableMappedPosition, RawSourceMap } from 'source-map'
import { beforeAll, describe, expect, test, vi } from 'vitest'

import { createStubRspeedy as createRspeedy } from './createRspeedy.js'
Expand Down Expand Up @@ -118,7 +118,7 @@ describe('Sourcemap', async () => {
) as RawSourceMap

const consumer = await new SourceMapConsumer(backgroundSourceMap)
const functionName2Source: Record<string, string | null> = {}
const functionName2Source: Record<string, NullableMappedPosition> = {}
functionNames.forEach((name) => {
const backgroundSourceLines = backgroundSource.split('\n')
let line = -1, column = -1
Expand All @@ -133,26 +133,31 @@ describe('Sourcemap', async () => {
line,
column,
})
if (functionName2Source[name].source) {
functionName2Source[name].source = path.basename(
functionName2Source[name].source,
)
}
})
expect(functionName2Source).toMatchInlineSnapshot(`
{
"function renderComponent": {
"column": 0,
"line": 296,
"name": null,
"source": "webpack:///node_modules/<PNPM_INNER>/@hongzhiyuan/preact/dist/preact.mjs",
"source": "preact.mjs",
},
"functionThatThrows": {
"column": 0,
"line": 18,
"name": null,
"source": "webpack:///fixtures/sourcemap/index.tsx",
"source": "index.tsx",
},
"innerFunction": {
"column": 0,
"line": 13,
"name": null,
"source": "webpack:///fixtures/sourcemap/index.tsx",
"source": "index.tsx",
},
}
`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,4 @@ export class LynxTestingEnv {
// @public (undocumented)
export type PickUnderscoreKeys<T> = Pick<T, FilterUnderscoreKeys<T>>;

// (No @packageDocumentation comment for this package)

```
Loading
Loading