Explicitly declare optional peer deps in just-scripts#825
Draft
Explicitly declare optional peer deps in just-scripts#825
Conversation
Add peerDependencies and peerDependenciesMeta to packages/just-scripts/package.json for all packages that are optionally loaded via tryRequire() calls: - @microsoft/api-extractor - @webpack-cli/init - autoprefixer - fork-ts-checker-webpack-plugin - html-webpack-plugin - node-sass - postcss - postcss-clean - postcss-rtl - sass - webpack Add .syncpackrc.json to ignore peer deps in version group checks. Co-authored-by: ecraig12345 <5864305+ecraig12345@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/just/sessions/e2e2b5e5-58e7-4bd3-af15-4bcdd013a7f4
Co-authored-by: ecraig12345 <5864305+ecraig12345@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/just/sessions/e2e2b5e5-58e7-4bd3-af15-4bcdd013a7f4
Copilot
AI
changed the title
[WIP] Fix implicit optional peer dependencies in just-scripts
Explicitly declare optional peer deps in just-scripts
Mar 26, 2026
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.
Tasks in
just-scriptsusetryRequire()to optionally load packages at runtime, but these were never declared aspeerDependencies. This makes them invisible to package managers and consumers.packages/just-scripts/package.json— Added all 11 packages found intryRequire()calls as optional peer dependencies:@microsoft/api-extractor,@webpack-cli/init,autoprefixer,fork-ts-checker-webpack-plugin,html-webpack-plugin,node-sass,postcss,postcss-clean,postcss-rtl,sass,webpack.syncpackrc.json— Configured syncpack to ignore peer deps in version group checks, since peer deps intentionally use broader ranges than devDependencies.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.