Skip to main content

Upgrading Geogirafe

  1. If you need to, change the version you want to target in your package.json.

  2. Run:

npm upgrade
  1. Update your files based on the changes in the sample application. To see what has changed, first we will check how long it has been since you last updated Geogirafe. After running npm upgrade, your package-lock.json will show the previous version. Search for @geogirafe/lib-geoportal in the git diff to find which version you upgraded from.
    "node_modules/@geogirafe/lib-geoportal": {
- "version": "1.0.0-2090024287",
- "resolved": "https://registry.npmjs.org/@geogirafe/lib-geoportal/-/lib-geoportal-1.0.0-2090024287.tgz",
- "integrity": "sha512-wR7+Kpp1C+I70NwI5uj/jBTWJqukvKYr2h0AdHgTCx21ctjpSjzVbqzqcjtfpQgMgHp3wuK6CNfuIs7GjbC0dw==",
+ "version": "1.0.2136394118",
+ "resolved": "https://registry.npmjs.org/@geogirafe/lib-geoportal/-/lib-geoportal-1.0.2136394118.tgz",
+ "integrity": "sha512-Qy6A1H03/Ahst1E0aRy6HXlNxe1JNE65UBtICvsYoTowZ3gTIGbV6mZi04FhXAX2acTBE+h9eDUalt4eqB1ewQ==",
}

Here we can see that we moved from 1.0.0-2090024287 to 1.0.2136394118

The last part of a version number is the ID of the pipeline used to publish the lib:

https://gitlab.com/geogirafe/gg-viewer/-/pipelines/2090024287

There, you can find the date that pipeline built the lib Oct 9, 2025, 11:52, finished Oct 9, 2025, 12:03.

Check the commits of the Sample Application repository:

https://gitlab.com/geogirafe/gg-sample/-/commits/main?ref_type=heads

Look for a commit done that day or later, for instance 00ec454ff357bebf24d0fb1aa0290aa86453fc09.

You can then compare changes of the code between that day and now. The syntax is

https://gitlab.com/geogirafe/gg-sample/-/compare/?from=<COMMIT_HASH>&to=main

For instance: https://gitlab.com/geogirafe/gg-sample/-/compare/?from=00ec454ff357bebf24d0fb1aa0290aa86453fc09&to=main

  1. Apply that git diff to your files, pay attention to not override some work you've already done.

Upgrading custom components

Your custom component might break if some changes are made in the core. You can check how a similar functionnality changed in existing components of geogirafe or ask for help on our Discord.