Skip to content

Use workspace:^ for all internal workspace dependencies#804

Open
Copilot wants to merge 5 commits intomainfrom
copilot/better-package-json-management
Open

Use workspace:^ for all internal workspace dependencies#804
Copilot wants to merge 5 commits intomainfrom
copilot/better-package-json-management

Conversation

Copy link

Copilot AI commented Feb 20, 2026

Currently all @player-ui/* workspace references use workspace:*, which pnpm replaces with exact versions on publish (e.g. 1.0.0). This pins consumers to specific patch versions unnecessarily and breaks scenarios where not every package is bumped simultaneously.

Changes

  • All 37 workspace package.json files — replaced workspace:*workspace:^ across dependencies, devDependencies, and peerDependencies

Result

Published packages will now carry semver ranges instead of pinned versions:

// Before
{
  "dependencies": { "@player-ui/partial-match-registry": "1.0.0" },
  "peerDependencies": { "@player-ui/player": "1.0.0", "@player-ui/types": "1.0.0" }
}

// After
{
  "dependencies": { "@player-ui/partial-match-registry": "^1.0.0" },
  "peerDependencies": { "@player-ui/player": "^1.0.0", "@player-ui/types": "^1.0.0" }
}

This lets package managers resolve compatible versions correctly when consumers haven't bumped every @player-ui/* package.

Original prompt

This section details on the original issue you should resolve

<issue_title>Better package.json version management for 1.0</issue_title>
<issue_description>During the early stages of Player when we were updating more frequently, having a specific version pinned for a dependency/devDependency/peerDependency. But for 1.0 we should better select the versions and ranges a package works with for cases where a user may not have bumped every package or when something else like tools is dependent on a specific player version (@player-ui/types being one of the main ones).

A good example of this is the asset-transform-plugin

At 1.0.0 we should instead structure the dependencies like this:

{
  "dependencies": {
    "@player-ui/partial-match-registry": "^1.0.0",
    "tslib": "^2.6.2"
  },
  "devDependencies": {
	  "@player-ui/types": "^1.0.0"
  },
  "peerDependencies": {
    "@player-ui/player": ">= 1.0.0"
  }
}

Then, if we have any notable additions that are required, we ensure the dependency or peer is updated to the correct range:

{
  "peerDependencies": {
	  "@player-ui/player": ">= 1.0.3"
	}
}

Besides the peers, most of this can be done by making PNPM workspace be this instead:

{
  "dependencies": {
    "@player-ui/partial-match-registry": "workspace:^"
  }
}

Mostly a simple change, but just want to ensure we delegate some of this work to the package managers since they would handle resolution better, even if something like @player-ui/player is the only version bumped.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… on publish

Co-authored-by: adierkens <13004162+adierkens@users.noreply.github.com>
Copilot AI changed the title [WIP] Update package.json for better version management in 1.0 Use workspace:^ for all internal workspace dependencies Feb 20, 2026
@codecov
Copy link

codecov bot commented Feb 20, 2026

Bundle Report

Bundle size has no change ✅

@KetanReddy
Copy link
Member

Are there certain cases where we would want to make sure that the versions are the same? I know on the react player side we've seen issues with mismatched versions causing react context issues.

@KetanReddy KetanReddy marked this pull request as ready for review March 12, 2026 02:03
@KetanReddy KetanReddy requested review from a team as code owners March 12, 2026 02:03
@KetanReddy KetanReddy enabled auto-merge March 12, 2026 02:03
@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (e3244f5) to head (c07ce0e).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #804   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@spentacular spentacular disabled auto-merge March 14, 2026 04:38
@KetanReddy KetanReddy added the skip-release Preserve the current version when merged label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release Preserve the current version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better package.json version management for 1.0

5 participants