-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Root devdeps #5012
Root devdeps #5012
Conversation
|
an alternative is to put all devDeps in the workspace root (except e.g. the ones shiki-twoslash needs to have in the site dir for building the docs) |
package.json
Outdated
@@ -30,6 +30,7 @@ | |||
"@rollup/plugin-replace": "^4.0.0", | |||
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.8.0", | |||
"@svitejs/changesets-changelog-github-compact": "^0.1.1", | |||
"@types/node": "~16.11.36", |
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.
Why tilde instead of caret?
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.
I'm not sure how @types/node
versions correspond to Node versions. If we're saying we support Node 16+, we should make sure we only have Node 16.0 types available, and not those from any later versions of Node 16. I don't know how we enforce this. Would that be ~16.0.0
?
If that's the purpose of the tilde, and if that's how the @types/node
versions work, we should make sure we don't bring in types for versions of Node we don't support (so that the typechecking can yell at us immediately if we use unsupported features), so that's why no caret, but also ~16.11 isn't what we want to be depending on either.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
Errr, wait. I completely confused things in my head. I intended to use ~
for Typescript, not Node... This was me failing to diff Rich's changes on top of the ones I had already 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.
If @types/[email protected]
is types for Node 16.11.x (is it?), then we don't want to use those types, as they would include features added after Node 16.0, and we're claiming SvelteKit works with any version of Node 16+ (which would include Node 16.0). If that's how versioning on @types/node
indeed works, it would be nice to be warned by the typechecker that we are using features of Node that we shouldn't.
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.
Since they're manually maintained, there's a best-effort process to match the major and minor versions with Node's. I'm not sure they backport fixes to previous minor versions when a gap is found late (eg. 16.1 backported to 16.0), though.
We could make it ~16.0
, but maybe we need some CI tests to make sure it doesn't get changed accidentally. Apparently Svelte's =8
didn't last 3 months, eh, Conduitry? 😆
I joke, but all package managers encourage us to update even if pinned to exact versions when updating post-package.json
, so a CI check isn't that ridiculous.
Moves shared
devDependencies
into the workspace rootPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0