Skip to content

Commit 478192a

Browse files
authored
Merge branch 'main' into safari-safe-area
2 parents 4d5bbc8 + 5dbae29 commit 478192a

File tree

177 files changed

+3217
-2114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+3217
-2114
lines changed
Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11
name: Docs preview create
22

33
on:
4-
repository_dispatch:
5-
types: [docs-preview-create]
4+
workflow_dispatch:
5+
inputs:
6+
repo:
7+
description: 'Repository name (not fully-qualified, eg. `svelte` or `kit`)'
8+
required: true
9+
type: string
10+
pr:
11+
description: 'PR number'
12+
required: true
13+
type: string
14+
owner:
15+
description: 'Owner (eg. sveltejs)'
16+
required: true
17+
type: string
18+
branch:
19+
description: 'Branch (eg. my-feature-branch)'
20+
required: true
21+
type: string
22+
23+
permissions:
24+
contents: write
625

726
env:
8-
BRANCH: preview-${{ github.event.client_payload.package }}-${{ github.event.client_payload.pr }}
27+
BRANCH: preview-${{ inputs.repo }}-${{ inputs.pr }}
928

1029
jobs:
1130
Sync:
31+
name: Sync
1232
runs-on: ubuntu-latest
33+
34+
concurrency:
35+
group: preview-${{ inputs.repo }}-${{ inputs.pr }} # can't reference env here
36+
cancel-in-progress: true
37+
1338
steps:
1439
- uses: actions/checkout@v4
1540
with:
@@ -25,7 +50,7 @@ jobs:
2550
run: git fetch origin ${{ env.BRANCH }} && git checkout ${{ env.BRANCH }} || git checkout -b ${{ env.BRANCH }}
2651

2752
- name: Sync
28-
run: cd apps/svelte.dev && pnpm sync-docs --owner="${{ github.event.client_payload.owner }}" -p "${{ github.event.client_payload.package }}#${{ github.event.client_payload.branch }}"
53+
run: cd apps/svelte.dev && pnpm sync-docs --owner="${{ inputs.owner }}" -p "${{ inputs.repo }}#${{ inputs.branch }}"
2954

3055
- name: Configure Git
3156
run: |
@@ -36,25 +61,12 @@ jobs:
3661
id: push
3762
run: git add -A && git commit -m "sync docs" && git push -u origin ${{ env.BRANCH }}
3863

39-
- name: Find comment
40-
id: fc
41-
uses: peter-evans/find-comment@v3
42-
with:
43-
token: ${{ secrets.COMMENTER_TOKEN }}
44-
repository: ${{ github.event.client_payload.repo }}
45-
issue-number: ${{ github.event.client_payload.pr }}
46-
comment-author: 'Rich-Harris' # it's using my personal access token, not sure if there's a way to comment as a bot instead
47-
body-includes: _this is an automated message_
48-
49-
- name: Create comment
50-
if: steps.fc.outputs.comment-id == ''
51-
uses: peter-evans/create-or-update-comment@v4
64+
- name: Request preview comment
65+
uses: peter-evans/repository-dispatch@v3
5266
with:
53-
token: ${{ secrets.COMMENTER_TOKEN }}
54-
repository: ${{ github.event.client_payload.repo }}
55-
issue-number: ${{ github.event.client_payload.pr }}
56-
body: |
57-
preview: https://svelte-dev-git-${{ env.BRANCH }}-svelte.vercel.app/
58-
59-
_this is an automated message_
60-
edit-mode: replace
67+
event-type: 'request-preview-comment'
68+
client-payload: |-
69+
{
70+
"repo": "${{ inputs.repo }}",
71+
"pr": "${{ inputs.pr }}"
72+
}

.github/workflows/docs-preview-delete.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
name: Docs preview delete
22

33
on:
4-
repository_dispatch:
5-
types: [docs-preview-delete]
4+
workflow_dispatch:
5+
inputs:
6+
repo:
7+
description: 'Repository name (not fully-qualified, eg. `svelte` or `kit`)'
8+
required: true
9+
type: string
10+
pr:
11+
description: 'PR number'
12+
required: true
13+
type: string
614

715
env:
8-
BRANCH: preview-${{ github.event.client_payload.package }}-${{ github.event.client_payload.pr }}
16+
BRANCH: preview-${{ inputs.repo }}-${{ inputs.pr }}
917

1018
jobs:
1119
Sync:

.github/workflows/sync-docs.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
name: Sync docs
22

33
on:
4-
repository_dispatch:
5-
types: [sync-request]
4+
workflow_dispatch:
5+
inputs:
6+
repo:
7+
description: 'Repository name (not fully-qualified, eg. `svelte` or `kit`)'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
614

