Skip to content

Commit 3fa5f88

Browse files
authored
chore: enable advancedEsm (#664)
1 parent 324c1ef commit 3fa5f88

File tree

8 files changed

+251
-73
lines changed

8 files changed

+251
-73
lines changed

e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"devDependencies": {
1010
"@rsbuild/core": "1.6.0-beta.1",
11-
"@rslib/core": "0.16.1",
11+
"@rslib/core": "0.17.0",
1212
"@rstest/core": "workspace:*",
1313
"@rstest/tsconfig": "workspace:*",
1414
"@types/jest-image-snapshot": "^6.4.0",

packages/core/LICENSE.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -666,20 +666,6 @@ Licensed under MIT license in the repository at chalk/ansi-styles.
666666
>
667667
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
668668
669-
### ansi-styles
670-
671-
Licensed under MIT license in the repository at chalk/ansi-styles.
672-
673-
> MIT License
674-
>
675-
> Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
676-
>
677-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
678-
>
679-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
680-
>
681-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
682-
683669
### birpc
684670

685671
Licensed under MIT license in the repository at git+https://github.com/antfu-collective/birpc.git.

packages/core/licensePlugin.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,15 @@ ${packages
333333
return new WebpackLicensePlugin({
334334
outputFilename: '../LICENSE.md',
335335
additionalFiles: {
336-
'../LICENSE.md': (packages) => renderLicenses(packages),
336+
'../LICENSE.md': (packages) => {
337+
const uniquePackages = new Map<string, PackageLicenseMeta>();
338+
for (const pkg of packages) {
339+
if (!uniquePackages.has(pkg.name)) {
340+
uniquePackages.set(pkg.name, pkg);
341+
}
342+
}
343+
return renderLicenses(Array.from(uniquePackages.values()));
344+
},
337345
},
338346
});
339347
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@babel/code-frame": "^7.27.1",
6767
"@jridgewell/trace-mapping": "0.3.31",
6868
"@microsoft/api-extractor": "^7.53.3",
69-
"@rslib/core": "0.16.1",
69+
"@rslib/core": "0.17.0",
7070
"@rstest/tsconfig": "workspace:*",
7171
"@sinonjs/fake-timers": "^14.0.0",
7272
"@types/babel__code-frame": "^7.0.6",

packages/core/rslib.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export default defineConfig({
99
id: 'rstest',
1010
format: 'esm',
1111
syntax: ['node 18'],
12+
experiments: {
13+
advancedEsm: true,
14+
},
1215
dts: {
1316
bundle: {
1417
bundledPackages: [
@@ -93,6 +96,9 @@ export default defineConfig({
9396
}),
9497
isBuildWatch ? null : licensePlugin(),
9598
].filter(Boolean),
99+
optimization: {
100+
splitChunks: false,
101+
},
96102
},
97103
},
98104
},

packages/coverage-istanbul/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"devDependencies": {
3333
"@rstest/tsconfig": "workspace:*",
3434
"@rstest/core": "workspace:*",
35-
"@rslib/core": "0.16.1",
35+
"@rslib/core": "0.17.0",
3636
"@types/node": "^22.16.5",
3737
"typescript": "^5.9.3",
3838
"@types/istanbul-lib-instrument": "^1.7.8",

packages/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"devDependencies": {
6868
"@rsbuild/core": "1.6.0-beta.1",
69-
"@rslib/core": "0.16.1",
69+
"@rslib/core": "0.17.0",
7070
"@rstest/core": "workspace:*",
7171
"@swc/core": "^1.13.5",
7272
"@types/glob": "^7.2.0",

0 commit comments

Comments
 (0)