diff --git a/.gitignore b/.gitignore index b0e6896dbe..7a14244929 100644 --- a/.gitignore +++ b/.gitignore @@ -33,5 +33,8 @@ _output /site/static/svelte-app.json /site/static/contributors.jpg /site/static/workers +/site/static/organisations /site/scripts/svelte-app +/site/scripts/community /site/src/routes/_contributors.js +/site/src/routes/_components/WhosUsingSvelte.svelte diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cf25421f6..bc6cf36109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,25 @@ ## Unreleased +* Disallow two-way binding to a variable declared by an `{#await}` block ([#4012](https://github.com/sveltejs/svelte/issues/4012)) +* Allow access to `let:` variables in sibling attributes on slot root ([#4173](https://github.com/sveltejs/svelte/issues/4173)) +* Add some more known globals ([#4276](https://github.com/sveltejs/svelte/pull/4276)) + +## 3.17.1 + +* Only attach SSR mode markers to a component's `` elements when compiling with `hydratable: true` ([#4258](https://github.com/sveltejs/svelte/issues/4258)) + +## 3.17.0 + +* Remove old `` elements during hydration so they aren't duplicated ([#1607](https://github.com/sveltejs/svelte/issues/1607)) * Prevent text input cursor jumping in Safari with one-way binding ([#3449](https://github.com/sveltejs/svelte/issues/3449)) * Expose compiler version in dev events ([#4047](https://github.com/sveltejs/svelte/issues/4047)) +* Don't run actions before their element is in the document ([#4166](https://github.com/sveltejs/svelte/issues/4166)) +* Fix reactive assignments with destructuring and stores where the destructured value should be undefined ([#4170](https://github.com/sveltejs/svelte/issues/4170)) +* Fix hydrating `{:else}` in `{#each}` ([#4202](https://github.com/sveltejs/svelte/issues/4202)) +* Do not automatically declare variables in reactive declarations when assigning to a member expression ([#4212](https://github.com/sveltejs/svelte/issues/4212)) +* Fix stringifying of attributes in SSR mode when there are spread attributes ([#4240](https://github.com/sveltejs/svelte/issues/4240)) +* Only render one `` in SSR mode when multiple components provide one ([#4250](https://github.com/sveltejs/svelte/pull/4250)) ## 3.16.7 diff --git a/package-lock.json b/package-lock.json index 6dc707c8d5..9ee0b53af6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.16.7", + "version": "3.17.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9c249f499f..c7ac32f3ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.16.7", + "version": "3.17.1", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index 3d349af51d..e541292e13 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -147,24 +147,7 @@ If a statement consists entirely of an assignment to an undeclared variable, Sve --- -A *store* is any object that allows reactive access to a value via a simple *store contract*. - -The [`svelte/store` module](docs#svelte_store) contains minimal store implementations which fulfil this contract. You can use these as the basis for your own stores, or you can implement your stores from scratch. - -A store must contain a `.subscribe` method, which must accept as its argument a subscription function. This subscription function must be immediately and synchronously called with the store's current value upon calling `.subscribe`. All of a store's active subscription functions must later be synchronously called whenever the store's value changes. The `.subscribe` method must also return an unsubscription function. Calling an unsubscription function must stop its subscription, and its corresponding subscription function must not be called again by the store. - -A store may optionally contain a `.set` method, which must accept as its argument a new value for the store, and which synchronously calls all of the store's active subscription functions. Such a store is called a *writable store*. - -```js -const unsubscribe = store.subscribe(value => { - console.log(value); -}); // logs `value` - -// later... -unsubscribe(); -``` - ---- +A *store* is an object that allows reactive access to a value via a simple *store contract*. The [`svelte/store` module](docs#svelte_store) contains minimal store implementations which fulfil this contract. Any time you have a reference to a store, you can access its value inside a component by prefixing it with the `$` character. This causes Svelte to declare the prefixed variable, and set up a store subscription that will be unsubscribed when appropriate. @@ -189,6 +172,20 @@ Local variables (that do not represent store values) must *not* have a `$` prefi </script> ``` +##### Store contract + +```js +store = { subscribe: (subscription: (value: any) => void) => () => void, set?: (value: any) => void } +``` + +You can create your own stores without relying on [`svelte/store`](docs#svelte_store), by implementing the *store contract*: + +1. A store must contain a `.subscribe` method, which must accept as its argument a subscription function. This subscription function must be immediately and synchronously called with the store's current value upon calling `.subscribe`. All of a store's active subscription functions must later be synchronously called whenever the store's value changes. +2. The `.subscribe` method must return an unsubscribe function. Calling an unsubscribe function must stop its subscription, and its corresponding subscription function must not be called again by the store. +3. A store may *optionally* contain a `.set` method, which must accept as its argument a new value for the store, and which synchronously calls all of the store's active subscription functions. Such a store is called a *writable store*. + +For interoperability with RxJS Observables, the `.subscribe` method is also allowed to return an object with an `.unsubscribe` method, rather than return the unsubscription function directly. Note however that unless `.subscribe` synchronously calls the subscription (which is not required by the Observable spec), Svelte will see the value of the store as `undefined` until it does. + ### <script context="module"> @@ -256,3 +253,15 @@ To apply styles to a selector globally, use the `:global(...)` modifier. } </style> ``` + +--- + +If you want to make @keyframes that are accessible globally, you need to prepend your keyframe names with `-global-`. + +The `-global-` part will be removed when compiled, and the keyframe then be referenced using just `my-animation-name` elsewhere in your code. + +```html +<style> + @keyframes -global-my-animation-name {...} +</style> +``` diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index b069c8abc0..0a4ca2ee1a 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -205,6 +205,8 @@ Iterating over lists of values can be done with an each block. </ul> ``` +You can use each blocks to iterate over any array or array-like value — that is, any object with a `length` property. + --- An each block can also specify an *index*, equivalent to the second argument in an `array.map(...)` callback: @@ -1016,7 +1018,7 @@ DOMRect { ​top: number, width: number, x: number, - y:number + y: number } ``` diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 5bcbe8764c..c75ec694d9 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -214,7 +214,11 @@ Events dispatched from child components can be listened to in their parent. Any ### `svelte/store` -The `svelte/store` module exports functions for creating [stores](docs#4_Prefix_stores_with_$_to_access_their_values). +The `svelte/store` module exports functions for creating [readable](docs#readable), [writable](docs#writable) and [derived](docs#derived) stores. + +Keep in mind that you don't *have* to use these functions to enjoy the [reactive `$store` syntax](docs#4_Prefix_stores_with_$_to_access_their_values) in your components. Any object that correctly implements `.subscribe`, unsubscribe, and (optionally) `.set` is a valid store, and will work both with the special syntax, and with Svelte's built-in [`derived` stores](docs#derived). + +This makes it possible to wrap almost any other reactive state handling library for use in Svelte. Read more about the [store contract](docs#Store_contract) to see what a correct implementation looks like. #### `writable` @@ -883,7 +887,7 @@ Existing children of `target` are left where they are. --- -The `hydrate` option instructs Svelte to upgrade existing DOM (usually from server-side rendering) rather than creating new elements. It will only work if the component was compiled with the [`hydratable: true` option](docs#svelte_compile). +The `hydrate` option instructs Svelte to upgrade existing DOM (usually from server-side rendering) rather than creating new elements. It will only work if the component was compiled with the [`hydratable: true` option](docs#svelte_compile). Hydration of `<head>` elements only works properly if the server-side rendering code was also compiled with `hydratable: true`, which adds a marker to each element in the `<head>` so that the component knows which elements it's responsible for removing during hydration. Whereas children of `target` are normally left alone, `hydrate: true` will cause any children to be removed. For that reason, the `anchor` option cannot be used alongside `hydrate: true`. diff --git a/site/content/docs/04-compile-time.md b/site/content/docs/04-compile-time.md index 45e4d3a4b4..262639d1da 100644 --- a/site/content/docs/04-compile-time.md +++ b/site/content/docs/04-compile-time.md @@ -68,7 +68,7 @@ The following options can be passed to the compiler. None are required: | `generate` | `"dom"` | If `"dom"`, Svelte emits a JavaScript class for mounting to the DOM. If `"ssr"`, Svelte emits an object with a `render` method suitable for server-side rendering. If `false`, no JavaScript or CSS is returned; just metadata. | `dev` | `false` | If `true`, causes extra code to be added to components that will perform runtime checks and provide debugging information during development. | `immutable` | `false` | If `true`, tells the compiler that you promise not to mutate any objects. This allows it to be less conservative about checking whether values have changed. -| `hydratable` | `false` | If `true`, enables the `hydrate: true` runtime option, which allows a component to upgrade existing DOM rather than creating new DOM from scratch. +| `hydratable` | `false` | If `true` when generating DOM code, enables the `hydrate: true` runtime option, which allows a component to upgrade existing DOM rather than creating new DOM from scratch. When generating SSR code, this adds markers to `<head>` elements so that hydration knows which to replace. | `legacy` | `false` | If `true`, generates code that will work in IE9 and IE10, which don't support things like `element.dataset`. | `accessors` | `false` | If `true`, getters and setters will be created for the component's props. If `false`, they will only be created for readonly exported values (i.e. those declared with `const`, `class` and `function`). If compiling with `customElement: true` this option defaults to `true`. | `customElement` | `false` | If `true`, tells the compiler to generate a custom element constructor instead of a regular Svelte component. diff --git a/site/package.json b/site/package.json index d841808a2a..a94d264217 100644 --- a/site/package.json +++ b/site/package.json @@ -7,7 +7,7 @@ "copy-workers": "rm -rf static/workers && cp -r node_modules/@sveltejs/svelte-repl/workers static", "migrate": "node-pg-migrate -r dotenv/config", "sapper": "npm run copy-workers && sapper build --legacy", - "update": "node scripts/update_template.js && node scripts/get-contributors.js", + "update": "node scripts/update_template.js && node scripts/get-contributors.js && node scripts/update_whos_using.js", "start": "node __sapper__/build", "test": "mocha -r esm test/**", "deploy": "make deploy" diff --git a/site/scripts/update_whos_using.js b/site/scripts/update_whos_using.js new file mode 100644 index 0000000000..131a162359 --- /dev/null +++ b/site/scripts/update_whos_using.js @@ -0,0 +1,12 @@ +const sh = require('shelljs'); + +sh.cd(__dirname + '/../'); + +// fetch community repo +sh.rm('-rf','scripts/community'); +sh.exec('npx degit sveltejs/community scripts/community'); + +// copy over relevant files +sh.cp('scripts/community/whos-using-svelte/WhosUsingSvelte.svelte', 'src/routes/_components/WhosUsingSvelte.svelte'); +sh.rm('-rf', 'static/organisations'); +sh.cp('-r', 'scripts/community/whos-using-svelte/organisations', 'static'); diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte deleted file mode 100644 index 5ae17ef7bc..0000000000 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ /dev/null @@ -1,96 +0,0 @@ -<!-- - Instructions for adding new logos: - - * Fork this repo, and clone your fork - * Create a branch called e.g. `add-myorganisation-logo` - * Add the logo to the `static/organisations` directory (preferably SVG) - * Add a new <a> tag in this component, in alphabetical order - * Create a pull request. Thanks! ---> - -<style> - .logos { - margin: 1em 0 0 0; - display: flex; - flex-wrap: wrap; - } - - a { - height: 40px; - margin: 0 0.5em 0.5em 0; - display: flex; - align-items: center; - border: 2px solid var(--second); - padding: 5px 10px; - border-radius: 20px; - color: var(--text); - } - - .add-yourself { - color: var(--prime); - } - - picture, - img { - height: 100%; - } - - @media (min-width: 540px) { - a { - height: 60px; - padding: 10px 20px; - border-radius: 30px; - } - } -</style> - -<div class="logos"> - <a target="_blank" rel="noopener" href="https://absoluteweb.com"><img src="organisations/absoluteweb.svg" alt="Absolute Web logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://bekchy.com"><img src="organisations/bekchy.png" alt="Bekchy logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://beyonk.com"><img src="organisations/beyonk.svg" alt="Beyonk logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://buydotstar.com"><img src="organisations/buydotstar.svg" alt="buy.* logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://cashfree.com/"><img src="organisations/cashfree.svg" alt="Cashfree logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://chess.com" style="background-color: rgb(49,46,43);"><img src="organisations/chess.svg" alt="Chess.com logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://comigosaude.com.br"><img src="organisations/comigo.svg" alt="Comigo logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://datawrapper.de"><img src="organisations/datawrapper.svg" alt="Datawrapper logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://db.nomics.world" style="background-color: rgb(15,39,47);"><picture><source type="image/webp" srcset="organisations/dbnomics.webp"><img src="organisations/dbnomics.jpg" alt="DBNomics logo" loading="lazy"></picture></a> - <a target="_blank" rel="noopener" href="https://deck.nl"><img src="organisations/deck.svg" alt="Deck logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://dextra.com.br/pt/"><img src="organisations/dextra.png" alt="Dextra logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.entriwise.com/"><img src="organisations/entriwise.png" alt="Entriwise logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.entur.org/about-entur/" style="background-color: rgb(25, 25, 84);"><img src="organisations/entur.svg" alt="Entur logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://from-now-on.com"><img src="organisations/from-now-on.png" alt="From-Now-On logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://fusioncharts.com"><img src="organisations/fusioncharts.svg" alt="FusionCharts logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://godaddy.com"><img src="organisations/godaddy.svg" alt="GoDaddy logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.grainger.com"><img src="organisations/grainger.svg" alt="Grainger logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="http://healthtree.org/"><img src="organisations/healthtree.png" alt="HealthTree logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://iota.org"><img src="organisations/iota.svg" alt="IOTA logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://itslearning.com"><img src="organisations/itslearning.svg" alt="itslearning logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://jacoux.com"><img src="organisations/jacoux.png" alt="Jacoux logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://jingmnt.co.za"><img src="organisations/jingmnt.png" alt="Jingmnt logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.mentorcv.com"><img src="organisations/mentorcv.png" alt="Mentor CV logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.metrovias.com.ar/"><img src="organisations/metrovias.svg" alt="Metrovias logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="http://mustlab.ru"><img src="organisations/mustlab.png" alt="Mustlab logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.nesta.org.uk"><img src="organisations/nesta.svg" alt="Nesta logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.nonkositelecoms.com"><img src="organisations/nonkosi.svg" alt="Nonkosi Telecoms logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.nzz.ch"><img src="organisations/nzz.svg" alt="Neue Zürcher Zeitung logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://nytimes.com"><img src="organisations/nyt.svg" alt="The New York Times logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://oberonspace.xyz"><img src="organisations/oberonspace.svg" alt="OberonSPACE logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://ofof.nl"><img src="organisations/ofof.png" alt="Ofof logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://openstate.eu"><img src="organisations/open-state-foundation.svg" alt="Open State Foundation logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://panascais.net"><img src="organisations/panascais.svg" alt="Panascais logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://pankod.com"><img src="organisations/pankod.svg" alt="Pankod logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://paperform.co"><img src="organisations/paperform.svg" alt="Paperform logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://razorpay.com"><img src="organisations/razorpay.svg" alt="Razorpay logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://sp.nl"><img src="organisations/socialist-party.svg" alt="Socialist Party logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.softmus.com.br/"><img src="organisations/softmus.png" alt="Softmus Tecnologia logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://sqltribe.com"><img src="organisations/sqltribe.svg" alt="SQL Tribe logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.stone.co"><img src="organisations/stone.svg" alt="Stone Payments logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://www.strixengine.com"><img src="organisations/strixcloud.svg" alt="Strix Cloud logo" loading="lazy"><span>Strix Cloud</span></a> - <a target="_blank" rel="noopener" href="https://sucuri.net" style="background-color: rgb(93, 93, 93);"><img src="organisations/sucuri.png" alt="Sucuri logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://tsh.io"><img src="organisations/tsh.svg" alt="The Software House logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://thunderdome.dev"><img src="organisations/thunderdome.svg" alt="Thunderdome logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://m.tokopedia.com"><img src="organisations/tokopedia.svg" alt="Tokopedia logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://webdesq.net"><img src="organisations/webdesq.svg" alt="Webdesq logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://zevvle.com/"><img src="organisations/zevvle.svg" alt="Zevvle logo" loading="lazy"></a> - <a target="_blank" rel="noopener" href="https://github.com/sveltejs/svelte/blob/master/site/src/routes/_components/WhosUsingSvelte.svelte" class="add-yourself"><span>+ your company?</span></a> -</div> diff --git a/site/static/organisations/absoluteweb.svg b/site/static/organisations/absoluteweb.svg deleted file mode 100644 index e2aeb9421e..0000000000 --- a/site/static/organisations/absoluteweb.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="102.507" width="366.013"><path d="M50.535 34.296h.17c.265-1.517.272-2.813.015-3.89-.255-1.077-.774-1.938-1.554-2.578-.486-.4-1.106-.729-1.83-1.004a10.729 10.729 0 00-1.415-.434c-1.384-.321-3.068-.48-5.056-.48h-8.487c-1.582 0-3.262.141-4.163 0-.9-.146-1.313-.539-1.534-.825-.218-.286-.452-.76-.406-1.777.045-1.02 1.393-4.372 1.393-4.372h14.124c3.873 0 7.087.396 9.642 1.187 2.556.792 4.45 1.979 5.687 3.563 1.082 1.314 1.76 3.048 2.04 5.203.275 2.156.213 4.745-.38 7.73-.688 3.467-2.286 10.354-2.961 13.824-.242 1.243-.875 4.991-.875 4.991h1.336c1.162 0 1.228.012 2.137-.151 1.595-.287 2.324-.9 2.877-1.528.55-.624 1.36-2.11 2.012-4.343.653-2.232 2.036-7.263 2.79-11.103.82-4.173 1.092-7.837.816-10.987-.277-3.151-1.104-5.787-2.476-7.912-1.732-2.578-4.247-4.811-7.824-5.884-9.277-2.78-18.271-2.382-24.235-1.614-10.62 1.37-15.32 6.112-18.644 13.884-1.441 3.371-3.232 10.145-3.857 13.956-.787 4.8-1.062 9.159-.712 12.685.354 3.525 1.35 6.427 2.992 8.706 1.953 2.772 4.951 4.881 8.996 6.328 4.041 1.449 9.13 2.234 15.257 2.358l4.57.091 6.257.087a4.309 4.309 0 014.156 5.2l-.538 2.546-7.97-.159-7.968-.161c-7.912-.16-14.469-1.2-19.669-3.119-5.197-1.92-9.04-4.719-11.526-8.4-1.964-2.921-3.15-6.566-3.56-10.935-.41-4.37-.044-9.462 1.1-15.28C3.663 27.473 8.511 18.36 15.804 12.368c7.293-5.99 17.032-8.864 29.22-8.619C57.207 3.993 65.79 7.011 70.77 12.8c4.98 5.792 6.357 14.353 4.133 25.687-.711 3.615-2.308 9.415-3.448 12.088a25.762 25.762 0 01-4.065 6.599c-2.022 2.393-4.802 5.208-12.364 5.444l-1.523.008c-.132 0-.246-.004-.373-.004-.263-.002-.53-.003-.773-.01l-.063-.001c-1.053-.027-3.946-.08-4.62-.179a7.421 7.421 0 01-.75-.149c-.477-.121-.805-.27-.955-.457-.223-.269-.43-.729-.404-1.638.018-.645.021-.653.18-1.738" fill="#2e56ff"/><path d="M40.865 25.91c1.987 0 3.672.159 5.055.48a10.721 10.721 0 01.001 0c-1.384-.321-3.068-.48-5.056-.48M49.166 27.828c.78.64 1.299 1.501 1.554 2.578-.255-1.077-.774-1.938-1.554-2.578M28.215 25.91c-.9-.146-1.313-.539-1.534-.825.217.286.633.679 1.534.824M57.121 23.686c-1.238-1.584-3.13-2.77-5.687-3.563 2.556.792 4.45 1.979 5.687 3.563M57.121 23.686c1.082 1.314 1.76 3.048 2.04 5.203-.278-2.155-.958-3.889-2.04-5.203" fill="#244eff"/><path d="M26.64 47.107c1.175-3.733 4.712-6.042 8.625-6.042H49.51l-.115.657-.116.657c-.506 2.864-1.483 7.081-2.028 8.756-.55 1.676-1.29 2.372-1.88 2.861-.59.489-2.052 1.345-3.847 1.587-1.792.243-4.343.182-7.34.182-3.098 0-5.334-.497-6.708-1.491-1.374-.993-2.014-2.51-1.535-4.47.153-.628.504-2.08.699-2.697zm23.895-12.811H37.67c-2.898 0-5.5.328-7.804.984-2.306.658-4.315 1.642-6.028 2.955-1.56 1.214-2.952 2.568-3.784 4.271-1.052 2.156-1.774 5.325-2.136 7.379-.36 2.054-.286 3.873.228 5.454.51 1.584 1.274 2.95 2.66 4.062 1.27 1.01 2.81 1.769 4.625 2.275 1.815.505 3.901.758 6.259.758a29.77 29.77 0 005.7-.53c1.815-.355 2.994-.7 4.635-1.408 1.42-.606 2.66-1.288 3.72-2.046" fill="#2e56ff"/><path d="M46.923 62.283c.222.056.466.109.758.152.675.097 3.565.15 4.613.176-1.053-.027-3.946-.08-4.62-.179a7.421 7.421 0 01-.75-.149M53.51 62.626h-.007.007M53.503 62.626h.007-.007M26.275 23.308c.045-1.02 1.086-2.62 1.393-4.372-.31 1.753-1.348 3.352-1.393 4.372M41.792 18.936c3.873 0 7.087.396 9.642 1.187-2.554-.79-5.77-1.187-9.642-1.187M32.378 25.91c-1.582 0-3.262.141-4.163 0 .901.141 2.578 0 4.163 0M49.166 27.828c-.486-.4-1.106-.729-1.83-1.004.723.275 1.343.605 1.83 1.004" fill="#244eff"/><path d="M105.724 24.616s-12.58.41-15.334 16.08c-1.741 9.573-2.786 15.858 10.018 15.44 0 0 12.489-.408 15.33-16.266 1.656-9.29 1.911-15.643-10.014-15.254zm-11.515-1.672c2.424-3.077 7.832-6.247 16.876-6.247 15.106 0 16.97 11.002 14.267 23.59-2.611 12.494-10.35 23.496-26.108 23.496-18.462 0-20.7-11.282-18.183-23.497L89.546.006h6.06a2.76 2.76 0 012.7 3.325L94.21 22.944M162.741 25.088s-6.76-.095-9.489-.127c-3.333-.04-11.556.044-12.584 5.951-1.555 8.945 29.417 3.029 26.176 19.165-2.397 11.058-8.579 13.333-23.03 13.333-4.477 0-17.788-.56-17.788-.56 1.47-7.179 1.47-7.179 8.743-7.179h10.536s11.626.384 12.808-5.203c2.222-10.5-28.945-2.986-26.047-19.412 1.935-10.977 8.763-13.614 22.937-13.614 4.08 0 16.222.482 16.222.482-1.397 7.164-1.397 7.164-8.484 7.164M197.693 24.697c-2.933.108-12.952.475-15.642 16.156-1.543 8.827-3.632 15.808 10.077 15.305 0 0 13.139-.482 15.919-16.259 1.46-8.544 2.982-15.69-10.354-15.202zm-7.817 39.18c-17.996 0-20.233-11.282-17.53-23.497 2.611-12.121 9.603-23.404 27.6-23.404 17.809 0 20.42 11.283 17.809 23.404-2.704 12.307-9.978 23.496-27.879 23.496M229.503 63.41h-6.144a2.728 2.728 0 01-2.67-3.293L233.42.007l5.961.01a2.723 2.723 0 012.66 3.28L229.503 63.41M276.71 58.482c-2.837 2.704-7.263 5.394-13.666 5.394h-7.34c-15.105 0-16.317-8.39-13.521-21.352l5.221-25.082h6.043a2.733 2.733 0 012.673 3.302l-4.799 22.526c-1.513 7.4-3.32 12.372 5.512 12.441 1.246.01 3.736.021 4.982.021 4.86 0 10.145-1.25 12.816-12.928 1.446-6.32 5.558-25.362 5.558-25.362h6.078a2.73 2.73 0 012.672 3.3c-1.268 5.932-3.722 18.097-4.496 21.07-2.775 10.629-5.127 14.186-7.732 16.67M355.659 36.557c1.398-6.248 3.398-12.308-8.951-12.308 0 0-12.308 0-14.919 12.308h23.87zm-1.679 7.646h-23.87c-1.491 6.806.309 11.738 10.163 11.468h10.071c7.367.02 8.908-.023 5.967 7.74h-17.25c-18.089 0-20.326-10.91-17.809-23.125 2.61-12.214 9.604-23.403 27.879-23.403 13.893 0 18.649 8.578 16.318 19.674-1.585 7.646-1.585 7.646-11.469 7.646M305.665.006l5.298.01a2.738 2.738 0 012.67 3.317l-3.025 14.024h12.4c-1.677 7.832-1.677 7.857-9.323 7.857h-4.476l-5.202 24.62c-.654 2.983-.619 5.141 3.262 5.5 6.816.632 8.2.011 5.595 8.113-15.197.839-20.057-2.722-17.727-13.631l5.11-24.643-6.982.018 1.999-7.836 6.681-.014 3.72-17.335" fill="#2e56ff"/><path d="M279.637 102.246h-3.633l-1.796-19.764-8.123 16.375c-.997 1.978-3.418 3.39-5.633 3.39h-2.385l-2.086-25.655h2.736c1.282 0 2.215.93 2.284 2.21l1.132 18.439 10.43-20.65h2.25c1.711 0 3.14 1.3 3.303 3.002l1.695 17.752 8.59-18.581a3.742 3.742 0 013.398-2.172h3.55l-11.056 22.74a5.178 5.178 0 01-4.656 2.914M314.62 87.28c.783-3.493 1.66-6.882-5.005-6.882 0 0-6.883 0-8.344 6.883h13.349m-.939 4.276h-13.349c-.833 3.806.087 6.622 5.684 6.413h5.632c4.02 0 4.937-.03 3.337 4.328h-9.646c-10.116 0-11.368-6.1-9.96-12.931 1.46-6.831 5.37-13.089 15.592-13.089 7.768 0 10.428 4.797 9.125 11.003-.887 4.276-.887 4.276-6.415 4.276M338.443 80.6s-7.036.239-8.564 9.004c-.968 5.354-2.242 8.894 5.613 8.628 0 0 6.984-.237 8.561-9.108.92-5.197 1.702-8.77-5.61-8.524zm-3.614 21.907c-10.324 0-11.576-6.31-10.168-13.14l4.746-22.527h2.773a2.028 2.028 0 011.987 2.44l-2.154 10.388c1.356-1.721 4.38-3.494 9.439-3.494 8.448 0 9.49 6.153 7.979 13.193-1.462 6.987-5.79 13.14-14.602 13.14" fill="#a5afbf"/></svg> \ No newline at end of file diff --git a/site/static/organisations/bekchy.png b/site/static/organisations/bekchy.png deleted file mode 100644 index 011553cb42..0000000000 Binary files a/site/static/organisations/bekchy.png and /dev/null differ diff --git a/site/static/organisations/beyonk.svg b/site/static/organisations/beyonk.svg deleted file mode 100644 index 57d15142a8..0000000000 --- a/site/static/organisations/beyonk.svg +++ /dev/null @@ -1 +0,0 @@ -<svg enable-background="new 0 0 263.2 127" viewBox="0 0 263.2 127" xmlns="http://www.w3.org/2000/svg"><path d="m263.2 28.5v-5.9h-22.5v-22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5 1.5-.5 2.4zm26.5 11.3v-22.6h5.9l10.8 13.8v-13.8h5.8v22.5h-5.8l-10.8-13.7v13.8zm38.1-13.3 7.1-9.3h7.2l-8.9 10.7 9.8 11.9h-7.6l-7.6-9.8v9.8h-5.9v-22.6h5.9z"/></svg> \ No newline at end of file diff --git a/site/static/organisations/buydotstar.svg b/site/static/organisations/buydotstar.svg deleted file mode 100644 index da0e5c9211..0000000000 --- a/site/static/organisations/buydotstar.svg +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg viewBox="0 0 257 60" xmlns="http://www.w3.org/2000/svg"> - <style> - .logo { - font-size: 60px; - text-align: center; - font-family: "Times New Roman", Times, serif; - } - </style> - <text x="65" y="46" class="logo">buy.*</text> -</svg> diff --git a/site/static/organisations/cashfree.svg b/site/static/organisations/cashfree.svg deleted file mode 100644 index d0952dd71c..0000000000 --- a/site/static/organisations/cashfree.svg +++ /dev/null @@ -1 +0,0 @@ -<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2156 462"><defs><linearGradient id="linear-gradient" x1="212.75" y1="160.13" x2="257.3" y2="176.47" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f18221"/><stop offset="1" stop-color="#f2b81a"/></linearGradient><linearGradient id="linear-gradient-2" x1="255.57" y1="98.18" x2="450.73" y2="92.36" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#215f70"/><stop offset="1" stop-color="#00b7b1"/></linearGradient><style>.cls-2{fill:#fff}</style></defs><path fill="#4d3475" d="M1 0h2155v462H1z"/><path class="cls-2" d="M819.83 318.07a53.65 53.65 0 01-47.75 53.19 215.5 215.5 0 01-24.54 1.34q-56 0-89.69-35.34t-33.72-92.74q0-61.71 37.93-99.73t95.88-38q6.31 0 12.26.3a52.54 52.54 0 0149.63 52.61 110.48 110.48 0 00-57.4-15.42q-41.8 0-67.72 26.72t-25.92 71.4q0 42.51 24.22 67.71t63.68 25.21q36.4 0 63.14-17.22zM1005 368.29h-40.41v-28.7h-.72q-19 33-55.78 33-27.09 0-42.43-14.71T850.32 319q0-52 59.92-60.64l54.53-7.71q0-39.28-37.31-39.28-32.84 0-59.2 22.6c0-25.22 17.75-47.61 42.64-51.71a149.89 149.89 0 0124.45-1.93q69.6 0 69.6 68.53zm-40.18-90.22l-38.57 5.38q-17.94 2.32-27 8.7t-9.06 22.33a24.45 24.45 0 008.35 19.1q8.34 7.46 22.33 7.45 19 0 31.48-13.37T964.77 294zM1044.23 324q23.32 17.76 51.49 17.76 37.66 0 37.66-22.25a17.54 17.54 0 00-3.22-10.67 31 31 0 00-8.7-7.8 68.51 68.51 0 00-12.92-6.1q-7.44-2.7-16.59-6.1a175.83 175.83 0 01-20.36-9.51 61.5 61.5 0 01-15.07-11.39 42.85 42.85 0 01-9.06-14.44 53.23 53.23 0 01-3-18.83 43.48 43.48 0 016.28-23.41 54.58 54.58 0 0116.86-17 80.72 80.72 0 0124-10.41 110.09 110.09 0 0127.8-3.5h2.66c23.89.39 42.91 20.21 42.91 44.11q-19.38-13.27-44.49-13.27a58.38 58.38 0 00-14.26 1.61 36.82 36.82 0 00-10.85 4.48 22.12 22.12 0 00-7 6.91 16.51 16.51 0 00-2.51 8.88 19 19 0 002.51 10.05 22.65 22.65 0 007.45 7.26 63.78 63.78 0 0011.84 5.74q6.9 2.61 15.87 5.65a232.44 232.44 0 0121.26 9.87 72 72 0 0116 11.39 44.74 44.74 0 0110.22 14.71q3.6 8.34 3.59 19.82 0 14-6.45 24.39a53.84 53.84 0 01-17.15 17.19 80.48 80.48 0 01-24.85 10.14 129.19 129.19 0 01-29.69 3.32c-1.65 0-3.29 0-4.91-.07a48.58 48.58 0 01-47.32-48.53zM1377.34 368.29a41.61 41.61 0 01-41.61-41.62v-58.83q0-54.52-36.42-54.53-18.3 0-30.85 15.78t-12.56 40.37v98.83h-41.79V138.15a41.8 41.8 0 0141.79-41.8V215.1h.72q20.81-34.78 59.55-34.8 61.17 0 61.17 74.8zM1531.79 130.26a37.82 37.82 0 00-19.19-4.85q-30.33 0-30.32 34.26v24.94H1525a32.64 32.64 0 01-32.64 32.64h-9.87v151h-41.62v-151h-31.39V216a31.39 31.39 0 0131.39-31.39v-29.78q0-29.06 19-45.83t47.54-16.77q15.42 0 24.39 3.41zM1661.12 224.25q-7.53-5.91-21.7-5.92-18.48 0-30.86 16.68t-12.38 45.39v87.89h-41.61V226.23a41.61 41.61 0 0141.61-41.62v37.85h.72q6.11-19.38 18.75-30.23t28.25-10.85q11.31 0 17.22 3.41zM1842.84 287.75h-125.21q.7 25.47 15.69 39.29t41.17 13.81q29.41 0 54-17.58v33.54q-25.12 15.79-66.37 15.79-40.55 0-63.59-25t-23.06-70.41q0-42.87 25.39-69.87t63.05-27q37.66 0 58.3 24.22t20.63 67.27zm-40.19-29.42q-.18-22.41-10.58-34.88t-28.7-12.45a40.37 40.37 0 00-30.4 13.09q-12.48 13.1-15.34 34.26zM2038 287.75h-125.21q.72 25.47 15.7 39.29t41.17 13.81q29.41 0 54-17.58v33.54q-25.11 15.79-66.37 15.79-40.54 0-63.59-25t-23-70.41q0-42.87 25.38-69.87t63-27q37.68 0 58.3 24.22t20.62 67.25zm-40.18-29.42q-.18-22.41-10.59-34.88t-28.7-12.45a40.37 40.37 0 00-30.4 13.09q-12.47 13.1-15.34 34.26z"/><path d="M220.69 154.26c-16.76 2.15-16 34.7-18.34 61.86l-13.54 138.76a64.73 64.73 0 01-70.7 58.12l20.82-213.39a53.09 53.09 0 0158-47.68z" fill="#f2b81a"/><path d="M410.32 172.76a63.36 63.36 0 01-69.21 56.9l-138.76-13.54c2.34-27.16 1.58-59.71 18.34-61.86z" fill="url(#linear-gradient)"/><path d="M540.09 73.67A65.07 65.07 0 01469 132.12l-142.5-13.91c2.4-27.9 1.62-61.34 18.84-63.54z" fill="url(#linear-gradient-2)"/><path d="M345.61 54.06c-17.49 2.81-16.71 36.25-19.11 64.15l-13.91 142.5a66.45 66.45 0 01-72.6 59.7l21.38-219.16c2.92-30 29.59-51.89 59.83-49.57z" fill="#00b7b1"/></svg> \ No newline at end of file diff --git a/site/static/organisations/chess.svg b/site/static/organisations/chess.svg deleted file mode 100644 index 752954f6e8..0000000000 --- a/site/static/organisations/chess.svg +++ /dev/null @@ -1 +0,0 @@ -<svg viewBox="0 0 109 31" xmlns="http://www.w3.org/2000/svg"><path d="m19.2 25.6c-1.5-.4-2.9-1.3-4-2.4-1.9-2.1-2.9-4.9-2.7-7.7-.1-2.1.5-4.2 1.5-6l-1-.5a4.96 4.96 0 1 0 -6.9-1.2c.3.5.7.9 1.2 1.2-.7.4-2.5 1.4-3 1.7-.1.1-.1.3-.1.3 0 .7.2 1.4.5 2 1 .2 2 .3 2.9.3-.2 2.3-.5 4.7-.9 7-.4 1.3-4.6 1.5-5.3 3.1-.1.3-.2.6-.2.9 0 .4.1.8.4 1.2.1.1-1.5.5-1.5 2-.1.5.2 1.1.6 1.5.9.6 1.9 1.1 3 1.4 2.1.5 4.2.7 6.3.7s4.3-.2 6.4-.7c1.1-.2 2.1-.7 3-1.4.4-.4.7-1 .7-1.6 0-.7-.3-1.4-.9-1.8z" fill="#4e7838"/><path d="m8.4 27.9c-1.4-.2-5.9-.9-7-2.5-.4.2-.7.4-1 .8 0 1.7 5.5 2.5 8 2.2.9-.1.5-.4 0-.5zm1.7-13c-.4-.2-2.6-1-2.6-1-.2 2.1-.5 4.2-.8 6.2-.4 1.3-4.6 1.5-5.3 3.1-.3.8 1.3 1.8 5.1 1.8 3.6 0 4-4.9 4.6-8.7.1-.7-.6-1.2-1-1.4zm1.9-4.2c-.7-.6-1.5-1.2-2.3-1.7 2.3-.6 3.9-2.7 3.8-5 0-3-1.9-4-3.3-4h-.1c-2.7.1-4.9 2.4-4.8 5.2.1 1.5.8 2.9 2 3.8-.7.4-2.5 1.4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0-.3-.1-.5-.2-.7s-.2-.3-.4-.4-.5-.2-.7-.1c-.3 0-.6.1-.9.2-.4.2-.7.5-1 .8v6h-1.4v-5.7c0-.3-.1-.5-.2-.7s-.2-.3-.4-.4-.5-.1-.8-.1-.6.1-.9.3-.7.4-.9.7v6h-1.4v-8h1.4v.9c.3-.3.7-.6 1.1-.9.3-.2.7-.3 1.2-.3.4 0 .9.1 1.3.3s.7.6.8 1.1c.3-.4.8-.7 1.2-1 .4-.2.8-.4 1.3-.4.3 0 .6.1.9.2s.5.3.7.5c.2.3.4.6.5.9.1.4.2.9.2 1.4v5.1z" fill="#fff"/></svg> \ No newline at end of file diff --git a/site/static/organisations/comigo.svg b/site/static/organisations/comigo.svg deleted file mode 100644 index 44622a5195..0000000000 --- a/site/static/organisations/comigo.svg +++ /dev/null @@ -1 +0,0 @@ -<svg viewBox="0 0 102.292 25" xmlns="http://www.w3.org/2000/svg"><g fill="#00c6fb"><path d="m4.417 17.624a7.686 7.686 0 0 1 -3.282-3.224 10.388 10.388 0 0 1 -1.135-5 10.464 10.464 0 0 1 1.135-5.015 7.765 7.765 0 0 1 3.265-3.254 10.574 10.574 0 0 1 5.033-1.131 11.666 11.666 0 0 1 4.443.833 6.686 6.686 0 0 1 3.024 2.211 1.423 1.423 0 0 1 .312.859 1.467 1.467 0 0 1 -.7 1.172 1.25 1.25 0 0 1 -.775.235 1.913 1.913 0 0 1 -.775-.17 1.716 1.716 0 0 1 -.646-.481 5.181 5.181 0 0 0 -2.044-1.474 7.835 7.835 0 0 0 -2.841-.455 5.6 5.6 0 0 0 -4.394 1.759 7.094 7.094 0 0 0 -1.576 4.911 6.966 6.966 0 0 0 1.59 4.869 5.7 5.7 0 0 0 4.431 1.741 7.044 7.044 0 0 0 5.195-1.926 2.267 2.267 0 0 1 1.472-.755 1.329 1.329 0 0 1 .854.312 1.512 1.512 0 0 1 .594 1.145 1.493 1.493 0 0 1 -.336.912 7.233 7.233 0 0 1 -3.166 2.24 12.536 12.536 0 0 1 -4.613.807 10.8 10.8 0 0 1 -5.066-1.12z" transform="translate(.006 .005)"/><path d="m34.231 21.208a6.43 6.43 0 0 1 -2.731-2.331 6.249 6.249 0 0 1 -.982-3.489 6.258 6.258 0 0 1 .985-3.489 6.44 6.44 0 0 1 2.726-2.329 10.127 10.127 0 0 1 7.986 0 6.436 6.436 0 0 1 2.727 2.33 6.252 6.252 0 0 1 .982 3.489 6.249 6.249 0 0 1 -.982 3.489 6.428 6.428 0 0 1 -2.726 2.331 10.133 10.133 0 0 1 -7.985 0zm7.133-2.929a3.7 3.7 0 0 0 1.15-2.891 3.7 3.7 0 0 0 -1.15-2.89 4.5 4.5 0 0 0 -3.14-1.041 4.5 4.5 0 0 0 -3.14 1.043 3.7 3.7 0 0 0 -1.15 2.89 3.7 3.7 0 0 0 1.15 2.891 4.5 4.5 0 0 0 3.139 1.041 4.5 4.5 0 0 0 3.14-1.044z" transform="translate(-11.447 -3.278)"/><path d="m58.384 21.61a1.5 1.5 0 0 1 -.437-1.146v-10.154a1.5 1.5 0 0 1 .437-1.145 1.732 1.732 0 0 1 1.24-.417 1.79 1.79 0 0 1 1.24.417 1.458 1.458 0 0 1 .465 1.145v.625a4.518 4.518 0 0 1 1.5-1.615 3.608 3.608 0 0 1 1.965-.572 3.462 3.462 0 0 1 1.964.586 3.594 3.594 0 0 1 1.318 1.6 5.355 5.355 0 0 1 4.16-2.187 3.9 3.9 0 0 1 3.23 1.458 6.361 6.361 0 0 1 1.163 4.062v6.2a1.458 1.458 0 0 1 -.466 1.146 1.79 1.79 0 0 1 -1.24.416 1.732 1.732 0 0 1 -1.24-.416 1.5 1.5 0 0 1 -.437-1.146v-6.4a3.449 3.449 0 0 0 -.452-1.937 1.508 1.508 0 0 0 -1.33-.664 2.172 2.172 0 0 0 -1.318.416 3.916 3.916 0 0 0 -1.06 1.318v7.261a1.46 1.46 0 0 1 -.466 1.146 1.791 1.791 0 0 1 -1.243.416 1.733 1.733 0 0 1 -1.241-.416 1.5 1.5 0 0 1 -.437-1.146v-5.856q0-3.151-1.783-3.15a2.2 2.2 0 0 0 -1.9.963 4.515 4.515 0 0 0 -.687 2.656v5.389a1.458 1.458 0 0 1 -.465 1.146 1.79 1.79 0 0 1 -1.24.416 1.732 1.732 0 0 1 -1.24-.416z" transform="translate(-21.734 -3.277)"/><path d="m92.026 3.318a1.8 1.8 0 0 1 -.581-1.392 1.8 1.8 0 0 1 .581-1.394 2.187 2.187 0 0 1 1.538-.532 2.284 2.284 0 0 1 1.562.534 1.767 1.767 0 0 1 .607 1.393 1.763 1.763 0 0 1 -.607 1.392 2.281 2.281 0 0 1 -1.562.534 2.183 2.183 0 0 1 -1.538-.534zm.323 15.01a1.5 1.5 0 0 1 -.437-1.146v-10.154a1.5 1.5 0 0 1 .437-1.145 1.733 1.733 0 0 1 1.24-.417 1.791 1.791 0 0 1 1.24.417 1.461 1.461 0 0 1 .471 1.145v10.154a1.46 1.46 0 0 1 -.466 1.146 1.791 1.791 0 0 1 -1.24.416 1.733 1.733 0 0 1 -1.24-.416z" transform="translate(-34.303 .005)"/><path d="m105.688 27.678a6.424 6.424 0 0 1 -2.649-1.64 1.268 1.268 0 0 1 -.362-.885 1.51 1.51 0 0 1 .62-1.172 1.3 1.3 0 0 1 .827-.312 2.364 2.364 0 0 1 1.5.755 4.374 4.374 0 0 0 1.562.9 6.163 6.163 0 0 0 2.029.326 4.007 4.007 0 0 0 3.124-1.223 4.679 4.679 0 0 0 1.062-3.384l-.023-1.043a5.411 5.411 0 0 1 -2.054 1.537 7.456 7.456 0 0 1 -2.882.494 6.765 6.765 0 0 1 -4.962-1.757 6.553 6.553 0 0 1 -1.786-4.882 6.464 6.464 0 0 1 1.821-4.881 7.016 7.016 0 0 1 5.079-1.758 6.344 6.344 0 0 1 2.584.547 7.206 7.206 0 0 1 2.223 1.537v-.521a1.46 1.46 0 0 1 .464-1.145 2.062 2.062 0 0 1 2.468-.013 1.473 1.473 0 0 1 .452 1.158v10.723a7.663 7.663 0 0 1 -.892 3.723 6.436 6.436 0 0 1 -2.559 2.578 7.909 7.909 0 0 1 -3.94.937 11.035 11.035 0 0 1 -3.707-.6zm6.577-9.4a3.722 3.722 0 0 0 1.138-2.891 3.721 3.721 0 0 0 -1.138-2.89 4.493 4.493 0 0 0 -3.152-1.041 4.023 4.023 0 0 0 -2.947 1.041 3.866 3.866 0 0 0 -1.059 2.89 3.868 3.868 0 0 0 1.059 2.891 4.025 4.025 0 0 0 2.947 1.041 4.5 4.5 0 0 0 3.152-1.041z" transform="translate(-38.143 -3.279)"/><path d="m132.955 21.209a6.43 6.43 0 0 1 -2.726-2.331 6.249 6.249 0 0 1 -.982-3.489 6.257 6.257 0 0 1 .982-3.489 6.44 6.44 0 0 1 2.726-2.329 10.127 10.127 0 0 1 7.986 0 6.436 6.436 0 0 1 2.726 2.329 6.257 6.257 0 0 1 .982 3.489 6.249 6.249 0 0 1 -.982 3.489 6.429 6.429 0 0 1 -2.726 2.331 10.134 10.134 0 0 1 -7.986 0zm7.134-2.929a3.7 3.7 0 0 0 1.15-2.891 3.7 3.7 0 0 0 -1.15-2.889 5.255 5.255 0 0 0 -6.279 0 3.7 3.7 0 0 0 -1.15 2.89 3.7 3.7 0 0 0 1.148 2.89 5.255 5.255 0 0 0 6.281 0z" transform="translate(-48.482 -3.279)"/><path d="m157.635 26.619a1.847 1.847 0 0 1 -.594-1.38 1.949 1.949 0 0 1 .594-1.445 2.048 2.048 0 0 1 1.5-.586 2.016 2.016 0 0 1 2.067 2.031 1.865 1.865 0 0 1 -.581 1.38 2.028 2.028 0 0 1 -1.486.572 2.073 2.073 0 0 1 -1.5-.572z" transform="translate(-58.91 -8.703)"/></g></svg> \ No newline at end of file diff --git a/site/static/organisations/datawrapper.svg b/site/static/organisations/datawrapper.svg deleted file mode 100644 index f614df0eee..0000000000 --- a/site/static/organisations/datawrapper.svg +++ /dev/null @@ -1 +0,0 @@ -<svg viewBox="2.80001831 3.70000458 320.40002441 89.69999695" xmlns="http://www.w3.org/2000/sv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-2.2-6.2-1.3-1.6-3-2.4-5.3-2.4z"/><path d="m298.7 40.1c-.6-.1-1.3-.2-2-.2-1.8 0-3.4.5-4.6 1.5-1.3 1-2.2 2.5-2.7 4.4v18.2h-2.9v-26.4h2.9v4.2c1.5-3.1 4-4.7 7.4-4.7.8 0 1.5.1 1.9.3z"/><path d="m323.2 93.4h-320.4v-89.7h2.7v87h317.7z"/></svg> \ No newline at end of file diff --git a/site/static/organisations/dbnomics.jpg b/site/static/organisations/dbnomics.jpg deleted file mode 100644 index 3d5991f869..0000000000 Binary files a/site/static/organisations/dbnomics.jpg and /dev/null differ diff --git a/site/static/organisations/dbnomics.webp b/site/static/organisations/dbnomics.webp deleted file mode 100644 index 14f3431bba..0000000000 Binary files a/site/static/organisations/dbnomics.webp and /dev/null differ diff --git a/site/static/organisations/deck.svg b/site/static/organisations/deck.svg deleted file mode 100644 index 21291ddfe9..0000000000 --- a/site/static/organisations/deck.svg +++ /dev/null @@ -1 +0,0 @@ -<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1" viewBox="0 0 1909 925" xmlns="http://www.w3.org/2000/svg"><path d="m1675 494 168-182h-197l-123 137v-345h-177v413l-106 102c-5 6-38 27-45 31-8 5-17 9-27 13-11 3-23 4-36 4s-25-2-36-8c-11-5-21-12-29-22-9-9-15-21-21-34-5-14-7-29-7-45 0-33 9-59 28-79 19-19 40-28 65-28 28 0 49 5 63 15 14 11 25 21 32 30l104-119c-21-24-48-44-81-59s-74-23-123-23a273 273 0 0 0 -190 76c-11 10-21 22-29 35a228 228 0 0 1 21 47l7 20c8 31 12 66 12 105v34h-333c1 8 3 17 7 26 3 9 10 18 20 26 9 8 22 14 37 19a276 276 0 0 0 197-27l5 11c6 15 14 29 22 43l4 5a254 254 0 0 0 115 89 324 324 0 0 0 230-6c17-8 32-17 46-27l48-51v86h177v-152l35-37 109 189h203zm-889-14c-4-9-9-18-16-25-8-8-17-14-28-20-11-5-24-8-39-8a90 90 0 0 0 -66 28 81 81 0 0 0 -21 51h175c0-8-2-17-5-26m-374 99c0 28-6 50-19 65-13 16-32 23-58 23-30 0-51-9-66-27-14-17-21-41-21-71 0-40 10-69 30-89s45-29 77-29c20 0 39 3 57 9zm0-266a311 311 0 0 0 -77-12c-40 0-76 7-109 20a251 251 0 0 0 -138 138 339 339 0 0 0 2 225 195 195 0 0 0 193 135 180 180 0 0 0 136-63l9 50h162v-7c-27-11-51-26-71-45-48-46-72-110-72-193 0-33 5-65 16-97a239 239 0 0 1 127-145v-215h-178z" fill="#030404" fill-rule="nonzero"/></svg> \ No newline at end of file diff --git a/site/static/organisations/dextra.png b/site/static/organisations/dextra.png deleted file mode 100644 index 725f9bd511..0000000000 Binary files a/site/static/organisations/dextra.png and /dev/null differ diff --git a/site/static/organisations/entriwise.png b/site/static/organisations/entriwise.png deleted file mode 100644 index be305e1300..0000000000 Binary files a/site/static/organisations/entriwise.png and /dev/null differ diff --git a/site/static/organisations/entur.svg b/site/static/organisations/entur.svg deleted file mode 100644 index 98bb5cc937..0000000000 --- a/site/static/organisations/entur.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="523" height="158"><rect id="backgroundrect" width="100%" height="100%" x="0" y="0" fill="none" stroke="none"/><style>.st0{fill:#fff}</style><g class="currentLayer"><path class="st0" d="M21.1 18.7v27.6h53.3V65H21.1v26.7h60.1v18.7H0V0h81.2v18.7H21.1z" id="svg_1"/><path d="M195.9 156.4H0v-18.7h195.9v18.7z" id="svg_2" fill="#ff5959"/><path class="st0" d="M193.7 110.2l-72.4-65.5v65.5h-21.1V0h2.3l72.4 66.7V0H196v110.2h-2.3z" id="svg_3"/><path class="st0" d="M299.8 64.9h-31.5v91.5h-21.1V64.9h-31.5V46.2h84.2v18.7z" id="svg_4"/><path class="st0" d="M363.1 158.4c-7.1 0-13.6-1.1-19.4-3.3-5.8-2.2-10.8-5.3-14.9-9.3-4.1-4-7.3-8.9-9.6-14.6-2.3-5.7-3.4-12.1-3.4-19.1V46.3h21.1V112c0 5.5.9 10.1 2.7 13.7 1.8 3.6 4 6.5 6.7 8.6 2.7 2.1 5.5 3.6 8.6 4.4 3.1.8 5.8 1.2 8.2 1.2 2.4 0 5.1-.4 8.2-1.2 3.1-.8 5.9-2.3 8.6-4.4 2.7-2.1 4.9-5 6.7-8.6 1.8-3.6 2.7-8.2 2.7-13.7V46.2h21.1V112c0 7-1.1 13.4-3.3 19.1-2.2 5.7-5.4 10.6-9.5 14.6s-9.1 7.1-14.9 9.3c-5.8 2.3-12.4 3.4-19.6 3.4z" id="svg_5"/><path class="st0" d="M451.2 121.4v35.1h-21.1V46.2h50.1c5.6 0 10.8.9 15.5 2.8 4.7 1.9 8.7 4.5 12 7.8 3.3 3.4 5.9 7.4 7.8 12 1.9 4.7 2.8 9.8 2.8 15.3 0 4.1-.6 8.1-1.7 12-1.1 3.9-2.6 7.4-4.6 10.5-2 3.1-4.4 5.8-7.2 8.1-2.9 2.3-6 3.8-9.4 4.7l27.4 37h-25.1l-25.5-35.1h-21zm0-18.4h24c4.4 0 8-.6 10.9-1.7 2.9-1.1 5.1-2.6 6.8-4.4 1.7-1.8 2.8-3.8 3.4-6.1.6-2.3.9-4.5.9-6.9 0-2.7-.4-5.2-1.3-7.5s-2.2-4.3-3.9-6c-1.8-1.7-4-3.1-6.8-4.1-2.8-1-6.1-1.5-10-1.5h-24V103z" id="svg_6"/></g></svg> \ No newline at end of file diff --git a/site/static/organisations/from-now-on.png b/site/static/organisations/from-now-on.png deleted file mode 100644 index 7da931dc34..0000000000 Binary files a/site/static/organisations/from-now-on.png and /dev/null differ diff --git a/site/static/organisations/fusioncharts.svg b/site/static/organisations/fusioncharts.svg deleted file mode 100644 index 6712115de8..0000000000 --- a/site/static/organisations/fusioncharts.svg +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg width="735px" height="115px" viewBox="0 0 735 115" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <!-- Generator: Sketch 51.1 (57501) - http://www.bohemiancoding.com/sketch --> - <title>logo colour - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file diff --git a/site/static/organisations/godaddy.svg b/site/static/organisations/godaddy.svg deleted file mode 100644 index e753ceed7b..0000000000 --- a/site/static/organisations/godaddy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/grainger.svg b/site/static/organisations/grainger.svg deleted file mode 100644 index af10fc52fe..0000000000 --- a/site/static/organisations/grainger.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/site/static/organisations/healthtree.png b/site/static/organisations/healthtree.png deleted file mode 100644 index ec3f219d1c..0000000000 Binary files a/site/static/organisations/healthtree.png and /dev/null differ diff --git a/site/static/organisations/iota.svg b/site/static/organisations/iota.svg deleted file mode 100644 index 1ab864a958..0000000000 --- a/site/static/organisations/iota.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/itslearning.svg b/site/static/organisations/itslearning.svg deleted file mode 100644 index 1d5fe6fcf4..0000000000 --- a/site/static/organisations/itslearning.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/jacoux.png b/site/static/organisations/jacoux.png deleted file mode 100644 index 6d3f52017c..0000000000 Binary files a/site/static/organisations/jacoux.png and /dev/null differ diff --git a/site/static/organisations/jingmnt.png b/site/static/organisations/jingmnt.png deleted file mode 100644 index 326f5f0bbf..0000000000 Binary files a/site/static/organisations/jingmnt.png and /dev/null differ diff --git a/site/static/organisations/mentorcv.png b/site/static/organisations/mentorcv.png deleted file mode 100644 index 17cf95a9ac..0000000000 Binary files a/site/static/organisations/mentorcv.png and /dev/null differ diff --git a/site/static/organisations/metrovias.svg b/site/static/organisations/metrovias.svg deleted file mode 100644 index a81394de59..0000000000 --- a/site/static/organisations/metrovias.svg +++ /dev/null @@ -1 +0,0 @@ -Asset 1 \ No newline at end of file diff --git a/site/static/organisations/mustlab.png b/site/static/organisations/mustlab.png deleted file mode 100644 index 4f3a29488b..0000000000 Binary files a/site/static/organisations/mustlab.png and /dev/null differ diff --git a/site/static/organisations/nesta.svg b/site/static/organisations/nesta.svg deleted file mode 100644 index 72f53e07b0..0000000000 --- a/site/static/organisations/nesta.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/nonkosi.svg b/site/static/organisations/nonkosi.svg deleted file mode 100644 index 8639c0ce38..0000000000 --- a/site/static/organisations/nonkosi.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/nyt.svg b/site/static/organisations/nyt.svg deleted file mode 100644 index 8735e53059..0000000000 --- a/site/static/organisations/nyt.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/nzz.svg b/site/static/organisations/nzz.svg deleted file mode 100644 index 70f9486263..0000000000 --- a/site/static/organisations/nzz.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/oberonspace.svg b/site/static/organisations/oberonspace.svg deleted file mode 100644 index 73fd68f8b5..0000000000 --- a/site/static/organisations/oberonspace.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/ofof.png b/site/static/organisations/ofof.png deleted file mode 100644 index 5ecde9b0fd..0000000000 Binary files a/site/static/organisations/ofof.png and /dev/null differ diff --git a/site/static/organisations/open-state-foundation.svg b/site/static/organisations/open-state-foundation.svg deleted file mode 100644 index f8c010e7e2..0000000000 --- a/site/static/organisations/open-state-foundation.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/panascais.svg b/site/static/organisations/panascais.svg deleted file mode 100644 index cb9e4f3afe..0000000000 --- a/site/static/organisations/panascais.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/site/static/organisations/pankod.svg b/site/static/organisations/pankod.svg deleted file mode 100644 index 34578a7739..0000000000 --- a/site/static/organisations/pankod.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - Dark - Created with Sketch. - - - - - - - - \ No newline at end of file diff --git a/site/static/organisations/paperform.svg b/site/static/organisations/paperform.svg deleted file mode 100644 index 3ee2540112..0000000000 --- a/site/static/organisations/paperform.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - Logo--gradient--shadow - Created with Sketch. - - - - - - - - - - - - - - \ No newline at end of file diff --git a/site/static/organisations/razorpay.svg b/site/static/organisations/razorpay.svg deleted file mode 100644 index 829adb319e..0000000000 --- a/site/static/organisations/razorpay.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/socialist-party.svg b/site/static/organisations/socialist-party.svg deleted file mode 100644 index 9dde31a5c0..0000000000 --- a/site/static/organisations/socialist-party.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/softmus.png b/site/static/organisations/softmus.png deleted file mode 100644 index 6d0c8af60a..0000000000 Binary files a/site/static/organisations/softmus.png and /dev/null differ diff --git a/site/static/organisations/sqltribe.svg b/site/static/organisations/sqltribe.svg deleted file mode 100644 index 2a51dfc0a7..0000000000 --- a/site/static/organisations/sqltribe.svg +++ /dev/null @@ -1,106 +0,0 @@ - -image/svg+xml \ No newline at end of file diff --git a/site/static/organisations/stone.svg b/site/static/organisations/stone.svg deleted file mode 100644 index 0401dbb292..0000000000 --- a/site/static/organisations/stone.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/strixcloud.svg b/site/static/organisations/strixcloud.svg deleted file mode 100644 index 49fe96b061..0000000000 --- a/site/static/organisations/strixcloud.svg +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/site/static/organisations/sucuri.png b/site/static/organisations/sucuri.png deleted file mode 100644 index a30b161139..0000000000 Binary files a/site/static/organisations/sucuri.png and /dev/null differ diff --git a/site/static/organisations/thunderdome.svg b/site/static/organisations/thunderdome.svg deleted file mode 100644 index 0a5d8ee055..0000000000 --- a/site/static/organisations/thunderdome.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/tokopedia.svg b/site/static/organisations/tokopedia.svg deleted file mode 100644 index d284f05d7b..0000000000 --- a/site/static/organisations/tokopedia.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/site/static/organisations/tsh.svg b/site/static/organisations/tsh.svg deleted file mode 100644 index 0b0388b500..0000000000 --- a/site/static/organisations/tsh.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/site/static/organisations/webdesq.svg b/site/static/organisations/webdesq.svg deleted file mode 100644 index c9f0012de0..0000000000 --- a/site/static/organisations/webdesq.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/zevvle.svg b/site/static/organisations/zevvle.svg deleted file mode 100644 index 45a26c7a7c..0000000000 --- a/site/static/organisations/zevvle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 1a5d39ab28..9822529ece 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -472,7 +472,7 @@ export default class Component { if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) { this.warn(declarator, { code: `unused-export-let`, - message: `${this.name.name} has unused export property '${name}'. If it is for external reference only, please consider using \`export const '${name}'\`` + message: `${this.name.name} has unused export property '${name}'. If it is for external reference only, please consider using \`export const ${name}\`` }); } }); @@ -495,7 +495,7 @@ export default class Component { if (variable.writable && !(variable.referenced || variable.referenced_from_script || variable.subscribable)) { this.warn(specifier, { code: `unused-export-let`, - message: `${this.name.name} has unused export property '${specifier.exported.name}'. If it is for external reference only, please consider using \`export const '${specifier.exported.name}'\`` + message: `${this.name.name} has unused export property '${specifier.exported.name}'. If it is for external reference only, please consider using \`export const ${specifier.exported.name}\`` }); } } @@ -603,6 +603,7 @@ export default class Component { const { expression } = node.body; if (expression.type !== 'AssignmentExpression') return; + if (expression.left.type === 'MemberExpression') return; extract_names(expression.left).forEach(name => { if (!this.var_lookup.has(name) && name[0] !== '$') { diff --git a/src/compiler/compile/css/Stylesheet.ts b/src/compiler/compile/css/Stylesheet.ts index 998a879687..246dab0f12 100644 --- a/src/compiler/compile/css/Stylesheet.ts +++ b/src/compiler/compile/css/Stylesheet.ts @@ -5,6 +5,7 @@ import Element from '../nodes/Element'; import { Ast, TemplateNode } from '../../interfaces'; import Component from '../Component'; import { CssNode } from './interfaces'; +import hash from "../utils/hash"; function remove_css_prefix(name: string): string { return name.replace(/^-((webkit)|(moz)|(o)|(ms))-/, ''); @@ -37,15 +38,6 @@ function minify_declarations( return c; } -// https://github.com/darkskyapp/string-hash/blob/master/index.js -function hash(str: string): string { - let hash = 5381; - let i = str.length; - - while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i); - return (hash >>> 0).toString(36); -} - class Rule { selectors: Selector[]; declarations: Declaration[]; diff --git a/src/compiler/compile/nodes/Binding.ts b/src/compiler/compile/nodes/Binding.ts index 28e6af5aa1..7d6fad0a81 100644 --- a/src/compiler/compile/nodes/Binding.ts +++ b/src/compiler/compile/nodes/Binding.ts @@ -50,6 +50,13 @@ export default class Binding extends Node { message: 'Cannot bind to a variable declared with the let: directive' }); } else if (this.is_contextual) { + if (scope.is_await(name)) { + component.error(this, { + code: 'invalid-binding', + message: 'Cannot bind to a variable declared with {#await ... then} or {:catch} blocks' + }); + } + scope.dependencies_for_name.get(name).forEach(name => { const variable = component.var_lookup.get(name); if (variable) { diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index a3b8dc7286..e8108858c5 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -151,6 +151,11 @@ export default class Element extends Node { } } + const has_let = info.attributes.some(node => node.type === 'Let'); + if (has_let) { + scope = scope.child(); + } + // Binding relies on Attribute, defer its evaluation const order = ['Binding']; // everything else is -1 info.attributes.sort((a, b) => order.indexOf(a.type) - order.indexOf(b.type)); @@ -181,9 +186,16 @@ export default class Element extends Node { this.handlers.push(new EventHandler(component, this, scope, node)); break; - case 'Let': - this.lets.push(new Let(component, this, scope, node)); + case 'Let': { + const l = new Let(component, this, scope, node); + this.lets.push(l); + const dependencies = new Set([l.name.name]); + + l.names.forEach(name => { + scope.add(name, dependencies, this); + }); break; + } case 'Transition': { @@ -202,20 +214,7 @@ export default class Element extends Node { } }); - if (this.lets.length > 0) { - this.scope = scope.child(); - - this.lets.forEach(l => { - const dependencies = new Set([l.name.name]); - - l.names.forEach(name => { - this.scope.add(name, dependencies, this); - }); - }); - } else { - this.scope = scope; - } - + this.scope = scope; this.children = map_children(component, this, this.scope, info.children); this.validate(); diff --git a/src/compiler/compile/nodes/Head.ts b/src/compiler/compile/nodes/Head.ts index 2c08dcd595..53e76d7a4d 100644 --- a/src/compiler/compile/nodes/Head.ts +++ b/src/compiler/compile/nodes/Head.ts @@ -1,9 +1,11 @@ import Node from './shared/Node'; import map_children from './shared/map_children'; +import hash from '../utils/hash'; export default class Head extends Node { type: 'Head'; children: any[]; // TODO + id: string; constructor(component, parent, scope, info) { super(component, parent, scope, info); @@ -18,5 +20,9 @@ export default class Head extends Node { this.children = map_children(component, parent, scope, info.children.filter(child => { return (child.type !== 'Text' || /\S/.test(child.data)); })); + + if (this.children.length > 0) { + this.id = `svelte-${hash(this.component.source.slice(this.start, this.end))}`; + } } } diff --git a/src/compiler/compile/nodes/shared/TemplateScope.ts b/src/compiler/compile/nodes/shared/TemplateScope.ts index 5f30d0c883..4e087eedf5 100644 --- a/src/compiler/compile/nodes/shared/TemplateScope.ts +++ b/src/compiler/compile/nodes/shared/TemplateScope.ts @@ -42,4 +42,9 @@ export default class TemplateScope { const owner = this.get_owner(name); return owner && (owner.type === 'Element' || owner.type === 'InlineComponent'); } + + is_await(name: string) { + const owner = this.get_owner(name); + return owner && (owner.type === 'ThenBlock' || owner.type === 'CatchBlock'); + } } diff --git a/src/compiler/compile/render_dom/Block.ts b/src/compiler/compile/render_dom/Block.ts index c8fa884721..68d28024fe 100644 --- a/src/compiler/compile/render_dom/Block.ts +++ b/src/compiler/compile/render_dom/Block.ts @@ -450,7 +450,7 @@ export default class Block { this.add_variable(dispose); if (this.event_listeners.length === 1) { - this.chunks.hydrate.push( + this.chunks.mount.push( b`${dispose} = ${this.event_listeners[0]};` ); @@ -458,7 +458,7 @@ export default class Block { b`${dispose}();` ); } else { - this.chunks.hydrate.push(b` + this.chunks.mount.push(b` ${dispose} = [ ${this.event_listeners} ]; diff --git a/src/compiler/compile/render_dom/wrappers/EachBlock.ts b/src/compiler/compile/render_dom/wrappers/EachBlock.ts index 5b13b486e6..4928b5a38c 100644 --- a/src/compiler/compile/render_dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/EachBlock.ts @@ -264,10 +264,23 @@ export default class EachBlockWrapper extends Wrapper { block.chunks.init.push(b` if (!${this.vars.data_length}) { ${each_block_else} = ${this.else.block.name}(#ctx); + } + `); + + block.chunks.create.push(b` + if (${each_block_else}) { ${each_block_else}.c(); } `); + if (this.renderer.options.hydratable) { + block.chunks.claim.push(b` + if (${each_block_else}) { + ${each_block_else}.l(${parent_nodes}); + } + `); + } + block.chunks.mount.push(b` if (${each_block_else}) { ${each_block_else}.m(${initial_mount_node}, ${initial_anchor_node}); diff --git a/src/compiler/compile/render_dom/wrappers/Head.ts b/src/compiler/compile/render_dom/wrappers/Head.ts index 188c26931a..e0b723d6dd 100644 --- a/src/compiler/compile/render_dom/wrappers/Head.ts +++ b/src/compiler/compile/render_dom/wrappers/Head.ts @@ -3,11 +3,12 @@ import Renderer from '../Renderer'; import Block from '../Block'; import Head from '../../nodes/Head'; import FragmentWrapper from './Fragment'; -import { x } from 'code-red'; +import { x, b } from 'code-red'; import { Identifier } from 'estree'; export default class HeadWrapper extends Wrapper { fragment: FragmentWrapper; + node: Head; constructor( renderer: Renderer, @@ -32,6 +33,18 @@ export default class HeadWrapper extends Wrapper { } render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier) { - this.fragment.render(block, x`@_document.head` as unknown as Identifier, x`#nodes` as unknown as Identifier); + let nodes; + if (this.renderer.options.hydratable && this.fragment.nodes.length) { + nodes = block.get_unique_name('head_nodes'); + block.chunks.claim.push(b`const ${nodes} = @query_selector_all('[data-svelte="${this.node.id}"]', @_document.head);`); + } + + this.fragment.render(block, x`@_document.head` as unknown as Identifier, nodes); + + if (nodes && this.renderer.options.hydratable) { + block.chunks.claim.push( + b`${nodes}.forEach(@detach);` + ); + } } } diff --git a/src/compiler/compile/render_ssr/Renderer.ts b/src/compiler/compile/render_ssr/Renderer.ts index 00a7ee2fb5..fb9216327c 100644 --- a/src/compiler/compile/render_ssr/Renderer.ts +++ b/src/compiler/compile/render_ssr/Renderer.ts @@ -41,6 +41,7 @@ const handlers: Record = { export interface RenderOptions extends CompileOptions{ locate: (c: number) => { line: number; column: number }; + head_id?: string; } export default class Renderer { diff --git a/src/compiler/compile/render_ssr/handlers/Element.ts b/src/compiler/compile/render_ssr/handlers/Element.ts index 81b8801686..e0982a0415 100644 --- a/src/compiler/compile/render_ssr/handlers/Element.ts +++ b/src/compiler/compile/render_ssr/handlers/Element.ts @@ -124,6 +124,10 @@ export default function(node: Element, renderer: Renderer, options: RenderOption } }); + if (options.hydratable && options.head_id) { + renderer.add_string(` data-svelte="${options.head_id}"`); + } + renderer.add_string('>'); if (node_contents !== undefined) { diff --git a/src/compiler/compile/render_ssr/handlers/Head.ts b/src/compiler/compile/render_ssr/handlers/Head.ts index d457942922..456e5c279b 100644 --- a/src/compiler/compile/render_ssr/handlers/Head.ts +++ b/src/compiler/compile/render_ssr/handlers/Head.ts @@ -3,8 +3,13 @@ import Head from '../../nodes/Head'; import { x } from 'code-red'; export default function(node: Head, renderer: Renderer, options: RenderOptions) { + const head_options = { + ...options, + head_id: node.id + }; + renderer.push(); - renderer.render(node.children, options); + renderer.render(node.children, head_options); const result = renderer.pop(); renderer.add_expression(x`($$result.head += ${result}, "")`); diff --git a/src/compiler/compile/render_ssr/handlers/Title.ts b/src/compiler/compile/render_ssr/handlers/Title.ts index 62d49d461a..a3f271ab1b 100644 --- a/src/compiler/compile/render_ssr/handlers/Title.ts +++ b/src/compiler/compile/render_ssr/handlers/Title.ts @@ -1,10 +1,20 @@ import Renderer, { RenderOptions } from '../Renderer'; import Title from '../../nodes/Title'; +import { x } from 'code-red'; export default function(node: Title, renderer: Renderer, options: RenderOptions) { - renderer.add_string(``); + renderer.push(); + + renderer.add_string('<title'); + if (options.hydratable && options.head_id) { + renderer.add_string(` data-svelte="${options.head_id}"`); + } + renderer.add_string('>'); renderer.render(node.children, options); renderer.add_string(``); + const result = renderer.pop(); + + renderer.add_expression(x`($$result.title = ${result}, "")`); } diff --git a/src/compiler/compile/utils/hash.ts b/src/compiler/compile/utils/hash.ts new file mode 100644 index 0000000000..7ac892611b --- /dev/null +++ b/src/compiler/compile/utils/hash.ts @@ -0,0 +1,8 @@ +// https://github.com/darkskyapp/string-hash/blob/master/index.js +export default function hash(str: string): string { + let hash = 5381; + let i = str.length; + + while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i); + return (hash >>> 0).toString(36); +} \ No newline at end of file diff --git a/src/compiler/utils/names.ts b/src/compiler/utils/names.ts index 88d4d4a319..02cc12e087 100644 --- a/src/compiler/utils/names.ts +++ b/src/compiler/utils/names.ts @@ -5,6 +5,8 @@ export const globals = new Set([ 'alert', 'Array', 'Boolean', + 'clearInterval', + 'clearTimeout', 'confirm', 'console', 'Date', @@ -16,6 +18,9 @@ export const globals = new Set([ 'Error', 'EvalError', 'Event', + 'fetch', + 'global', + 'globalThis', 'history', 'Infinity', 'InternalError', @@ -41,11 +46,14 @@ export const globals = new Set([ 'RegExp', 'sessionStorage', 'Set', + 'setInterval', + 'setTimeout', 'String', 'SyntaxError', 'TypeError', 'undefined', 'URIError', + 'URL', 'window' ]); diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts index c1d2f80101..10588a0804 100644 --- a/src/runtime/internal/Component.ts +++ b/src/runtime/internal/Component.ts @@ -127,7 +127,8 @@ export function init(component, options, instance, create_fragment, not_equal, p let ready = false; $$.ctx = instance - ? instance(component, prop_values, (i, ret, value = ret) => { + ? instance(component, prop_values, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if ($$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index c641315bc3..f9e89f41b9 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -273,6 +273,10 @@ export function custom_event(type: string, detail?: T) { return e; } +export function query_selector_all(selector: string, parent: HTMLElement = document.body) { + return Array.from(parent.querySelectorAll(selector)); +} + export class HtmlTag { e: HTMLElement; n: ChildNode[]; diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index 274006f243..646a81d817 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -25,9 +25,7 @@ export function spread(args, classes_to_add) { else if (boolean_attributes.has(name.toLowerCase())) { if (value) str += " " + name; } else if (value != null) { - str += " " + name + "=" + JSON.stringify(String(value) - .replace(/"/g, '"') - .replace(/'/g, ''')); + str += ` ${name}="${String(value).replace(/"/g, '"').replace(/'/g, ''')}"`; } }); @@ -103,12 +101,13 @@ export function create_ssr_component(fn) { on_destroy = []; const result: { + title: string; head: string; css: Set<{ map: null; code: string; }>; - } = { head: '', css: new Set() }; + } = { title: '', head: '', css: new Set() }; const html = $$render(result, props, {}, options); @@ -120,7 +119,7 @@ export function create_ssr_component(fn) { code: Array.from(result.css).map(css => css.code).join('\n'), map: null // TODO }, - head: result.head + head: result.title + result.head }; }, diff --git a/test/helpers.js b/test/helpers.js index 2a03e0f436..a764d43f96 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -45,6 +45,12 @@ export function tryToReadFile(file) { } } +export function cleanRequireCache() { + Object.keys(require.cache) + .filter(x => x.endsWith('.svelte')) + .forEach(file => delete require.cache[file]); +} + const virtualConsole = new jsdom.VirtualConsole(); virtualConsole.sendTo(console); @@ -68,6 +74,7 @@ window.scrollTo = function(pageXOffset, pageYOffset) { export function env() { window.document.title = ''; + window.document.head.innerHTML = ''; window.document.body.innerHTML = '
'; return window; diff --git a/test/hydration/index.js b/test/hydration/index.js index a0bfd6de4b..f57a0cdc1a 100644 --- a/test/hydration/index.js +++ b/test/hydration/index.js @@ -67,8 +67,16 @@ describe('hydration', () => { } const target = window.document.body; + const head = window.document.head; + target.innerHTML = fs.readFileSync(`${cwd}/_before.html`, 'utf-8'); + let before_head; + try { + before_head = fs.readFileSync(`${cwd}/_before_head.html`, 'utf-8'); + head.innerHTML = before_head; + } catch (err) {} + const snapshot = config.snapshot ? config.snapshot(target) : {}; const component = new SvelteComponent({ @@ -88,6 +96,19 @@ describe('hydration', () => { } } + if (before_head) { + try { + assert.htmlEqual(head.innerHTML, fs.readFileSync(`${cwd}/_after_head.html`, 'utf-8')); + } catch (error) { + if (shouldUpdateExpected()) { + fs.writeFileSync(`${cwd}/_after_head.html`, head.innerHTML); + console.log(`Updated ${cwd}/_after_head.html.`); + } else { + throw error; + } + } + } + if (config.test) { config.test(assert, target, snapshot, component, window); } else { diff --git a/test/hydration/samples/each-else/_after.html b/test/hydration/samples/each-else/_after.html new file mode 100644 index 0000000000..7920500ec3 --- /dev/null +++ b/test/hydration/samples/each-else/_after.html @@ -0,0 +1,4 @@ +

