Skip to content

Commit 527c14d

Browse files
committed
Merge remote-tracking branch 'upstream/master'
* upstream/master: (140 commits) support $$props and $$restProps for custom elements (sveltejs#5608) Bump eslint-config to 5.5.0 (sveltejs#5599) update changelog add Node and Element as known globals (sveltejs#5601) docs: fix a11y warning in media elements example (sveltejs#5606) Curly braces linting fixes (sveltejs#5585) refactor sourcemap and preprocessor tests (sveltejs#5583) -> v3.29.4 fix code generation error with nullish coalescing operator and logical operators (sveltejs#5564) -> v3.29.3 -> v3.29.2 -> v3.29.1 docs: fix a11y warning in media elements tutorial (sveltejs#5523) update changelog get context at start of {#if} update block instead of at the end (sveltejs#5531) update changelog only allow passing functions to lifecycle functions (sveltejs#5529) update changelog fix compiler hanging on <slot slot="..."> (sveltejs#5536) Add svelte@next caveat to bug report template (sveltejs#5561) ...
2 parents 297dfcc + 6fa3e91 commit 527c14d

File tree

1,063 files changed

+7739
-2733
lines changed

Some content is hidden

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

1,063 files changed

+7739
-2733
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ the issue. One way we prioritize issues is by the number of :+1: reactions on
88
their descriptions. Please DO NOT add `+1` or :+1: comments.
99

1010
### Feature requests and proposals
11+
1112
We're excited to hear how we can make Svelte better. Please add as much detail
12-
as you can on your use case.
13+
as you can on your use case. To propose an implementation of a large feature or
14+
change, please create an [RFC](https://github.com/sveltejs/rfcs).
1315

1416
### Bugs
17+
1518
If you're filing an issue about a bug please include as much information
1619
as you can including the following.
1720

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ assignees: ''
77

88
---
99

10+
## Is this about svelte@next? This project is currently in a pre-release stage and breaking changes may occur at any time. Please do not post any kind of bug reports or questions on GitHub about it.
11+
1012
**Describe the bug**
1113
A clear and concise description of what the bug is.
1214

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ assignees: ''
77

88
---
99

10+
<!--
11+
If you'd like to propose an implementation for a large new feature or change then please create an RFC:
12+
https://github.com/sveltejs/rfcs
13+
-->
14+
1015
**Is your feature request related to a problem? Please describe.**
1116
A clear and concise description of what the problem is. For example: I'm always frustrated when [...]
1217

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
2-
31
### Before submitting the PR, please make sure you do the following
4-
- [ ] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases, features are absent for a reason.
5-
- [ ] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
6-
- [ ] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to `npm run lint`!)
2+
- [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
3+
- [ ] This message body should clearly illustrate what problems it solves.
4+
- [ ] Ideally, include a test that fails without this PR but passes with it.
5+
76
### Tests
8-
- [ ] Run the tests with `npm test` or `yarn test`)
7+
- [ ] Run the tests with `npm test` and lint the project with `npm run lint`

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ node_modules
1818
/coverage/
1919
/coverage.lcov
2020
/test/*/samples/_
21-
/test/sourcemaps/samples/*/output.js
22-
/test/sourcemaps/samples/*/output.js.map
23-
/test/sourcemaps/samples/*/output.css
24-
/test/sourcemaps/samples/*/output.css.map
2521
/yarn-error.log
2622
_actual*.*
2723
_output

.mocharc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
file: [
3+
'test/test.ts'
4+
],
5+
require: [
6+
'sucrase/register'
7+
]
8+
};
9+
10+
// add coverage options when running 'npx c8 mocha'
11+
if (process.env.NODE_V8_COVERAGE) {
12+
module.exports.fullTrace = true;
13+
module.exports.require.push('source-map-support/register');
14+
}

CHANGELOG.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,92 @@
22

33
## Unreleased
44

5+
* Fix `$$props` and `$$restProps` when compiling to a custom element ([#5482](https://github.com/sveltejs/svelte/issues/5482))
6+
* Add `Element` and `Node` to known globals ([#5586](https://github.com/sveltejs/svelte/issues/5586))
7+
8+
## 3.29.4
9+
10+
* Fix code generation error with `??` alongside logical operators ([#5558](https://github.com/sveltejs/svelte/issues/5558))
11+
12+
## 3.29.3
13+
14+
* Hopefully actually republish with proper UMD build for use in the REPL
15+
16+
## 3.29.2
17+
18+
* Republish with proper UMD build for use in the REPL
19+
20+
## 3.29.1
21+
22+
* Fix compiler hanging on `<slot slot="...">` ([#5475](https://github.com/sveltejs/svelte/issues/5475))
23+
* Fix types on `get` function in `svelte/store` ([#5483](https://github.com/sveltejs/svelte/pull/5483))
24+
* Add missing `end` field on ASTs for non-top-level `<style>` elements ([#5487](https://github.com/sveltejs/svelte/pull/5487))
25+
* Fix `{#if}` inside `{#await}` with destructuring ([#5508](https://github.com/sveltejs/svelte/issues/5508))
26+
* Fix types on lifecycle hooks ([#5529](https://github.com/sveltejs/svelte/pull/5529))
27+
28+
## 3.29.0
29+
30+
* Support `<slot slot="...">` ([#2079](https://github.com/sveltejs/svelte/issues/2079))
31+
* Fix unmounting components with a bidirectional transition with a delay ([#4954](https://github.com/sveltejs/svelte/issues/4954))
32+
* Add types to `get` function in `svelte/store` ([#5269](https://github.com/sveltejs/svelte/pull/5269))
33+
* Add a warning when a component looks like it's trying to use another component without beginning with a capital letter ([#5302](https://github.com/sveltejs/svelte/pull/5302))
34+
* Add `EventSource` to known globals ([#5463](https://github.com/sveltejs/svelte/issues/5463))
35+
* Fix compiler exception with `~`/`+` combinators and `{...spread}` attributes ([#5465](https://github.com/sveltejs/svelte/issues/5465))
36+
37+
## 3.28.0
38+
39+
* Add `{#key}` block for keying arbitrary content on an expression ([#1469](https://github.com/sveltejs/svelte/issues/1469))
40+
41+
## 3.27.0
42+
43+
* Add `|nonpassive` event modifier, explicitly passing `passive: false` ([#2068](https://github.com/sveltejs/svelte/issues/2068))
44+
* Scope CSS selectors with `~` and `+` combinators ([#3104](https://github.com/sveltejs/svelte/issues/3104))
45+
* Fix keyed `{#each}` not reacting to key changing ([#5444](https://github.com/sveltejs/svelte/issues/5444))
46+
* Fix destructuring into store values ([#5449](https://github.com/sveltejs/svelte/issues/5449))
47+
* Fix erroneous `missing-declaration` warning with `use:obj.method` ([#5451](https://github.com/sveltejs/svelte/issues/5451))
48+
49+
## 3.26.0
50+
51+
* Support `use:obj.method` as actions ([#3935](https://github.com/sveltejs/svelte/issues/3935))
52+
* Support `_` as numeric separator ([#5407](https://github.com/sveltejs/svelte/issues/5407))
53+
* Fix assignments to properties on store values ([#5412](https://github.com/sveltejs/svelte/issues/5412))
54+
* Add special style scoping handling of `[open]` selectors on `<details>` elements ([#5421](https://github.com/sveltejs/svelte/issues/5421))
55+
* Support `import.meta` in template expressions ([#5422](https://github.com/sveltejs/svelte/issues/5422))
56+
57+
## 3.25.1
58+
59+
* Fix specificity of certain styles involving a child selector ([#4795](https://github.com/sveltejs/svelte/issues/4795))
60+
* Fix transitions that are parameterised with stores ([#5244](https://github.com/sveltejs/svelte/issues/5244))
61+
* Fix scoping of styles involving child selector and `*` ([#5370](https://github.com/sveltejs/svelte/issues/5370))
62+
* Fix destructuring which reassigns stores ([#5388](https://github.com/sveltejs/svelte/issues/5388))
63+
* Fix `{#await}`s with no `{:catch}` getting stuck unresolved if the promise rejects ([#5401](https://github.com/sveltejs/svelte/issues/5401))
64+
65+
## 3.25.0
66+
67+
* Use `null` rather than `undefined` for coerced bound value of `<input type="number">` ([#1701](https://github.com/sveltejs/svelte/issues/1701))
68+
* Expose object of which slots have received content in `$$slots` ([#2106](https://github.com/sveltejs/svelte/issues/2106))
69+
* Correctly disallow using lifecycle hooks after synchronous component initialisation ([#4259](https://github.com/sveltejs/svelte/issues/4259), [#4899](https://github.com/sveltejs/svelte/issues/4899))
70+
* Re-throw an unhandled rejection when an `{#await}` block with no `{:catch}` gets a rejection ([#5129](https://github.com/sveltejs/svelte/issues/5129))
71+
* Add types to `createEventDispatcher` ([#5211](https://github.com/sveltejs/svelte/issues/5211))
72+
* In SSR mode, do not automatically declare variables for reactive assignments to member expressions ([#5247](https://github.com/sveltejs/svelte/issues/5247))
73+
* Include selector in message of `unused-css-selector` warning ([#5252](https://github.com/sveltejs/svelte/issues/5252))
74+
* Fix using `<Namespaced.Component/>`s in child `{#await}`/`{#each}` contexts ([#5255](https://github.com/sveltejs/svelte/issues/5255))
75+
* Fix using `<svelte:component>` in `{:catch}` ([#5259](https://github.com/sveltejs/svelte/issues/5259))
76+
* Fix setting one-way bound `<input>` `value` to `undefined` when it has spread attributes ([#5270](https://github.com/sveltejs/svelte/issues/5270))
77+
* Fix deep two-way bindings inside an `{#each}` involving a store ([#5286](https://github.com/sveltejs/svelte/issues/5286))
78+
* Use valid XHTML for elements that are optimised and inserted with `.innerHTML` ([#5315](https://github.com/sveltejs/svelte/issues/5315))
79+
* Fix reactivity of `$$props` in slot fallback content ([#5367](https://github.com/sveltejs/svelte/issues/5367))
80+
81+
## 3.24.1
82+
583
* Prevent duplicate invalidation with certain two-way component bindings ([#3180](https://github.com/sveltejs/svelte/issues/3180), [#5117](https://github.com/sveltejs/svelte/issues/5117), [#5144](https://github.com/sveltejs/svelte/issues/5144))
684
* Fix reactivity when passing `$$props` to a `<slot>` ([#3364](https://github.com/sveltejs/svelte/issues/3364))
85+
* Fix transitions on `{#each}` `{:else}` ([#4970](https://github.com/sveltejs/svelte/issues/4970))
786
* Fix unneeded invalidation of `$$props` and `$$restProps` ([#4993](https://github.com/sveltejs/svelte/issues/4993), [#5118](https://github.com/sveltejs/svelte/issues/5118))
87+
* Provide better compiler error message when mismatched tags are due to autoclosing of tags ([#5049](https://github.com/sveltejs/svelte/issues/5049))
88+
* Add `a11y-label-has-associated-control` warning ([#5074](https://github.com/sveltejs/svelte/pull/5074))
89+
* Add `a11y-media-has-caption` warning ([#5075](https://github.com/sveltejs/svelte/pull/5075))
90+
* Fix `bind:group` when using contextual reference ([#5174](https://github.com/sveltejs/svelte/issues/5174))
891

992
## 3.24.0
1093

CONTRIBUTING.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ When [opening a new issue](https://github.com/sveltejs/svelte/issues/new/choose)
4343
- **One issue, one bug:** Please report a single bug per issue.
4444
- **Provide reproduction steps:** List all the steps necessary to reproduce the issue. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort. If possible, use the [REPL](https://svelte.dev/repl) to create your reproduction.
4545

46+
## RFCs
47+
48+
If you'd like to propose an implementation for a large new feature or change then please [create an RFC](https://github.com/sveltejs/rfcs) to discuss it up front.
49+
4650
## Installation
4751

4852
1. Ensure you have [npm](https://www.npmjs.com/get-npm) installed.
4953
1. After cloning the repository, run `npm install` in the root of the repository.
5054
1. To start a development server, run `npm run dev`.
5155

52-
5356
## Pull requests
5457

5558
### Your first pull request

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
<a href="https://svelte.dev">
33
<img alt="Cybernetically enhanced web apps: Svelte" src="https://sveltejs.github.io/assets/banner.png">
44
</a>
5-
65
<a href="https://www.npmjs.com/package/svelte">
76
<img src="https://img.shields.io/npm/v/svelte.svg" alt="npm version">
87
</a>
9-
108
<a href="https://github.com/sveltejs/svelte/blob/master/LICENSE">
119
<img src="https://img.shields.io/npm/l/svelte.svg" alt="license">
1210
</a>
11+
<a href="https://svelte.dev/chat">
12+
<img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg" alt="Chat">
13+
</a>
1314
</p>
1415

1516

@@ -20,6 +21,15 @@ Svelte is a new way to build web applications. It's a compiler that takes your d
2021
Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://svelte.dev/chat).
2122

2223

24+
## Supporting Svelte
25+
26+
Svelte is an MIT-licensed open source project with its ongoing development made possible entirely by the support of awesome volunteers. If you'd like to support their efforts, please consider:
27+
28+
- [Becoming a backer on Open Collective](https://opencollective.com/svelte).
29+
30+
Funds donated via Open Collective will be used for compensating expenses related to Svelte's development such as hosting costs. If sufficient donations are received, funds may also be used to support Svelte's development more directly.
31+
32+
2333
## Development
2434

2535
Pull requests are encouraged and always welcome. [Pick an issue](https://github.com/sveltejs/svelte/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and help us out!

mocha.coverage.opts

Lines changed: 0 additions & 4 deletions
This file was deleted.

mocha.opts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)