Skip to main content

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.
warning

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

1.0.0-alpha.325

  • react-router-dom upgraded to 6.26.2.

1.0.0-alpha.322

  • Ant Design upgraded to 5.20.2.

1.0.0-alpha.320

  • The yarn pre-dev command has been removed and replaced with yarn start:code and yarn build:code. If you need to run the project using the code generated by the code generator, you need to manually modify the package.json file. You can copy this command from a project generated by create-icp-app.

1.0.0-alpha.318

1.0.0-alpha.317

  • The componentProps.mode attribute of the Select component has been deprecated. The Select component no longer supports the special mode: tags from Ant Design. Use componentProps.multiple: true for 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

1.0.0-alpha.312

  • Prettier upgraded to 3.2.5.

1.0.0-alpha.309

  • process.env.PUBLIC_PATH is deprecated. Use window.ICP_PUBLIC_PATH instead.
    • A new build parameter --no-dynamic-public-path has been added, which means that dynamic publicPath will not be used, and the appConfig's baseUrl will be used instead.
    • In development mode, dynamic publicPath is not used. The publicPath remains /icp-ui/ and /ui/.
    • Files changed:
      • public/index.html
      • src/services/auth.js
      • src/store/features/authSlice.js
      • src/index.js
      • src/public-path.js
      • package.json
  • window.__bot_conf__.user_idle_time is deprecated. Use the application-level appConfig.userIdleTime or the user-level userProfile.userIdleTime instead.
    • Files changed:
      • src/services/auth.js
  • Fix user idle auto-logout.
    • Files changed:
      • src/services/auth.js
      • src/store/features/authSlice.js

1.0.0-alpha.307

  • All component refs are now exposed as ref.node to represent the root DOM node of the rendered component.
  • The ref interface exposed by TableElement has been modified. ref.api is now ref.gridApi.
  • The ref interface exposed by EChartElement has been modified. The ECharts instance is now accessed via ref.chart.

1.0.0-alpha.304

  • restApi.js now supports translation of error messages.

1.0.0-alpha.299

  • The dataResponseKeyPath of Cascader and TreeSelect is now set to results by default, which is consistent with other components. If you encounter issues with these components not using form data sources, modify the dataResponseKeyPath value manually.

1.0.0-alpha.297

  • restApi.js now supports a config parameter skipResponseInterceptors: bool to skip error handling, such as error prompts and 401 logout.
  • A new script import has been added to package.json. Running npm run import imports project-seed-data.json into the local environment.

1.0.0-alpha.272

  • MainNav.js now supports opening Modals from the menu.

1.0.0-alpha.266

  • auth.js now fixes the issue where iframes do not listen for user idle state.

1.0.0-alpha.264

  • The import method for message in restApi.js has been changed to import { message } from '@icp/settings'; to enable the use of context with message.

1.0.0-alpha.253

  • The url parameter from in Login.js now includes a same-origin check. External addresses will not be redirected.

1.0.0-alpha.243

1.0.0-alpha.240

  • The html tag in index.html no longer includes the lang attribute.

1.0.0-alpha.239

1.0.0-alpha.238

1.0.0-alpha.233

1.0.0-alpha.224

1.0.0-alpha.221

  • The position of clearToken in the logout method of auth.js has been adjusted to ensure that the accessToken can be passed to the logout API.

1.0.0-alpha.210

1.0.0-alpha.195

1.0.0-alpha.176

  • Template2 has been refactored. If you have not modified the Template2 folder in your project, you can replace the corresponding folder in your project with the entire packages/create-icp-app/template/src/components/Templates/Template2 folder. Also, remember to delete the following code from your project's App.css file:

    #root,
    .app {
    height: 100%;
    }
  • The height: 100% setting for body has been removed. If needed, you can add it back to your project.

  • If you update Template2, you need to add the sidebar configuration to app.config.json:

    {
    "sidebar": {
    "appearance": "dark",
    "collapsible": true
    }
    }

1.0.0-alpha.175

1.0.0-alpha.173

  • react-router-dom version 6.12.1 caused issues in production mode and has been downgraded to 6.12.0.

1.0.0-alpha.172

  • Delete the saas-ui/src/vars.css file in your project, as it is now included in @icp/app.
  • Upgrade react-router-dom to 6.12.1.
  • Remove the dependency on @primer/octicons-react in 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 cache folder is excluded in your .gitignore file.

1.0.0-alpha.171