-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
chore(ui): don't depend on pnpm syntax #7771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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 removes the non-npm workspace:*
dependency and inlines the SimpleLocaleConfig
type to eliminate reliance on an external interface.
- Inline
SimpleLocaleConfig
instead of usingPick<LocaleConfig>
and drop theLocaleConfig
import - Remove
"@node-core/website-i18n": "workspace:*"
fromdevDependencies
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/ui-components/types.ts | Inlined SimpleLocaleConfig properties and removed external import |
packages/ui-components/package.json | Deleted workspace syntax for @node-core/website-i18n |
Comments suppressed due to low confidence (2)
packages/ui-components/package.json:50
- [nitpick] Since the
workspace:*
syntax was removed, pin@node-core/website-i18n
to a fixed npm version (e.g.,^1.2.3
) so consumers get a predictable release instead of missing the dependency entirely.
"@node-core/website-i18n": "workspace:*",
packages/ui-components/types.ts:21
- [nitpick] Consider adding a JSDoc comment to
SimpleLocaleConfig
explaining its shape and reminding maintainers to sync it with the upstreamLocaleConfig
interface to avoid divergence over time.
export type SimpleLocaleConfig = {
5186012
to
40fd13c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #7771 +/- ##
==========================================
+ Coverage 75.34% 75.36% +0.01%
==========================================
Files 96 96
Lines 7858 7858
Branches 192 192
==========================================
+ Hits 5921 5922 +1
+ Misses 1936 1935 -1
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Lighthouse Results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometimes DRYness is the enemy
@avivkeller sorry for the silly question, but could you clarify how |
It's not a silly question, we are still trying to figure that out in nodejs/api-docs-tooling#236. Currently, in nodejs/api-docs-tooling#273, I'm using a package I made for us to import |
I see, thanks a lot Aviv 🙂 Personally I would consider the option to publish the package as @AugustinMauroy suggested. Having to remove pnpm So all things considered I think I am not a huge fan of the approach 🤔, however I can live with it if everyone else is happy with it 🙂 (also considering that you're already using it for rehype-shiki) |
I recommend you raise your concerns in the dedicated issue. This PR is intended to work for npm installations of this package, which was one of the goals we had in mind when migrating to the monorepo. That's always something we can change, however, I think that's a discussion for the other issue. |
I see, sorry for the extra noise then 😓 |
When we import
@node-core/ui-components
fromapi-docs-tooling
, it can't contain non-npm syntax in it'spackage.json
. Therefore, this PR removes the dependency on theworkspace:*
syntax.