Skip to content

Commit 6b3167a

Browse files
authored
Merge pull request #7025 from alibaba/release/next
Release @ice/app 3.5.1
2 parents e14dc87 + f0c2dde commit 6b3167a

File tree

22 files changed

+97
-27
lines changed

22 files changed

+97
-27
lines changed

packages/ice/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 3.5.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [4130611d]
8+
- Updated dependencies [2e274966]
9+
- @ice/rspack-config@1.2.1
10+
- @ice/runtime@1.5.1
11+
312
## 3.5.0
413

514
### Minor Changes

packages/ice/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ice/app",
3-
"version": "3.5.0",
3+
"version": "3.5.1",
44
"description": "provide scripts and configuration used by web framework ice",
55
"type": "module",
66
"main": "./esm/index.js",

packages/jsx-runtime/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @ice/jsx-runtime
22

3+
## 0.3.1
4+
5+
### Patch Changes
6+
7+
- 2e274966: fix: export createElement for backward compatibility
8+
39
## 0.3.0
410

511
### Minor Changes

packages/jsx-runtime/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ice/jsx-runtime",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "JSX runtime for ice.",
55
"files": [
66
"esm",
@@ -34,7 +34,8 @@
3434
"jsx-runtime"
3535
],
3636
"dependencies": {
37-
"style-unit": "^3.0.4"
37+
"style-unit": "^3.0.4",
38+
"@swc/helpers": "^0.5.13"
3839
},
3940
"devDependencies": {
4041
"@ice/pkg": "^1.5.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createElement as reactCreateElement } from 'react';
2+
import { hijackElementProps } from './style.js';
3+
export function createElement(type: any, props: any, ...children: any[]) {
4+
return reactCreateElement(type, hijackElementProps(props), ...children);
5+
}

packages/jsx-runtime/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './prod.js';
2+
export { createElement } from './createElement.js';

packages/miniapp-react-dom/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @ice/miniapp-react-dom
22

3+
## 1.1.1
4+
5+
### Patch Changes
6+
7+
- @ice/miniapp-runtime@1.2.1
8+
39
## 1.1.0
410

511
### Minor Changes

packages/miniapp-react-dom/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ice/miniapp-react-dom",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "like react-dom, but for miniapps.",
55
"type": "module",
66
"types": "./esm/index.d.ts",

packages/miniapp-runtime/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.2.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [2e274966]
8+
- @ice/runtime@1.5.1
9+
310
## 1.2.0
411

512
### Minor Changes

packages/miniapp-runtime/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ice/miniapp-runtime",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "ice runtime for miniapps.",
55
"type": "module",
66
"types": "./esm/index.d.ts",

packages/plugin-i18n/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"plugin"
4040
],
4141
"dependencies": {
42-
"@ice/jsx-runtime": "^0.3.0",
42+
"@ice/jsx-runtime": "^0.3.1",
4343
"@swc/helpers": "^0.5.1",
4444
"accept-language-parser": "^1.5.0",
4545
"universal-cookie": "^4.0.4",
@@ -56,8 +56,8 @@
5656
"webpack-dev-server": "4.15.0"
5757
},
5858
"peerDependencies": {
59-
"@ice/app": "^3.5.0",
60-
"@ice/runtime": "^1.5.0"
59+
"@ice/app": "^3.5.1",
60+
"@ice/runtime": "^1.5.1"
6161
},
6262
"publishConfig": {
6363
"access": "public"

packages/plugin-miniapp/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.2.1
4+
5+
### Patch Changes
6+
7+
- cce46e9b: fix: should check skeleton file existed before read
8+
- @ice/miniapp-runtime@1.2.1
9+
- @ice/miniapp-react-dom@1.1.1
10+
311
## 1.2.0
412

513
### Minor Changes

packages/plugin-miniapp/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ice/plugin-miniapp",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "ice.js plugin for miniapp.",
55
"license": "MIT",
66
"type": "module",
@@ -50,8 +50,8 @@
5050
"sax": "^1.2.4"
5151
},
5252
"devDependencies": {
53-
"@ice/app": "^3.5.0",
54-
"@ice/runtime": "^1.5.0",
53+
"@ice/app": "^3.5.1",
54+
"@ice/runtime": "^1.5.1",
5555
"webpack": "^5.88.0"
5656
},
5757
"repository": {

packages/plugin-miniapp/src/miniapp/webpack/plugins/MiniPlugin.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ export default class MiniPlugin {
588588
path: pagePath,
589589
isNative,
590590
stylePath: isNative ? this.getStylePath(pagePath) : undefined,
591+
templatePath: isNative ? this.getTemplatePath(pagePath) : undefined,
591592
skeletonPath: isNative ? this.getSkeletonExtraPath(pagePath) : undefined,
592593
};
593594
}),
@@ -690,10 +691,10 @@ export default class MiniPlugin {
690691
}
691692
this.addEntry(path.resolve(__dirname, '..', 'template/custom-wrapper'), 'custom-wrapper', META_TYPE.STATIC);
692693

