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

chore: commit types #9862

Merged
merged 6 commits into from
Jan 4, 2024
Merged

chore: commit types #9862

merged 6 commits into from
Jan 4, 2024

Conversation

dummdidumm
Copy link
Member

To ensure that changes to code/types doesn't result in unwanted changes in type generation, or that bumps to dts-buddy don't cause unwanted regressions, we're checking in the generated types. Types should be committed as-is (don't format it with prettier!). CI is enhanced to check that git sees no changed files after generating the types, which would mean types have changed.

This fails right now because types are wrong due to a regression from a dts-buddy bump. As such, no Svelte release should happen until this is fixed!

Svelte 5 rewrite

Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (main).

If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is svelte-4 and not main.

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
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests and linting

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

To ensure that changes to code/types doesn't result in unwanted changes in type generation, or that bumps to dts-buddy don't cause unwanted regressions, we're checking in the generated types. Types should be committed as-is (don't format it with prettier!). CI is enhanced to check that git sees no changed files after generating the types, which would mean types have changed.
Copy link

changeset-bot bot commented Dec 8, 2023

⚠️ No Changeset found

Latest commit: 4016570

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

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@dummdidumm dummdidumm mentioned this pull request Dec 15, 2023
@dominikg
Copy link
Member

dominikg commented Jan 1, 2024

apart from the renaming of prepublishOnly i mentioned before, another check in the release.yml is needed that ensures that types are up2date before releasing.

compare:
https://github.com/sveltejs/vite-plugin-svelte/blob/833d66cee57a0ec7cbfcf29b23796988dfdc7cf3/.github/workflows/release.yml#L46C1-L49

and again i'd suggest to split the checks into separate named items so that contributors (and us) can figure out faster which check has failed.

@dummdidumm
Copy link
Member Author

Could you add those changes? You're probably more familiar with that syntax than I am. It also needs a change in the the corresponding Svelte 5 PR

@dummdidumm
Copy link
Member Author

Did the changes except prebublishOnly - it would be too cumbersome to split up the type generation logic that is checked in from the ones that is git-ignored. If a type change slips through that's on us not being on the lookout enough.

@dominikg
Copy link
Member

dominikg commented Jan 4, 2024

approved. the check steps could be made optional to be able to see multiple fails at once, but that can be in a different PR as well.

There is a lint error that reads like some type issue, no clue about the macos fail.

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.

2 participants