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

[breaking] move packaging functionality into its own package #5730

Merged
merged 22 commits into from
Aug 17, 2022

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Jul 27, 2022

How to migrate

  1. npm install -D @sveltejs/package (or pnpm, or yarn)
  2. If you have configured some package options, move them to the top level of svelte.config.js:
const config = {
	kit: {
- 		package: {..}
	},
+	package: {..}
};
  1. Replace svelte-kit package with svelte-package in your package.json script

PR description

Draft PR to move the package functionality out of SvelteKit. This makes the following decisions (all up for discussion):

  • New package is called @sveltejs/package
  • Package has its own CLI, svelte-package, svelte-kit package will be removed
  • Minimal SvelteKit interop; kit.files.lib is used to set source if source is unset
  • We don't call svelte-kit sync in this package because you can use it standalone, but the template will call it before calling the package command

TODOS:

  • SvelteKit and this new package share some utility code around filesystem stuff and options parsing. How do we best share this, if at all? Should we create a private package in the monorepo and enhance the rollup config to inline it, so no visible changes to the outside? Sounds like the best solution to me
  • How to deploy this as a new package? Changeset masterminds please help. Is it enough to create a changeset and the rest is taken care of?
  • Adjust SvelteKit code: remove packaging, remove the config (error and tell to switch to this new package)

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 Jul 27, 2022

⚠️ No Changeset found

Latest commit: 6f1526c

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

@dummdidumm
Copy link
Member Author

dummdidumm commented Jul 28, 2022

Tests for create-svelte are failing because the package isn't available yet on npm. The lint error is unrelated to this change, since the env PR the test needs sync to run first. So although CI is all red, this PR is actually passing it.

@dummdidumm
Copy link
Member Author

I think we should merge this as-is and do the other stuff in follow-up PRs.

@dummdidumm dummdidumm marked this pull request as ready for review August 17, 2022 14:20
@Rich-Harris Rich-Harris merged commit 89ef569 into master Aug 17, 2022
@Rich-Harris Rich-Harris deleted the svelte-package branch August 17, 2022 16:26
@ignatiusmb ignatiusmb mentioned this pull request Aug 18, 2022
5 tasks
akadusei added a commit to GrottoPress/kitty that referenced this pull request Sep 3, 2022
fmaclen added a commit to fmaclen/canutin-desktop that referenced this pull request Dec 5, 2022
svelte-kit package has been removed. It now lives in its own npm package. See the PR on how to migrate: sveltejs/kit#5730
fmaclen added a commit to fmaclen/canutin-desktop that referenced this pull request Dec 6, 2022
* chore: remove unused script

svelte-kit package has been removed. It now lives in its own npm package. See the PR on how to migrate: sveltejs/kit#5730

* feat: add Linux server release

* feat: remove builds for all except ubuntu

This is a test for building and releasing a Linux server version of Canutin

* Revert "feat: remove builds for all except ubuntu"

This reverts commit 01481ba.

* fix: get previous tag

* fix: rename ELECTRON_SWITCHED_VAULT to SHOULD_CHECK_VAULT

* fix: replace semantic-release package with GH action

* fix: add Linux server package script

* fix: typo
fmaclen added a commit to fmaclen/canutin-desktop that referenced this pull request Dec 6, 2022
* feat: add access key

* feat: save generated access key to vault and set cookies

* chore: rename isVaultReadyStore to isAppReadyStore

* feat: add access key page

* feat: check access key on every request

* chore: general cleanup

* fix: remove URL protocol override

* chore: more syntax cleanup

* chore: remove unused store props

* feat: add status bar notification after setting access key

* test: fix sync tests

* test: increase visual diff ratio

* chore: remove unused imports

* fix: skip checks when /devTools is requested in dev and tests

* fix: update environment variables for tests

* test: add accessKey tests

* test: add more tests

* test: add test for /vault

* test: add more assertions

* fix: cleanup redundant syntax

* fix: update Linux Prisma engines

* test: add statusBar assertion

* test: add statusBar assertion on reset

* test: reset access key before continuing

* test: improve assertion resilience

* chore: rename helpers/test.server.ts

* test: don't reload, go to /devTools

* test: add TEST_ACCESS_KEY check

* docs: add comment

* feat: add server only release (#153)

* chore: remove unused script

svelte-kit package has been removed. It now lives in its own npm package. See the PR on how to migrate: sveltejs/kit#5730

* feat: add Linux server release

* feat: remove builds for all except ubuntu

This is a test for building and releasing a Linux server version of Canutin

* Revert "feat: remove builds for all except ubuntu"

This reverts commit 01481ba.

* fix: get previous tag

* fix: rename ELECTRON_SWITCHED_VAULT to SHOULD_CHECK_VAULT

* fix: replace semantic-release package with GH action

* fix: add Linux server package script

* fix: typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants