Repository navigation
fix: mark @sap/cds-dk peer dependency as optional - #156
Merged
Merged
Conversation
daogrady
self-requested a review
October 23, 2026 08:19
daogrady
approved these changes
Oct 23, 2026
daogrady
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
Without being too deep into this particular code base, I believe your proposed change makes sense.
I am no sure why the Node22 test suite fails, but since it works properly on Node24, I'd say we're good.
Contributor
Author
|
Hi @daogrady Thanks |
|
Hi @bkohenkel , pipeline is green and merged, thanks again for the contribution! Best, |
This branch was successfully deployed
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.
Fixes #155
@sap/cds-dk is only needed for the
cds buildplugin, and cds-plugin.js alreadyguards that with
cds.build?.register?.(...)— at runtime the plugin workswithout cds-dk.
Because the peer is currently required, npm 7+ auto-installs @sap/cds-dk into
every consuming app's production dependency tree. Its bundled dependencies
(e.g. handlebars) then show up in security scans and cannot be fixed via
overrides, forcing apps to uselegacy-peer-deps.Marking the peer as optional preserves compatibility validation when
@sap/cds-dk is installed, while preventing npm from installing it
automatically for runtime-only consumers.
Verified in a clean consumer project that installing @cap-js/notifications
without @sap/cds-dk no longer installs cds-dk, while the runtime plugin still
loads; with @sap/cds-dk installed, the notifications build task is still
registered.