- Update Open Pioneer Trails dependencies to latest version.
- Update OpenLayers to version 10.3.0.
- Slightly update patch setup with mocks needed by OpenLayers 10.3.0 (see
src/testing/global-setup.ts
). - Update
chakra-react-select
to version 5. - Update patch for chakra-ui's menu component (see patches in
package.json
). - Remove obsolete chakra patches.
- Remove obsolete reference to
@chakra-ui/system
. This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
- Add a new script:
pnpm run generate-sbom
. The script generates a software bill of materials (SBOM) for the project that includes all production dependencies. For more information, see the relevant section in the Repository Guide.
- Replace
peerDependencies
with normaldependencies
due to limitations of pnpm. - Use new CLI tool
check-pnpm-duplicates
(Docs) to check for duplicate packages. The tool will run automatically after everypnpm install
(seeprepare
script inpackage.json
) and can be triggered manually by runningpnpm check-duplicates
. The configuration forcheck-duplicates
is stored insupport/duplicate-packages.yaml
. - Update dependencies:
- OpenLayers base packages to
0.7.0
- Trails core packages to
2.3.0
- TypeScript to
5.6.3
- Minor updates of miscellaneous dependencies
- OpenLayers base packages to
- Update eslint rules after updating typescript-eslint (see
.eslintrc
) - Hide deprecation warnings for some legacy SASS APIs used in vite (see
vite.config.ts
)
- Add a new script:
pnpm run generate-sbom
. The script generates a software bill of materials (SBOM) for the project that includes all production dependencies. For more information, see the relevant section in the Repository Guide.
-
Migrate to pnpm catalogs for central dependencies.
The catalog protocol allows central management of dependency versions from the root project in
pnpm-workspace.yaml
. Example:# pnpm-workspace.yaml catalog: "@open-pioneer/basemap-switcher": ^0.4.4
// some-package/package.json { "dependencies": { // uses version from catalog, the version number does not have to be repeated "@open-pioneer/basemap-switcher": "catalog:" } }
To migrate your project, you can use the codemod
$ pnpx codemod pnpm/catalog
. It will automatically create the catalog and rewrite your package.json files. Note that it currently does not handlepeerDependencies
, so a manual step is still required.We hope that this change will make dependency management much simpler in the long run. For more details, visit pnpm's documentation.
-
Remove the
syncpack
dependency and the pnpm scriptsupdate-shared-versions
andlint-shared-versions
: they are no longer needed since we now use catalogs.
- Update to latest OpenLayers Trails Packages. This also adapts to the breaking change in the react-utils package (see Release notes).
-
Improve the commit hooks (
.husky/pre-commit
). Commit hooks run duringgit commit
to check the code style and run tests. Previously, all files within the project were checked for style issues and all unit tests were run.With this update, only changed files will be checked (via lint-staged) and only tests affected by changed files will be re-executed (via
vitest --changed
). Also, prettier will now format staged files automatically -- it is no longer necessary to runprettier
manually in most cases.This change significantly improves the time it takes to commit a change. Unfortunately, TypeScript will still run type checks on the entire code base.
-
Update
syncpack
.
-
Update the license report script. It can now handle dependency license information returned by pnpm 9. See also open-pioneer/trails-openlayers-base-packages#335.
-
Configure
virtual-store-dir-max-length=60
in.npmrc
.This limits the paths generated by
pnpm
to the given length, which helps on windows where "long" paths can trigger weird errors. See also https://pnpm.io/npmrc#virtual-store-dir-max-length for more information. -
Update the patch against
react-select
. -
Update development dependencies.
-
tsconfig.json
: Switch to"moduleResolution": "Bundler"
. This is the appropriate resolution mode for TypeScript code when using a bundler such as Vite."moduleResolution": "Bundler"
fixes some cases where the TypeScript compiler would not find the declarations for certain modern packages (e.g. those that only useexports
in their package.json). -
Update workflow files (some actions were outdated).
-
Update trails dependencies.
It appears that recent versions of pnpm will sometimes not update peer dependencies when using
pnpm update
(pnpm/pnpm#8081). This mostly seems to affect indirectly required packages which are not explicitly listed in apackage.json
file.This may produce errors such as this:
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies src/packages/sample-package └─┬ @open-pioneer/runtime 2.1.5 ├── ✕ unmet peer @open-pioneer/base-theme@^0.3.2: found 0.3.1 └── ✕ unmet peer @open-pioneer/runtime-react-support@^1.0.2: found 1.0.1
As a workaround, you can temporarily (or even permanently) list the packages and their desired version in a
package.json
, and then executepnpm update-shared-versions && pnpm install && pnpm dedupe
.For example:
// top level package.json { // ... "dependencies": { // ... "@open-pioneer/base-theme": "^0.3.2", "@open-pioneer/runtime-react-support": "^1.0.2", "@open-pioneer/react-utils": "^0.2.3", "@open-pioneer/http": "^2.1.7" } }
-
Update
react
to 18.3.1 -
Update
ol
to 9.2.4 -
Update test packages:
- "@testing-library/dom": "^10.2.0",
- "@testing-library/jest-dom": "^6.4.6",
- "@testing-library/react": "^16.0.0",
These versions resolve a deprecation warning with the new versions of react ("Warning:
ReactDOMTestUtils.act
is deprecated in favor ofReact.act
...").They require patching the dependency declarations of
@open-pioneer/test-utils
to get rid of warnings, since there is no new release yet that declares compatibility with the new major versions (although they will work in practice):// package.json { "pnpm": { "peerDependencyRules": { "allowedVersions": { "@open-pioneer/test-utils>@testing-library/react": ">= 14.1.2", "@open-pioneer/test-utils>@testing-library/dom": ">= 9.3.3" } } } }
- Update patch for
react-select
: only use valid values foraria-activedescendant
. This removes a warning in firefox whenaria-activedescendant
was set to an empty string.
- Update to Vite 5.1 and Vitest 1.6
- Major changes in Vitest 1: Release Notes
- Major changes in Vite 5: Release Notes
- Require pnpm >= 9.0, see release notes.
This also updates the lockfile to
lockfileVersion: 9.0
- Configure
envDir: __dirname
invite.config.ts
to load.env
files from the root of the repository instead ofsrc
.
- Update to latest Open Pioneer Trails packages
- Update to OpenLayers 9