Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@open-pioneer/build-package@3.0.0
Major Changes
type: module
Minor Changes
e4ae880: Implement additional validations when importing modules from other packages.
build-package
will now check that the imported module actually exists.build-package
now verifies that the imported module is an actual entry point of that package (declared in thebuild.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 Prevent imports of unexported modules trails-core-packages#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
to
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 Import of OpenLayers modules fails under vitest trails-openlayers-base-packages#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
@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.
build-package
will now check that the imported module actually exists.build-package
now verifies that the imported module is an actual entry point of that package (declared in thebuild.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 Prevent imports of unexported modules trails-core-packages#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
@open-pioneer/build-common@2.0.4
Patch Changes
@open-pioneer/vite-plugin-pioneer@3.0.3
Patch Changes