Upgrading Local Projects to Corresponding ICP Versions: API Updates and Manual Modifications Required
Environment Requirements
- Node.js version 20.18.1 or above (You can check the version by running
node -v).- If you need to use a lower version of Node.js for other projects, you can manage multiple Node versions using nvm.
- Yarn version 1.22.22 or above (You can check the version by running
yarn -v).- Yarn is recommended, but npm can also be used.
This document is no longer being updated. Please refer to the CHANGELOG for the latest information. :::
note For updates to the local project framework source code (e.g., Template and MobileTemplate), if there are no special requirements, you can use create-icp-app to generate a new website structure file. :::
2.0.7
- The
PageHeaderin Template2 now supports the form setting "Display the page title and breadcrumbs from the template." You need to updateTemplate.js. For reference, see PR: https://gitlab.dev.bizops.com.cn/product-core/icp/-/merge_requests/3282/diffs.
1.0.0-alpha.325
react-router-domupgraded to 6.26.2.
1.0.0-alpha.322
- Ant Design upgraded to 5.20.2.
1.0.0-alpha.320
- The
yarn pre-devcommand has been removed and replaced withyarn start:codeandyarn build:code. If you need to run the project using the code generated by the code generator, you need to manually modify thepackage.jsonfile. You can copy this command from a project generated bycreate-icp-app.
1.0.0-alpha.318
- The
Login,BasicLogin, andPage404pages have been moved to Template2 and Template3. You need to make corresponding modifications. For reference, see the changes in thecreate-icp-appdirectory in this PR: https://gitlab.dev.bizops.com.cn/product-core/icp/-/merge_requests/2648/diffs. - The
props.routerscompatibility inMobileTemplate1has been removed. Useprops.routesinstead.
1.0.0-alpha.317
- The
componentProps.modeattribute of theSelectcomponent has been deprecated. TheSelectcomponent no longer supports the specialmode: tagsfrom Ant Design. UsecomponentProps.multiple: truefor multiple selection functionality instead.
1.0.0-alpha.316
- When the login method is explicitly specified, the login method selection is no longer displayed.
- Files changed:
src/components/PageRouter/Login/Login.js
- Files changed:
1.0.0-alpha.312
- Prettier upgraded to 3.2.5.
1.0.0-alpha.309
process.env.PUBLIC_PATHis deprecated. Usewindow.ICP_PUBLIC_PATHinstead.- A new build parameter
--no-dynamic-public-pathhas been added, which means that dynamicpublicPathwill not be used, and theappConfig'sbaseUrlwill be used instead. - In development mode, dynamic
publicPathis not used. ThepublicPathremains/icp-ui/and/ui/. - Files changed:
public/index.htmlsrc/services/auth.jssrc/store/features/authSlice.jssrc/index.jssrc/public-path.jspackage.json
- A new build parameter
window.__bot_conf__.user_idle_timeis deprecated. Use the application-levelappConfig.userIdleTimeor the user-leveluserProfile.userIdleTimeinstead.- Files changed:
src/services/auth.js
- Files changed:
- Fix user idle auto-logout.
- Files changed:
src/services/auth.jssrc/store/features/authSlice.js
- Files changed:
1.0.0-alpha.307
- All component refs are now exposed as
ref.nodeto represent the root DOM node of the rendered component. - The
refinterface exposed byTableElementhas been modified.ref.apiis nowref.gridApi. - The
refinterface exposed byEChartElementhas been modified. The ECharts instance is now accessed viaref.chart.
1.0.0-alpha.304
restApi.jsnow supports translation of error messages.
1.0.0-alpha.299
- The
dataResponseKeyPathofCascaderandTreeSelectis now set toresultsby default, which is consistent with other components. If you encounter issues with these components not using form data sources, modify thedataResponseKeyPathvalue manually.
1.0.0-alpha.297
restApi.jsnow supports aconfigparameterskipResponseInterceptors: boolto skip error handling, such as error prompts and 401 logout.- A new script
importhas been added topackage.json. Runningnpm run importimportsproject-seed-data.jsoninto the local environment.
1.0.0-alpha.272
MainNav.jsnow supports opening Modals from the menu.
1.0.0-alpha.266
auth.jsnow fixes the issue where iframes do not listen for user idle state.
1.0.0-alpha.264
- The import method for
messageinrestApi.jshas been changed toimport { message } from '@icp/settings';to enable the use of context withmessage.
1.0.0-alpha.253
- The
urlparameterfrominLogin.jsnow includes a same-origin check. External addresses will not be redirected.
1.0.0-alpha.243
Templatehas minor code updates.- For reference, see: https://gitlab.dev.bizops.com.cn/product-core/aip/-/merge_requests/404/diffs
1.0.0-alpha.240
- The
htmltag inindex.htmlno longer includes thelangattribute.
1.0.0-alpha.239
Templatehas minor code updates.- For reference, see: https://gitlab.dev.bizops.com.cn/product-core/aip/-/merge_requests/397/diffs
1.0.0-alpha.238
Templatehas minor code updates.- For reference, see: https://gitlab.dev.bizops.com.cn/product-core/aip/-/merge_requests/395/diffs
- For reference, see: https://gitlab.dev.bizops.com.cn/product-core/aip/-/merge_requests/396/diffs
1.0.0-alpha.233
- The CSS variable
--brand-colorhas been renamed to--primary-color;--default-font-colorhas been renamed to--font-color. Templatehas minor code updates.- Ant Design has been upgraded to 5.9.2.
1.0.0-alpha.224
- The refresh time in
auth.jshas been adjusted to 5 seconds before expiration, instead of half of the remaining time. - The breadcrumbs and page title in
Template2have been refactored.
1.0.0-alpha.221
- The position of
clearTokenin thelogoutmethod ofauth.jshas been adjusted to ensure that theaccessTokencan be passed to thelogoutAPI.
1.0.0-alpha.210
- The
sidebar resizefeature has been added toTemplate2. For updates, see: https://gitlab.dev.bizops.com.cn/product-core/aic/-/merge_requests/350/diffs
1.0.0-alpha.195
- Fix the issue where menu highlighting is disordered when
activeBasePathandtoare set to empty strings. For reference, see: https://gitlab.dev.bizops.com.cn/product-core/aic/-/merge_requests/326/diffs
1.0.0-alpha.176
-
Template2has been refactored. If you have not modified theTemplate2folder in your project, you can replace the corresponding folder in your project with the entirepackages/create-icp-app/template/src/components/Templates/Template2folder. Also, remember to delete the following code from your project'sApp.cssfile:#root,
.app {
height: 100%;
} -
The
height: 100%setting forbodyhas been removed. If needed, you can add it back to your project. -
If you update
Template2, you need to add thesidebarconfiguration toapp.config.json:{
"sidebar": {
"appearance": "dark",
"collapsible": true
}
}
1.0.0-alpha.175
- Update the
services/auth.jsfile (fix concurrent JWT refresh issue). The parameter forauth.logout(reason)has been changed toauth.logout({reason}). For reference, see the changes inauth.jsin this PR: https://gitlab.dev.bizops.com.cn/product-core/aic/-/merge_requests/301, and the changes inauth.jsand calls toauth.logout()in this PR: https://gitlab.dev.bizops.com.cn/product-core/aic/-/merge_requests/303.
1.0.0-alpha.173
react-router-domversion6.12.1caused issues in production mode and has been downgraded to6.12.0.
1.0.0-alpha.172
- Delete the
saas-ui/src/vars.cssfile in your project, as it is now included in@icp/app. - Upgrade
react-router-domto6.12.1. - Remove the dependency on
@primer/octicons-reactin your project. Use the<Icon name="oct:person" />syntax instead. For reference, see this PR: https://gitlab.dev.bizops.com.cn/product-core/aic/-/merge_requests/293/diffs. - Ensure that the
cachefolder is excluded in your.gitignorefile.
1.0.0-alpha.171
- The project's font and style settings are now included in
@icp/app. You can remove any custom settings if not needed. For reference, see this PR: https://gitlab.dev.bizops.com.cn/product-core/aic/-/merge_requests/290/diffs