-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
javascript: Add support for the pnpm package manager #18864
Conversation
|
||
|
||
@dataclass(frozen=True) | ||
class NodeJSProject: |
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.
Should this be implemented via a union?
I'm hesitant because I don't think users will want to extend this union themselves, but it might make the code cleaner w.r.t to the package manager specific properties.
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.
While it's totally fine to have "private" @unions
, I don't think that seems necessary yet, no. And it's probably worth avoiding prematurely extracting interfaces in case #16763 comes along and makes it much easier to use @union
s by allowing methods to be awaited.
But when in doubt, leaving a TODO comment behind posing the question can be helpful, as it might help the reader come to another conclusion.
@@ -72,7 +85,8 @@ def test_packages_sources_as_resource_using_build_tool(rule_runner: RuleRunner) | |||
"devDependencies": {"parcel": "2.6.2"}, | |||
} | |||
), | |||
"src/js/package-lock.json": (Path(__file__).parent / "package-lock.json").read_text(), | |||
"src/js/.npmrc": "strict-peer-dependencies=false", |
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.
Parcels dependency tree is broken.
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.
Thanks!
|
||
|
||
@dataclass(frozen=True) | ||
class NodeJSProject: |
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.
While it's totally fine to have "private" @unions
, I don't think that seems necessary yet, no. And it's probably worth avoiding prematurely extracting interfaces in case #16763 comes along and makes it much easier to use @union
s by allowing methods to be awaited.
But when in doubt, leaving a TODO comment behind posing the question can be helpful, as it might help the reader come to another conclusion.
Nice! You can run |
Yeah, I think I managed to interactive rebase my way out of the pre-commit hooks 😅 All done now, though! @stuhood I'll consider adding a todo in the pr, I'll be adding |
Head branch was pushed to by a user without write access
Enable to configure
pnpm
at the nodejs project or repository level, via corepack.Fixes #18527.