715
jobs:
816
Sync:
@@ -17,13 +25,13 @@ jobs:
1725
- run: pnpm install --frozen-lockfile
1826

1927
- name: Sync
20-
run: cd apps/svelte.dev && pnpm sync-docs -p ${{ github.event.client_payload.package }}
28+
run: cd apps/svelte.dev && pnpm sync-docs -p ${{ inputs.repo }}
2129

2230
- name: Create or update pull request
2331
uses: peter-evans/create-pull-request@v7
2432
with:
25-
commit-message: sync ${{ github.event.client_payload.package }} docs
26-
title: Sync `${{ github.event.client_payload.package }}` docs
33+
commit-message: sync ${{ inputs.repo }} docs
34+
title: Sync `${{ inputs.repo }}` docs
2735
body: This is an automated pull request. See the [README](../tree/main/apps/svelte.dev/scripts/sync-docs/README.md) for more information
28-
branch: sync-${{ github.event.client_payload.package }}
36+
branch: sync-${{ inputs.repo }}
2937
base: main

apps/svelte.dev/content/blog/2016-11-26-frameworks-without-the-framework.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Frameworks without the framework: why didn't we think of this sooner?"
33
description: You can't write serious applications in vanilla JavaScript without hitting a complexity wall. But a compiler can do it for you.
44
author: Rich Harris
5-
authorURL: https://twitter.com/Rich_Harris
5+
authorURL: https://bsky.app/profile/rich-harris.dev
66
---
77

88
> Wait, this new framework has a _runtime_? Ugh. Thanks, I'll pass.
@@ -12,7 +12,7 @@ We're shipping too much code to our users. Like a lot of front end developers, I
1212

1313
But I was wrong. 100kb of .js isn't equivalent to 100kb of .jpg. It's not just the network time that'll kill your app's startup performance, but the time spent parsing and evaluating your script, during which time the browser becomes completely unresponsive. On mobile, those milliseconds rack up very quickly.
1414

