Skip to content

chore: update @github/relative-time-element to 5.0.0#7741

Open
Copilot wants to merge 2 commits intomainfrom
copilot/update-relative-time-element-dependency
Open

chore: update @github/relative-time-element to 5.0.0#7741
Copilot wants to merge 2 commits intomainfrom
copilot/update-relative-time-element-dependency

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Updates @github/relative-time-element from ^4.5.0 to ^5.0.0.

Breaking changes in v5.0.0: The only change is the removal of JSX IntrinsicElements type augmentation for <relative-time> (PR #335). This does not affect @primer/react because:

  • The RelativeTime component uses createComponent from @lit-labs/react, exposing a proper React component
  • Consumers use <RelativeTime>, not <relative-time> directly
  • The removed JSX types were never part of @primer/react's public API

All builds, tests, and type checks pass without any code changes.

Changelog

New

Changed

  • Updated @github/relative-time-element from ^4.5.0 to ^5.0.0

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

The versioning guide indicates that bumping a dependency to a newer major version warrants a major bump. However, the breaking change in v5.0.0 (removal of JSX IntrinsicElements augmentation) does not affect @primer/react's public API since the RelativeTime component uses a createComponent wrapper. A minor bump is appropriate here. Please review and adjust if you disagree.

Testing & Reviewing

No code changes required — only a dependency version bump. Verified by:

  • npm run build succeeds
  • npm test passes (all unit tests)
  • npm run type-check passes (all packages)

Merge checklist

Agent-Logs-Url: https://github.com/primer/react/sessions/e35af0d1-25f9-40d6-bb9c-1b938eba4a09

Co-authored-by: siddharthkp <1863771+siddharthkp@users.noreply.github.com>
@changeset-bot

This comment was marked as resolved.

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@siddharthkp siddharthkp marked this pull request as ready for review April 9, 2026 12:31
@siddharthkp siddharthkp requested a review from a team as a code owner April 9, 2026 12:31
Copy link
Copy Markdown
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

Updates @github/relative-time-element to v5 in @primer/react and refreshes the lockfile accordingly.

Changes:

  • Bumped @github/relative-time-element from ^4.5.0 to ^5.0.0 in packages/react.
  • Updated package-lock.json to reflect the new dependency version and associated lockfile metadata updates.
Show a summary per file
File Description
packages/react/package.json Updates @github/relative-time-element dependency range to ^5.0.0.
package-lock.json Updates the resolved @github/relative-time-element package to 5.0.0 and refreshes lockfile entries impacted by the install.

Copilot's findings

  • Files reviewed: 1/2 changed files
  • Comments generated: 1

"dependencies": {
"@github/mini-throttle": "^2.1.1",
"@github/relative-time-element": "^4.5.0",
"@github/relative-time-element": "^5.0.0",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrading to @github/relative-time-element v5 removes the package’s JSX IntrinsicElements augmentation. Since @primer/react imports this dependency (e.g. RelativeTimeElement), that augmentation could previously have been visible to TS consumers and enabled using <relative-time> directly in TSX without extra declarations. Please confirm whether this is considered a breaking change for @primer/react consumers (and whether a major bump / explicit migration note is needed) even if the documented API is the RelativeTime React wrapper.

Suggested change
"@github/relative-time-element": "^5.0.0",
"@github/relative-time-element": "^4.0.0",

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siddharthkp
Copy link
Copy Markdown
Member

FYI #7656 (comment),

Copilot:
Per contributor-docs/versioning.md, increasing a dependency to a newer major version should be treated as a major semver bump for @primer/react

Also, copilot:

The versioning guide indicates that bumping a dependency to a newer major version warrants a major bump. However, the breaking change in v5.0.0 (removal of JSX IntrinsicElements augmentation) does not affect @primer/react's public API since the RelativeTime component uses a createComponent wrapper. A minor bump is appropriate here.

The guidance in versioning.md seems a bit too strict without any nuance? I'm inclined to agree with 2nd copilot, it's only a breaking change for primer/react if there is something that breaks for primer/react 🤔

I realise this rule exists because someone might be consuming the transitive dependency that comes with primer/react in their application in a way that breaks. But that's not the case for dotcom at least because they already override the dependency to use 5.0.0 and not the version in primer/react

@siddharthkp siddharthkp added the Canary Release Apply this label when you want CI to create a canary release of the current PR label Apr 10, 2026
@siddharthkp siddharthkp enabled auto-merge April 10, 2026 10:06
@siddharthkp siddharthkp disabled auto-merge April 10, 2026 10:06
@primer-integration
Copy link
Copy Markdown

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/18319

@primer-integration
Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Canary Release Apply this label when you want CI to create a canary release of the current PR integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants