From 89f30dae3692fd8d013bd33f0342c7d58f195aea Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Mon, 6 Apr 2020 20:45:27 +1000 Subject: [PATCH 01/14] docs: Fix simple typo, specificy -> specify (#4637) --- site/content/docs/03-run-time.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 0bbae24185..85661bd3b9 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -804,7 +804,7 @@ You can see a full example on the [animations tutorial](tutorial/animate) ### `svelte/easing` -Easing functions specificy the rate of change over time and are useful when working with Svelte's built-in transitions and animations as well as the tweened and spring utilities. `svelte/easing` contains 31 named exports, a `linear` ease and 3 variants of 10 different easing functions: `in`, `out` and `inOut`. +Easing functions specify the rate of change over time and are useful when working with Svelte's built-in transitions and animations as well as the tweened and spring utilities. `svelte/easing` contains 31 named exports, a `linear` ease and 3 variants of 10 different easing functions: `in`, `out` and `inOut`. You can explore the various eases using the [ease visualiser](examples#easing) in the [examples section](examples). From 085897c799dba914e553fcfac83aa3416ab23bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=A4=D1=80=D0=BE=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Mon, 6 Apr 2020 14:01:02 +0300 Subject: [PATCH 02/14] feat(internal): Support globalThis in modern environments (#4628) --- src/runtime/internal/globals.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/runtime/internal/globals.ts b/src/runtime/internal/globals.ts index 664093d2e4..b97f81ab9f 100644 --- a/src/runtime/internal/globals.ts +++ b/src/runtime/internal/globals.ts @@ -1,3 +1,7 @@ declare const global: any; -export const globals = (typeof window !== 'undefined' ? window : global) as unknown as typeof globalThis; +export const globals = (typeof window !== 'undefined' + ? window + : typeof globalThis !== 'undefined' + ? globalThis + : global) as unknown as typeof globalThis; From d7497deaecc043f799ce81bb86298010605d2b99 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Mon, 6 Apr 2020 07:04:40 -0400 Subject: [PATCH 03/14] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbab1872dc..80db122cb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Try using `globalThis` rather than `globals` for the benefit of non-Node servers and web workers ([#3561](https://github.com/sveltejs/svelte/issues/3561), [#4545](https://github.com/sveltejs/svelte/issues/4545)) * Fix attaching of JS debugging comments to HTML comments ([#4565](https://github.com/sveltejs/svelte/issues/4565)) ## 3.20.1 From df3ae85b42b6fa2d6a07cdb1073c9ebd8c9f8a71 Mon Sep 17 00:00:00 2001 From: Robin Cussol Date: Tue, 7 Apr 2020 15:30:33 +0200 Subject: [PATCH 04/14] fix(examples): use correct URL for Ask HN posts (#4640) --- .../examples/21-miscellaneous/01-hacker-news/Item.svelte | 6 ++++-- .../examples/21-miscellaneous/01-hacker-news/Summary.svelte | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte index e9cd617e96..802ab437f7 100644 --- a/site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte +++ b/site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte @@ -3,6 +3,8 @@ export let item; export let returnTo; + + $: url = !item.domain ? `https://news.ycombinator.com/${item.url}` : item.url;