fix: bundle workspace deps and add config-resolver to release-please#309
Merged
Conversation
- Add bundledDependencies for @elastic/config-resolver and @elastic/es-schemas so npm install @elastic/cli works without those packages being published to the registry (fixes #308) - Remove "private": true from config-resolver to allow future independent publishing - Add packages/config-resolver entry to release-please config so it gets versioned and tagged alongside the CLI - Add the node-workspace plugin so release-please automatically updates inter-package dependency versions in the release PR
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts MegaLinter is graciously provided by OX Security |
bundledDependencies doesn't consult the private flag of the bundled package — npm pack follows workspace symlinks regardless. Keeping private: true prevents accidental independent publishing until we are ready to release it separately.
@elastic/es-schemas is now marked private (c57a0fe), so license-checker reports it as UNLICENSED. Same pattern as @elastic/config-resolver.
Contributor
Author
|
Heads up on the NOTICE.txt regeneration in this PR: marking @JoshMock is this expected/correct behaviour? A couple of options if not:
Going with option 1 here to unblock CI, happy to do option 2 in a follow-up if preferred. |
Member
|
yep, option 1 is fine for now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #308 —
npm install @elastic/cliwas failing with E404 because@elastic/config-resolverand@elastic/es-schemasare declared as runtime dependencies but were never published to npm.bundledDependenciesfor both workspace packages in the rootpackage.json. npm will include them verbatim in the published tarball so consumers never need to fetch them from the registry.packages/config-resolverto.github/release-please-config.jsonso it gets its own changelog, tags, and version bumps tracked by release-please.node-workspaceplugin to release-please config so that when either workspace package is versioned, the CLI's dependency references inpackage.jsonare updated automatically in the release PR (and the CLI gets a patch bump if it has no other changes).What to verify
npm pack --dry-runshows@elastic/config-resolverand@elastic/es-schemasin the tarball listing.github/release-please-config.json— all three packages tracked,node-workspaceplugin presentrelease.yml(npm publishwithout--workspaces) continues to publish only@elastic/cli; workspace packages are not published separately