Skip to content

Use workspace:^ for all internal workspace dependencies#804

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/better-package-json-management
Draft

Use workspace:^ for all internal workspace dependencies#804
Copilot wants to merge 2 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

Changes will increase total bundle size by 1.89kB (0.03%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
plugins/shared-constants/core 7.32kB 1.89kB (34.72%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: plugins/shared-constants/core

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.legacy-esm.js 1.89kB 1.89kB 100.0% ⚠️

@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.

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.

Better package.json version management for 1.0

3 participants