Upgrading Grouparoo from v0.1 to v0.2

Last Updated: 2021-02-05

Hello Grouparoo Community! v0.2 brings four major changes:

  1. Code Config
  2. The Grouparoo CLI
  3. Support for writing tests for your application
  4. UI Editions (coming soon)

Upgrade Guide

See this pull request, which contains the changes to the app-example project. This is a good example for upgrading to v0.2 of Grouparoo for your app. All of the changes required will be in your package.json file.

  1. Install the latest version of the grouparoo command line tool: npm install -g grouparoo

  2. Remove any references to @grouparoo/email-authentication. This package has been removed and is no longer needed.

  3. Update all the package version numbers to the latest version, ie "@grouparoo/core": "0.2.0" and then npm install --legacy-peer-deps to install the latest versions.

    • There are tools like npm-check-updates which can do this for you automatically, ie: npx npm-check-updates --upgrade && npm install --legacy-peer-deps
  4. To add the Grouparoo UI, run grouparoo install @grouparoo/ui-community

  5. Remove the prepare step from scripts inside your package.json. This step is no longer needed and will speed up your install process.

    • Check the rest of your build process and remove all instances of npm run prepare that you might have, i.e. in a Dockerfile.
  6. Change the paths for your start and dev scripts to remove the /api path per the example below.

    • If you are using Docker or another runner to start your apps, you may also need to make a similar change.
    • In a Dockerfile, you might change CMD ["./api/bin/start"] to CMD ["./bin/start"]
    "scripts": {
      "start": "cd node_modules/@grouparoo/core && ./bin/start", // "api/" has been removed
      "dev": "cd node_modules/@grouparoo/core && ./bin/dev", // "api/" has been removed
    }
    

The changes, in entirety, to your package.json will look similar to this:

Example diff of an upgraded application

Now you can run your Grouparoo application (grouparoo start)!