Hello, world

+

+ weird +

\ No newline at end of file diff --git a/test/hydration/samples/each-else/_before.html b/test/hydration/samples/each-else/_before.html new file mode 100644 index 0000000000..7920500ec3 --- /dev/null +++ b/test/hydration/samples/each-else/_before.html @@ -0,0 +1,4 @@ +

Hello, world

+

+ weird +

\ No newline at end of file diff --git a/test/hydration/samples/each-else/main.svelte b/test/hydration/samples/each-else/main.svelte new file mode 100644 index 0000000000..64d3a37c58 --- /dev/null +++ b/test/hydration/samples/each-else/main.svelte @@ -0,0 +1,15 @@ + + +

Hello, {name}

+{#each array as elem} +

+ item +

+{:else} +

+ weird +

+{/each} diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_after.html b/test/hydration/samples/head-meta-hydrate-duplicate/_after.html new file mode 100644 index 0000000000..3e5b375f0a --- /dev/null +++ b/test/hydration/samples/head-meta-hydrate-duplicate/_after.html @@ -0,0 +1 @@ +
Just a dummy page.
\ No newline at end of file diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html b/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html new file mode 100644 index 0000000000..10cf2c8b9a --- /dev/null +++ b/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html @@ -0,0 +1,4 @@ +Some Title + + + \ No newline at end of file diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_before.html b/test/hydration/samples/head-meta-hydrate-duplicate/_before.html new file mode 100644 index 0000000000..3e5b375f0a --- /dev/null +++ b/test/hydration/samples/head-meta-hydrate-duplicate/_before.html @@ -0,0 +1 @@ +
Just a dummy page.
\ No newline at end of file diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html b/test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html new file mode 100644 index 0000000000..d2f218fb8d --- /dev/null +++ b/test/hydration/samples/head-meta-hydrate-duplicate/_before_head.html @@ -0,0 +1,4 @@ +Some Title + + + \ No newline at end of file diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_config.js b/test/hydration/samples/head-meta-hydrate-duplicate/_config.js new file mode 100644 index 0000000000..482efd564d --- /dev/null +++ b/test/hydration/samples/head-meta-hydrate-duplicate/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, target, snapshot, component, window) { + assert.equal(window.document.querySelectorAll('meta').length, 2); + } +}; diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/main.svelte b/test/hydration/samples/head-meta-hydrate-duplicate/main.svelte new file mode 100644 index 0000000000..1a8b125dd2 --- /dev/null +++ b/test/hydration/samples/head-meta-hydrate-duplicate/main.svelte @@ -0,0 +1,8 @@ + + Some Title + + + + + +
Just a dummy page.
\ No newline at end of file diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index da42603895..968b5965d5 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -20,10 +20,10 @@ function create_fragment(ctx) { c() { button = element("button"); button.textContent = "foo"; - dispose = action_destroyer(foo_action = foo.call(null, button, /*foo_function*/ ctx[1])); }, m(target, anchor) { insert(target, button, anchor); + dispose = action_destroyer(foo_action = foo.call(null, button, /*foo_function*/ ctx[1])); }, p(ctx, [dirty]) { if (foo_action && is_function(foo_action.update) && dirty & /*bar*/ 1) foo_action.update.call(null, /*foo_function*/ ctx[1]); @@ -42,7 +42,7 @@ function handleFoo(bar) { } function foo(node, callback) { - + } function instance($$self, $$props, $$invalidate) { diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index dc3ebb5cf8..22d9cd939c 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -21,10 +21,10 @@ function create_fragment(ctx) { a = element("a"); a.textContent = "Test"; attr(a, "href", "#"); - dispose = action_destroyer(link_action = link.call(null, a)); }, m(target, anchor) { insert(target, a, anchor); + dispose = action_destroyer(link_action = link.call(null, a)); }, p: noop, i: noop, diff --git a/test/js/samples/bind-online/expected.js b/test/js/samples/bind-online/expected.js index 8285646481..e129e66d71 100644 --- a/test/js/samples/bind-online/expected.js +++ b/test/js/samples/bind-online/expected.js @@ -14,13 +14,13 @@ function create_fragment(ctx) { add_render_callback(/*onlinestatuschanged*/ ctx[1]); return { - c() { + c: noop, + m(target, anchor) { dispose = [ listen(window, "online", /*onlinestatuschanged*/ ctx[1]), listen(window, "offline", /*onlinestatuschanged*/ ctx[1]) ]; }, - m: noop, p: noop, i: noop, o: noop, diff --git a/test/js/samples/bind-open/expected.js b/test/js/samples/bind-open/expected.js index d4f148cac9..7d66145f0a 100644 --- a/test/js/samples/bind-open/expected.js +++ b/test/js/samples/bind-open/expected.js @@ -20,12 +20,11 @@ function create_fragment(ctx) { details.innerHTML = `summarycontent `; - - dispose = listen(details, "toggle", /*details_toggle_handler*/ ctx[1]); }, m(target, anchor) { insert(target, details, anchor); details.open = /*open*/ ctx[0]; + dispose = listen(details, "toggle", /*details_toggle_handler*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*open*/ 1) { diff --git a/test/js/samples/bindings-readonly-order/expected.js b/test/js/samples/bindings-readonly-order/expected.js index cf30686662..db0e7cb007 100644 --- a/test/js/samples/bindings-readonly-order/expected.js +++ b/test/js/samples/bindings-readonly-order/expected.js @@ -26,16 +26,16 @@ function create_fragment(ctx) { input1 = element("input"); attr(input0, "type", "file"); attr(input1, "type", "file"); - - dispose = [ - listen(input0, "change", /*input0_change_handler*/ ctx[1]), - listen(input1, "change", /*input1_change_handler*/ ctx[2]) - ]; }, m(target, anchor) { insert(target, input0, anchor); insert(target, t, anchor); insert(target, input1, anchor); + + dispose = [ + listen(input0, "change", /*input0_change_handler*/ ctx[1]), + listen(input1, "change", /*input1_change_handler*/ ctx[2]) + ]; }, p: noop, i: noop, diff --git a/test/js/samples/capture-inject-dev-only/expected.js b/test/js/samples/capture-inject-dev-only/expected.js index 6c639d9207..a314b0cff3 100644 --- a/test/js/samples/capture-inject-dev-only/expected.js +++ b/test/js/samples/capture-inject-dev-only/expected.js @@ -28,7 +28,6 @@ function create_fragment(ctx) { t0 = text(/*foo*/ ctx[0]); t1 = space(); input = element("input"); - dispose = listen(input, "input", /*input_input_handler*/ ctx[1]); }, m(target, anchor) { insert(target, p, anchor); @@ -36,6 +35,7 @@ function create_fragment(ctx) { insert(target, t1, anchor); insert(target, input, anchor); set_input_value(input, /*foo*/ ctx[0]); + dispose = listen(input, "input", /*input_input_handler*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*foo*/ 1) set_data(t0, /*foo*/ ctx[0]); diff --git a/test/js/samples/component-static-var/expected.js b/test/js/samples/component-static-var/expected.js index e01402b6d4..a65d9186a7 100644 --- a/test/js/samples/component-static-var/expected.js +++ b/test/js/samples/component-static-var/expected.js @@ -35,7 +35,6 @@ function create_fragment(ctx) { create_component(bar.$$.fragment); t1 = space(); input = element("input"); - dispose = listen(input, "input", /*input_input_handler*/ ctx[1]); }, m(target, anchor) { mount_component(foo, target, anchor); @@ -45,6 +44,7 @@ function create_fragment(ctx) { insert(target, input, anchor); set_input_value(input, /*z*/ ctx[0]); current = true; + dispose = listen(input, "input", /*input_input_handler*/ ctx[1]); }, p(ctx, [dirty]) { const bar_changes = {}; diff --git a/test/js/samples/component-store-reassign-invalidate/expected.js b/test/js/samples/component-store-reassign-invalidate/expected.js index 02a74cf22e..771b20dec4 100644 --- a/test/js/samples/component-store-reassign-invalidate/expected.js +++ b/test/js/samples/component-store-reassign-invalidate/expected.js @@ -31,13 +31,13 @@ function create_fragment(ctx) { t1 = space(); button = element("button"); button.textContent = "reset"; - dispose = listen(button, "click", /*click_handler*/ ctx[2]); }, m(target, anchor) { insert(target, h1, anchor); append(h1, t0); insert(target, t1, anchor); insert(target, button, anchor); + dispose = listen(button, "click", /*click_handler*/ ctx[2]); }, p(ctx, [dirty]) { if (dirty & /*$foo*/ 2) set_data(t0, /*$foo*/ ctx[1]); diff --git a/test/js/samples/dont-invalidate-this/expected.js b/test/js/samples/dont-invalidate-this/expected.js index 98f638dfcf..f5f6d07812 100644 --- a/test/js/samples/dont-invalidate-this/expected.js +++ b/test/js/samples/dont-invalidate-this/expected.js @@ -17,10 +17,10 @@ function create_fragment(ctx) { return { c() { input = element("input"); - dispose = listen(input, "input", make_uppercase); }, m(target, anchor) { insert(target, input, anchor); + dispose = listen(input, "input", make_uppercase); }, p: noop, i: noop, diff --git a/test/js/samples/event-handler-dynamic/expected.js b/test/js/samples/event-handler-dynamic/expected.js index 42c6b2951a..16b4a3f626 100644 --- a/test/js/samples/event-handler-dynamic/expected.js +++ b/test/js/samples/event-handler-dynamic/expected.js @@ -42,14 +42,6 @@ function create_fragment(ctx) { t5 = space(); button2 = element("button"); button2.textContent = "click"; - - dispose = [ - listen(button0, "click", /*updateHandler1*/ ctx[2]), - listen(button1, "click", /*updateHandler2*/ ctx[3]), - listen(button2, "click", function () { - if (is_function(/*clickHandler*/ ctx[0])) /*clickHandler*/ ctx[0].apply(this, arguments); - }) - ]; }, m(target, anchor) { insert(target, p0, anchor); @@ -61,6 +53,14 @@ function create_fragment(ctx) { append(p1, t4); insert(target, t5, anchor); insert(target, button2, anchor); + + dispose = [ + listen(button0, "click", /*updateHandler1*/ ctx[2]), + listen(button1, "click", /*updateHandler2*/ ctx[3]), + listen(button2, "click", function () { + if (is_function(/*clickHandler*/ ctx[0])) /*clickHandler*/ ctx[0].apply(this, arguments); + }) + ]; }, p(new_ctx, [dirty]) { ctx = new_ctx; diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index 6f04e67808..c519fac668 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -20,10 +20,10 @@ function create_fragment(ctx) { a = element("a"); a.textContent = "this should not navigate to example.com"; attr(a, "href", "https://example.com"); - dispose = listen(a, "touchstart", touchstart_handler); }, m(target, anchor) { insert(target, a, anchor); + dispose = listen(a, "touchstart", touchstart_handler); }, p: noop, i: noop, diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 3f324bb76d..252034a431 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -35,13 +35,6 @@ function create_fragment(ctx) { t3 = space(); button2 = element("button"); button2.textContent = "or me!"; - - dispose = [ - listen(button0, "click", stop_propagation(prevent_default(handleClick))), - listen(button1, "click", handleClick, { once: true, capture: true }), - listen(button2, "click", handleClick, true), - listen(div, "touchstart", handleTouchstart, { passive: true }) - ]; }, m(target, anchor) { insert(target, div, anchor); @@ -50,6 +43,13 @@ function create_fragment(ctx) { append(div, button1); append(div, t3); append(div, button2); + + dispose = [ + listen(button0, "click", stop_propagation(prevent_default(handleClick))), + listen(button1, "click", handleClick, { once: true, capture: true }), + listen(button2, "click", handleClick, true), + listen(div, "touchstart", handleTouchstart, { passive: true }) + ]; }, p: noop, i: noop, diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index c3e46f0c79..2a2254fbd7 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -20,10 +20,10 @@ function create_fragment(ctx) { input = element("input"); attr(input, "type", "file"); input.multiple = true; - dispose = listen(input, "change", /*input_change_handler*/ ctx[1]); }, m(target, anchor) { insert(target, input, anchor); + dispose = listen(input, "change", /*input_change_handler*/ ctx[1]); }, p: noop, i: noop, diff --git a/test/js/samples/input-no-initial-value/expected.js b/test/js/samples/input-no-initial-value/expected.js index 8ff2b2798b..d588f0bf73 100644 --- a/test/js/samples/input-no-initial-value/expected.js +++ b/test/js/samples/input-no-initial-value/expected.js @@ -31,11 +31,6 @@ function create_fragment(ctx) { button.textContent = "Store"; attr(input, "type", "text"); input.required = true; - - dispose = [ - listen(input, "input", /*input_input_handler*/ ctx[2]), - listen(form, "submit", /*handleSubmit*/ ctx[1]) - ]; }, m(target, anchor) { insert(target, form, anchor); @@ -43,6 +38,11 @@ function create_fragment(ctx) { set_input_value(input, /*test*/ ctx[0]); append(form, t0); append(form, button); + + dispose = [ + listen(input, "input", /*input_input_handler*/ ctx[2]), + listen(form, "submit", /*handleSubmit*/ ctx[1]) + ]; }, p(ctx, [dirty]) { if (dirty & /*test*/ 1 && input.value !== /*test*/ ctx[0]) { diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index 5a074d9754..12dfd3e90e 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -22,16 +22,16 @@ function create_fragment(ctx) { c() { input = element("input"); attr(input, "type", "range"); + }, + m(target, anchor) { + insert(target, input, anchor); + set_input_value(input, /*value*/ ctx[0]); dispose = [ listen(input, "change", /*input_change_input_handler*/ ctx[1]), listen(input, "input", /*input_change_input_handler*/ ctx[1]) ]; }, - m(target, anchor) { - insert(target, input, anchor); - set_input_value(input, /*value*/ ctx[0]); - }, p(ctx, [dirty]) { if (dirty & /*value*/ 1) { set_input_value(input, /*value*/ ctx[0]); diff --git a/test/js/samples/input-value/expected.js b/test/js/samples/input-value/expected.js index 81753441e4..21c7bfc83b 100644 --- a/test/js/samples/input-value/expected.js +++ b/test/js/samples/input-value/expected.js @@ -30,7 +30,6 @@ function create_fragment(ctx) { t1 = text(/*name*/ ctx[0]); t2 = text("!"); input.value = /*name*/ ctx[0]; - dispose = listen(input, "input", /*onInput*/ ctx[1]); }, m(target, anchor) { insert(target, input, anchor); @@ -38,6 +37,7 @@ function create_fragment(ctx) { insert(target, h1, anchor); append(h1, t1); append(h1, t2); + dispose = listen(input, "input", /*onInput*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*name*/ 1 && input.value !== /*name*/ ctx[0]) { diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 344976ade6..fefe867e14 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -19,11 +19,11 @@ function create_fragment(ctx) { c() { input = element("input"); attr(input, "type", "checkbox"); - dispose = listen(input, "change", /*input_change_handler*/ ctx[1]); }, m(target, anchor) { insert(target, input, anchor); input.checked = /*foo*/ ctx[0]; + dispose = listen(input, "change", /*input_change_handler*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*foo*/ 1) { diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index 4127a6d7d6..7634481a2d 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -30,7 +30,6 @@ function create_fragment(ctx) { p = element("p"); t2 = text("x: "); t3 = text(/*x*/ ctx[0]); - dispose = listen(button, "click", /*foo*/ ctx[1]); }, m(target, anchor) { insert(target, button, anchor); @@ -38,6 +37,7 @@ function create_fragment(ctx) { insert(target, p, anchor); append(p, t2); append(p, t3); + dispose = listen(button, "click", /*foo*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*x*/ 1) set_data(t3, /*x*/ ctx[0]); diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index 0d4493baf3..c154608cd5 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -31,7 +31,6 @@ function create_fragment(ctx) { p = element("p"); t2 = text("number of things: "); t3 = text(t3_value); - dispose = listen(button, "click", /*foo*/ ctx[1]); }, m(target, anchor) { insert(target, button, anchor); @@ -39,6 +38,7 @@ function create_fragment(ctx) { insert(target, p, anchor); append(p, t2); append(p, t3); + dispose = listen(button, "click", /*foo*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*things*/ 1 && t3_value !== (t3_value = /*things*/ ctx[0].length + "")) set_data(t3, t3_value); diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index 0bd627eb87..77780baa99 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -30,7 +30,6 @@ function create_fragment(ctx) { p = element("p"); t2 = text("x: "); t3 = text(/*x*/ ctx[0]); - dispose = listen(button, "click", /*click_handler*/ ctx[1]); }, m(target, anchor) { insert(target, button, anchor); @@ -38,6 +37,7 @@ function create_fragment(ctx) { insert(target, p, anchor); append(p, t2); append(p, t3); + dispose = listen(button, "click", /*click_handler*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*x*/ 1) set_data(t3, /*x*/ ctx[0]); diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index e049a6d39b..4fe45616c7 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -31,7 +31,6 @@ function create_fragment(ctx) { p = element("p"); t2 = text("number of things: "); t3 = text(t3_value); - dispose = listen(button, "click", /*click_handler*/ ctx[1]); }, m(target, anchor) { insert(target, button, anchor); @@ -39,6 +38,7 @@ function create_fragment(ctx) { insert(target, p, anchor); append(p, t2); append(p, t3); + dispose = listen(button, "click", /*click_handler*/ ctx[1]); }, p(ctx, [dirty]) { if (dirty & /*things*/ 1 && t3_value !== (t3_value = /*things*/ ctx[0].length + "")) set_data(t3, t3_value); diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index b5548a3efe..52fef36792 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -41,6 +41,17 @@ function create_fragment(ctx) { if (/*duration*/ ctx[4] === void 0) add_render_callback(() => /*audio_durationchange_handler*/ ctx[13].call(audio)); if (/*seeking*/ ctx[8] === void 0) add_render_callback(() => /*audio_seeking_seeked_handler*/ ctx[17].call(audio)); if (/*ended*/ ctx[9] === void 0) add_render_callback(() => /*audio_ended_handler*/ ctx[18].call(audio)); + }, + m(target, anchor) { + insert(target, audio, anchor); + + if (!isNaN(/*volume*/ ctx[6])) { + audio.volume = /*volume*/ ctx[6]; + } + + if (!isNaN(/*playbackRate*/ ctx[7])) { + audio.playbackRate = /*playbackRate*/ ctx[7]; + } dispose = [ listen(audio, "progress", /*audio_progress_handler*/ ctx[10]), @@ -56,17 +67,6 @@ function create_fragment(ctx) { listen(audio, "ended", /*audio_ended_handler*/ ctx[18]) ]; }, - m(target, anchor) { - insert(target, audio, anchor); - - if (!isNaN(/*volume*/ ctx[6])) { - audio.volume = /*volume*/ ctx[6]; - } - - if (!isNaN(/*playbackRate*/ ctx[7])) { - audio.playbackRate = /*playbackRate*/ ctx[7]; - } - }, p(ctx, [dirty]) { if (!audio_updating && dirty & /*currentTime*/ 8 && !isNaN(/*currentTime*/ ctx[3])) { audio.currentTime = /*currentTime*/ ctx[3]; diff --git a/test/js/samples/video-bindings/expected.js b/test/js/samples/video-bindings/expected.js index 5b734a70a6..c8cd1d84ce 100644 --- a/test/js/samples/video-bindings/expected.js +++ b/test/js/samples/video-bindings/expected.js @@ -37,16 +37,16 @@ function create_fragment(ctx) { video = element("video"); if (/*videoHeight*/ ctx[1] === void 0 || /*videoWidth*/ ctx[2] === void 0) add_render_callback(() => /*video_resize_handler*/ ctx[5].call(video)); add_render_callback(() => /*video_elementresize_handler*/ ctx[6].call(video)); + }, + m(target, anchor) { + insert(target, video, anchor); + video_resize_listener = add_resize_listener(video, /*video_elementresize_handler*/ ctx[6].bind(video)); dispose = [ listen(video, "timeupdate", video_timeupdate_handler), listen(video, "resize", /*video_resize_handler*/ ctx[5]) ]; }, - m(target, anchor) { - insert(target, video, anchor); - video_resize_listener = add_resize_listener(video, /*video_elementresize_handler*/ ctx[6].bind(video)); - }, p(ctx, [dirty]) { if (!video_updating && dirty & /*currentTime*/ 1 && !isNaN(/*currentTime*/ ctx[0])) { video.currentTime = /*currentTime*/ ctx[0]; diff --git a/test/js/samples/window-binding-online/expected.js b/test/js/samples/window-binding-online/expected.js index 8285646481..e129e66d71 100644 --- a/test/js/samples/window-binding-online/expected.js +++ b/test/js/samples/window-binding-online/expected.js @@ -14,13 +14,13 @@ function create_fragment(ctx) { add_render_callback(/*onlinestatuschanged*/ ctx[1]); return { - c() { + c: noop, + m(target, anchor) { dispose = [ listen(window, "online", /*onlinestatuschanged*/ ctx[1]), listen(window, "offline", /*onlinestatuschanged*/ ctx[1]) ]; }, - m: noop, p: noop, i: noop, o: noop, diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index f79212e25e..70c39eedd2 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -33,6 +33,11 @@ function create_fragment(ctx) { p = element("p"); t0 = text("scrolled to "); t1 = text(/*y*/ ctx[0]); + }, + m(target, anchor) { + insert(target, p, anchor); + append(p, t0); + append(p, t1); dispose = listen(window, "scroll", () => { scrolling = true; @@ -41,11 +46,6 @@ function create_fragment(ctx) { /*onwindowscroll*/ ctx[1](); }); }, - m(target, anchor) { - insert(target, p, anchor); - append(p, t0); - append(p, t1); - }, p(ctx, [dirty]) { if (dirty & /*y*/ 1 && !scrolling) { scrolling = true; diff --git a/test/runtime/index.js b/test/runtime/index.js index df02cabcb4..f070eb8185 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -10,6 +10,7 @@ import { showOutput, loadConfig, loadSvelte, + cleanRequireCache, env, setupHtmlEqual, mkdirp @@ -79,11 +80,7 @@ describe("runtime", () => { compileOptions.immutable = config.immutable; compileOptions.accessors = 'accessors' in config ? config.accessors : true; - Object.keys(require.cache) - .filter(x => x.endsWith('.svelte')) - .forEach(file => { - delete require.cache[file]; - }); + cleanRequireCache(); let mod; let SvelteComponent; diff --git a/test/runtime/samples/action-receives-element-mounted/_config.js b/test/runtime/samples/action-receives-element-mounted/_config.js new file mode 100644 index 0000000000..0806d0fa90 --- /dev/null +++ b/test/runtime/samples/action-receives-element-mounted/_config.js @@ -0,0 +1,8 @@ +const result = {}; + +export default { + props: { result }, + async test({ assert, component, target, window }) { + assert.notEqual(result.parentElement, null); + } +}; diff --git a/test/runtime/samples/action-receives-element-mounted/main.svelte b/test/runtime/samples/action-receives-element-mounted/main.svelte new file mode 100644 index 0000000000..a53ce81de0 --- /dev/null +++ b/test/runtime/samples/action-receives-element-mounted/main.svelte @@ -0,0 +1,8 @@ + + +

Hello!

\ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-g/A.svelte b/test/runtime/samples/component-slot-let-g/A.svelte new file mode 100644 index 0000000000..4f4ac95014 --- /dev/null +++ b/test/runtime/samples/component-slot-let-g/A.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-g/_config.js b/test/runtime/samples/component-slot-let-g/_config.js new file mode 100644 index 0000000000..aaa9895ea8 --- /dev/null +++ b/test/runtime/samples/component-slot-let-g/_config.js @@ -0,0 +1,22 @@ +export default { + html: ` + 1 + 0 + `, + async test({ assert, target, component, window }) { + component.x = 2; + + assert.htmlEqual(target.innerHTML, ` + 2 + 0 + `); + + const span = target.querySelector('span'); + await span.dispatchEvent(new window.MouseEvent('click')); + + assert.htmlEqual(target.innerHTML, ` + 2 + 2 + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-g/main.svelte b/test/runtime/samples/component-slot-let-g/main.svelte new file mode 100644 index 0000000000..e7d4890e6b --- /dev/null +++ b/test/runtime/samples/component-slot-let-g/main.svelte @@ -0,0 +1,17 @@ + + + + y = reflected} + slot="foo" + let:reflected + class={reflected} + > + {reflected} + + +{ y } \ No newline at end of file diff --git a/test/runtime/samples/reactive-values-no-implicit-member-expression/_config.js b/test/runtime/samples/reactive-values-no-implicit-member-expression/_config.js new file mode 100644 index 0000000000..05a8159589 --- /dev/null +++ b/test/runtime/samples/reactive-values-no-implicit-member-expression/_config.js @@ -0,0 +1,5 @@ +export default { + test({ assert, window }) { + assert.equal(window.document.title, 'foo'); + } +}; diff --git a/test/runtime/samples/reactive-values-no-implicit-member-expression/main.svelte b/test/runtime/samples/reactive-values-no-implicit-member-expression/main.svelte new file mode 100644 index 0000000000..a631d4d9f8 --- /dev/null +++ b/test/runtime/samples/reactive-values-no-implicit-member-expression/main.svelte @@ -0,0 +1,3 @@ + diff --git a/test/runtime/samples/reactive-values-store-destructured-undefined/_config.js b/test/runtime/samples/reactive-values-store-destructured-undefined/_config.js new file mode 100644 index 0000000000..5e3f15f5dc --- /dev/null +++ b/test/runtime/samples/reactive-values-store-destructured-undefined/_config.js @@ -0,0 +1,6 @@ +export default { + html: ` +

undefined

+

undefined

+ ` +}; diff --git a/test/runtime/samples/reactive-values-store-destructured-undefined/main.svelte b/test/runtime/samples/reactive-values-store-destructured-undefined/main.svelte new file mode 100644 index 0000000000..152e0e3e2e --- /dev/null +++ b/test/runtime/samples/reactive-values-store-destructured-undefined/main.svelte @@ -0,0 +1,9 @@ + + +

{foo1}

+

{foo2}

diff --git a/test/server-side-rendering/index.js b/test/server-side-rendering/index.js index a56a4ddaed..ee1319845d 100644 --- a/test/server-side-rendering/index.js +++ b/test/server-side-rendering/index.js @@ -9,6 +9,7 @@ import { loadSvelte, setupHtmlEqual, tryToLoadJson, + cleanRequireCache, shouldUpdateExpected, mkdirp } from "../helpers.js"; @@ -27,11 +28,6 @@ let compile = null; describe("ssr", () => { before(() => { - require("../../register")({ - extensions: ['.svelte', '.html'], - sveltePath - }); - compile = loadSvelte(true).compile; return setupHtmlEqual(); @@ -40,9 +36,11 @@ describe("ssr", () => { fs.readdirSync(`${__dirname}/samples`).forEach(dir => { if (dir[0] === ".") return; + const config = loadConfig(`${__dirname}/samples/${dir}/_config.js`); + // add .solo to a sample directory name to only run that test, or // .show to always show the output. or both - const solo = /\.solo/.test(dir); + const solo = config.solo || /\.solo/.test(dir); const show = /\.show/.test(dir); if (solo && process.env.CI) { @@ -51,6 +49,18 @@ describe("ssr", () => { (solo ? it.only : it)(dir, () => { dir = path.resolve(`${__dirname}/samples`, dir); + + cleanRequireCache(); + + const compileOptions = { + sveltePath, + ...config.compileOptions, + generate: 'ssr', + format: 'cjs' + }; + + require("../../register")(compileOptions); + try { const Component = require(`${dir}/main.svelte`).default; @@ -133,18 +143,16 @@ describe("ssr", () => { (config.skip ? it.skip : solo ? it.only : it)(dir, () => { const cwd = path.resolve("test/runtime/samples", dir); - Object.keys(require.cache) - .filter(x => x.endsWith('.svelte')) - .forEach(file => { - delete require.cache[file]; - }); + cleanRequireCache(); delete global.window; - const compileOptions = Object.assign({ sveltePath }, config.compileOptions, { + const compileOptions = { + sveltePath, + ...config.compileOptions, generate: 'ssr', format: 'cjs' - }); + }; require("../../register")(compileOptions); diff --git a/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_config.js b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_config.js new file mode 100644 index 0000000000..ae9b250f86 --- /dev/null +++ b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_config.js @@ -0,0 +1,5 @@ +export default { + compileOptions: { + hydratable: true + } +}; diff --git a/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected-head.html b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected-head.html new file mode 100644 index 0000000000..d2f218fb8d --- /dev/null +++ b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected-head.html @@ -0,0 +1,4 @@ +Some Title + + + \ No newline at end of file diff --git a/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected.html b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected.html new file mode 100644 index 0000000000..a469e618fa --- /dev/null +++ b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/_expected.html @@ -0,0 +1,3 @@ + + +
Just a dummy page.
\ No newline at end of file diff --git a/test/server-side-rendering/samples/head-meta-hydrate-duplicate/main.svelte b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/main.svelte new file mode 100644 index 0000000000..1a8b125dd2 --- /dev/null +++ b/test/server-side-rendering/samples/head-meta-hydrate-duplicate/main.svelte @@ -0,0 +1,8 @@ + + Some Title + + + + + +
Just a dummy page.
\ No newline at end of file diff --git a/test/server-side-rendering/samples/head-multiple-title/A.svelte b/test/server-side-rendering/samples/head-multiple-title/A.svelte new file mode 100644 index 0000000000..b139b4ff77 --- /dev/null +++ b/test/server-side-rendering/samples/head-multiple-title/A.svelte @@ -0,0 +1,3 @@ + + A + diff --git a/test/server-side-rendering/samples/head-multiple-title/B.svelte b/test/server-side-rendering/samples/head-multiple-title/B.svelte new file mode 100644 index 0000000000..4a29ecb04c --- /dev/null +++ b/test/server-side-rendering/samples/head-multiple-title/B.svelte @@ -0,0 +1,3 @@ + + B + diff --git a/test/server-side-rendering/samples/head-multiple-title/_expected-head.html b/test/server-side-rendering/samples/head-multiple-title/_expected-head.html new file mode 100644 index 0000000000..af5c5feba4 --- /dev/null +++ b/test/server-side-rendering/samples/head-multiple-title/_expected-head.html @@ -0,0 +1 @@ +B \ No newline at end of file diff --git a/test/server-side-rendering/samples/head-multiple-title/_expected.html b/test/server-side-rendering/samples/head-multiple-title/_expected.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/server-side-rendering/samples/head-multiple-title/data.json b/test/server-side-rendering/samples/head-multiple-title/data.json new file mode 100644 index 0000000000..eab238e816 --- /dev/null +++ b/test/server-side-rendering/samples/head-multiple-title/data.json @@ -0,0 +1,3 @@ +{ + "adjective": "custom" +} \ No newline at end of file diff --git a/test/server-side-rendering/samples/head-multiple-title/main.svelte b/test/server-side-rendering/samples/head-multiple-title/main.svelte new file mode 100644 index 0000000000..fb9a70b923 --- /dev/null +++ b/test/server-side-rendering/samples/head-multiple-title/main.svelte @@ -0,0 +1,10 @@ + + + + Main + + + diff --git a/test/server-side-rendering/samples/spread-attributes-white-space/_expected.html b/test/server-side-rendering/samples/spread-attributes-white-space/_expected.html new file mode 100644 index 0000000000..a73bb17e8c --- /dev/null +++ b/test/server-side-rendering/samples/spread-attributes-white-space/_expected.html @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/server-side-rendering/samples/spread-attributes-white-space/main.svelte b/test/server-side-rendering/samples/spread-attributes-white-space/main.svelte new file mode 100644 index 0000000000..6919d9ea54 --- /dev/null +++ b/test/server-side-rendering/samples/spread-attributes-white-space/main.svelte @@ -0,0 +1,12 @@ + + + + + diff --git a/test/validator/samples/binding-await-catch/errors.json b/test/validator/samples/binding-await-catch/errors.json new file mode 100644 index 0000000000..00141686f3 --- /dev/null +++ b/test/validator/samples/binding-await-catch/errors.json @@ -0,0 +1,9 @@ +[ + { + "code": "invalid-binding", + "message": "Cannot bind to a variable declared with {#await ... then} or {:catch} blocks", + "pos": 79, + "start": { "line": 6, "column": 9, "character": 79 }, + "end": { "line": 6, "column": 27, "character": 97 } + } +] diff --git a/test/validator/samples/binding-await-catch/input.svelte b/test/validator/samples/binding-await-catch/input.svelte new file mode 100644 index 0000000000..b640f6305b --- /dev/null +++ b/test/validator/samples/binding-await-catch/input.svelte @@ -0,0 +1,7 @@ + +{#await promise} +{:catch error} + +{/await} diff --git a/test/validator/samples/binding-await-then-2/errors.json b/test/validator/samples/binding-await-then-2/errors.json new file mode 100644 index 0000000000..e734ed4717 --- /dev/null +++ b/test/validator/samples/binding-await-then-2/errors.json @@ -0,0 +1,9 @@ +[ + { + "code": "invalid-binding", + "message": "Cannot bind to a variable declared with {#await ... then} or {:catch} blocks", + "pos": 78, + "start": { "line": 6, "column": 9, "character": 78 }, + "end": { "line": 6, "column": 19, "character": 88 } + } +] diff --git a/test/validator/samples/binding-await-then-2/input.svelte b/test/validator/samples/binding-await-then-2/input.svelte new file mode 100644 index 0000000000..e8c56c8e0b --- /dev/null +++ b/test/validator/samples/binding-await-then-2/input.svelte @@ -0,0 +1,7 @@ + +{#await promise} +{:then value} + +{/await} diff --git a/test/validator/samples/binding-await-then/errors.json b/test/validator/samples/binding-await-then/errors.json new file mode 100644 index 0000000000..a611e7731f --- /dev/null +++ b/test/validator/samples/binding-await-then/errors.json @@ -0,0 +1,9 @@ +[ + { + "code": "invalid-binding", + "message": "Cannot bind to a variable declared with {#await ... then} or {:catch} blocks", + "pos": 75, + "start": { "line": 5, "column": 9, "character": 75 }, + "end": { "line": 5, "column": 19, "character": 85 } + } +] diff --git a/test/validator/samples/binding-await-then/input.svelte b/test/validator/samples/binding-await-then/input.svelte new file mode 100644 index 0000000000..bc55ef97e4 --- /dev/null +++ b/test/validator/samples/binding-await-then/input.svelte @@ -0,0 +1,6 @@ + +{#await promise then value} + +{/await} diff --git a/test/validator/samples/unreferenced-variables/warnings.json b/test/validator/samples/unreferenced-variables/warnings.json index 7d9e0111bf..dfac58ebdb 100644 --- a/test/validator/samples/unreferenced-variables/warnings.json +++ b/test/validator/samples/unreferenced-variables/warnings.json @@ -6,7 +6,7 @@ "column": 12, "line": 8 }, - "message": "Component has unused export property 'd'. If it is for external reference only, please consider using `export const 'd'`", + "message": "Component has unused export property 'd'. If it is for external reference only, please consider using `export const d`", "pos": 102, "start": { "character": 102, @@ -21,7 +21,7 @@ "column": 15, "line": 8 }, - "message": "Component has unused export property 'e'. If it is for external reference only, please consider using `export const 'e'`", + "message": "Component has unused export property 'e'. If it is for external reference only, please consider using `export const e`", "pos": 105, "start": { "character": 105, @@ -36,7 +36,7 @@ "column": 18, "line": 9 }, - "message": "Component has unused export property 'g'. If it is for external reference only, please consider using `export const 'g'`", + "message": "Component has unused export property 'g'. If it is for external reference only, please consider using `export const g`", "pos": 125, "start": { "character": 125, @@ -51,7 +51,7 @@ "column": 18, "line": 10 }, - "message": "Component has unused export property 'h'. If it is for external reference only, please consider using `export const 'h'`", + "message": "Component has unused export property 'h'. If it is for external reference only, please consider using `export const h`", "pos": 145, "start": { "character": 145, @@ -66,7 +66,7 @@ "column": 25, "line": 12 }, - "message": "Component has unused export property 'j'. If it is for external reference only, please consider using `export const 'j'`", + "message": "Component has unused export property 'j'. If it is for external reference only, please consider using `export const j`", "pos": 187, "start": { "character": 187,