-
Notifications
You must be signed in to change notification settings - Fork 3
Centralize external package versions and correct pack script #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
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.