From 25bb1a696a00762cf8eca7141f630bdc3e6518a5 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 12:58:14 -0700 Subject: [PATCH 01/19] chore: setup changesets --- .changeset/README.md | 8 +++++++ .changeset/config.json | 11 ++++++++++ .changeset/pre.json | 8 +++++++ .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 .changeset/pre.json create mode 100644 .github/workflows/release.yml diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 000000000000..e5b6d8d6a67a --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 000000000000..cee58792a00e --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", + "changelog": ["@svitejs/changesets-changelog-github-compact", { "repo": "sveltejs/svelte" }], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "master", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000000..7c25128a63ce --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,8 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "svelte": "4.0.0-next.1" + }, + "changesets": [] +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000000..2f24422e0830 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Release + +on: + push: + branches: + - version-4 + +permissions: {} +jobs: + release: + # prevents this action from running on forks + if: github.repository == 'sveltejs/svelte' + permissions: + contents: write # to create release (changesets/action) + pull-requests: write # to create pull request (changesets/action) + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + - uses: pnpm/action-setup@v2.2.4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + cache: pnpm + + - run: pnpm install --frozen-lockfile + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + # This expects you to have a script called release which does a build for your packages and calls changeset publish + publish: pnpm release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 567b7a378693bbeb1a965e4e255e1485db22334e Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 13:42:29 -0700 Subject: [PATCH 02/19] address feedback --- .changeset/config.json | 4 ++-- .github/workflows/release.yml | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index cee58792a00e..9824736d4df0 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -5,7 +5,7 @@ "fixed": [], "linked": [], "access": "public", - "baseBranch": "master", - "updateInternalDependencies": "patch", + "baseBranch": "version-4", + "bumpVersionsWithWorkspaceProtocolOnly": true, "ignore": [] } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f24422e0830..89d7bcc04450 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,9 +32,6 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 - with: - # This expects you to have a script called release which does a build for your packages and calls changeset publish - publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 39c432e624257bbaf70f187aee6c1f0e1558f75b Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 13:44:22 -0700 Subject: [PATCH 03/19] use node lts --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89d7bcc04450..1d72c324cf4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: + node-version: 18.x cache: pnpm - run: pnpm install --frozen-lockfile From 24989ad2a7a7078905f92a6039a4659e68148d0a Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 14:06:45 -0700 Subject: [PATCH 04/19] add release script --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e2e60ef73289..730a9aaddab6 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "build": "pnpm -r build", "check": "pnpm -r check", "lint": "pnpm -r lint", - "format": "pnpm -r format" + "format": "pnpm -r format", + "release":"changeset release" }, "repository": { "type": "git", From bcb0a3064d344a99e4a57426ed21c2b7d56d1e7b Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:12:30 -0700 Subject: [PATCH 05/19] generate version --- .github/workflows/release.yml | 2 ++ package.json | 1 + packages/svelte/package.json | 7 ++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d72c324cf4e..84ced7c3da6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,8 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 + with: + version: pnpm version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 730a9aaddab6..3c8e9c6d11d3 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "check": "pnpm -r check", "lint": "pnpm -r lint", "format": "pnpm -r format", + "version":"pnpm changeset version && pnpm -r generate:version && git add -a", "release":"changeset release" }, "repository": { diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 323d672fa81a..0faa40ade32d 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -74,11 +74,12 @@ "format": "prettier . --cache --plugin-search-dir=. --write", "check": "prettier . --cache --plugin-search-dir=. --check", "test": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"", - "build": "rollup -c && npm run tsd", - "prepare": "npm run build", + "build": "rollup -c && pnpm tsd", + "prepare": "pnpm build", + "generate:version": "pnpm build", "dev": "rollup -cw", "posttest": "agadoo src/internal/index.js", - "prepublishOnly": "npm run lint && npm run build && npm test", + "prepublishOnly": "pnpm lint && pnpm build && pnpm test", "tsd": "node ./generate-types.js", "lint": "eslint \"{src,test}/**/*.{ts,js}\" --cache" }, From b2c53faa6ac4fd683867443a9d654bea78131b75 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:19:02 -0700 Subject: [PATCH 06/19] add space --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3c8e9c6d11d3..9c532cd1f922 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "check": "pnpm -r check", "lint": "pnpm -r lint", "format": "pnpm -r format", - "version":"pnpm changeset version && pnpm -r generate:version && git add -a", - "release":"changeset release" + "version": "pnpm changeset version && pnpm -r generate:version && git add -a", + "release": "changeset release" }, "repository": { "type": "git", From 0fc25ce569f8599acdf24d6dc4076f76b8d9c47c Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:20:13 -0700 Subject: [PATCH 07/19] pnpm changeset -> changeset --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9c532cd1f922..383f0af105d2 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "check": "pnpm -r check", "lint": "pnpm -r lint", "format": "pnpm -r format", - "version": "pnpm changeset version && pnpm -r generate:version && git add -a", + "version": "changeset version && pnpm -r generate:version && git add -a", "release": "changeset release" }, "repository": { From 0298a2da55d19c764d3a8bb9bd897351b850563a Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:27:34 -0700 Subject: [PATCH 08/19] separate out version generation --- packages/svelte/package.json | 2 +- packages/svelte/rollup.config.js | 10 +++------- packages/svelte/scripts/generate-version.js | 8 ++++++++ pnpm-lock.yaml | 6 +++++- 4 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 packages/svelte/scripts/generate-version.js diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 0faa40ade32d..f26856a4177c 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -76,7 +76,7 @@ "test": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"", "build": "rollup -c && pnpm tsd", "prepare": "pnpm build", - "generate:version": "pnpm build", + "generate:version": "node ./scripts/generate-version.js", "dev": "rollup -cw", "posttest": "agadoo src/internal/index.js", "prepublishOnly": "pnpm lint && pnpm build && pnpm test", diff --git a/packages/svelte/rollup.config.js b/packages/svelte/rollup.config.js index ec1eddca82d2..7916e42c2dbc 100644 --- a/packages/svelte/rollup.config.js +++ b/packages/svelte/rollup.config.js @@ -5,14 +5,10 @@ import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; -const require = createRequire(import.meta.url); -const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8')); +// runs the version generation +import './scripts/generate-version.js' -// Create auto-generated .js files -fs.writeFileSync( - './src/shared/version.js', - `/** @type {string} */\nexport const VERSION = '${pkg.version}';` -); +const require = createRequire(import.meta.url); const internal = await import('./src/runtime/internal/index.js'); fs.writeFileSync( diff --git a/packages/svelte/scripts/generate-version.js b/packages/svelte/scripts/generate-version.js new file mode 100644 index 000000000000..685b4c9929f7 --- /dev/null +++ b/packages/svelte/scripts/generate-version.js @@ -0,0 +1,8 @@ +import fs from 'node:fs'; + +const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8')); + +fs.writeFileSync( + './src/shared/version.js', + `/** @type {string} */\nexport const VERSION = '${pkg.version}';` +); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 535ef573fc5d..dcf32989356c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,8 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false importers: From 3e43950e356e59bc38d5cc4e37ffb66aa3b4511c Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:28:57 -0700 Subject: [PATCH 09/19] revert lockfile changes --- pnpm-lock.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dcf32989356c..535ef573fc5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,8 +1,4 @@ -lockfileVersion: '6.1' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false +lockfileVersion: '6.0' importers: From 4ce96c16d5362764b999f7bc699686ac009d14d4 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:29:35 -0700 Subject: [PATCH 10/19] expand comment --- packages/svelte/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/rollup.config.js b/packages/svelte/rollup.config.js index 7916e42c2dbc..f1e4e8baf23f 100644 --- a/packages/svelte/rollup.config.js +++ b/packages/svelte/rollup.config.js @@ -5,7 +5,7 @@ import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; -// runs the version generation +// runs the version generation as a side-effect of importing import './scripts/generate-version.js' const require = createRequire(import.meta.url); From c97df16922df1e934a051d71fde65c022290992f Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:31:21 -0700 Subject: [PATCH 11/19] rename version script --- .github/workflows/release.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84ced7c3da6c..8f3bad81072e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: id: changesets uses: changesets/action@v1 with: - version: pnpm version + version: pnpm changeset:version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 383f0af105d2..d106b20b1c2e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "check": "pnpm -r check", "lint": "pnpm -r lint", "format": "pnpm -r format", - "version": "changeset version && pnpm -r generate:version && git add -a", + "changeset:version": "changeset version && pnpm -r generate:version && git add -a", "release": "changeset release" }, "repository": { From fa805bd4e0c75bd5c09771542c6558b08d7ec494 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:32:04 -0700 Subject: [PATCH 12/19] update git cli flag --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d106b20b1c2e..4c43ea091450 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "check": "pnpm -r check", "lint": "pnpm -r lint", "format": "pnpm -r format", - "changeset:version": "changeset version && pnpm -r generate:version && git add -a", + "changeset:version": "changeset version && pnpm -r generate:version && git add --all", "release": "changeset release" }, "repository": { From 989111757c4f107c62697f3242d0857392c26034 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:40:47 -0700 Subject: [PATCH 13/19] semicolon --- packages/svelte/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/rollup.config.js b/packages/svelte/rollup.config.js index f1e4e8baf23f..927f8e949545 100644 --- a/packages/svelte/rollup.config.js +++ b/packages/svelte/rollup.config.js @@ -6,7 +6,7 @@ import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; // runs the version generation as a side-effect of importing -import './scripts/generate-version.js' +import './scripts/generate-version.js'; const require = createRequire(import.meta.url); From 59fbfa8a00ba31b2031fba2d236f8bef57639562 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:42:56 -0700 Subject: [PATCH 14/19] space --- packages/svelte/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/package.json b/packages/svelte/package.json index f26856a4177c..ade672ce3594 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -86,7 +86,7 @@ "repository": { "type": "git", "url": "https://github.com/sveltejs/svelte.git", - "directory":"packages/svelte" + "directory": "packages/svelte" }, "keywords": [ "UI", From 290ddfb2c951743354abc36505dadb64fd97e7ee Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Tue, 30 May 2023 15:46:48 -0700 Subject: [PATCH 15/19] format changelog --- packages/svelte/CHANGELOG.md | 2934 +++++++++++++++++----------------- 1 file changed, 1461 insertions(+), 1473 deletions(-) diff --git a/packages/svelte/CHANGELOG.md b/packages/svelte/CHANGELOG.md index 8ca73bb115d2..7542f0d18580 100644 --- a/packages/svelte/CHANGELOG.md +++ b/packages/svelte/CHANGELOG.md @@ -4,2605 +4,2593 @@ ### Major Changes -* breaking: Minimum supported Node version is now Node 16 ([#8566](https://github.com/sveltejs/svelte/pull/8566)) -* breaking: Minimum supported webpack version is now webpack 5 ([#8515](https://github.com/sveltejs/svelte/pull/8515)) -* breaking: Bundlers must specify the `browser` condition when building a frontend bundle for the browser ([#8516](https://github.com/sveltejs/svelte/pull/8516)) -* breaking: Minimum supported vite-plugin-svelte version is now 2.4.1. SvelteKit users can upgrade to 1.20.0 or newer to ensure a compatible version ([#8516](https://github.com/sveltejs/svelte/pull/8516)) -* breaking: Minimum supported `rollup-plugin-svelte` version is now 7.1.5 ([198dbcf](https://github.com/sveltejs/svelte/commit/198dbcf)) -* breaking: Minimum supported `svelte-loader` is now 3.1.8 ([198dbcf](https://github.com/sveltejs/svelte/commit/198dbcf)) -* breaking: Minimum supported TypeScript version is now TypeScript 5 (it will likely work with lower versions, but we make no guarantees about that) ([#8488](https://github.com/sveltejs/svelte/pull/8488)) -* breaking: Remove `svelte/register` hook, CJS runtime version and CJS compiler output ([#8613](https://github.com/sveltejs/svelte/pull/8613)) -* breaking: Stricter types for `createEventDispatcher` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224)) -* breaking: Stricter types for `Action` and `ActionReturn` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224)) -* breaking: Stricter types for `onMount` - now throws a type error when returning a function asynchronously to catch potential mistakes around callback functions (see PR for migration instructions) ([#8136](https://github.com/sveltejs/svelte/pull/8136)) -* breaking: Overhaul and drastically improve creating custom elements with Svelte (see PR for list of changes and migration instructions) ([#8457](https://github.com/sveltejs/svelte/pull/8457)) -* breaking: Deprecate `SvelteComponentTyped` in favor of `SvelteComponent` ([#8512](https://github.com/sveltejs/svelte/pull/8512)) -* breaking: Make transitions local by default to prevent confusion around page navigations ([#6686](https://github.com/sveltejs/svelte/issues/6686)) -* breaking: Error on falsy values instead of stores passed to `derived` ([#7947](https://github.com/sveltejs/svelte/pull/7947)) -* breaking: Custom store implementers now need to pass an `update` function additionally to the `set` function ([#6750](https://github.com/sveltejs/svelte/pull/6750)) -* breaking: Do not expose default slot bindings to named slots and vice versa ([#6049](https://github.com/sveltejs/svelte/pull/6049)) -* breaking: Change order in which preprocessors are applied ([#8618](https://github.com/sveltejs/svelte/pull/8618)) -* breaking: The runtime now makes use of `classList.toggle(name, boolean)` which does not work in very old browsers ([#8629](https://github.com/sveltejs/svelte/pull/8629)) -* breaking: apply `inert` to outroing elements ([#8627](https://github.com/sveltejs/svelte/pull/8627)) +- breaking: Minimum supported Node version is now Node 16 ([#8566](https://github.com/sveltejs/svelte/pull/8566)) +- breaking: Minimum supported webpack version is now webpack 5 ([#8515](https://github.com/sveltejs/svelte/pull/8515)) +- breaking: Bundlers must specify the `browser` condition when building a frontend bundle for the browser ([#8516](https://github.com/sveltejs/svelte/pull/8516)) +- breaking: Minimum supported vite-plugin-svelte version is now 2.4.1. SvelteKit users can upgrade to 1.20.0 or newer to ensure a compatible version ([#8516](https://github.com/sveltejs/svelte/pull/8516)) +- breaking: Minimum supported `rollup-plugin-svelte` version is now 7.1.5 ([198dbcf](https://github.com/sveltejs/svelte/commit/198dbcf)) +- breaking: Minimum supported `svelte-loader` is now 3.1.8 ([198dbcf](https://github.com/sveltejs/svelte/commit/198dbcf)) +- breaking: Minimum supported TypeScript version is now TypeScript 5 (it will likely work with lower versions, but we make no guarantees about that) ([#8488](https://github.com/sveltejs/svelte/pull/8488)) +- breaking: Remove `svelte/register` hook, CJS runtime version and CJS compiler output ([#8613](https://github.com/sveltejs/svelte/pull/8613)) +- breaking: Stricter types for `createEventDispatcher` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224)) +- breaking: Stricter types for `Action` and `ActionReturn` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224)) +- breaking: Stricter types for `onMount` - now throws a type error when returning a function asynchronously to catch potential mistakes around callback functions (see PR for migration instructions) ([#8136](https://github.com/sveltejs/svelte/pull/8136)) +- breaking: Overhaul and drastically improve creating custom elements with Svelte (see PR for list of changes and migration instructions) ([#8457](https://github.com/sveltejs/svelte/pull/8457)) +- breaking: Deprecate `SvelteComponentTyped` in favor of `SvelteComponent` ([#8512](https://github.com/sveltejs/svelte/pull/8512)) +- breaking: Make transitions local by default to prevent confusion around page navigations ([#6686](https://github.com/sveltejs/svelte/issues/6686)) +- breaking: Error on falsy values instead of stores passed to `derived` ([#7947](https://github.com/sveltejs/svelte/pull/7947)) +- breaking: Custom store implementers now need to pass an `update` function additionally to the `set` function ([#6750](https://github.com/sveltejs/svelte/pull/6750)) +- breaking: Do not expose default slot bindings to named slots and vice versa ([#6049](https://github.com/sveltejs/svelte/pull/6049)) +- breaking: Change order in which preprocessors are applied ([#8618](https://github.com/sveltejs/svelte/pull/8618)) +- breaking: The runtime now makes use of `classList.toggle(name, boolean)` which does not work in very old browsers ([#8629](https://github.com/sveltejs/svelte/pull/8629)) +- breaking: apply `inert` to outroing elements ([#8627](https://github.com/sveltejs/svelte/pull/8627)) ### Minor Changes -* Add a way to modify attributes for script/style preprocessors ([#8618](https://github.com/sveltejs/svelte/pull/8618)) -* Improve hydration speed by adding `data-svelte-h` attribute to detect unchanged HTML elements ([#7426](https://github.com/sveltejs/svelte/pull/7426)) -* Add `a11y no-noninteractive-element-interactions` rule ([#8391](https://github.com/sveltejs/svelte/pull/8391)) -* Add `a11y-no-static-element-interactions`rule ([#8251](https://github.com/sveltejs/svelte/pull/8251)) -* Allow `#each` to iterate over iterables like `Set`, `Map` etc ([#7425](https://github.com/sveltejs/svelte/issues/7425)) -* Improve duplicate key error for keyed `each` blocks ([#8411](https://github.com/sveltejs/svelte/pull/8411)) -* Warn about `:` in attributes and props to prevent ambiguity with Svelte directives ([#6823](https://github.com/sveltejs/svelte/issues/6823)) +- Add a way to modify attributes for script/style preprocessors ([#8618](https://github.com/sveltejs/svelte/pull/8618)) +- Improve hydration speed by adding `data-svelte-h` attribute to detect unchanged HTML elements ([#7426](https://github.com/sveltejs/svelte/pull/7426)) +- Add `a11y no-noninteractive-element-interactions` rule ([#8391](https://github.com/sveltejs/svelte/pull/8391)) +- Add `a11y-no-static-element-interactions`rule ([#8251](https://github.com/sveltejs/svelte/pull/8251)) +- Allow `#each` to iterate over iterables like `Set`, `Map` etc ([#7425](https://github.com/sveltejs/svelte/issues/7425)) +- Improve duplicate key error for keyed `each` blocks ([#8411](https://github.com/sveltejs/svelte/pull/8411)) +- Warn about `:` in attributes and props to prevent ambiguity with Svelte directives ([#6823](https://github.com/sveltejs/svelte/issues/6823)) ### Patch Changes -* Bind `null` option and input values consistently ([#8312](https://github.com/sveltejs/svelte/issues/8312)) -* Allow `$store` to be used with changing values including nullish values ([#7555](https://github.com/sveltejs/svelte/issues/7555)) -* Initialize stylesheet with `/* empty */` to enable setting CSP directive that also works in Safari ([#7800](https://github.com/sveltejs/svelte/pull/7800)) -* Treat slots as if they don't exist when using CSS adjacent and general sibling combinators ([#8284](https://github.com/sveltejs/svelte/issues/8284)) -* Fix transitions so that they don't require a `style-src 'unsafe-inline'` Content Security Policy (CSP) ([#6662](https://github.com/sveltejs/svelte/issues/6662)). -* Explicitly disallow `var` declarations extending the reactive statement scope ([#6800](https://github.com/sveltejs/svelte/pull/6800)) -* Improve error message when trying to use `animate:` directives on inline components ([#8641](https://github.com/sveltejs/svelte/issues/8641)) +- Bind `null` option and input values consistently ([#8312](https://github.com/sveltejs/svelte/issues/8312)) +- Allow `$store` to be used with changing values including nullish values ([#7555](https://github.com/sveltejs/svelte/issues/7555)) +- Initialize stylesheet with `/* empty */` to enable setting CSP directive that also works in Safari ([#7800](https://github.com/sveltejs/svelte/pull/7800)) +- Treat slots as if they don't exist when using CSS adjacent and general sibling combinators ([#8284](https://github.com/sveltejs/svelte/issues/8284)) +- Fix transitions so that they don't require a `style-src 'unsafe-inline'` Content Security Policy (CSP) ([#6662](https://github.com/sveltejs/svelte/issues/6662)). +- Explicitly disallow `var` declarations extending the reactive statement scope ([#6800](https://github.com/sveltejs/svelte/pull/6800)) +- Improve error message when trying to use `animate:` directives on inline components ([#8641](https://github.com/sveltejs/svelte/issues/8641)) ## 3.59.1 -* Handle dynamic values in `a11y-autocomplete-valid` ([#8567](https://github.com/sveltejs/svelte/pull/8567)) +- Handle dynamic values in `a11y-autocomplete-valid` ([#8567](https://github.com/sveltejs/svelte/pull/8567)) ## 3.59.0 -* Add `ResizeObserver` bindings `contentRect`/`contentBoxSize`/`borderBoxSize`/`devicePixelContentBoxSize` ([#8022](https://github.com/sveltejs/svelte/pull/8022)) -* Add `devicePixelRatio` binding for `` ([#8285](https://github.com/sveltejs/svelte/issues/8285)) -* Add `fullscreenElement` and `visibilityState` bindings for `` ([#8507](https://github.com/sveltejs/svelte/pull/8507)) -* Add `a11y-autocomplete-valid` warning ([#8520](https://github.com/sveltejs/svelte/pull/8520)) -* Fix handling of `width`/`height` attributes when spreading ([#6752](https://github.com/sveltejs/svelte/issues/6752)) -* Fix updating of interpolated `style:` directive when using spread ([#8438](https://github.com/sveltejs/svelte/issues/8438)) -* Remove `style:` directive property when value is `undefined` ([#8462](https://github.com/sveltejs/svelte/issues/8462)) -* Fix type of `VERSION` compiler export ([#8498](https://github.com/sveltejs/svelte/issues/8498)) -* Relax `a11y-no-redundant-roles` warning ([#8536](https://github.com/sveltejs/svelte/pull/8536)) -* Handle nested array rest destructuring ([#8552](https://github.com/sveltejs/svelte/issues/8552), [#8554](https://github.com/sveltejs/svelte/issues/8554)) +- Add `ResizeObserver` bindings `contentRect`/`contentBoxSize`/`borderBoxSize`/`devicePixelContentBoxSize` ([#8022](https://github.com/sveltejs/svelte/pull/8022)) +- Add `devicePixelRatio` binding for `` ([#8285](https://github.com/sveltejs/svelte/issues/8285)) +- Add `fullscreenElement` and `visibilityState` bindings for `` ([#8507](https://github.com/sveltejs/svelte/pull/8507)) +- Add `a11y-autocomplete-valid` warning ([#8520](https://github.com/sveltejs/svelte/pull/8520)) +- Fix handling of `width`/`height` attributes when spreading ([#6752](https://github.com/sveltejs/svelte/issues/6752)) +- Fix updating of interpolated `style:` directive when using spread ([#8438](https://github.com/sveltejs/svelte/issues/8438)) +- Remove `style:` directive property when value is `undefined` ([#8462](https://github.com/sveltejs/svelte/issues/8462)) +- Fix type of `VERSION` compiler export ([#8498](https://github.com/sveltejs/svelte/issues/8498)) +- Relax `a11y-no-redundant-roles` warning ([#8536](https://github.com/sveltejs/svelte/pull/8536)) +- Handle nested array rest destructuring ([#8552](https://github.com/sveltejs/svelte/issues/8552), [#8554](https://github.com/sveltejs/svelte/issues/8554)) ## 3.58.0 -* Add `bind:innerText` for `contenteditable` elements ([#3311](https://github.com/sveltejs/svelte/issues/3311)) -* Add support for CSS `@container` queries ([#6969](https://github.com/sveltejs/svelte/issues/6969)) -* Respect `preserveComments` in DOM output ([#7182](https://github.com/sveltejs/svelte/pull/7182)) -* Allow use of `document` for `target` in typings ([#7554](https://github.com/sveltejs/svelte/pull/7554)) -* Add `a11y-interactive-supports-focus` warning ([#8392](https://github.com/sveltejs/svelte/pull/8392)) -* Fix equality check when updating dynamic text ([#5931](https://github.com/sveltejs/svelte/issues/5931)) -* Relax `a11y-no-noninteractive-element-to-interactive-role` warning ([#8402](https://github.com/sveltejs/svelte/pull/8402)) -* Properly handle microdata attributes ([#8413](https://github.com/sveltejs/svelte/issues/8413)) -* Prevent name collision when using computed destructuring variables ([#8417](https://github.com/sveltejs/svelte/issues/8417)) -* Fix escaping `