Zum Hauptinhalt springen

How to upgrade

Real-life applications are too complex for us to upgrade automatically. A lot depends on your business logic that we cannot predict. That is why you still need to complete manual upgrade steps that are specific to each version.

Typical upgrade​

In every upgrade, you do the following:

  1. Run the update:app command
  2. Perform the required manual steps if needed
  3. Verify your upgrade manually
  4. Merge the upgrade branch
Note: If you have not followed Jutro naming conventions, you may need to restructure your app and refactor some code. Upgrade scripts depend on a specific folder structure and file naming convention.

See First automated upgrade below.

Run update:app​

At the root of your application run:

npx @jutro/cli-internal@latest update:app

jutro migration commands​

When upgrading your Jutro app to a new version you should use the jutro commands:

  • jutro update:app, migrates your app to a new version you select.
  • jutro update:cli updates jutro to the latest version.

To learn more about the available options, run:

  • jutro update --help
  • jutro update {action} --help - to learn about options for action provided (e.g.,: app, metadata, or js)

Perform manual steps​

To find out what manual steps you need:

  • Check the upgrade page to see manual steps required for a specific version.
  • Read through the CHANGELOG to understand if there are any other changes you must make.

Verify your upgrade manually​

After the upgrade, follow these general steps:

  1. In package.json, verify that all @jutro dependencies are on the latest version. Do not use wildcards in version numbers (like "^3.0.1"). Use the exact version.
  2. Verify that all packages have the same version.
  3. If you make any changes, run npm install.
  4. Run your automated tests, like unit, e2e, or any other.
  5. Start your application.
  6. Check the console log in your browser for any errors or warnings.
  7. Go through all manual test cases you have for your app.

Merge the changes in a new branch​

Merge those changes to the desired branch to update your code with the changed files

First automated upgrade​

If you used an old version of Jutro (or Elixir) to create your app, you may need to restructure to successfully upgrade to the latest version.

You must follow our naming conventions.

File naming conventions​

The following naming conventions are mandatory, if you want automated upgradability:

  • Component.js
  • Component.metadata.json5
  • Component.module.scss
  • Component.messages.js
  • __tests__
    • Component.test.js

Aligning your folder structure with Jutro app​

To align your app folder structure with that expected by the Jutro app version you are upgrading to:

  1. Move your app root component into src/app/. If it is called Elixir.js, rename it to App.js.

  2. Move any associated files and rename them according to the conventions. You resulting file structure should be similar to:

    src
    app
    __tests__
    App.test.js
    App.js
    App.config.json5
    App.module.scss
    App.messages.js
  3. Create a new file, src/app/App.routes.js and put your route configuration in there:

    import FormPage from './Pages/FormPage/FormPage';
    import CodelessForm from './Pages/CodelessForm/CodelessForm';

    export const routes = [
    {
    path: '/',
    exact: true,
    showOnNavBar: false,
    redirect: '/codeless',
    },
    {
    title: 'Codeless Form',
    path: '/codeless',
    exact: true,
    component: 'CodelessForm',
    },
    . . .
    ];

    export const componentMap = {
    FormPage,
    CodelessForm,
    AuthPage,
    };
  4. In App.js:

    • Remove explicit route configuration.

    • Import routes from the new file:

      import { routes, componentMap } from './routes';
    • Remove unnecessary imports.

  5. Extract the configItems from overrides.config.js to a separate file, configItems.js.

    For example, to use the default configuration for paths and jest, and to override the babelLoaderRule for 'webpack', put the following in configItems.js.

    module.exports = [
    'paths',
    'jest',
    {
    name: 'webpack',
    overrides: {
    getBabelLoaderRule: (loaders) => loaders.tsLoaderRule,
    },
    },
    ];
Note: If you have a config-overrides.js file instead of overrides.config.js, see the webpack migration documentation.

What's the latest version of Jutro?​

You can check the latest major published version using the version dropdown on this site.

But if you want the latest not necessarily stable version, you can use one of the following methods.

Check the version in Artifactory​

  1. Go to https://artifactory.guidewire.com.
  2. Search for jutro.
  3. Find the latest version by looking at the Modified column.