Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
RFC: Templates — Reusable packages to share dependencies and configuration #3
RFC: Templates — Reusable packages to share dependencies and configuration #3
Changes from all commits
c2f333b
b1c3522
bae6127
c1f3f2a
9a83824
7d86fc5
3161830
24c69db
cb35007
9cd64ec
22da4ac
e829ed7
714d1d8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
do we really need an alias? wouldn't it be enough to reference by package name? also, in most cases I think just specifying
catalog:
should be enough.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.
We could remove the alias.
At the moment there's 2 ways to refer to something.
package.json
dependency specifier syntax: Ex^1.0.0
.rfcs/text/0003-templates.md
Lines 281 to 287 in 714d1d8
Removing the alias and allowing,
Means introducing a 3rd syntax just for catalogs. For example, we wouldn't allow
^0.1.0
for the example above. I'm okay with that if we think the ergonomics of not having an alias is worthwhile.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.
it may be an array too.
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.
Let's add more details to the section about catalogs. If you remember, we discussed how only versions from dependencies and peerDependencies of the template will be used: https://github.com/orgs/pnpm/discussions/5974#discussioncomment-4783001
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.
Ack! Will do. Agree this is important to solidify into the RFC.
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.
Added some details to catalogs here: 24c69db
I reread the initial discussion linked 2 comments above and I'm actually a bit curious for whether we want to keep the "
peerDependencies
can only catalogpeerDependencies
restriction". I'm not too opinionated and could go either way.Just wondering if users might be surprised by the need to copy a specifier in
dependencies
topeerDependencies
when they try to use it in the later. How would we explain that restriction to someone asking in the future?