15-
If you're not convinced that this is a problem, follow [Alex Russell](https://twitter.com/slightlylate) on Twitter. Alex [hasn't been making many friends in the framework community lately](https://twitter.com/slightlylate/status/728355959022587905), but he's not wrong. But the proposed alternative to using frameworks like Angular, React and Ember – [Polymer](https://www.polymer-project.org/1.0/) – hasn't yet gained traction in the front end world, and it's certainly not for a lack of marketing.
15+
If you're not convinced that this is a problem, follow [Alex Russell](https://bsky.app/profile/infrequently.org) on BlueSky. Alex [hasn't been making many friends in the framework community lately](https://twitter.com/slightlylate/status/728355959022587905), but he's not wrong. But the proposed alternative to using frameworks like Angular, React and Ember – [Polymer](https://www.polymer-project.org/1.0/) – hasn't yet gained traction in the front end world, and it's certainly not for a lack of marketing.
1616

1717
Perhaps we need to rethink the whole thing.
1818

@@ -30,7 +30,7 @@ Svelte is a new framework that does exactly that. You write your components usin
3030

3131
The [Svelte implementation of TodoMVC](https://svelte-todomvc.surge.sh/) weighs 3.6kb zipped. For comparison, React plus ReactDOM _without any app code_ weighs about 45kb zipped. It takes about 10x as long for the browser just to evaluate React as it does for Svelte to be up and running with an interactive TodoMVC.
3232

33-
And once your app _is_ up and running, according to [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark) **Svelte is fast as heck**. It's faster than React. It's faster than Vue. It's faster than Angular, or Ember, or Ractive, or Preact, or Riot, or Mithril. It's competitive with Inferno, which is probably the fastest UI framework in the world, for now, because [Dominic Gannaway](https://twitter.com/trueadm) is a wizard. (Svelte is slower at removing elements. We're [working on it](https://github.com/sveltejs/svelte/issues/26).)
33+
And once your app _is_ up and running, according to [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark) **Svelte is fast as heck**. It's faster than React. It's faster than Vue. It's faster than Angular, or Ember, or Ractive, or Preact, or Riot, or Mithril. It's competitive with Inferno, which is probably the fastest UI framework in the world, for now, because [Dominic Gannaway](https://bsky.app/profile/trueadm.dev) is a wizard. (Svelte is slower at removing elements. We're [working on it](https://github.com/sveltejs/svelte/issues/26).)
3434

3535
It's basically as fast as vanilla JS, which makes sense because it _is_ vanilla JS – just vanilla JS that you didn't have to write.
3636

apps/svelte.dev/content/blog/2017-09-06-the-zen-of-just-writing-css.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: The zen of Just Writing CSS
33
description: I would say this is the future, but we're already doing it.
44
author: Rich Harris
5-
authorURL: https://twitter.com/Rich_Harris
5+
authorURL: https://bsky.app/profile/rich-harris.dev
66
---
77

88
It's fashionable to dislike CSS. There are lots of reasons why that's the case, but it boils down to this: CSS is _unpredictable_. If you've never had the experience of tweaking a style rule and accidentally breaking some layout that you thought was completely unrelated — usually when you're trying to ship — then you're either new at this or you're a much better programmer than the rest of us.

apps/svelte.dev/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Sapper: Towards the ideal web app framework'
33
description: Taking the next-plus-one step
44
author: Rich Harris
5-
authorURL: https://twitter.com/Rich_Harris
5+
authorURL: https://bsky.app/profile/rich-harris.dev
66
---
77

88
> Quickstart for the impatient: [the Sapper docs](https://sapper.svelte.dev), and the [starter template](https://github.com/sveltejs/sapper-template)

apps/svelte.dev/content/blog/2018-04-18-version-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Svelte v2 is out!
33
description: Here's what you need to know
44
author: Rich Harris
5-
authorURL: https://twitter.com/Rich_Harris
5+
authorURL: https://bsky.app/profile/rich-harris.dev
66
---
77

88
<aside>Our motto is 'move slowly and break things'. No, wait, that came out wrong...</aside>

apps/svelte.dev/content/blog/2018-12-26-svelte-css-in-js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Using CSS-in-JS with Svelte
33
description: You don't need to, but you can
44
author: Rich Harris
5-
authorURL: https://twitter.com/Rich_Harris
5+
authorURL: https://bsky.app/profile/rich-harris.dev
66
---
77

88
CSS is a core part of any web app. By extension, a UI framework that doesn't have a built-in way to add styles to your components is unfinished.

apps/svelte.dev/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Virtual DOM is pure overhead
33
description: Let's retire the 'virtual DOM is fast' myth once and for all
44
author: Rich Harris
5-
authorURL: https://twitter.com/Rich_Harris
5+
authorURL: https://bsky.app/profile/rich-harris.dev
66
---
77

88
If you've used JavaScript frameworks in the last few years, you've probably heard the phrase 'the virtual DOM is fast', often said to mean that it's faster than the _real_ DOM. It's a surprisingly resilient meme — for example people have asked how Svelte can be fast when it doesn't use a virtual DOM.

apps/svelte.dev/content/blog/2019-01-31-svelte-on-the-changelog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Svelte on The Changelog
33
description: Listen to the interview here
44
author: Rich Harris
5-
authorURL: https://twitter.com/Rich_Harris
5+
authorURL: https://bsky.app/profile/rich-harris.dev
66
---
77

88
Earlier this month, I had the privilege of appearing on [The Changelog](https://changelog.com/podcast), a podcast about software development. We had a fun (for me) and wide-ranging conversation:
@@ -14,8 +14,8 @@ Earlier this month, I had the privilege of appearing on [The Changelog](https://
1414

1515
...and, most importantly, Svelte 3.
1616

17-
Unless you hang out in our [Discord server](/chat) or follow [@sveltejs](https://twitter.com/sveltejs) on Twitter, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it _will_ be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it.
17+
Unless you hang out in our [Discord server](/chat) or follow [@sveltejs](https://bsky.app/profile/svelte.dev) on BlueSky, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it _will_ be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it.
1818

19-
On the podcast [Adam](https://twitter.com/adamstac), [Jerod](https://twitter.com/jerodsanto) and I talk about some of the changes and why we're making them. You can listen here or on the [podcast page](https://changelog.com/podcast/332).
19+
On the podcast [Adam](https://bsky.app/profile/adamstac.bsky.social), [Jerod](https://bsky.app/profile/jerod.bsky.social) and I talk about some of the changes and why we're making them. You can listen here or on the [podcast page](https://changelog.com/podcast/332).
2020

2121
<audio data-theme="night" style="width: 100%" data-src="https://changelog.com/podcast/332/embed" src="https://cdn.changelog.com/uploads/podcast/332/the-changelog-332.mp3" preload="none" class="changelog-episode" controls></audio><p><a href="https://changelog.com/podcast/332">The Changelog 332: A UI framework without the framework</a> – Listen on <a href="https://changelog.com/">Changelog.com</a></p><script async src="//cdn.changelog.com/embed.js"></script>

0 commit comments

Comments
 (0)