diff --git a/.github/stale.yml b/.github/stale.yml
deleted file mode 100644
index 3bc3fa6b99..0000000000
--- a/.github/stale.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Configuration for probot-stale - https://github.com/probot/stale
-
-# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
-onlyLabels: []
-
-# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
-exemptLabels:
- - popular
- - pinned
- - security
- - bug
- - "[Status] Maybe Later"
-
-# Set to true to ignore issues in a project (defaults to false)
-exemptProjects: false
-
-# Set to true to ignore issues in a milestone (defaults to false)
-exemptMilestones: false
-
-# Set to true to ignore issues with an assignee (defaults to false)
-exemptAssignees: false
-
-# Label to use when marking as stale
-staleLabel: stale-bot
-
-# Comment to post when removing the stale label.
-# unmarkComment: >
-# Your comment here.
-
-# Limit the number of actions per hour, from 1-30. Default is 30
-limitPerRun: 30
-
-# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
-pulls:
- daysUntilStale: 210
- daysUntilClose: 25
- markComment: >
- This pull request has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
- closeComment: >
- This pull request has been closed as it was previously marked as stale and saw no subsequent activity.
-
-issues:
- daysUntilStale: 180
- daysUntilClose: 14
- markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
- closeComment: >
- This issue has been closed as it was previously marked as stale and saw no subsequent activity.
diff --git a/.gitignore b/.gitignore
index 32582b2774..228136cbc8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,14 +23,3 @@ node_modules
_actual*.*
_output
/types
-
-/site/.svelte-kit/
-/site/build/
-/site/.env
-/site/static/svelte-app.json
-/site/static/contributors.jpg
-/site/static/donors.jpg
-/site/static/workers/
-/site/scripts/svelte-app/
-/site/src/routes/_contributors.js
-/site/src/routes/_donors.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 81ef8805d0..39dc47b387 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,32 @@
# Svelte changelog
+## 3.45.0
+
+* Fix non-boolean attribute rendering in SSR to render truthy values as-is ([#6121](https://github.com/sveltejs/svelte/issues/6121))
+* Fix binding to a member expression also invalidating the member property ([#6921](https://github.com/sveltejs/svelte/issues/6921))
+* Fix default values in `{#each}`/etc. destructurings not being considered references for the purposes of compiler warnings ([#6964](https://github.com/sveltejs/svelte/issues/6964))
+* Fix `{:else if}` value incorrectly being cached ([#7043](https://github.com/sveltejs/svelte/pull/7043))
+* Add `a11y-no-redundant-roles` warning ([#7067](https://github.com/sveltejs/svelte/pull/7067))
+* Fix code generation error with arrow functions whose bodies are object destructuring assignments ([#7087](https://github.com/sveltejs/svelte/issues/7087))
+
+## 3.44.3
+
+* Fix `bind:this` binding inside `onMount` for manually instantiated component ([#6760](https://github.com/sveltejs/svelte/issues/6760))
+* Prevent cursor jumps with one-way binding for other `type="text"`-like ``s ([#6941](https://github.com/sveltejs/svelte/pull/6941))
+* Exclude `async` loops from `loopGuardTimeout` ([#6945](https://github.com/sveltejs/svelte/issues/6945))
+
+## 3.44.2
+
+* Fix overly restrictive preprocessor types ([#6904](https://github.com/sveltejs/svelte/pull/6904))
+* More specific typing for crossfade function - returns a tuple, not an array ([#6926](https://github.com/sveltejs/svelte/issues/6926))
+* Add `URLSearchParams` as a known global ([#6938](https://github.com/sveltejs/svelte/pull/6938))
+* Add `types` field to `exports` map ([#6939](https://github.com/sveltejs/svelte/issues/6939))
+
+## 3.44.1
+
+* Fix code generation when a multi-line `return` statement contains comments ([code-red#36](https://github.com/Rich-Harris/code-red/issues/36))
+* Fix code generation when `for`/`if`/`while` statements have empty bodies ([#6884](https://github.com/sveltejs/svelte/issues/6884))
+
## 3.44.0
* Add `enableSourcemap` compiler option ([#6835](https://github.com/sveltejs/svelte/pull/6835))
diff --git a/LICENSE.md b/LICENSE.md
index cbf510847f..cd8f94f4ca 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright (c) 2016-21 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
+Copyright (c) 2016-22 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/README.md b/README.md
index 8d263abeb9..fa66ac6cc9 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ npm run test -- -g transition
## svelte.dev
-The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [Sapper](https://sapper.svelte.dev).
+The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [SvelteKit](https://kit.svelte.dev).
### Is svelte.dev down?
diff --git a/package-lock.json b/package-lock.json
index e8bc9889a7..c0f623415d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "svelte",
- "version": "3.44.0",
+ "version": "3.45.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "svelte",
- "version": "3.44.0",
+ "version": "3.45.0",
"license": "MIT",
"devDependencies": {
"@ampproject/remapping": "^0.3.0",
@@ -25,7 +25,7 @@
"acorn": "^8.4.1",
"agadoo": "^1.1.0",
"c8": "^5.0.1",
- "code-red": "^0.2.2",
+ "code-red": "^0.2.4",
"codecov": "^3.5.0",
"css-tree": "^1.1.2",
"eslint": "^7.32.0",
@@ -1082,9 +1082,9 @@
}
},
"node_modules/code-red": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.2.tgz",
- "integrity": "sha512-CvM8mK6RkLCwMNt+/TBLmqC6eKcbky9AOR+jC+0ClSh4Mk2Ix7+sPqUEIAbJzT822oCu3D469prC7155657n2A==",
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.4.tgz",
+ "integrity": "sha512-tAJQiZviSyB2KUhz+rocKFzCHPkVooX2aFrdpfWDRvxWJaBQTYFJ/Z2TcWqbjXj5oJJBlqd2GxBXdtAhOXySVQ==",
"dev": true,
"dependencies": {
"@types/estree": "^0.0.50",
@@ -6376,9 +6376,9 @@
}
},
"code-red": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.2.tgz",
- "integrity": "sha512-CvM8mK6RkLCwMNt+/TBLmqC6eKcbky9AOR+jC+0ClSh4Mk2Ix7+sPqUEIAbJzT822oCu3D469prC7155657n2A==",
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.4.tgz",
+ "integrity": "sha512-tAJQiZviSyB2KUhz+rocKFzCHPkVooX2aFrdpfWDRvxWJaBQTYFJ/Z2TcWqbjXj5oJJBlqd2GxBXdtAhOXySVQ==",
"dev": true,
"requires": {
"@types/estree": "^0.0.50",
diff --git a/package.json b/package.json
index 60ee4f179d..7d36c10971 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "svelte",
- "version": "3.44.0",
+ "version": "3.45.0",
"description": "Cybernetically enhanced web apps",
"module": "index.mjs",
"main": "index",
@@ -22,6 +22,11 @@
"exports": {
"./package.json": "./package.json",
".": {
+ "types": "./types/runtime/index.d.ts",
+ "browser": {
+ "import": "./index.mjs",
+ "require": "./index.js"
+ },
"node": {
"import": "./ssr.mjs",
"require": "./ssr.js"
@@ -30,22 +35,27 @@
"require": "./index.js"
},
"./compiler": {
+ "types": "./types/compiler/index.d.ts",
"import": "./compiler.mjs",
"require": "./compiler.js"
},
"./animate": {
+ "types": "./types/runtime/animate/index.d.ts",
"import": "./animate/index.mjs",
"require": "./animate/index.js"
},
"./easing": {
+ "types": "./types/runtime/easing/index.d.ts",
"import": "./easing/index.mjs",
"require": "./easing/index.js"
},
"./internal": {
+ "types": "./types/runtime/internal/index.d.ts",
"import": "./internal/index.mjs",
"require": "./internal/index.js"
},
"./motion": {
+ "types": "./types/runtime/motion/index.d.ts",
"import": "./motion/index.mjs",
"require": "./motion/index.js"
},
@@ -53,14 +63,17 @@
"require": "./register.js"
},
"./store": {
+ "types": "./types/runtime/store/index.d.ts",
"import": "./store/index.mjs",
"require": "./store/index.js"
},
"./transition": {
+ "types": "./types/runtime/transition/index.d.ts",
"import": "./transition/index.mjs",
"require": "./transition/index.js"
},
"./ssr": {
+ "types": "./types/runtime/index.d.ts",
"import": "./ssr.mjs",
"require": "./ssr.js"
}
@@ -70,8 +83,8 @@
},
"types": "types/runtime/index.d.ts",
"scripts": {
- "test": "mocha",
- "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts",
+ "test": "mocha --exit",
+ "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts --exit",
"quicktest": "mocha",
"precoverage": "c8 mocha",
"coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html",
@@ -119,7 +132,7 @@
"acorn": "^8.4.1",
"agadoo": "^1.1.0",
"c8": "^5.0.1",
- "code-red": "^0.2.2",
+ "code-red": "^0.2.4",
"codecov": "^3.5.0",
"css-tree": "^1.1.2",
"eslint": "^7.32.0",
diff --git a/site/.dockerignore b/site/.dockerignore
deleted file mode 100644
index c8dd6b5308..0000000000
--- a/site/.dockerignore
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-!/Dockerfile
-!/package.json
-!/package-lock.json
-!/build
-!/static
-!/content
diff --git a/site/.env.example b/site/.env.example
deleted file mode 100644
index ce4a906653..0000000000
--- a/site/.env.example
+++ /dev/null
@@ -1,13 +0,0 @@
-NODE_ENV=
-
-PORT=3000
-BASEURL=http://localhost:3000
-GITHUB_CLIENT_ID=
-GITHUB_CLIENT_SECRET=
-VITE_MAPBOX_ACCESS_TOKEN=
-
-PGHOST=localhost
-PGPORT=5432
-PGUSER=username
-PGPASSWORD=password
-PGDATABASE=database_name
diff --git a/site/.eslintrc.cjs b/site/.eslintrc.cjs
deleted file mode 100644
index 255b8af9c5..0000000000
--- a/site/.eslintrc.cjs
+++ /dev/null
@@ -1,58 +0,0 @@
-module.exports = {
- root: true,
- rules: {
- indent: [2, 'tab', { SwitchCase: 1 }],
- semi: [2, 'always'],
- 'keyword-spacing': [2, { before: true, after: true }],
- 'space-before-blocks': [2, 'always'],
- 'no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
- 'no-cond-assign': 0,
- 'no-unused-vars': 2,
- 'object-shorthand': [2, 'always'],
- 'no-const-assign': 2,
- 'no-class-assign': 2,
- 'no-this-before-super': 2,
- 'no-var': 2,
- 'no-unreachable': 2,
- 'valid-typeof': 2,
- 'quote-props': [2, 'as-needed'],
- 'one-var': [2, 'never'],
- 'prefer-arrow-callback': 2,
- 'prefer-const': [2, { destructuring: 'all' }],
- 'arrow-spacing': 2,
- 'no-inner-declarations': 0,
- 'require-atomic-updates': 0
- },
- env: {
- es6: true,
- browser: true,
- node: true,
- mocha: true
- },
- extends: [
- 'eslint:recommended',
- 'plugin:import/errors',
- 'plugin:import/warnings'
- ],
- plugins: ['svelte3'],
- overrides: [
- {
- files: ['*.svelte'],
- processor: 'svelte3/svelte3'
- }
- ],
- parserOptions: {
- ecmaVersion: 9,
- sourceType: 'module'
- },
- settings: {
- 'import/core-modules': ['svelte'],
- 'svelte3/compiler': (() => {
- try {
- return require('svelte/compiler');
- } catch (e) {
- return null;
- }
- })()
- }
-};
diff --git a/site/.gcloudignore b/site/.gcloudignore
deleted file mode 100644
index c46042a27e..0000000000
--- a/site/.gcloudignore
+++ /dev/null
@@ -1 +0,0 @@
-#!include:.dockerignore
diff --git a/site/Dockerfile b/site/Dockerfile
deleted file mode 100644
index 493cfe3f93..0000000000
--- a/site/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-# IMPORTANT: Don't use this Dockerfile in your own projects without also looking at the .dockerignore file.
-# Without an appropriate .dockerignore, this Dockerfile will copy a large number of unneeded files into your image.
-
-FROM mhart/alpine-node:14
-
-# install dependencies
-WORKDIR /app
-COPY package.json package-lock.json ./
-RUN npm ci --production
-
-###
-# Only copy over the Node pieces we need
-# ~> Saves 35MB
-###
-FROM mhart/alpine-node:slim-14
-
-WORKDIR /app
-COPY --from=0 /app .
-COPY . .
-
-EXPOSE 3000
-CMD ["node", "build"]
diff --git a/site/Makefile b/site/Makefile
deleted file mode 100644
index ebf7223f41..0000000000
--- a/site/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-HASH := `git rev-parse --short HEAD`
-
-SERVICE := svelte-website
-PROJECT := svelte-dev
-
-IMAGE := gcr.io/$(PROJECT)/$(SERVICE):$(HASH)
-
-sveltekit:
- @echo "\n~> updating template & contributors list"
- @npm run update
- @echo "\n~> building SvelteKit app"
- @npm run build
-
-
-docker:
- @echo "\n~> building docker image"
- @gcloud builds submit --project $(PROJECT) -t $(IMAGE)
-
-
-deploy: sveltekit docker
- @echo "\n~> deploying $(SERVICE) to Cloud Run servers"
- @gcloud run deploy $(SERVICE) --project $(PROJECT) --allow-unauthenticated --platform managed --region us-central1 --image $(IMAGE) --memory=512Mi
diff --git a/site/README.md b/site/README.md
deleted file mode 100644
index 4c1d462a90..0000000000
--- a/site/README.md
+++ /dev/null
@@ -1,84 +0,0 @@
-## Running locally
-
-Set up the site sub-project:
-
-```bash
-git clone https://github.com/sveltejs/svelte.git
-cd site
-npm ci
-npm run dev
-```
-
-and navigate to [localhost:3000](http://localhost:3000).
-
-The first time you run the site locally, it will update the list of Contributors and REPL dependencies. After this it won't run again unless you force it by running:
-
-```bash
-npm run update
-```
-
-## Running using the local copy of Svelte
-
-By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. When running the site locally, you can also use your local copy of Svelte.
-
-To produce the proper browser-compatible UMD build of the compiler, you will need to run `npm run build` (or `npm run dev`) in the root of this repository with the `PUBLISH` environment variable set to any non-empty string:
-
-```bash
-git clone https://github.com/sveltejs/svelte.git
-cd svelte
-npm ci
-PUBLISH=1 npm run build
-cd site
-npm ci
-npm run dev
-```
-
-Then visit the REPL at [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). Please note that the local REPL only works with `npm run dev` and not when building the site for production usage.
-
-## REPL GitHub integration
-
-In order for the REPL's GitHub integration to work properly when running locally, you will need to:
-- [create a GitHub OAuth app](https://github.com/settings/developers):
- - set `Authorization callback URL` to `http://localhost:3000/auth/callback`;
- - set `Application name` as you like, and `Homepage URL` as `http://localhost:3000/`;
- - create the app and take note of `Client ID` and `Client Secret`
-- in this repo, create `site/.env` containing:
- ```
- GITHUB_CLIENT_ID=[your app's Client ID]
- GITHUB_CLIENT_SECRET=[your app's Client Secret]
- BASEURL=http://localhost:3000
- ```
-
-## Building the site
-
-To build the website, run `npm run build`. The output can be found in `build`.
-
-## Testing
-
-Tests can be run using `npm run test`.
-
-
-## Linking `@sveltejs/site-kit` and `@sveltejs/svelte-repl`
-
-This site depends on `@sveltejs/site-kit` (a collection of styles, components and icons used in common by *.svelte.dev websites), and `@sveltejs/svelte-repl`.
-
-In order to work on features that depend on those packages, you need to [link](https://docs.npmjs.com/cli/link) their repositories:
-
-- `cd `
-- `git clone https://github.com/sveltejs/site-kit`
-- `git clone https://github.com/sveltejs/svelte-repl`
-- `cd /site-kit`
-- `npm link`
-- `cd /svelte-repl`
-- `npm link`
-- `cd /site`
-- `npm link @sveltejs/site-kit`
-- `npm link @sveltejs/svelte-repl`
-
-
-
-## Translating the API docs
-
-Anchors are automatically generated using headings in the documentation and by default (for the english language) they are latinised to make sure the URL is always conforming to RFC3986.
-
-If we need to translate the API documentation to a language using unicode chars, we can setup this app to export the correct anchors by setting up `SLUG_PRESERVE_UNICODE` to `true` in `config.js`.
diff --git a/site/config.js b/site/config.js
deleted file mode 100644
index 097bd173a8..0000000000
--- a/site/config.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export const SLUG_PRESERVE_UNICODE = false;
-export const SLUG_SEPARATOR = '_';
diff --git a/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md b/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md
index 3a25f15b12..72d9d8895b 100644
--- a/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md
+++ b/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md
@@ -12,7 +12,7 @@ Because of that, getting started with it can be a little bit confusing at first.
## 1. Use the REPL
-The [Svelte REPL](repl) is the easiest way to begin. You can choose from a list of examples to get you started, and tweak them until they do what you want.
+The [Svelte REPL](/repl) is the easiest way to begin. You can choose from a list of examples to get you started, and tweak them until they do what you want.
@@ -52,7 +52,7 @@ npm run dev
This will create a new project in the `my-svelte-project` directory, install its dependencies, and start a server on http://localhost:5000.
-You can find more information about using TypeScript [here](blog/svelte-and-typescript).
+You can find more information about using TypeScript [here](/blog/svelte-and-typescript).
Once you've tinkered a bit and understood how everything fits together, you can fork [sveltejs/template](https://github.com/sveltejs/template) and start doing this instead:
diff --git a/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md b/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md
index a467ac3d7f..2bf3a2e8a5 100644
--- a/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md
+++ b/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md
@@ -28,7 +28,7 @@ The consequence of all this is the **append-only stylesheet**. There's no way of
The idea behind SFCs is simple: you write your components in an HTML file that (optionally) contains a `
\ No newline at end of file
+
diff --git a/site/content/examples/05-bindings/09-media-elements/App.svelte b/site/content/examples/05-bindings/09-media-elements/App.svelte
index b4c5907f6d..de89b1be8d 100644
--- a/site/content/examples/05-bindings/09-media-elements/App.svelte
+++ b/site/content/examples/05-bindings/09-media-elements/App.svelte
@@ -50,7 +50,7 @@