693-
const resolveComponentStyleEntry = (name: string, stylePaths: string[]) => {
694+
const resolveComponentStyleEntry = (name: string, stylePaths: string[], ext = this.options.fileType.style) => {
694695
for (const stylePath of stylePaths) {
695696
if (fs.existsSync(stylePath)) {
696-
this.addEntry(stylePath, this.getTargetFilePath(name, this.options.fileType.style), META_TYPE.NORMAL);
697+
this.addEntry(stylePath, this.getTargetFilePath(name, ext), META_TYPE.NORMAL);
697698
break;
698699
}
699700
}
@@ -709,12 +710,10 @@ export default class MiniPlugin {
709710
this.addEntry(item.templatePath, this.getTemplatePath(item.name), META_TYPE.NORMAL);
710711
}
711712

712-
if (item.skeletonPath) {
713-
if (item.skeletonPath.template) {
714-
this.addEntry(item.skeletonPath.template, this.getTargetFilePath(item.name, `${this.options.fileType.skeletonMidExt}${this.options.fileType.templ}`), META_TYPE.NORMAL);
715-
}
713+
if (item.skeletonPath && item.skeletonPath.template && fs.existsSync(item.skeletonPath.template)) {
714+
this.addEntry(item.skeletonPath.template, this.getTargetFilePath(item.name, `${this.options.fileType.skeletonMidExt}${this.options.fileType.templ}`), META_TYPE.NORMAL);
716715
if (item.skeletonPath.style) {
717-
resolveComponentStyleEntry(this.getTargetFilePath(item.name, this.options.fileType.skeletonMidExt), item.skeletonPath.style);
716+
resolveComponentStyleEntry(item.name, item.skeletonPath.style, `${this.options.fileType.skeletonMidExt}${this.options.fileType.style}`);
718717
}
719718
}
720719
} else {

packages/rspack-config/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @ice/rspack-config
22

3+
## 1.2.1
4+
5+
### Patch Changes
6+
7+
- 4130611d: fix: update splitChunk config
8+
39
## 1.2.0
410

511
### Minor Changes

packages/rspack-config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ice/rspack-config",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"repository": "alibaba/ice",
55
"bugs": "https://github.com/alibaba/ice/issues",
66
"homepage": "https://v3.ice.work",

packages/rspack-config/src/splitChunks.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ export const getVendorStrategy = (options: Configuration['splitChunks']) => {
8787

8888
const getSplitChunks = (_: string, strategy: string | boolean) => {
8989
if (strategy === false) {
90-
// Empty splitChunks configuration if strategy is false.
91-
return {};
90+
// Set minChunks to a large number to disable the splitChunks feature.
91+
// the value of Infinity is not work properly for this version of rspack.
92+
return { minChunks: 100000, cacheGroups: { default: false } };
9293
} else if (typeof strategy === 'string' && ['page-vendors', 'vendors'].includes(strategy)) {
9394
const splitChunksOptions = strategy === 'page-vendors' ? { chunks: 'all' } : {};
9495
return getVendorStrategy(splitChunksOptions);

packages/runtime/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @ice/runtime
22

3+
## 1.5.1
4+
5+
### Patch Changes
6+
7+
- 2e274966: feat: support hook of onBeforeHydrate
8+
- Updated dependencies [2e274966]
9+
- @ice/jsx-runtime@0.3.1
10+
311
## 1.5.0
412

513
### Minor Changes

packages/runtime/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ice/runtime",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "Runtime module for ice.js",
55
"type": "module",
66
"types": "./esm/index.d.ts",
@@ -54,7 +54,7 @@
5454
"./esm/polyfills/abortcontroller.js"
5555
],
5656
"dependencies": {
57-
"@ice/jsx-runtime": "^0.3.0",
57+
"@ice/jsx-runtime": "^0.3.1",
5858
"@ice/shared": "^1.1.0",
5959
"@remix-run/router": "1.14.2",
6060
"abortcontroller-polyfill": "1.7.5",

packages/runtime/src/runClientApp.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ export default async function runClientApp(options: RunClientAppOptions) {
120120
reportRecoverableError(error, errorInfo, { ignoreRuntimeWarning: revalidate });
121121
}),
122122
};
123+
if (appConfig?.app?.onBeforeHydrate) {
124+
appConfig?.app?.onBeforeHydrate();
125+
}
123126
return ReactDOM.hydrateRoot(container, element, hydrateOptions);
124127
});
125128
}

packages/runtime/src/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type App = Partial<{
1717
strict: boolean;
1818
errorBoundary: boolean;
1919
onRecoverableError: (error: unknown, errorInfo: ErrorStack) => void;
20+
onBeforeHydrate: () => void;
2021
} & Record<AppLifecycle, VoidFunction>>;
2122

2223
export interface ErrorStack {

pnpm-lock.yaml

+13-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)