Skip to content

Conversation

@pontemonti
Copy link
Contributor

@pontemonti pontemonti commented Dec 9, 2025

Problem:

  • The package.json files use pnpm for certain dependencies. Both the internal ("workspace") and the external dependencies were referenced using workspace:*, which is incorrect. workspace:* is only applicable to dependencies within the workspace. For external dependencies, catalog: should be used.
  • When creating the packages, npm pack is used. This does not take the pnpm workspace into account. This resulted in workspace:* leaking out into the packages that we published, making it difficult to install them.

Solution

  • Update pnpm-workspace.yaml to add all relevant external dependencies under the catalog property.
  • Update all package.json files to only reference package versions using workspace:* (for dependencies within the workspace) and catalog: (for external dependencies).
  • Add copyFiles.js script to copy LICENSE.md and CHANGELOG.md to the specified directory. Use this script in all package.json files that are published, instead of calling cp from there. While cp works fine when run in the workflow, it does not work when run on Windows. The copyFiles.js script ensures that this works cross platform.
  • Update package.json files to use pnpm pack instead of npm pack. This ensures that the workspace:* and catalog: references are converted into version numbers/ranges in the packages that get published.

JesuTerraz
JesuTerraz previously approved these changes Dec 9, 2025
@pontemonti pontemonti marked this pull request as ready for review December 9, 2025 22:32
@pontemonti pontemonti requested review from a team as code owners December 9, 2025 22:32
Copilot AI review requested due to automatic review settings December 9, 2025 22:32
Copy link
Contributor

Copilot AI left a 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 pack to node ../../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

@pontemonti pontemonti enabled auto-merge (squash) December 10, 2025 04:39
Copilot AI review requested due to automatic review settings December 10, 2025 04:40
Copy link
Contributor

Copilot AI left a 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

@pontemonti pontemonti merged commit 07168a2 into main Dec 10, 2025
13 checks passed
@pontemonti pontemonti deleted the users/johanb/FixPackaging branch December 10, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants