From 9c0507e308f231d3409f64168c040fc6292b4301 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 27 Jun 2020 10:27:07 -0400 Subject: [PATCH 01/11] site: bump svelte-repl --- site/package-lock.json | 12 ++++++------ site/package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 33dfa629a1..a34f0d528e 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1291,9 +1291,9 @@ } }, "@sveltejs/svelte-repl": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.19.tgz", - "integrity": "sha512-35R94X6uYgy6PHLQnQCsKcZ4zb6rGGQXjBYqjuCkoCykIlSLx8/avq6BGqudmE5pzVWDP3kk4063cHgccy1xYg==", + "version": "0.1.20", + "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.20.tgz", + "integrity": "sha512-PPy1Sxn+yLSo+H/KPvl8jRJizv4VgkDLL2u3SLfSgOgQgzUVBEjiOW9HUlgOwW61uCq2lSsS7A8NdILxEkrFnA==", "dev": true, "requires": { "codemirror": "^5.49.2", @@ -1601,9 +1601,9 @@ "dev": true }, "codemirror": { - "version": "5.53.2", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.53.2.tgz", - "integrity": "sha512-wvSQKS4E+P8Fxn/AQ+tQtJnF1qH5UOlxtugFLpubEZ5jcdH2iXTVinb+Xc/4QjshuOxRm4fUsU2QPF1JJKiyXA==", + "version": "5.55.0", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.55.0.tgz", + "integrity": "sha512-TumikSANlwiGkdF/Blnu/rqovZ0Y3Jh8yy9TqrPbSM0xxSucq3RgnpVDQ+mD9q6JERJEIT2FMuF/fBGfkhIR/g==", "dev": true }, "color-convert": { diff --git a/site/package.json b/site/package.json index ffcf2b9473..06081570b8 100644 --- a/site/package.json +++ b/site/package.json @@ -37,7 +37,7 @@ "@babel/runtime": "^7.6.0", "@sindresorhus/slugify": "^0.9.1", "@sveltejs/site-kit": "^1.1.5", - "@sveltejs/svelte-repl": "^0.1.19", + "@sveltejs/svelte-repl": "^0.1.20", "degit": "^2.1.4", "dotenv": "^8.1.0", "esm": "^3.2.25", From 324d18d9c2b774d48c7ab9419b8261dd86d6a226 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 27 Jun 2020 15:21:52 -0400 Subject: [PATCH 02/11] update site-kit --- site/package-lock.json | 6 +++--- site/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 33dfa629a1..4046212696 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1281,9 +1281,9 @@ } }, "@sveltejs/site-kit": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.1.5.tgz", - "integrity": "sha512-Rs2quQ/H00DAN/ZTFa+unLefL335UW3Yo4I2rTocW5JwW73Kvi5++d7BcY8LsjhMCbG1PkwQmJE2RVrIIxQcOw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.2.0.tgz", + "integrity": "sha512-C7puq+1so3fKPPZAnQJQlKfyCG6FsnSSFSS2LRIhWD8VK2FL5j8Eq7DIKSxUvWbGw1AsxnzO3dIHJWPB7fwjKg==", "dev": true, "requires": { "@sindresorhus/slugify": "^0.9.1", diff --git a/site/package.json b/site/package.json index ffcf2b9473..70d73a27a1 100644 --- a/site/package.json +++ b/site/package.json @@ -36,7 +36,7 @@ "@babel/preset-env": "^7.6.0", "@babel/runtime": "^7.6.0", "@sindresorhus/slugify": "^0.9.1", - "@sveltejs/site-kit": "^1.1.5", + "@sveltejs/site-kit": "^1.2.0", "@sveltejs/svelte-repl": "^0.1.19", "degit": "^2.1.4", "dotenv": "^8.1.0", From 82b1025d44b536c4d4083f960ba90861c53892f0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 27 Jun 2020 16:45:36 -0400 Subject: [PATCH 03/11] fix regex used to build docs --- site/src/routes/docs/_sections.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/routes/docs/_sections.js b/site/src/routes/docs/_sections.js index bb081a050b..3657ba85ac 100644 --- a/site/src/routes/docs/_sections.js +++ b/site/src/routes/docs/_sections.js @@ -85,7 +85,7 @@ export default function() { renderer.heading = (text, level, rawtext) => { let slug; - const match = /(.+)<\/a>/.exec(text); + const match = /]*>(.+)<\/a>/.exec(text); if (match) { slug = match[1]; text = match[2]; From db0b3b3dfc611f200f049c2311a97a4395e1f8ca Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 27 Jun 2020 17:47:04 -0400 Subject: [PATCH 04/11] bump svelte-repl --- site/package-lock.json | 6 +++--- site/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/package-lock.json b/site/package-lock.json index 52f604e7f9..b3d12343f1 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1291,9 +1291,9 @@ } }, "@sveltejs/svelte-repl": { - "version": "0.1.20", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.20.tgz", - "integrity": "sha512-PPy1Sxn+yLSo+H/KPvl8jRJizv4VgkDLL2u3SLfSgOgQgzUVBEjiOW9HUlgOwW61uCq2lSsS7A8NdILxEkrFnA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.2.0.tgz", + "integrity": "sha512-2vLQnOVrsmn2d2K4a6urGm8OulGGSPhZCGNySSb1H8nOPsgKrdcTt5qoaxNYXgcyVp55Yow2SvXYXsyJKd4KEQ==", "dev": true, "requires": { "codemirror": "^5.49.2", diff --git a/site/package.json b/site/package.json index f74671831a..30075c9f37 100644 --- a/site/package.json +++ b/site/package.json @@ -37,7 +37,7 @@ "@babel/runtime": "^7.6.0", "@sindresorhus/slugify": "^0.9.1", "@sveltejs/site-kit": "^1.2.0", - "@sveltejs/svelte-repl": "^0.1.20", + "@sveltejs/svelte-repl": "^0.2.0", "degit": "^2.1.4", "dotenv": "^8.1.0", "esm": "^3.2.25", From 9975169539eea7b8c1a4decf9e927b55deb65550 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sun, 28 Jun 2020 09:05:04 -0400 Subject: [PATCH 05/11] Update docs now the lang tools stuff is in prod (#5081) --- site/content/faq/400-how-can-i-get-syntax-highlighting.md | 4 ++-- site/content/faq/500-what-about-typescript-support.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/site/content/faq/400-how-can-i-get-syntax-highlighting.md b/site/content/faq/400-how-can-i-get-syntax-highlighting.md index 90f10b254f..96a80e3c32 100644 --- a/site/content/faq/400-how-can-i-get-syntax-highlighting.md +++ b/site/content/faq/400-how-can-i-get-syntax-highlighting.md @@ -1,5 +1,5 @@ --- -question: How can I get VSCode to syntax-highlight my .svelte files? +question: How can I get VS Code to syntax-highlight my .svelte files? --- -There is an [official VSCode extension for Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode), however it is still in the **beta** testing stage, and not all issues have been ironed out. \ No newline at end of file +There is an [official VS Code extension for Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). diff --git a/site/content/faq/500-what-about-typescript-support.md b/site/content/faq/500-what-about-typescript-support.md index 7cd0ccbe54..adfd63764e 100644 --- a/site/content/faq/500-what-about-typescript-support.md +++ b/site/content/faq/500-what-about-typescript-support.md @@ -1,10 +1,11 @@ --- -question: What about Typescript support? +question: What about TypeScript support? --- -You need to install a preprocessor such as [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess). Work is ongoing to improve [IDE support](https://github.com/sveltejs/language-tools/issues/83). You can also run type checking from the command line with [svelte-check](https://www.npmjs.com/package/svelte-check). +You need to install a preprocessor such as [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess). You can run type checking from the command line with [svelte-check](https://www.npmjs.com/package/svelte-check). + +To declare the type of a reactive variable in a Svelte template, you should use the following syntax: -To declare the type of a reactive variable in a Svelte template, you can use the following syntax: ``` let x: number; $: x = count + 1; From b56829c7b8c42f2243025886078493dc366bb752 Mon Sep 17 00:00:00 2001 From: Adam Ho Date: Tue, 30 Jun 2020 22:44:44 +0800 Subject: [PATCH 06/11] site: fix blog typo (#5090) --- .../2017-12-31-sapper-towards-the-ideal-web-app-framework.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md b/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md index cca200e966..67e732c230 100644 --- a/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md +++ b/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md @@ -57,7 +57,7 @@ What about a more 'real world' example? Conveniently, the [RealWorld](https://gi -The entire app costs 132.7kb (39.9kb zipped), which is significantly smaller than the reference React/Redux implementation at 327kb (85.7kb), but even if was as large it would *feel* faster because of code-splitting. And that's a crucial point. We're told we need to code-split our apps, but if your app uses a traditional framework like React or Vue then there's a hard lower bound on the size of your initial code-split chunk — the framework itself, which is likely to be a significant portion of your total app size. With the Svelte approach, that's no longer the case. +The entire app costs 132.7kb (39.9kb zipped), which is significantly smaller than the reference React/Redux implementation at 327kb (85.7kb), but even if it was as large it would *feel* faster because of code-splitting. And that's a crucial point. We're told we need to code-split our apps, but if your app uses a traditional framework like React or Vue then there's a hard lower bound on the size of your initial code-split chunk — the framework itself, which is likely to be a significant portion of your total app size. With the Svelte approach, that's no longer the case. But size is only part of the story. Svelte apps are also extremely performant and memory-efficient, and the framework includes powerful features that you would sacrifice if you chose a 'minimal' or 'simple' UI library. From 3f99e51a6f050b555d2b7e3092b114428185dd28 Mon Sep 17 00:00:00 2001 From: Antony Jones Date: Tue, 7 Jul 2020 15:41:26 +0100 Subject: [PATCH 07/11] make builds time out after a reasonable period (#5100) --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff0ec4f633..abb80bd3fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ on: [push, pull_request] jobs: Tests: runs-on: ${{ matrix.os }} + timeout-minutes: 6 strategy: matrix: node-version: [8, 10, 12, 14] @@ -18,12 +19,14 @@ jobs: CI: true Lint: runs-on: ubuntu-latest + timeout-minutes: 2 steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 - run: 'npm i && npm run lint' Unit: runs-on: ${{ matrix.os }} + timeout-minutes: 3 strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] From 3dfb17873992c8543e1b04b79533ed4896680bd1 Mon Sep 17 00:00:00 2001 From: Bob Fanger Date: Tue, 7 Jul 2020 16:47:40 +0200 Subject: [PATCH 08/11] fix: Parameters with default values are optional (#5083) --- src/runtime/animate/index.ts | 6 ++-- src/runtime/transition/index.ts | 56 ++++++++++++++++----------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/runtime/animate/index.ts b/src/runtime/animate/index.ts index 087c0f7141..82ec0d5a5f 100644 --- a/src/runtime/animate/index.ts +++ b/src/runtime/animate/index.ts @@ -11,9 +11,9 @@ export interface AnimationConfig { } interface FlipParams { - delay: number; - duration: number | ((len: number) => number); - easing: (t: number) => number; + delay?: number; + duration?: number | ((len: number) => number); + easing?: (t: number) => number; } export function flip(node: Element, animation: { from: DOMRect; to: DOMRect }, params: FlipParams): AnimationConfig { diff --git a/src/runtime/transition/index.ts b/src/runtime/transition/index.ts index 0a20c81b1f..f1197c0b17 100644 --- a/src/runtime/transition/index.ts +++ b/src/runtime/transition/index.ts @@ -12,11 +12,11 @@ export interface TransitionConfig { } interface BlurParams { - delay: number; - duration: number; + delay?: number; + duration?: number; easing?: EasingFunction; - amount: number; - opacity: number; + amount?: number; + opacity?: number; } export function blur(node: Element, { @@ -41,9 +41,9 @@ export function blur(node: Element, { } interface FadeParams { - delay: number; - duration: number; - easing: EasingFunction; + delay?: number; + duration?: number; + easing?: EasingFunction; } export function fade(node: Element, { @@ -62,12 +62,12 @@ export function fade(node: Element, { } interface FlyParams { - delay: number; - duration: number; - easing: EasingFunction; - x: number; - y: number; - opacity: number; + delay?: number; + duration?: number; + easing?: EasingFunction; + x?: number; + y?: number; + opacity?: number; } export function fly(node: Element, { @@ -95,9 +95,9 @@ export function fly(node: Element, { } interface SlideParams { - delay: number; - duration: number; - easing: EasingFunction; + delay?: number; + duration?: number; + easing?: EasingFunction; } export function slide(node: Element, { @@ -133,11 +133,11 @@ export function slide(node: Element, { } interface ScaleParams { - delay: number; - duration: number; - easing: EasingFunction; - start: number; - opacity: number; + delay?: number; + duration?: number; + easing?: EasingFunction; + start?: number; + opacity?: number; } export function scale(node: Element, { @@ -166,10 +166,10 @@ export function scale(node: Element, { } interface DrawParams { - delay: number; - speed: number; - duration: number | ((len: number) => number); - easing: EasingFunction; + delay?: number; + speed?: number; + duration?: number | ((len: number) => number); + easing?: EasingFunction; } export function draw(node: SVGElement & { getTotalLength(): number }, { @@ -199,9 +199,9 @@ export function draw(node: SVGElement & { getTotalLength(): number }, { } interface CrossfadeParams { - delay: number; - duration: number | ((len: number) => number); - easing: EasingFunction; + delay?: number; + duration?: number | ((len: number) => number); + easing?: EasingFunction; } type ClientRectMap = Map; From 4910f5797f1ed8596e7d2ac7889efe4c5f3b76a6 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Tue, 7 Jul 2020 10:49:05 -0400 Subject: [PATCH 09/11] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f15d40206..873c5bb52d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * Update `` with one-way `value` binding when the available `