chore: update @github/relative-time-element to 5.0.0#7741
chore: update @github/relative-time-element to 5.0.0#7741
Conversation
Agent-Logs-Url: https://github.com/primer/react/sessions/e35af0d1-25f9-40d6-bb9c-1b938eba4a09 Co-authored-by: siddharthkp <1863771+siddharthkp@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
|
There was a problem hiding this comment.
Pull request overview
Updates @github/relative-time-element to v5 in @primer/react and refreshes the lockfile accordingly.
Changes:
- Bumped
@github/relative-time-elementfrom^4.5.0to^5.0.0inpackages/react. - Updated
package-lock.jsonto 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", |
There was a problem hiding this comment.
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.
| "@github/relative-time-element": "^5.0.0", | |
| "@github/relative-time-element": "^4.0.0", |
Also, copilot:
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 |
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/18319 |
Updates
@github/relative-time-elementfrom^4.5.0to^5.0.0.Breaking changes in v5.0.0: The only change is the removal of JSX
IntrinsicElementstype augmentation for<relative-time>(PR #335). This does not affect@primer/reactbecause:RelativeTimecomponent usescreateComponentfrom@lit-labs/react, exposing a proper React component<RelativeTime>, not<relative-time>directly@primer/react's public APIAll builds, tests, and type checks pass without any code changes.
Changelog
New
Changed
@github/relative-time-elementfrom^4.5.0to^5.0.0Removed
Rollout strategy
The versioning guide indicates that bumping a dependency to a newer major version warrants a
majorbump. However, the breaking change in v5.0.0 (removal of JSX IntrinsicElements augmentation) does not affect@primer/react's public API since theRelativeTimecomponent uses acreateComponentwrapper. Aminorbump 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 buildsucceedsnpm testpasses (all unit tests)npm run type-checkpasses (all packages)Merge checklist