Skip to content

Commit

Permalink
Merge pull request #4300 from alibaba/release-next
Browse files Browse the repository at this point in the history
Release 1.17.8
  • Loading branch information
ClarkXia authored May 13, 2021
2 parents 6d6db01 + 26a673d commit 8d76dfa
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 33 deletions.
4 changes: 2 additions & 2 deletions packages/icejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ice.js",
"version": "1.17.7",
"version": "1.17.8",
"description": "command line interface and builtin plugin for icejs",
"author": "[email protected]",
"homepage": "",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@alib/build-scripts": "^0.1.13",
"build-plugin-app-core": "1.4.3",
"build-plugin-app-core": "1.4.5",
"build-plugin-helmet": "1.0.2",
"build-plugin-ice-auth": "1.7.3",
"build-plugin-ice-config": "1.8.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/plugin-app-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.4.5

- [fix] lose `errorBoundary` type define

## 1.4.4

- [feat] add baidu/kuaishou env judge
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-app-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "build-plugin-app-core",
"version": "1.4.4",
"version": "1.4.5",
"description": "the core plugin for icejs and raxjs.",
"author": "[email protected]",
"homepage": "",
Expand Down Expand Up @@ -42,4 +42,4 @@
"url": "https://github.com/alibaba/ice/tree/master/packages/plugin-app-core"
},
"gitHead": "07ac7bb07162aac8c90778dd1de4a2060f8df498"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface IApp {
mountNode?: HTMLElement;
addProvider?: ({ children }: { children: FrameworkNode }) => FrameworkElement;
getInitialData?: (ctx?: IContext) => Promise<any>;
errorBoundary?: boolean;
ErrorBoundaryFallback?: (error: any) => FrameworkComponentType,
onErrorBoundaryHander?: (error: Error, componentStack: string) => any;
onLaunch?: (options?: any) => any;
Expand Down
3 changes: 3 additions & 0 deletions packages/plugin-stark-module/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.0.1
- [fix] set `devServer.contentBase` the right way.

## 2.0.0

- [feat] support built-in babel plugin to append lifecycle.
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-stark-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "build-plugin-stark-module",
"version": "2.0.0",
"version": "2.0.1",
"description": "build-scripts plugin for build stark module",
"main": "lib/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-stark-module/src/setUMDConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const getConfig: GetConfig = ({ context, onGetWebpackConfig }, { modules, output
config.plugin('MiniCssExtractPlugin').tap(([args]) => [{ ...args, filename: filenameStrategy ? `${filenameStrategy}.css` : './[name]/index.css' }]);

// hack with multi publicpath
config.devServer.contentBase(path.join(rootDir, 'dist'));
config.devServer.contentBase(output);
config.devServer.writeToDisk(true);
});
};
Expand Down
6 changes: 5 additions & 1 deletion packages/react-app-renderer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## 2.0.3

- [fix] origin appConfig object was modified

## 2.0.2

- [fix] throw error when not setting route type
- [feat] throw error when not using the BrowserRouter
- [feat] throw error when not using the BrowserRouter
2 changes: 1 addition & 1 deletion packages/react-app-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-app-renderer",
"version": "2.0.2",
"version": "2.0.3",
"description": "",
"author": "[email protected]",
"homepage": "https://github.com/alibaba/ice#readme",
Expand Down
18 changes: 16 additions & 2 deletions packages/react-app-renderer/src/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,25 @@ function renderInServer(context, options) {
}

export default function reactAppRendererWithSSR(context, options) {
const { appConfig } = options || {};
const cloneOptions = deepClone(options);
const { appConfig } = cloneOptions || {};
appConfig.router = appConfig.router || {};
if (appConfig.router.type !== 'browser') {
throw new Error('[SSR]: Only support BrowserRouter when using SSR. You should set the router type to "browser". For more detail, please visit https://ice.work/docs/guide/basic/router');
}
appConfig.router.type = 'static';
return renderInServer(context, options);
return renderInServer(context, cloneOptions);
}

function deepClone(config) {
if(typeof config !== 'object' || config === null) {
return config;
}
const ret = {};
Object.getOwnPropertyNames(config).forEach((key: string) => {
if (Object.prototype.hasOwnProperty.call(config, key)) {
ret[key] = deepClone(config[key]);
}
});
return ret;
}
23 changes: 0 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4897,29 +4897,6 @@ buffer@^5.2.1, buffer@^5.5.0:
base64-js "^1.3.1"
ieee754 "^1.1.13"

[email protected]:
version "1.4.3"
resolved "https://registry.nlark.com/build-plugin-app-core/download/build-plugin-app-core-1.4.3.tgz?cache=0&sync_timestamp=1620638854118&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbuild-plugin-app-core%2Fdownload%2Fbuild-plugin-app-core-1.4.3.tgz#a1fc6db973a5caa1dcc188e3e1e0d6ff1435c2d7"
integrity sha1-ofxtuXOlyqHcwYjj4eDW/xQ1wtc=
dependencies:
"@builder/app-helpers" "^2.0.0"
chalk "^4.0.0"
chokidar "^3.4.1"
create-app-shared "^0.2.0"
ejs "^3.0.1"
fs-extra "^8.1.0"
globby "^11.0.0"
history "^4.9.0"
lodash.debounce "^4.0.8"
miniapp-history "^0.1.0"
miniapp-renderer "^0.1.4"
prettier "^2.0.2"
query-string "^6.13.1"
rax-app-renderer "^2.0.0"
rax-use-router "^3.0.0"
react-app-renderer "^2.0.0"
universal-env "^3.0.0"

[email protected]:
version "0.1.7"
resolved "https://registry.nlark.com/build-plugin-miniapp/download/build-plugin-miniapp-0.1.7.tgz#f60b67d6d0d480a7f93961c7f29c2fe724bdf32d"
Expand Down

0 comments on commit 8d76dfa

Please sign in to comment.