Centralize external package versions and correct pack script - #109
Merged
Conversation
JesuTerraz
previously approved these changes
Dec 9, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes external package version management using pnpm's catalog feature and standardizes the package build scripts. The changes move version specifications from individual package.json files to a centralized catalog in pnpm-workspace.yaml, replacing wildcards and explicit versions with "catalog:" references.
Key Changes:
- Introduced pnpm catalog feature for centralized version management of external dependencies
- Created copyFiles.js utility to standardize LICENSE.md and CHANGELOG.md copying during packaging
- Updated all pack scripts from
cp ... && npm packtonode ../../copyFiles.js . && pnpm pack
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Added catalog section with centralized external package versions; reorganized overrides section |
| pnpm-lock.yaml | Updated with catalog definitions and resolved versions for all dependencies |
| copyFiles.js | New ES module utility with proper copyright header for copying LICENSE/CHANGELOG files |
| tests/package.json | Migrated all external dependencies from explicit versions to catalog references |
| tests-agent/openai-agent-auto-instrument-sample/package.json | Migrated dependencies to catalog; contains critical bugs (references to packages not in catalog) |
| packages/agents-a365-*/package.json (9 files) | Updated pack scripts and migrated dependencies to catalog references |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
rahuldevikar761
approved these changes
Dec 9, 2025
joratz
approved these changes
Dec 9, 2025
tmlsousa
approved these changes
Dec 10, 2025
juliomenendez
approved these changes
Dec 10, 2025
pontemonti
enabled auto-merge (squash)
December 10, 2025 04:39
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.
Problem:
package.jsonfiles usepnpmfor certain dependencies. Both the internal ("workspace") and the external dependencies were referenced usingworkspace:*, which is incorrect.workspace:*is only applicable to dependencies within the workspace. For external dependencies,catalog:should be used.npm packis used. This does not take thepnpmworkspace into account. This resulted inworkspace:*leaking out into the packages that we published, making it difficult to install them.Solution
pnpm-workspace.yamlto add all relevant external dependencies under thecatalogproperty.package.jsonfiles to only reference package versions usingworkspace:*(for dependencies within the workspace) andcatalog:(for external dependencies).copyFiles.jsscript to copyLICENSE.mdandCHANGELOG.mdto the specified directory. Use this script in allpackage.jsonfiles that are published, instead of callingcpfrom there. Whilecpworks fine when run in the workflow, it does not work when run on Windows. ThecopyFiles.jsscript ensures that this works cross platform.package.jsonfiles to usepnpm packinstead ofnpm pack. This ensures that theworkspace:*andcatalog:references are converted into version numbers/ranges in the packages that get published.