Skip to content
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

Merged
merged 8 commits into from
May 23, 2022
Merged

Root devdeps #5012

merged 8 commits into from
May 23, 2022

Conversation

Rich-Harris
Copy link
Member

Moves shared devDependencies into the workspace root

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented May 21, 2022

⚠️ No Changeset found

Latest commit: 7723deb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Rich-Harris
Copy link
Member Author

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",
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@mrkishi mrkishi May 22, 2022

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If @types/node@16.11.x 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.

Copy link
Member

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.

@Rich-Harris Rich-Harris merged commit f5963d8 into master May 23, 2022
@Rich-Harris Rich-Harris deleted the root-devdeps branch May 23, 2022 14:07
@Rich-Harris Rich-Harris mentioned this pull request May 30, 2022
Rich-Harris added a commit that referenced this pull request May 30, 2022
@Rich-Harris Rich-Harris mentioned this pull request May 30, 2022
Rich-Harris added a commit that referenced this pull request May 30, 2022
* revert #5012

* include packaging test changes from #5120

* update deps

* update lockfile

* changeset

* lint

* ffs try this

* include indirect dependencies in duplicates check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants