diff --git a/.changeset/bright-ads-behave.md b/.changeset/bright-ads-behave.md deleted file mode 100644 index f1721e8..0000000 --- a/.changeset/bright-ads-behave.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@open-pioneer/build-package": major -"@open-pioneer/build-package-cli": minor ---- - -Switch to `type: module` diff --git a/.changeset/nice-humans-add.md b/.changeset/nice-humans-add.md deleted file mode 100644 index 8072fc8..0000000 --- a/.changeset/nice-humans-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@open-pioneer/build-common": patch ---- - -Use timestamps instead of request ids to import build configs diff --git a/.changeset/ninety-steaks-repeat.md b/.changeset/ninety-steaks-repeat.md deleted file mode 100644 index e535d70..0000000 --- a/.changeset/ninety-steaks-repeat.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@open-pioneer/build-package-cli": minor -"@open-pioneer/build-package": minor ---- - -Implement additional validations when importing modules from other packages. - -- When importing modules from normal node packages, `build-package` will now check that the imported module actually exists. -- When importing modules from another trails package in the same repository, `build-package` now verifies that the imported module is an actual entry point of that package (declared in the `build.config.mjs`). - -These validations are designed to errors where a package would run locally (in Vite's development mode) -but end up broken when published (see also https://github.com/open-pioneer/trails-core-packages/issues/42). diff --git a/.changeset/odd-ducks-warn.md b/.changeset/odd-ducks-warn.md deleted file mode 100644 index 55d91a8..0000000 --- a/.changeset/odd-ducks-warn.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@open-pioneer/build-package-cli": patch -"@open-pioneer/build-package": patch -"@open-pioneer/vite-plugin-pioneer": patch ---- - -Update dependencies diff --git a/.changeset/spotty-ducks-notice.md b/.changeset/spotty-ducks-notice.md deleted file mode 100644 index d701c13..0000000 --- a/.changeset/spotty-ducks-notice.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@open-pioneer/build-package": minor ---- - -Implement automatic rewrite for certain problematic import statements. - -Under certain conditions, `build-package` will add extensions to imported modules when the imported module does not (strictly) exist. -For example, this rewrites - -```js -import * from "ol/proj/proj4"; -``` - -to - -```js -import * from "ol/proj/proj4.js"; -``` - -While the first import works with bundlers such as Vite or Rollup, Node will refuse to import it. -Because node is strict about extensions, the first snippet cannot execute in some environments (such as Vitest). - -This new behavior is intended as a fix for https://github.com/open-pioneer/trails-openlayers-base-packages/issues/314. -Please open an issue if this fix causes any problems for your packages. diff --git a/.changeset/tidy-balloons-cry.md b/.changeset/tidy-balloons-cry.md deleted file mode 100644 index 424bd17..0000000 --- a/.changeset/tidy-balloons-cry.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@open-pioneer/build-package-cli": minor -"@open-pioneer/build-package": minor ---- - -Introduce an option to configure the root directory (`-r` for the CLI, `rootDirectory` for the JavaScript API). - -The root directory is used to detect which packages are local to the project. -The option defaults to the root of the current workspace (e.g. the PNPM workspace root), or, if that doesn't work, to the root of the current git repository. -However, it can also be configured manually. diff --git a/packages/build-common/CHANGELOG.md b/packages/build-common/CHANGELOG.md index 8974a44..046ec8a 100644 --- a/packages/build-common/CHANGELOG.md +++ b/packages/build-common/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog @open-pioneer/build-common +## 2.0.4 + +### Patch Changes + +- d9a0c1b: Use timestamps instead of request ids to import build configs + ## 2.0.3 ### Patch Changes diff --git a/packages/build-common/package.json b/packages/build-common/package.json index bcbc755..b1e0f4b 100644 --- a/packages/build-common/package.json +++ b/packages/build-common/package.json @@ -1,7 +1,7 @@ { "name": "@open-pioneer/build-common", "description": "Common functionality used when building Open Pioneer Trails applications or packages.", - "version": "2.0.3", + "version": "2.0.4", "main": "dist/index.js", "types": "types.d.ts", "type": "commonjs", diff --git a/packages/build-package-cli/CHANGELOG.md b/packages/build-package-cli/CHANGELOG.md index 44b3805..706af79 100644 --- a/packages/build-package-cli/CHANGELOG.md +++ b/packages/build-package-cli/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog @open-pioneer/build-package-cli +## 2.1.0 + +### Minor Changes + +- e4ae880: Switch to `type: module` +- e4ae880: Implement additional validations when importing modules from other packages. + + - When importing modules from normal node packages, `build-package` will now check that the imported module actually exists. + - When importing modules from another trails package in the same repository, `build-package` now verifies that the imported module is an actual entry point of that package (declared in the `build.config.mjs`). + + These validations are designed to errors where a package would run locally (in Vite's development mode) + but end up broken when published (see also https://github.com/open-pioneer/trails-core-packages/issues/42). + +- e4ae880: Introduce an option to configure the root directory (`-r` for the CLI, `rootDirectory` for the JavaScript API). + + The root directory is used to detect which packages are local to the project. + The option defaults to the root of the current workspace (e.g. the PNPM workspace root), or, if that doesn't work, to the root of the current git repository. + However, it can also be configured manually. + +### Patch Changes + +- 3550ca8: Update dependencies +- Updated dependencies [e4ae880] +- Updated dependencies [e4ae880] +- Updated dependencies [3550ca8] +- Updated dependencies [e4ae880] +- Updated dependencies [e4ae880] + - @open-pioneer/build-package@3.0.0 + ## 2.0.3 ### Patch Changes diff --git a/packages/build-package-cli/package.json b/packages/build-package-cli/package.json index fe67261..7a7b5b5 100644 --- a/packages/build-package-cli/package.json +++ b/packages/build-package-cli/package.json @@ -1,7 +1,7 @@ { "name": "@open-pioneer/build-package-cli", "description": "Provides a CLI tool to compile Open Pioneer Trails packages.", - "version": "2.0.3", + "version": "2.1.0", "type": "module", "license": "Apache-2.0", "repository": { diff --git a/packages/build-package/CHANGELOG.md b/packages/build-package/CHANGELOG.md index 834c66e..a58da96 100644 --- a/packages/build-package/CHANGELOG.md +++ b/packages/build-package/CHANGELOG.md @@ -1,5 +1,54 @@ # Changelog @open-pioneer/build-package +## 3.0.0 + +### Major Changes + +- e4ae880: Switch to `type: module` + +### Minor Changes + +- e4ae880: Implement additional validations when importing modules from other packages. + + - When importing modules from normal node packages, `build-package` will now check that the imported module actually exists. + - When importing modules from another trails package in the same repository, `build-package` now verifies that the imported module is an actual entry point of that package (declared in the `build.config.mjs`). + + These validations are designed to errors where a package would run locally (in Vite's development mode) + but end up broken when published (see also https://github.com/open-pioneer/trails-core-packages/issues/42). + +- e4ae880: Implement automatic rewrite for certain problematic import statements. + + Under certain conditions, `build-package` will add extensions to imported modules when the imported module does not (strictly) exist. + For example, this rewrites + + ```js + import * from "ol/proj/proj4"; + ``` + + to + + ```js + import * from "ol/proj/proj4.js"; + ``` + + While the first import works with bundlers such as Vite or Rollup, Node will refuse to import it. + Because node is strict about extensions, the first snippet cannot execute in some environments (such as Vitest). + + This new behavior is intended as a fix for https://github.com/open-pioneer/trails-openlayers-base-packages/issues/314. + Please open an issue if this fix causes any problems for your packages. + +- e4ae880: Introduce an option to configure the root directory (`-r` for the CLI, `rootDirectory` for the JavaScript API). + + The root directory is used to detect which packages are local to the project. + The option defaults to the root of the current workspace (e.g. the PNPM workspace root), or, if that doesn't work, to the root of the current git repository. + However, it can also be configured manually. + +### Patch Changes + +- 3550ca8: Update dependencies +- Updated dependencies [d9a0c1b] + - @open-pioneer/build-common@2.0.4 + ## 2.0.3 ### Patch Changes diff --git a/packages/build-package/package.json b/packages/build-package/package.json index aabc916..17a5379 100644 --- a/packages/build-package/package.json +++ b/packages/build-package/package.json @@ -1,7 +1,7 @@ { "name": "@open-pioneer/build-package", "description": "Implements partial compilation for Open Pioneer Trails packages.", - "version": "2.0.3", + "version": "3.0.0", "main": "dist/index.js", "types": "types.d.ts", "type": "module", diff --git a/packages/vite-plugin/CHANGELOG.md b/packages/vite-plugin/CHANGELOG.md index a23b52d..22c113a 100644 --- a/packages/vite-plugin/CHANGELOG.md +++ b/packages/vite-plugin/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog @open-pioneer/vite-plugin-pioneer +## 3.0.3 + +### Patch Changes + +- 3550ca8: Update dependencies +- Updated dependencies [d9a0c1b] + - @open-pioneer/build-common@2.0.4 + ## 3.0.2 ### Patch Changes diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index 434bb28..2182b7c 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@open-pioneer/vite-plugin-pioneer", "description": "The vite plugin provided by this package is required by Open Pioneer Trails applications.", - "version": "3.0.2", + "version": "3.0.3", "main": "dist/index.js", "types": "types.d.ts", "type": "module",