-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix: Install an exact version of @github/prettier-config
#464
Conversation
This matches what I've seen us install in practice. See https://github.com/npm/template-oss/blob/4ef5cf6be626cb5265486420634ad231832540ab/package.json#L70
disregard this approval, I didn't see it was done w/ a hard config to a specific version. That's not how this is done. |
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 usually don't bake versions into this package itself.
I see we typically don't specify versions of dependencies, not even major versions. However why is there support for exact versions in template-oss if we should never use it? template-oss/lib/check/check-required.js Line 29 in 4ef5cf6
template-oss/lib/check/check-required.js Line 40 in 4ef5cf6
And why does |
The exact version specification appears to be for It does not look like we've baked into template-oss the ability to enforce no prefixes for other dependencies. I know we'd talked about it for the linting rules packages, but I don't think it's been done. |
I now understand that we should avoid hardcoding versions in this repo, as its too much trouble to update them later. Ideally we'd want a way to indicate which dependencies should be installed as an exact versions, and template-oss would output something like I don't know if we'd actually want or need to migrate to a eventual newer release of |
This matches what I've seen us install in practice. See
template-oss/package.json
Line 70 in 4ef5cf6
template-oss/test/apply/lint.js
Lines 50 to 52 in b35bca5
Sample postlint guidance
Instead of
@github/prettier-config@*
, it tells you to install@github/[email protected]
with the--save-exact
flag.Exact version enforcement
semver range
Exact version
References
Follow-up to #447