diff --git a/.github/stale.yml b/.github/stale.yml
deleted file mode 100644
index 3bc3fa6b99..0000000000
--- a/.github/stale.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Configuration for probot-stale - https://github.com/probot/stale
-
-# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
-onlyLabels: []
-
-# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
-exemptLabels:
- - popular
- - pinned
- - security
- - bug
- - "[Status] Maybe Later"
-
-# Set to true to ignore issues in a project (defaults to false)
-exemptProjects: false
-
-# Set to true to ignore issues in a milestone (defaults to false)
-exemptMilestones: false
-
-# Set to true to ignore issues with an assignee (defaults to false)
-exemptAssignees: false
-
-# Label to use when marking as stale
-staleLabel: stale-bot
-
-# Comment to post when removing the stale label.
-# unmarkComment: >
-# Your comment here.
-
-# Limit the number of actions per hour, from 1-30. Default is 30
-limitPerRun: 30
-
-# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
-pulls:
- daysUntilStale: 210
- daysUntilClose: 25
- markComment: >
- This pull request has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
- closeComment: >
- This pull request has been closed as it was previously marked as stale and saw no subsequent activity.
-
-issues:
- daysUntilStale: 180
- daysUntilClose: 14
- markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
- closeComment: >
- This issue has been closed as it was previously marked as stale and saw no subsequent activity.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f6a9fdf42f..bbfde04f67 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,7 +6,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
- node-version: [8, 10, 12, 14]
+ node-version: [8, 10, 12, 14, 16]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
diff --git a/.gitignore b/.gitignore
index 911ff19cab..22389f683c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ node_modules
/compiler.*js
/index.*js
/ssr.*js
+/action
/internal
/store
/easing
@@ -16,21 +17,8 @@ node_modules
/transition
/animate
/scratch/
-/coverage/
-/coverage.lcov
/test/*/samples/_
/yarn-error.log
_actual*.*
_output
/types
-
-/site/cypress/screenshots/
-/site/__sapper__/
-/site/.env
-/site/.sessions
-/site/static/svelte-app.json
-/site/static/contributors.jpg
-/site/static/workers
-/site/scripts/svelte-app
-/site/scripts/community
-/site/src/routes/_contributors.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 278de46650..8c1afb7727 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,81 @@
## Unreleased
+* Add `aria-description` to the list of allowed ARIA attributes ([#7301](https://github.com/sveltejs/svelte/issues/7301))
+* Add TypeScript interfaces for typing actions ([#6538](https://github.com/sveltejs/svelte/issues/6538))
* Add `SvelteComponentConstructor` convenience type ([#6770](https://github.com/sveltejs/svelte/pull/6770))
+## 3.46.4
+
+* Avoid `maximum call stack size exceeded` errors on large components ([#4694](https://github.com/sveltejs/svelte/issues/4694))
+* Preserve leading space with `preserveWhitespace: true` ([#4731](https://github.com/sveltejs/svelte/issues/4731))
+* Preserve leading space in `
` tags ([#6437](https://github.com/sveltejs/svelte/issues/6437))
+* Improve error message when trying to use `style:` directives on inline components ([#7177](https://github.com/sveltejs/svelte/issues/7177))
+* Add `FormData` as a known global ([#7199](https://github.com/sveltejs/svelte/pull/7199))
+* Mark `css`/`instance`/`module` AST properties as optional in types ([#7204](https://github.com/sveltejs/svelte/pull/7204))
+
+## 3.46.3
+
+* Ignore whitespace in `{#each}` blocks when containing elements with `animate:` ([#5477](https://github.com/sveltejs/svelte/pull/5477))
+* Throw compiler error when variable in `context="instance"` collides with import in `context="module"` ([#7090](https://github.com/sveltejs/svelte/issues/7090))
+* Fix compiler crash when `{@const}` contains arrow functions ([#7134](https://github.com/sveltejs/svelte/issues/7134))
+
+## 3.46.2
+
+* Export `FlipParams` interface from `svelte/animate` ([#7103](https://github.com/sveltejs/svelte/issues/7103))
+* Fix `style:` directive reactivity inside `{#each}` block ([#7136](https://github.com/sveltejs/svelte/issues/7136))
+
+## 3.46.1
+
+* Handle `style:kebab-case` directives ([#7122](https://github.com/sveltejs/svelte/issues/7122))
+* Improve AST produced for `style:` directives ([#7127](https://github.com/sveltejs/svelte/pull/7127))
+
+## 3.46.0
+
+* Implement `{@const}` tag ([RFC #33](https://github.com/sveltejs/rfcs/pull/33), [#6413](https://github.com/sveltejs/svelte/pull/6413))
+* Implement `style:` directive ([RFC #42](https://github.com/sveltejs/rfcs/pull/42), [#5923](https://github.com/sveltejs/svelte/pull/5923))
+* Fix style manager conflicts when using multiple Svelte instances ([#7026](https://github.com/sveltejs/svelte/issues/7026))
+* Fix hydration when using `{@html}` ([#7115](https://github.com/sveltejs/svelte/issues/7115))
+
+## 3.45.0
+
+* Fix non-boolean attribute rendering in SSR to render truthy values as-is ([#6121](https://github.com/sveltejs/svelte/issues/6121))
+* Fix binding to a member expression also invalidating the member property ([#6921](https://github.com/sveltejs/svelte/issues/6921))
+* Fix default values in `{#each}`/etc. destructurings not being considered references for the purposes of compiler warnings ([#6964](https://github.com/sveltejs/svelte/issues/6964))
+* Fix `{:else if}` value incorrectly being cached ([#7043](https://github.com/sveltejs/svelte/pull/7043))
+* Add `a11y-no-redundant-roles` warning ([#7067](https://github.com/sveltejs/svelte/pull/7067))
+* Fix code generation error with arrow functions whose bodies are object destructuring assignments ([#7087](https://github.com/sveltejs/svelte/issues/7087))
+
+## 3.44.3
+
+* Fix `bind:this` binding inside `onMount` for manually instantiated component ([#6760](https://github.com/sveltejs/svelte/issues/6760))
+* Prevent cursor jumps with one-way binding for other `type="text"`-like ` `s ([#6941](https://github.com/sveltejs/svelte/pull/6941))
+* Exclude `async` loops from `loopGuardTimeout` ([#6945](https://github.com/sveltejs/svelte/issues/6945))
+
+## 3.44.2
+
+* Fix overly restrictive preprocessor types ([#6904](https://github.com/sveltejs/svelte/pull/6904))
+* More specific typing for crossfade function - returns a tuple, not an array ([#6926](https://github.com/sveltejs/svelte/issues/6926))
+* Add `URLSearchParams` as a known global ([#6938](https://github.com/sveltejs/svelte/pull/6938))
+* Add `types` field to `exports` map ([#6939](https://github.com/sveltejs/svelte/issues/6939))
+
+## 3.44.1
+
+* Fix code generation when a multi-line `return` statement contains comments ([code-red#36](https://github.com/Rich-Harris/code-red/issues/36))
+* Fix code generation when `for`/`if`/`while` statements have empty bodies ([#6884](https://github.com/sveltejs/svelte/issues/6884))
+
+## 3.44.0
+
+* Add `enableSourcemap` compiler option ([#6835](https://github.com/sveltejs/svelte/pull/6835))
+
+## 3.43.2
+
+* Fix regression where user-specified `import`s were not rewritten according to the `sveltePath` option ([#6834](https://github.com/sveltejs/svelte/issues/6834))
+
+## 3.43.1
+
+* Prevent a rejecting promise used in `{#await}` during SSR from appearing as an unhandled rejection ([#6789](https://github.com/sveltejs/svelte/issues/6789))
+
## 3.43.0
* Use export map to expose no-op versions of lifecycle functions for SSR ([#6743](https://github.com/sveltejs/svelte/pull/6743))
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..65d86fe76a
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
+This repository is governed by the Svelte Code of Conduct.
+
+https://github.com/sveltejs/community/blob/main/CODE_OF_CONDUCT.md
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 17141d71bd..48aa238f89 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -15,7 +15,7 @@ There are many ways to contribute to Svelte, and many of them do not involve wri
- Look through the [open issues](https://github.com/sveltejs/svelte/issues). A good starting point would be issues tagged [good first issue](https://github.com/sveltejs/svelte/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#triaging-issues-and-pull-requests).
- If you find an issue you would like to fix, [open a pull request](#your-first-pull-request).
- Read through our [tutorials](https://svelte.dev/tutorial/basics). If you find anything that is confusing or can be improved, you can make edits by clicking "Edit this chapter" at the bottom left of the tutorial page.
-- Take a look at the [features requested](https://github.com/sveltejs/svelte/labels/enhancement) by others in the community and consider opening a pull request if you see something you want to work on.
+- Take a look at the [features requested](https://github.com/sveltejs/svelte/labels/feature%20request) by others in the community and consider opening a pull request if you see something you want to work on.
Contributions are very welcome. If you think you need help planning your contribution, please ping us on Discord at [svelte.dev/chat](https://svelte.dev/chat) and let us know you are looking for a bit of help.
diff --git a/LICENSE.md b/LICENSE.md
index cbf510847f..cd8f94f4ca 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright (c) 2016-21 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
+Copyright (c) 2016-22 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/README.md b/README.md
index 8d263abeb9..fa66ac6cc9 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ npm run test -- -g transition
## svelte.dev
-The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [Sapper](https://sapper.svelte.dev).
+The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [SvelteKit](https://kit.svelte.dev).
### Is svelte.dev down?
diff --git a/package-lock.json b/package-lock.json
index 12dd6587eb..effd933cb3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,11 @@
{
"name": "svelte",
- "version": "3.43.0",
+ "version": "3.46.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "name": "svelte",
- "version": "3.43.0",
+ "version": "3.46.4",
"license": "MIT",
"devDependencies": {
"@ampproject/remapping": "^0.3.0",
@@ -17,16 +16,14 @@
"@rollup/plugin-sucrase": "^3.1.0",
"@rollup/plugin-typescript": "^2.0.1",
"@rollup/plugin-virtual": "^2.0.0",
- "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.7.0",
+ "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.8.0",
"@types/mocha": "^7.0.0",
"@types/node": "^8.10.53",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"acorn": "^8.4.1",
"agadoo": "^1.1.0",
- "c8": "^5.0.1",
- "code-red": "^0.2.2",
- "codecov": "^3.5.0",
+ "code-red": "^0.2.5",
"css-tree": "^1.1.2",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.24.2",
@@ -39,7 +36,7 @@
"magic-string": "^0.25.3",
"mocha": "^7.0.0",
"periscopic": "^3.0.4",
- "puppeteer": "^2.1.1",
+ "puppeteer": "^2.0.0",
"rollup": "^1.27.14",
"source-map": "^0.7.3",
"source-map-support": "^0.5.13",
@@ -97,12 +94,6 @@
"node": ">=6.9.0"
}
},
- "node_modules/@bcoe/v8-coverage": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.1.tgz",
- "integrity": "sha512-KioOCsSvSvXx6xUNLiJz+P+VMb7NRcePjoefOr74Y5P6lEKsiOn35eZyZzgpK4XCNJdXTDR7+zykj0lwxRvZ2g==",
- "dev": true
- },
"node_modules/@eslint/eslintrc": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
@@ -123,45 +114,6 @@
"node": "^10.12.0 || >=12.0.0"
}
},
- "node_modules/@eslint/eslintrc/node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/debug": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true
- },
"node_modules/@humanwhocodes/config-array": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz",
@@ -176,23 +128,6 @@
"node": ">=10.10.0"
}
},
- "node_modules/@humanwhocodes/config-array/node_modules/debug": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
"node_modules/@humanwhocodes/object-schema": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz",
@@ -363,33 +298,12 @@
"resolved": "git+ssh://git@github.com/sveltejs/eslint-config.git#31fd4faeea88990069502460b023698b1c9c2d13",
"dev": true
},
- "node_modules/@tootallnate/once": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.0.0.tgz",
- "integrity": "sha512-KYyTT/T6ALPkIRd2Ge080X/BsXvy9O0hcWTtMWkPvwAwF99+vn6Dv4GzrFT/Nn1LePr+FFDbRXXlqmsy9lw2zA==",
- "dev": true,
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/@types/estree": {
"version": "0.0.50",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz",
"integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
"dev": true
},
- "node_modules/@types/is-windows": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/@types/is-windows/-/is-windows-0.2.0.tgz",
- "integrity": "sha1-byTuSHMdMRaOpRBhDW3RXl/Jxv8=",
- "dev": true
- },
- "node_modules/@types/istanbul-lib-coverage": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
- "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==",
- "dev": true
- },
"node_modules/@types/json-schema": {
"version": "7.0.9",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
@@ -403,9 +317,9 @@
"dev": true
},
"node_modules/@types/mime-types": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.0.tgz",
- "integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM=",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.1.tgz",
+ "integrity": "sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw==",
"dev": true
},
"node_modules/@types/mocha": {
@@ -460,18 +374,6 @@
}
}
},
- "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- }
- },
"node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -556,18 +458,6 @@
}
}
},
- "node_modules/@typescript-eslint/parser/node_modules/debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- }
- },
"node_modules/@typescript-eslint/scope-manager": {
"version": "4.31.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.31.2.tgz",
@@ -625,23 +515,6 @@
}
}
},
- "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
"node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -773,21 +646,25 @@
}
},
"node_modules/ajv": {
- "version": "6.10.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
- "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"dependencies": {
- "fast-deep-equal": "^2.0.1",
+ "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/ansi-colors": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
- "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
"dev": true,
"engines": {
"node": ">=6"
@@ -821,9 +698,9 @@
"dev": true
},
"node_modules/anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
"dev": true,
"dependencies": {
"normalize-path": "^3.0.0",
@@ -842,15 +719,6 @@
"sprintf-js": "~1.0.2"
}
},
- "node_modules/argv": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz",
- "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=",
- "dev": true,
- "engines": {
- "node": ">=0.6.10"
- }
- },
"node_modules/array-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
@@ -927,9 +795,9 @@
}
},
"node_modules/async-limiter": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
- "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
"node_modules/asynckit": {
@@ -969,9 +837,9 @@
}
},
"node_modules/binary-extensions": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
- "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true,
"engines": {
"node": ">=8"
@@ -1035,32 +903,6 @@
"node": ">=6"
}
},
- "node_modules/c8": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/c8/-/c8-5.0.1.tgz",
- "integrity": "sha512-63V/XrzqX2wgByuJyafJYuaudvxxmGrm/acqRJpvbtKvRUj6h/85EFrVweQ14j1F7wRASp0W9zyZqj8fnWI+4Q==",
- "dev": true,
- "dependencies": {
- "@bcoe/v8-coverage": "^0.2.1",
- "find-up": "^3.0.0",
- "foreground-child": "^1.5.6",
- "furi": "^1.3.0",
- "istanbul-lib-coverage": "^2.0.1",
- "istanbul-lib-report": "^2.0.1",
- "istanbul-reports": "^2.2.4",
- "rimraf": "^2.6.2",
- "test-exclude": "^5.0.0",
- "v8-to-istanbul": "^3.1.3",
- "yargs": "^13.1.0",
- "yargs-parser": "^10.1.0"
- },
- "bin": {
- "c8": "bin/c8.js"
- },
- "engines": {
- "node": ">=10.12.0"
- }
- },
"node_modules/call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
@@ -1157,9 +999,9 @@
}
},
"node_modules/code-red": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.2.tgz",
- "integrity": "sha512-CvM8mK6RkLCwMNt+/TBLmqC6eKcbky9AOR+jC+0ClSh4Mk2Ix7+sPqUEIAbJzT822oCu3D469prC7155657n2A==",
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.5.tgz",
+ "integrity": "sha512-x+uQyJLNS1v0+74eXqM7FMPoM1fU/fN3tdexGWtCuVjCfxADt1TuuEGIGlFyCC2vhgINDctDb/rgSn8/ZDfJsQ==",
"dev": true,
"dependencies": {
"@types/estree": "^0.0.50",
@@ -1170,25 +1012,6 @@
"sourcemap-codec": "^1.4.8"
}
},
- "node_modules/codecov": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.6.5.tgz",
- "integrity": "sha512-v48WuDMUug6JXwmmfsMzhCHRnhUf8O3duqXvltaYJKrO1OekZWpB/eH6iIoaxMl8Qli0+u3OxptdsBOYiD7VAQ==",
- "dev": true,
- "dependencies": {
- "argv": "0.0.2",
- "ignore-walk": "3.0.3",
- "js-yaml": "3.13.1",
- "teeny-request": "6.0.1",
- "urlgrey": "0.4.4"
- },
- "bin": {
- "codecov": "bin/codecov"
- },
- "engines": {
- "node": ">=4.0"
- }
- },
"node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -1246,31 +1069,12 @@
"typedarray": "^0.0.6"
}
},
- "node_modules/convert-source-map": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz",
- "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "~5.1.1"
- }
- },
"node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
- "node_modules/cross-spawn": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
- "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
- "dev": true,
- "dependencies": {
- "lru-cache": "^4.0.1",
- "which": "^1.2.9"
- }
- },
"node_modules/css-tree": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz",
@@ -1341,12 +1145,20 @@
}
},
"node_modules/debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
+ "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dev": true,
"dependencies": {
- "ms": "^2.1.1"
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
}
},
"node_modules/decamelize": {
@@ -1452,15 +1264,6 @@
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
- "node_modules/end-of-stream": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
- "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
- "dev": true,
- "dependencies": {
- "once": "^1.4.0"
- }
- },
"node_modules/enquirer": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
@@ -1473,15 +1276,6 @@
"node": ">=8.6"
}
},
- "node_modules/enquirer/node_modules/ansi-colors": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@@ -1953,18 +1747,6 @@
"node": ">= 8"
}
},
- "node_modules/eslint/node_modules/debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- }
- },
"node_modules/eslint/node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@@ -1998,12 +1780,6 @@
"node": ">=4"
}
},
- "node_modules/eslint/node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true
- },
"node_modules/eslint/node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -2280,40 +2056,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "dependencies": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/execa/node_modules/cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "dependencies": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- },
- "engines": {
- "node": ">=4.8"
- }
- },
"node_modules/extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
@@ -2360,9 +2102,9 @@
]
},
"node_modules/fast-deep-equal": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
- "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
"node_modules/fast-glob": {
@@ -2448,9 +2190,9 @@
}
},
"node_modules/flat": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
- "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz",
+ "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==",
"dev": true,
"dependencies": {
"is-buffer": "~2.0.3"
@@ -2493,16 +2235,6 @@
"integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==",
"dev": true
},
- "node_modules/foreground-child": {
- "version": "1.5.6",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz",
- "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=",
- "dev": true,
- "dependencies": {
- "cross-spawn": "^4",
- "signal-exit": "^3.0.0"
- }
- },
"node_modules/forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -2536,7 +2268,9 @@
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
+ "deprecated": "\"Please update to latest v2.3 or v2.2\"",
"dev": true,
+ "hasInstallScript": true,
"optional": true,
"os": [
"darwin"
@@ -2557,16 +2291,6 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
- "node_modules/furi": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/furi/-/furi-1.3.0.tgz",
- "integrity": "sha512-TYoXEeRLKHXNWcCBP0VH1psPktQ9G8Y0GfZwMXCvwVbhbfNx7JItKWhB5mMBYufNjqxEHq+Ivd1nLtr5vQyVoQ==",
- "dev": true,
- "dependencies": {
- "@types/is-windows": "^0.2.0",
- "is-windows": "^1.0.2"
- }
- },
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
@@ -2590,18 +2314,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "dependencies": {
- "pump": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/get-symbol-description": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
@@ -2628,9 +2340,9 @@
}
},
"node_modules/glob": {
- "version": "7.1.4",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
- "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
@@ -2642,6 +2354,9 @@
},
"engines": {
"node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/glob-parent": {
@@ -2830,60 +2545,19 @@
"whatwg-encoding": "^1.0.1"
}
},
- "node_modules/html-escaper": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
- "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
- "dev": true
- },
- "node_modules/http-proxy-agent": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
- "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
+ "node_modules/http-signature": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true,
"dependencies": {
- "@tootallnate/once": "1",
- "agent-base": "6",
- "debug": "4"
+ "assert-plus": "^1.0.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
},
"engines": {
- "node": ">= 6"
- }
- },
- "node_modules/http-proxy-agent/node_modules/agent-base": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz",
- "integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==",
- "dev": true,
- "dependencies": {
- "debug": "4"
- },
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/http-proxy-agent/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "dev": true,
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/http-signature": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
- "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
- "dev": true,
- "dependencies": {
- "assert-plus": "^1.0.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
- },
- "engines": {
- "node": ">=0.8",
- "npm": ">=1.3.7"
+ "node": ">=0.8",
+ "npm": ">=1.3.7"
}
},
"node_modules/https-proxy-agent": {
@@ -2899,15 +2573,6 @@
"node": ">= 6.0.0"
}
},
- "node_modules/https-proxy-agent/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "dev": true,
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -2929,15 +2594,6 @@
"node": ">= 4"
}
},
- "node_modules/ignore-walk": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
- "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
- "dev": true,
- "dependencies": {
- "minimatch": "^3.0.4"
- }
- },
"node_modules/import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@@ -2993,15 +2649,6 @@
"node": ">= 0.4"
}
},
- "node_modules/invert-kv": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
- "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/ip-regex": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
@@ -3058,10 +2705,24 @@
}
},
"node_modules/is-buffer": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
+ "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
"engines": {
"node": ">=4"
}
@@ -3193,15 +2854,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-stream": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/is-string": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
@@ -3238,15 +2890,6 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
- "node_modules/is-windows": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
- "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -3265,41 +2908,6 @@
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true
},
- "node_modules/istanbul-lib-coverage": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz",
- "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/istanbul-lib-report": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz",
- "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==",
- "dev": true,
- "dependencies": {
- "istanbul-lib-coverage": "^2.0.5",
- "make-dir": "^2.1.0",
- "supports-color": "^6.1.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/istanbul-reports": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz",
- "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==",
- "dev": true,
- "dependencies": {
- "html-escaper": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -3440,18 +3048,6 @@
"node": ">=6"
}
},
- "node_modules/lcid": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
- "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
- "dev": true,
- "dependencies": {
- "invert-kv": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
@@ -3556,16 +3152,6 @@
"node": ">=8"
}
},
- "node_modules/lru-cache": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
- "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
- "dev": true,
- "dependencies": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
"node_modules/magic-string": {
"version": "0.25.3",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz",
@@ -3575,60 +3161,12 @@
"sourcemap-codec": "^1.4.4"
}
},
- "node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dev": true,
- "dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/make-dir/node_modules/semver": {
- "version": "5.7.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
- "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
- "dev": true,
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/map-age-cleaner": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
- "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
- "dev": true,
- "dependencies": {
- "p-defer": "^1.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/mdn-data": {
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
"dev": true
},
- "node_modules/mem": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
- "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
- "dev": true,
- "dependencies": {
- "map-age-cleaner": "^0.1.1",
- "mimic-fn": "^2.0.0",
- "p-is-promise": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -3652,9 +3190,9 @@
}
},
"node_modules/mime": {
- "version": "2.4.6",
- "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
- "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
+ "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==",
"dev": true,
"bin": {
"mime": "cli.js"
@@ -3664,35 +3202,26 @@
}
},
"node_modules/mime-db": {
- "version": "1.40.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
- "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
+ "version": "1.50.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz",
+ "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==",
"dev": true,
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
- "version": "2.1.24",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
- "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
+ "version": "2.1.33",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz",
+ "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==",
"dev": true,
"dependencies": {
- "mime-db": "1.40.0"
+ "mime-db": "1.50.0"
},
"engines": {
"node": ">= 0.6"
}
},
- "node_modules/mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -3760,6 +3289,29 @@
},
"engines": {
"node": ">= 8.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mochajs"
+ }
+ },
+ "node_modules/mocha/node_modules/ansi-colors": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
+ "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/mocha/node_modules/debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
}
},
"node_modules/mocha/node_modules/glob": {
@@ -3806,24 +3358,6 @@
"node": ">=6"
}
},
- "node_modules/mocha/node_modules/yargs": {
- "version": "13.3.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
- "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
- "dev": true,
- "dependencies": {
- "cliui": "^5.0.0",
- "find-up": "^3.0.0",
- "get-caller-file": "^2.0.1",
- "require-directory": "^2.1.1",
- "require-main-filename": "^2.0.0",
- "set-blocking": "^2.0.0",
- "string-width": "^3.0.0",
- "which-module": "^2.0.0",
- "y18n": "^4.0.0",
- "yargs-parser": "^13.1.2"
- }
- },
"node_modules/mocha/node_modules/yargs-parser": {
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
@@ -3857,12 +3391,6 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
- "node_modules/nice-try": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
- "dev": true
- },
"node_modules/node-environment-flags": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
@@ -3873,24 +3401,6 @@
"semver": "^5.7.0"
}
},
- "node_modules/node-environment-flags/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true,
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/node-fetch": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
- "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
- "dev": true,
- "engines": {
- "node": "4.x || >=6.0.0"
- }
- },
"node_modules/node-modules-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz",
@@ -3921,18 +3431,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/npm-run-path": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
- "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
- "dev": true,
- "dependencies": {
- "path-key": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/nwsapi": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
@@ -3991,16 +3489,20 @@
}
},
"node_modules/object.getownpropertydescriptors": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
- "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz",
+ "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==",
"dev": true,
"dependencies": {
+ "call-bind": "^1.0.2",
"define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
+ "es-abstract": "^1.18.0-next.2"
},
"engines": {
"node": ">= 0.8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/object.values": {
@@ -4046,47 +3548,6 @@
"node": ">= 0.8.0"
}
},
- "node_modules/os-locale": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
- "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
- "dev": true,
- "dependencies": {
- "execa": "^1.0.0",
- "lcid": "^2.0.0",
- "mem": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/p-defer": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
- "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/p-finally": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/p-is-promise": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
- "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/p-limit": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
@@ -4169,19 +3630,10 @@
"node": ">=0.10.0"
}
},
- "node_modules/path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/path-parse": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"node_modules/path-type": {
@@ -4239,15 +3691,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/pirates": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz",
@@ -4436,28 +3879,12 @@
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"dev": true
},
- "node_modules/pseudomap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
- "dev": true
- },
"node_modules/psl": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz",
"integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==",
"dev": true
},
- "node_modules/pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dev": true,
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
@@ -4489,36 +3916,6 @@
"node": ">=8.16.0"
}
},
- "node_modules/puppeteer/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "dev": true,
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/puppeteer/node_modules/mime-db": {
- "version": "1.44.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
- "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/puppeteer/node_modules/mime-types": {
- "version": "2.1.27",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
- "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
- "dev": true,
- "dependencies": {
- "mime-db": "1.44.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/puppeteer/node_modules/ws": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
@@ -4571,19 +3968,6 @@
"node": ">=4"
}
},
- "node_modules/read-pkg-up": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz",
- "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==",
- "dev": true,
- "dependencies": {
- "find-up": "^3.0.0",
- "read-pkg": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
@@ -4872,9 +4256,9 @@
}
},
"node_modules/semver": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
- "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true,
"bin": {
"semver": "bin/semver"
@@ -4886,27 +4270,6 @@
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
},
- "node_modules/shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
- "dev": true,
- "dependencies": {
- "shebang-regex": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
@@ -4921,12 +4284,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
- },
"node_modules/slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -5092,17 +4449,8 @@
"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stream-events": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz",
- "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==",
- "dev": true,
- "dependencies": {
- "stubs": "^3.0.0"
+ "engines": {
+ "node": ">=0.10.0"
}
},
"node_modules/string_decoder": {
@@ -5162,15 +4510,6 @@
"node": ">=4"
}
},
- "node_modules/strip-eof": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/strip-json-comments": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
@@ -5183,12 +4522,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/stubs": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz",
- "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=",
- "dev": true
- },
"node_modules/sucrase": {
"version": "3.16.0",
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.16.0.tgz",
@@ -5227,18 +4560,6 @@
"node": "*"
}
},
- "node_modules/supports-color": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
- "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
- "dev": true,
- "dependencies": {
- "has-flag": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/svelte": {
"version": "3.43.0",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.43.0.tgz",
@@ -5273,9 +4594,9 @@
}
},
"node_modules/table/node_modules/ajv": {
- "version": "8.6.3",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz",
- "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==",
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
+ "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
"dev": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
@@ -5303,12 +4624,6 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
- "node_modules/table/node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true
- },
"node_modules/table/node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -5350,34 +4665,6 @@
"node": ">=8"
}
},
- "node_modules/teeny-request": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-6.0.1.tgz",
- "integrity": "sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g==",
- "dev": true,
- "dependencies": {
- "http-proxy-agent": "^4.0.0",
- "https-proxy-agent": "^4.0.0",
- "node-fetch": "^2.2.0",
- "stream-events": "^1.0.5",
- "uuid": "^3.3.2"
- }
- },
- "node_modules/test-exclude": {
- "version": "5.2.3",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz",
- "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==",
- "dev": true,
- "dependencies": {
- "glob": "^7.1.3",
- "minimatch": "^3.0.4",
- "read-pkg-up": "^4.0.0",
- "require-main-filename": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -5580,12 +4867,6 @@
"punycode": "^2.1.0"
}
},
- "node_modules/urlgrey": {
- "version": "0.4.4",
- "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz",
- "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=",
- "dev": true
- },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -5607,20 +4888,6 @@
"integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==",
"dev": true
},
- "node_modules/v8-to-istanbul": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-3.2.3.tgz",
- "integrity": "sha512-B8d/oxMtc/x0TYXr9b+Ywu5KexA/on4QMQ9M1kTYnoGZzKdo8LLk9ySlWePdDOtr2G0/2Injgcp3sOR9gU+3vQ==",
- "dev": true,
- "dependencies": {
- "@types/istanbul-lib-coverage": "^2.0.1",
- "convert-source-map": "^1.6.0",
- "source-map": "^0.7.3"
- },
- "engines": {
- "node": ">=10.10.0"
- }
- },
"node_modules/validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
@@ -5836,47 +5103,22 @@
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
"dev": true
},
- "node_modules/yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
- "dev": true
- },
"node_modules/yargs": {
- "version": "13.2.4",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz",
- "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==",
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+ "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
"dependencies": {
"cliui": "^5.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
- "os-locale": "^3.1.0",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
- "yargs-parser": "^13.1.0"
- }
- },
- "node_modules/yargs-parser": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
- "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
- "dev": true,
- "dependencies": {
- "camelcase": "^4.1.0"
- }
- },
- "node_modules/yargs-parser/node_modules/camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
- "dev": true,
- "engines": {
- "node": ">=4"
+ "yargs-parser": "^13.1.2"
}
},
"node_modules/yargs-unparser": {
@@ -5893,25 +5135,7 @@
"node": ">=6"
}
},
- "node_modules/yargs-unparser/node_modules/yargs": {
- "version": "13.3.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
- "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
- "dev": true,
- "dependencies": {
- "cliui": "^5.0.0",
- "find-up": "^3.0.0",
- "get-caller-file": "^2.0.1",
- "require-directory": "^2.1.1",
- "require-main-filename": "^2.0.0",
- "set-blocking": "^2.0.0",
- "string-width": "^3.0.0",
- "which-module": "^2.0.0",
- "y18n": "^4.0.0",
- "yargs-parser": "^13.1.2"
- }
- },
- "node_modules/yargs-unparser/node_modules/yargs-parser": {
+ "node_modules/yargs/node_modules/yargs-parser": {
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
@@ -5921,16 +5145,6 @@
"decamelize": "^1.2.0"
}
},
- "node_modules/yargs/node_modules/yargs-parser": {
- "version": "13.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
- "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
- "dev": true,
- "dependencies": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
- }
- },
"node_modules/yauzl": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
@@ -5979,12 +5193,6 @@
"js-tokens": "^4.0.0"
}
},
- "@bcoe/v8-coverage": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.1.tgz",
- "integrity": "sha512-KioOCsSvSvXx6xUNLiJz+P+VMb7NRcePjoefOr74Y5P6lEKsiOn35eZyZzgpK4XCNJdXTDR7+zykj0lwxRvZ2g==",
- "dev": true
- },
"@eslint/eslintrc": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
@@ -6000,35 +5208,6 @@
"js-yaml": "^3.13.1",
"minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1"
- },
- "dependencies": {
- "ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
- "requires": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- }
- },
- "debug": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- },
- "fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true
- }
}
},
"@humanwhocodes/config-array": {
@@ -6040,17 +5219,6 @@
"@humanwhocodes/object-schema": "^1.2.0",
"debug": "^4.1.1",
"minimatch": "^3.0.4"
- },
- "dependencies": {
- "debug": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- }
}
},
"@humanwhocodes/object-schema": {
@@ -6199,13 +5367,7 @@
"@sveltejs/eslint-config": {
"version": "git+ssh://git@github.com/sveltejs/eslint-config.git#31fd4faeea88990069502460b023698b1c9c2d13",
"dev": true,
- "from": "@sveltejs/eslint-config@github:sveltejs/eslint-config#v5.7.0"
- },
- "@tootallnate/once": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.0.0.tgz",
- "integrity": "sha512-KYyTT/T6ALPkIRd2Ge080X/BsXvy9O0hcWTtMWkPvwAwF99+vn6Dv4GzrFT/Nn1LePr+FFDbRXXlqmsy9lw2zA==",
- "dev": true
+ "from": "@sveltejs/eslint-config@github:sveltejs/eslint-config#v5.8.0"
},
"@types/estree": {
"version": "0.0.50",
@@ -6213,18 +5375,6 @@
"integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
"dev": true
},
- "@types/is-windows": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/@types/is-windows/-/is-windows-0.2.0.tgz",
- "integrity": "sha1-byTuSHMdMRaOpRBhDW3RXl/Jxv8=",
- "dev": true
- },
- "@types/istanbul-lib-coverage": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
- "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==",
- "dev": true
- },
"@types/json-schema": {
"version": "7.0.9",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
@@ -6238,9 +5388,9 @@
"dev": true
},
"@types/mime-types": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.0.tgz",
- "integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM=",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.1.tgz",
+ "integrity": "sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw==",
"dev": true
},
"@types/mocha": {
@@ -6279,15 +5429,6 @@
"tsutils": "^3.21.0"
},
"dependencies": {
- "debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- },
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -6338,17 +5479,6 @@
"@typescript-eslint/types": "4.31.2",
"@typescript-eslint/typescript-estree": "4.31.2",
"debug": "^4.3.1"
- },
- "dependencies": {
- "debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- }
}
},
"@typescript-eslint/scope-manager": {
@@ -6382,15 +5512,6 @@
"tsutils": "^3.21.0"
},
"dependencies": {
- "debug": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- },
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -6487,21 +5608,21 @@
"dev": true
},
"ajv": {
- "version": "6.10.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
- "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"requires": {
- "fast-deep-equal": "^2.0.1",
+ "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ansi-colors": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
- "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
"dev": true
},
"ansi-regex": {
@@ -6526,9 +5647,9 @@
"dev": true
},
"anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
"dev": true,
"requires": {
"normalize-path": "^3.0.0",
@@ -6544,12 +5665,6 @@
"sprintf-js": "~1.0.2"
}
},
- "argv": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz",
- "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=",
- "dev": true
- },
"array-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
@@ -6608,9 +5723,9 @@
"dev": true
},
"async-limiter": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
- "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
"asynckit": {
@@ -6647,9 +5762,9 @@
}
},
"binary-extensions": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
- "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
"brace-expansion": {
@@ -6701,26 +5816,6 @@
"integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
"dev": true
},
- "c8": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/c8/-/c8-5.0.1.tgz",
- "integrity": "sha512-63V/XrzqX2wgByuJyafJYuaudvxxmGrm/acqRJpvbtKvRUj6h/85EFrVweQ14j1F7wRASp0W9zyZqj8fnWI+4Q==",
- "dev": true,
- "requires": {
- "@bcoe/v8-coverage": "^0.2.1",
- "find-up": "^3.0.0",
- "foreground-child": "^1.5.6",
- "furi": "^1.3.0",
- "istanbul-lib-coverage": "^2.0.1",
- "istanbul-lib-report": "^2.0.1",
- "istanbul-reports": "^2.2.4",
- "rimraf": "^2.6.2",
- "test-exclude": "^5.0.0",
- "v8-to-istanbul": "^3.1.3",
- "yargs": "^13.1.0",
- "yargs-parser": "^10.1.0"
- }
- },
"call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
@@ -6799,9 +5894,9 @@
}
},
"code-red": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.2.tgz",
- "integrity": "sha512-CvM8mK6RkLCwMNt+/TBLmqC6eKcbky9AOR+jC+0ClSh4Mk2Ix7+sPqUEIAbJzT822oCu3D469prC7155657n2A==",
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.2.5.tgz",
+ "integrity": "sha512-x+uQyJLNS1v0+74eXqM7FMPoM1fU/fN3tdexGWtCuVjCfxADt1TuuEGIGlFyCC2vhgINDctDb/rgSn8/ZDfJsQ==",
"dev": true,
"requires": {
"@types/estree": "^0.0.50",
@@ -6812,19 +5907,6 @@
"sourcemap-codec": "^1.4.8"
}
},
- "codecov": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.6.5.tgz",
- "integrity": "sha512-v48WuDMUug6JXwmmfsMzhCHRnhUf8O3duqXvltaYJKrO1OekZWpB/eH6iIoaxMl8Qli0+u3OxptdsBOYiD7VAQ==",
- "dev": true,
- "requires": {
- "argv": "0.0.2",
- "ignore-walk": "3.0.3",
- "js-yaml": "3.13.1",
- "teeny-request": "6.0.1",
- "urlgrey": "0.4.4"
- }
- },
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -6873,31 +5955,12 @@
"typedarray": "^0.0.6"
}
},
- "convert-source-map": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz",
- "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.1"
- }
- },
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
- "cross-spawn": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
- "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
- "dev": true,
- "requires": {
- "lru-cache": "^4.0.1",
- "which": "^1.2.9"
- }
- },
"css-tree": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz",
@@ -6960,12 +6023,12 @@
}
},
"debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
+ "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dev": true,
"requires": {
- "ms": "^2.1.1"
+ "ms": "2.1.2"
}
},
"decamelize": {
@@ -7052,15 +6115,6 @@
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
- "end-of-stream": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
- "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
- "dev": true,
- "requires": {
- "once": "^1.4.0"
- }
- },
"enquirer": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
@@ -7068,14 +6122,6 @@
"dev": true,
"requires": {
"ansi-colors": "^4.1.1"
- },
- "dependencies": {
- "ansi-colors": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
- "dev": true
- }
}
},
"error-ex": {
@@ -7271,15 +6317,6 @@
"which": "^2.0.1"
}
},
- "debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- },
"escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
@@ -7303,12 +6340,6 @@
}
}
},
- "fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true
- },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -7687,36 +6718,6 @@
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
- "execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- },
- "dependencies": {
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- }
- }
- },
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
@@ -7759,9 +6760,9 @@
"dev": true
},
"fast-deep-equal": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
- "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
"fast-glob": {
@@ -7835,9 +6836,9 @@
}
},
"flat": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
- "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz",
+ "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==",
"dev": true,
"requires": {
"is-buffer": "~2.0.3"
@@ -7870,16 +6871,6 @@
"integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==",
"dev": true
},
- "foreground-child": {
- "version": "1.5.6",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz",
- "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=",
- "dev": true,
- "requires": {
- "cross-spawn": "^4",
- "signal-exit": "^3.0.0"
- }
- },
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -7922,16 +6913,6 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
- "furi": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/furi/-/furi-1.3.0.tgz",
- "integrity": "sha512-TYoXEeRLKHXNWcCBP0VH1psPktQ9G8Y0GfZwMXCvwVbhbfNx7JItKWhB5mMBYufNjqxEHq+Ivd1nLtr5vQyVoQ==",
- "dev": true,
- "requires": {
- "@types/is-windows": "^0.2.0",
- "is-windows": "^1.0.2"
- }
- },
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
@@ -7949,15 +6930,6 @@
"has-symbols": "^1.0.1"
}
},
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
"get-symbol-description": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
@@ -7978,9 +6950,9 @@
}
},
"glob": {
- "version": "7.1.4",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
- "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -8119,50 +7091,13 @@
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
},
- "html-encoding-sniffer": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
- "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
- "dev": true,
- "requires": {
- "whatwg-encoding": "^1.0.1"
- }
- },
- "html-escaper": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
- "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
- "dev": true
- },
- "http-proxy-agent": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
- "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
+ "html-encoding-sniffer": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
+ "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
"dev": true,
"requires": {
- "@tootallnate/once": "1",
- "agent-base": "6",
- "debug": "4"
- },
- "dependencies": {
- "agent-base": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz",
- "integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==",
- "dev": true,
- "requires": {
- "debug": "4"
- }
- },
- "debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- }
+ "whatwg-encoding": "^1.0.1"
}
},
"http-signature": {
@@ -8184,17 +7119,6 @@
"requires": {
"agent-base": "5",
"debug": "4"
- },
- "dependencies": {
- "debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- }
}
},
"iconv-lite": {
@@ -8212,15 +7136,6 @@
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true
},
- "ignore-walk": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
- "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
- "dev": true,
- "requires": {
- "minimatch": "^3.0.4"
- }
- },
"import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@@ -8264,12 +7179,6 @@
"side-channel": "^1.0.4"
}
},
- "invert-kv": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
- "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
- "dev": true
- },
"ip-regex": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
@@ -8311,9 +7220,9 @@
}
},
"is-buffer": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
+ "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
"dev": true
},
"is-callable": {
@@ -8404,12 +7313,6 @@
"has-tostringtag": "^1.0.0"
}
},
- "is-stream": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
- "dev": true
- },
"is-string": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
@@ -8434,12 +7337,6 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
- "is-windows": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
- "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
- "dev": true
- },
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -8458,32 +7355,6 @@
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true
},
- "istanbul-lib-coverage": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz",
- "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==",
- "dev": true
- },
- "istanbul-lib-report": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz",
- "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==",
- "dev": true,
- "requires": {
- "istanbul-lib-coverage": "^2.0.5",
- "make-dir": "^2.1.0",
- "supports-color": "^6.1.0"
- }
- },
- "istanbul-reports": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz",
- "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==",
- "dev": true,
- "requires": {
- "html-escaper": "^2.0.0"
- }
- },
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -8605,15 +7476,6 @@
"integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
"dev": true
},
- "lcid": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
- "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
- "dev": true,
- "requires": {
- "invert-kv": "^2.0.0"
- }
- },
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
@@ -8705,16 +7567,6 @@
"chalk": "^2.4.2"
}
},
- "lru-cache": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
- "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
- "dev": true,
- "requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
"magic-string": {
"version": "0.25.3",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz",
@@ -8724,50 +7576,12 @@
"sourcemap-codec": "^1.4.4"
}
},
- "make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dev": true,
- "requires": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- },
- "dependencies": {
- "semver": {
- "version": "5.7.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
- "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
- "dev": true
- }
- }
- },
- "map-age-cleaner": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
- "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
- "dev": true,
- "requires": {
- "p-defer": "^1.0.0"
- }
- },
"mdn-data": {
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
"dev": true
},
- "mem": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
- "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
- "dev": true,
- "requires": {
- "map-age-cleaner": "^0.1.1",
- "mimic-fn": "^2.0.0",
- "p-is-promise": "^2.0.0"
- }
- },
"merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -8785,32 +7599,26 @@
}
},
"mime": {
- "version": "2.4.6",
- "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
- "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
+ "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==",
"dev": true
},
"mime-db": {
- "version": "1.40.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
- "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
+ "version": "1.50.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz",
+ "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==",
"dev": true
},
"mime-types": {
- "version": "2.1.24",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
- "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
+ "version": "2.1.33",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz",
+ "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==",
"dev": true,
"requires": {
- "mime-db": "1.40.0"
+ "mime-db": "1.50.0"
}
},
- "mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "dev": true
- },
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -8867,6 +7675,21 @@
"yargs-unparser": "1.6.0"
},
"dependencies": {
+ "ansi-colors": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
+ "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
+ "dev": true
+ },
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
@@ -8902,24 +7725,6 @@
"has-flag": "^3.0.0"
}
},
- "yargs": {
- "version": "13.3.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
- "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
- "dev": true,
- "requires": {
- "cliui": "^5.0.0",
- "find-up": "^3.0.0",
- "get-caller-file": "^2.0.1",
- "require-directory": "^2.1.1",
- "require-main-filename": "^2.0.0",
- "set-blocking": "^2.0.0",
- "string-width": "^3.0.0",
- "which-module": "^2.0.0",
- "y18n": "^4.0.0",
- "yargs-parser": "^13.1.2"
- }
- },
"yargs-parser": {
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
@@ -8955,12 +7760,6 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
- "nice-try": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
- "dev": true
- },
"node-environment-flags": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
@@ -8969,22 +7768,8 @@
"requires": {
"object.getownpropertydescriptors": "^2.0.3",
"semver": "^5.7.0"
- },
- "dependencies": {
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
- }
}
},
- "node-fetch": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
- "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
- "dev": true
- },
"node-modules-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz",
@@ -9009,15 +7794,6 @@
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
},
- "npm-run-path": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
- "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
- "dev": true,
- "requires": {
- "path-key": "^2.0.0"
- }
- },
"nwsapi": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
@@ -9061,13 +7837,14 @@
}
},
"object.getownpropertydescriptors": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
- "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz",
+ "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
+ "es-abstract": "^1.18.0-next.2"
}
},
"object.values": {
@@ -9104,35 +7881,6 @@
"wordwrap": "~1.0.0"
}
},
- "os-locale": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
- "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
- "dev": true,
- "requires": {
- "execa": "^1.0.0",
- "lcid": "^2.0.0",
- "mem": "^4.0.0"
- }
- },
- "p-defer": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
- "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
- "dev": true
- },
- "p-finally": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
- "dev": true
- },
- "p-is-promise": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
- "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==",
- "dev": true
- },
"p-limit": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
@@ -9194,16 +7942,10 @@
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
- "path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
- "dev": true
- },
"path-parse": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"path-type": {
@@ -9251,12 +7993,6 @@
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
"dev": true
},
- "pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true
- },
"pirates": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz",
@@ -9404,28 +8140,12 @@
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"dev": true
},
- "pseudomap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
- "dev": true
- },
"psl": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz",
"integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==",
"dev": true
},
- "pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dev": true,
- "requires": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
@@ -9450,30 +8170,6 @@
"ws": "^6.1.0"
},
"dependencies": {
- "debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "mime-db": {
- "version": "1.44.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
- "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
- "dev": true
- },
- "mime-types": {
- "version": "2.1.27",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
- "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
- "dev": true,
- "requires": {
- "mime-db": "1.44.0"
- }
- },
"ws": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
@@ -9508,16 +8204,6 @@
"path-type": "^3.0.0"
}
},
- "read-pkg-up": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz",
- "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==",
- "dev": true,
- "requires": {
- "find-up": "^3.0.0",
- "read-pkg": "^3.0.0"
- }
- },
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
@@ -9748,9 +8434,9 @@
}
},
"semver": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
- "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
},
"set-blocking": {
@@ -9759,21 +8445,6 @@
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
},
- "shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
- "dev": true,
- "requires": {
- "shebang-regex": "^1.0.0"
- }
- },
- "shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
- "dev": true
- },
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
@@ -9785,12 +8456,6 @@
"object-inspect": "^1.9.0"
}
},
- "signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
- },
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -9931,15 +8596,6 @@
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
"dev": true
},
- "stream-events": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz",
- "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==",
- "dev": true,
- "requires": {
- "stubs": "^3.0.0"
- }
- },
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -9985,24 +8641,12 @@
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
},
- "strip-eof": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
- "dev": true
- },
"strip-json-comments": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true
},
- "stubs": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz",
- "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=",
- "dev": true
- },
"sucrase": {
"version": "3.16.0",
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.16.0.tgz",
@@ -10033,15 +8677,6 @@
}
}
},
- "supports-color": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
- "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- },
"svelte": {
"version": "3.43.0",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.43.0.tgz",
@@ -10070,9 +8705,9 @@
},
"dependencies": {
"ajv": {
- "version": "8.6.3",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz",
- "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==",
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
+ "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -10093,12 +8728,6 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
- "fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true
- },
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -10133,31 +8762,6 @@
}
}
},
- "teeny-request": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-6.0.1.tgz",
- "integrity": "sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g==",
- "dev": true,
- "requires": {
- "http-proxy-agent": "^4.0.0",
- "https-proxy-agent": "^4.0.0",
- "node-fetch": "^2.2.0",
- "stream-events": "^1.0.5",
- "uuid": "^3.3.2"
- }
- },
- "test-exclude": {
- "version": "5.2.3",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz",
- "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3",
- "minimatch": "^3.0.4",
- "read-pkg-up": "^4.0.0",
- "require-main-filename": "^2.0.0"
- }
- },
"text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -10325,12 +8929,6 @@
"punycode": "^2.1.0"
}
},
- "urlgrey": {
- "version": "0.4.4",
- "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz",
- "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=",
- "dev": true
- },
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -10349,17 +8947,6 @@
"integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==",
"dev": true
},
- "v8-to-istanbul": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-3.2.3.tgz",
- "integrity": "sha512-B8d/oxMtc/x0TYXr9b+Ywu5KexA/on4QMQ9M1kTYnoGZzKdo8LLk9ySlWePdDOtr2G0/2Injgcp3sOR9gU+3vQ==",
- "dev": true,
- "requires": {
- "@types/istanbul-lib-coverage": "^2.0.1",
- "convert-source-map": "^1.6.0",
- "source-map": "^0.7.3"
- }
- },
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
@@ -10550,35 +9137,28 @@
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
"dev": true
},
- "yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
- "dev": true
- },
"yargs": {
- "version": "13.2.4",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz",
- "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==",
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+ "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
"requires": {
"cliui": "^5.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
- "os-locale": "^3.1.0",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
- "yargs-parser": "^13.1.0"
+ "yargs-parser": "^13.1.2"
},
"dependencies": {
"yargs-parser": {
- "version": "13.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
- "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
+ "version": "13.1.2",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+ "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true,
"requires": {
"camelcase": "^5.0.0",
@@ -10587,23 +9167,6 @@
}
}
},
- "yargs-parser": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
- "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
- "dev": true,
- "requires": {
- "camelcase": "^4.1.0"
- },
- "dependencies": {
- "camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
- "dev": true
- }
- }
- },
"yargs-unparser": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
@@ -10613,36 +9176,6 @@
"flat": "^4.1.0",
"lodash": "^4.17.15",
"yargs": "^13.3.0"
- },
- "dependencies": {
- "yargs": {
- "version": "13.3.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
- "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
- "dev": true,
- "requires": {
- "cliui": "^5.0.0",
- "find-up": "^3.0.0",
- "get-caller-file": "^2.0.1",
- "require-directory": "^2.1.1",
- "require-main-filename": "^2.0.0",
- "set-blocking": "^2.0.0",
- "string-width": "^3.0.0",
- "which-module": "^2.0.0",
- "y18n": "^4.0.0",
- "yargs-parser": "^13.1.2"
- }
- },
- "yargs-parser": {
- "version": "13.1.2",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
- "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
- "dev": true,
- "requires": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
- }
- }
}
},
"yauzl": {
diff --git a/package.json b/package.json
index 66decce07a..577cca67f2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "svelte",
- "version": "3.43.0",
+ "version": "3.46.4",
"description": "Cybernetically enhanced web apps",
"module": "index.mjs",
"main": "index",
@@ -22,6 +22,11 @@
"exports": {
"./package.json": "./package.json",
".": {
+ "types": "./types/runtime/index.d.ts",
+ "browser": {
+ "import": "./index.mjs",
+ "require": "./index.js"
+ },
"node": {
"import": "./ssr.mjs",
"require": "./ssr.js"
@@ -30,22 +35,30 @@
"require": "./index.js"
},
"./compiler": {
+ "types": "./types/compiler/index.d.ts",
"import": "./compiler.mjs",
"require": "./compiler.js"
},
+ "./action": {
+ "types": "./types/runtime/action/index.d.ts"
+ },
"./animate": {
+ "types": "./types/runtime/animate/index.d.ts",
"import": "./animate/index.mjs",
"require": "./animate/index.js"
},
"./easing": {
+ "types": "./types/runtime/easing/index.d.ts",
"import": "./easing/index.mjs",
"require": "./easing/index.js"
},
"./internal": {
+ "types": "./types/runtime/internal/index.d.ts",
"import": "./internal/index.mjs",
"require": "./internal/index.js"
},
"./motion": {
+ "types": "./types/runtime/motion/index.d.ts",
"import": "./motion/index.mjs",
"require": "./motion/index.js"
},
@@ -53,14 +66,17 @@
"require": "./register.js"
},
"./store": {
+ "types": "./types/runtime/store/index.d.ts",
"import": "./store/index.mjs",
"require": "./store/index.js"
},
"./transition": {
+ "types": "./types/runtime/transition/index.d.ts",
"import": "./transition/index.mjs",
"require": "./transition/index.js"
},
"./ssr": {
+ "types": "./types/runtime/index.d.ts",
"import": "./ssr.mjs",
"require": "./ssr.js"
}
@@ -70,13 +86,9 @@
},
"types": "types/runtime/index.d.ts",
"scripts": {
- "test": "mocha",
- "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts",
+ "test": "mocha --exit",
+ "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts --exit",
"quicktest": "mocha",
- "precoverage": "c8 mocha",
- "coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html",
- "codecov": "codecov",
- "precodecov": "npm run coverage",
"build": "rollup -c && npm run tsd",
"prepare": "npm run build",
"dev": "rollup -cw",
@@ -111,16 +123,14 @@
"@rollup/plugin-sucrase": "^3.1.0",
"@rollup/plugin-typescript": "^2.0.1",
"@rollup/plugin-virtual": "^2.0.0",
- "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.7.0",
+ "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.8.0",
"@types/mocha": "^7.0.0",
"@types/node": "^8.10.53",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"acorn": "^8.4.1",
"agadoo": "^1.1.0",
- "c8": "^5.0.1",
- "code-red": "^0.2.2",
- "codecov": "^3.5.0",
+ "code-red": "^0.2.5",
"css-tree": "^1.1.2",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.24.2",
@@ -133,7 +143,7 @@
"magic-string": "^0.25.3",
"mocha": "^7.0.0",
"periscopic": "^3.0.4",
- "puppeteer": "^2.1.1",
+ "puppeteer": "^2.0.0",
"rollup": "^1.27.14",
"source-map": "^0.7.3",
"source-map-support": "^0.5.13",
diff --git a/site/.dockerignore b/site/.dockerignore
deleted file mode 100644
index 0822df13e4..0000000000
--- a/site/.dockerignore
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
-!/Dockerfile
-!/package.json
-!/package-lock.json
-!/__sapper__
-/__sapper__/*
-!/__sapper__/build
-!/static
-!/content
diff --git a/site/.env.example b/site/.env.example
deleted file mode 100644
index 9cfe50cd6c..0000000000
--- a/site/.env.example
+++ /dev/null
@@ -1,13 +0,0 @@
-NODE_ENV=
-
-PORT=
-BASEURL=
-GITHUB_CLIENT_ID=
-GITHUB_CLIENT_SECRET=
-MAPBOX_ACCESS_TOKEN=
-
-PGHOST=hostname
-PGPORT=port
-PGUSER=username
-PGPASSWORD=password
-PGDATABASE=database_name
diff --git a/site/.eslintrc.js b/site/.eslintrc.js
deleted file mode 100644
index 255b8af9c5..0000000000
--- a/site/.eslintrc.js
+++ /dev/null
@@ -1,58 +0,0 @@
-module.exports = {
- root: true,
- rules: {
- indent: [2, 'tab', { SwitchCase: 1 }],
- semi: [2, 'always'],
- 'keyword-spacing': [2, { before: true, after: true }],
- 'space-before-blocks': [2, 'always'],
- 'no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
- 'no-cond-assign': 0,
- 'no-unused-vars': 2,
- 'object-shorthand': [2, 'always'],
- 'no-const-assign': 2,
- 'no-class-assign': 2,
- 'no-this-before-super': 2,
- 'no-var': 2,
- 'no-unreachable': 2,
- 'valid-typeof': 2,
- 'quote-props': [2, 'as-needed'],
- 'one-var': [2, 'never'],
- 'prefer-arrow-callback': 2,
- 'prefer-const': [2, { destructuring: 'all' }],
- 'arrow-spacing': 2,
- 'no-inner-declarations': 0,
- 'require-atomic-updates': 0
- },
- env: {
- es6: true,
- browser: true,
- node: true,
- mocha: true
- },
- extends: [
- 'eslint:recommended',
- 'plugin:import/errors',
- 'plugin:import/warnings'
- ],
- plugins: ['svelte3'],
- overrides: [
- {
- files: ['*.svelte'],
- processor: 'svelte3/svelte3'
- }
- ],
- parserOptions: {
- ecmaVersion: 9,
- sourceType: 'module'
- },
- settings: {
- 'import/core-modules': ['svelte'],
- 'svelte3/compiler': (() => {
- try {
- return require('svelte/compiler');
- } catch (e) {
- return null;
- }
- })()
- }
-};
diff --git a/site/.gcloudignore b/site/.gcloudignore
deleted file mode 100644
index c46042a27e..0000000000
--- a/site/.gcloudignore
+++ /dev/null
@@ -1 +0,0 @@
-#!include:.dockerignore
diff --git a/site/.travis.yml b/site/.travis.yml
deleted file mode 100644
index 8ad1fc38c8..0000000000
--- a/site/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - "stable"
-env:
- global:
- - BUILD_TIMEOUT=10000
-install:
- - npm install
- - npm install cypress
-
diff --git a/site/Dockerfile b/site/Dockerfile
deleted file mode 100644
index 0261a69521..0000000000
--- a/site/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-# IMPORTANT: Don't use this Dockerfile in your own Sapper projects without also looking at the .dockerignore file.
-# Without an appropriate .dockerignore, this Dockerfile will copy a large number of unneeded files into your image.
-
-FROM mhart/alpine-node:12
-
-# install dependencies
-WORKDIR /app
-COPY package.json package-lock.json ./
-RUN npm ci --production
-
-###
-# Only copy over the Node pieces we need
-# ~> Saves 35MB
-###
-FROM mhart/alpine-node:slim-12
-
-WORKDIR /app
-COPY --from=0 /app .
-COPY . .
-
-EXPOSE 3000
-CMD ["node", "__sapper__/build"]
diff --git a/site/Makefile b/site/Makefile
deleted file mode 100644
index 48b3e972e6..0000000000
--- a/site/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-HASH := `git rev-parse --short HEAD`
-
-SERVICE := svelte-website
-PROJECT := svelte-dev
-
-IMAGE := gcr.io/$(PROJECT)/$(SERVICE):$(HASH)
-
-sapper:
- @echo "\n~> updating template & contributors list"
- @npm run update
- @echo "\n~> building Sapper app"
- @npm run build
-
-
-docker:
- @echo "\n~> building docker image"
- @gcloud builds submit --project $(PROJECT) -t $(IMAGE)
-
-
-deploy: sapper docker
- @echo "\n~> deploying $(SERVICE) to Cloud Run servers"
- @gcloud run deploy $(SERVICE) --project $(PROJECT) --allow-unauthenticated --platform managed --region us-central1 --image $(IMAGE) --memory=512Mi
diff --git a/site/README.md b/site/README.md
deleted file mode 100644
index 502cc42e17..0000000000
--- a/site/README.md
+++ /dev/null
@@ -1,84 +0,0 @@
-## Running locally
-
-Set up the site sub-project:
-
-```bash
-git clone https://github.com/sveltejs/svelte.git
-cd site
-npm ci
-npm run dev
-```
-
-and navigate to [localhost:3000](http://localhost:3000).
-
-The first time you run the site locally, it will update the list of Contributors and REPL dependencies. After this it won't run again unless you force it by running:
-
-```bash
-npm run update
-```
-
-## Running using the local copy of Svelte
-
-By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. When running the site locally, you can also use your local copy of Svelte.
-
-To produce the proper browser-compatible UMD build of the compiler, you will need to run `npm run build` (or `npm run dev`) in the root of this repository with the `PUBLISH` environment variable set to any non-empty string:
-
-```bash
-git clone https://github.com/sveltejs/svelte.git
-cd svelte
-npm ci
-PUBLISH=1 npm run build
-cd site
-npm ci
-npm run dev
-```
-
-Then visit the REPL at [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). Please note that the local REPL only works with `npm run dev` and not when building the site for production usage.
-
-## REPL GitHub integration
-
-In order for the REPL's GitHub integration to work properly when running locally, you will need to:
-- [create a GitHub OAuth app](https://github.com/settings/developers):
- - set `Authorization callback URL` to `http://localhost:3000/auth/callback`;
- - set `Application name` as you like, and `Homepage URL` as `http://localhost:3000/`;
- - create the app and take note of `Client ID` and `Client Secret`
-- in this repo, create `site/.env` containing:
- ```
- GITHUB_CLIENT_ID=[your app's Client ID]
- GITHUB_CLIENT_SECRET=[your app's Client Secret]
- BASEURL=http://localhost:3000
- ```
-
-## Building the site
-
-To build the website, run `npm run build`. The output can be found in `__sapper__/build`.
-
-## Testing
-
-Tests can be run using `npm run test`.
-
-
-## Linking `@sveltejs/site-kit` and `@sveltejs/svelte-repl`
-
-This site depends on `@sveltejs/site-kit` (a collection of styles, components and icons used in common by *.svelte.dev websites), and `@sveltejs/svelte-repl`.
-
-In order to work on features that depend on those packages, you need to [link](https://docs.npmjs.com/cli/link) their repositories:
-
-- `cd `
-- `git clone https://github.com/sveltejs/site-kit`
-- `git clone https://github.com/sveltejs/svelte-repl`
-- `cd /site-kit`
-- `npm link`
-- `cd /svelte-repl`
-- `npm link`
-- `cd /site`
-- `npm link @sveltejs/site-kit`
-- `npm link @sveltejs/svelte-repl`
-
-
-
-## Translating the API docs
-
-Anchors are automatically generated using headings in the documentation and by default (for the english language) they are latinised to make sure the URL is always conforming to RFC3986.
-
-If we need to translate the API documentation to a language using unicode chars, we can setup this app to export the correct anchors by setting up `SLUG_PRESERVE_UNICODE` to `true` in `config.js`.
diff --git a/site/appveyor.yml b/site/appveyor.yml
deleted file mode 100644
index 80f5ec2a4d..0000000000
--- a/site/appveyor.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-version: "{build}"
-
-shallow_clone: true
-
-init:
- - git config --global core.autocrlf false
-
-build: off
-
-environment:
- matrix:
- # node.js
- - nodejs_version: stable
-
-install:
- - ps: Install-Product node $env:nodejs_version
- - npm install
diff --git a/site/config.js b/site/config.js
deleted file mode 100644
index 097bd173a8..0000000000
--- a/site/config.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export const SLUG_PRESERVE_UNICODE = false;
-export const SLUG_SEPARATOR = '_';
diff --git a/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md b/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md
index 3a25f15b12..72d9d8895b 100644
--- a/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md
+++ b/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md
@@ -12,7 +12,7 @@ Because of that, getting started with it can be a little bit confusing at first.
## 1. Use the REPL
-The [Svelte REPL](repl) is the easiest way to begin. You can choose from a list of examples to get you started, and tweak them until they do what you want.
+The [Svelte REPL](/repl) is the easiest way to begin. You can choose from a list of examples to get you started, and tweak them until they do what you want.
You'll need to have Node.js installed, and know how to use the terminal
@@ -52,7 +52,7 @@ npm run dev
This will create a new project in the `my-svelte-project` directory, install its dependencies, and start a server on http://localhost:5000.
-You can find more information about using TypeScript [here](blog/svelte-and-typescript).
+You can find more information about using TypeScript [here](/blog/svelte-and-typescript).
Once you've tinkered a bit and understood how everything fits together, you can fork [sveltejs/template](https://github.com/sveltejs/template) and start doing this instead:
diff --git a/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md b/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md
index a467ac3d7f..2bf3a2e8a5 100644
--- a/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md
+++ b/site/content/blog/2017-09-06-the-zen-of-just-writing-css.md
@@ -28,7 +28,7 @@ The consequence of all this is the **append-only stylesheet**. There's no way of
The idea behind SFCs is simple: you write your components in an HTML file that (optionally) contains a `
\ No newline at end of file
+
diff --git a/site/content/examples/05-bindings/09-media-elements/App.svelte b/site/content/examples/05-bindings/09-media-elements/App.svelte
index b4c5907f6d..de89b1be8d 100644
--- a/site/content/examples/05-bindings/09-media-elements/App.svelte
+++ b/site/content/examples/05-bindings/09-media-elements/App.svelte
@@ -50,7 +50,7 @@
Caminandes: Llamigos
-From Blender Open Projects . CC-BY
+From Blender Studio . CC-BY
\ No newline at end of file
+
diff --git a/site/content/examples/07-stores/00-writable-stores/App.svelte b/site/content/examples/07-stores/00-writable-stores/App.svelte
index ee542f789d..61e55401a5 100644
--- a/site/content/examples/07-stores/00-writable-stores/App.svelte
+++ b/site/content/examples/07-stores/00-writable-stores/App.svelte
@@ -4,14 +4,14 @@
import Decrementer from './Decrementer.svelte';
import Resetter from './Resetter.svelte';
- let count_value;
+ let countValue;
const unsubscribe = count.subscribe(value => {
- count_value = value;
+ countValue = value;
});
-The count is {count_value}
+The count is {countValue}
diff --git a/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte b/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte
index 5e1ad9863c..90701aeab4 100644
--- a/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte
+++ b/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte
@@ -30,7 +30,7 @@
{#if visible}
-
+
The quick brown fox jumps over the lazy dog
{/if}
diff --git a/site/content/examples/12-svg/03-area-chart/data.js b/site/content/examples/12-svg/03-area-chart/data.js
index 72cb04f0d8..5cb65b397e 100644
--- a/site/content/examples/12-svg/03-area-chart/data.js
+++ b/site/content/examples/12-svg/03-area-chart/data.js
@@ -36,5 +36,10 @@ export default [
{ x: 2013, y: 5.35 },
{ x: 2014, y: 5.28 },
{ x: 2015, y: 4.63 },
- { x: 2016, y: 4.72 }
-];
\ No newline at end of file
+ { x: 2016, y: 4.72 },
+ { x: 2017, y: 4.82 },
+ { x: 2018, y: 4.79 },
+ { x: 2019, y: 4.36 },
+ { x: 2020, y: 4 },
+ { x: 2021, y: 4.92 }
+];
diff --git a/site/content/examples/13-actions/00-actions/App.svelte b/site/content/examples/13-actions/00-actions/App.svelte
index 4548a5cbb6..79214ec81f 100644
--- a/site/content/examples/13-actions/00-actions/App.svelte
+++ b/site/content/examples/13-actions/00-actions/App.svelte
@@ -1,39 +1,15 @@
-
+ (showModal = true)}>Show Modal
+{#if showModal}
+ (showModal = false)}>
+ Click outside me!
+
+{/if}
\ No newline at end of file
+
diff --git a/site/content/examples/13-actions/00-actions/click_outside.js b/site/content/examples/13-actions/00-actions/click_outside.js
new file mode 100644
index 0000000000..e8983c1457
--- /dev/null
+++ b/site/content/examples/13-actions/00-actions/click_outside.js
@@ -0,0 +1,15 @@
+export function clickOutside(node) {
+ const handleClick = (event) => {
+ if (!node.contains(event.target)) {
+ node.dispatchEvent(new CustomEvent("outclick"));
+ }
+ };
+
+ document.addEventListener("click", handleClick, true);
+
+ return {
+ destroy() {
+ document.removeEventListener("click", handleClick, true);
+ }
+ };
+}
diff --git a/site/content/examples/13-actions/03-actions-pannable/App.svelte b/site/content/examples/13-actions/03-actions-pannable/App.svelte
new file mode 100644
index 0000000000..4548a5cbb6
--- /dev/null
+++ b/site/content/examples/13-actions/03-actions-pannable/App.svelte
@@ -0,0 +1,51 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/13-actions/03-actions-pannable/meta.json b/site/content/examples/13-actions/03-actions-pannable/meta.json
new file mode 100644
index 0000000000..b97be8071f
--- /dev/null
+++ b/site/content/examples/13-actions/03-actions-pannable/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "A more complex action"
+}
\ No newline at end of file
diff --git a/site/content/examples/13-actions/00-actions/pannable.js b/site/content/examples/13-actions/03-actions-pannable/pannable.js
similarity index 100%
rename from site/content/examples/13-actions/00-actions/pannable.js
rename to site/content/examples/13-actions/03-actions-pannable/pannable.js
diff --git a/site/content/examples/15-composition/02-named-slots/ContactCard.svelte b/site/content/examples/15-composition/02-named-slots/ContactCard.svelte
index 87bd392afa..1068641891 100644
--- a/site/content/examples/15-composition/02-named-slots/ContactCard.svelte
+++ b/site/content/examples/15-composition/02-named-slots/ContactCard.svelte
@@ -41,7 +41,7 @@
line-height: 1.2;
}
- .address { background-image: url(tutorial/icons/map-marker.svg) }
- .email { background-image: url(tutorial/icons/email.svg) }
+ .address { background-image: url(/tutorial/icons/map-marker.svg) }
+ .email { background-image: url(/tutorial/icons/email.svg) }
.missing { color: #999 }
-
\ No newline at end of file
+
diff --git a/site/content/examples/16-context/00-context-api/Map.svelte b/site/content/examples/16-context/00-context-api/Map.svelte
index 059fcca45b..99aead054b 100644
--- a/site/content/examples/16-context/00-context-api/Map.svelte
+++ b/site/content/examples/16-context/00-context-api/Map.svelte
@@ -1,9 +1,9 @@
+
+
+
+
{#if map}
-
+
{/if}
@@ -47,4 +46,4 @@
width: 100%;
height: 100%;
}
-
\ No newline at end of file
+
diff --git a/site/content/examples/17-special-elements/00-svelte-self/File.svelte b/site/content/examples/17-special-elements/00-svelte-self/File.svelte
index 8a0048dd68..e769ab4841 100644
--- a/site/content/examples/17-special-elements/00-svelte-self/File.svelte
+++ b/site/content/examples/17-special-elements/00-svelte-self/File.svelte
@@ -3,7 +3,7 @@
$: type = name.slice(name.lastIndexOf('.') + 1);
-{name}
+{name}
\ No newline at end of file
+
diff --git a/site/content/examples/17-special-elements/00-svelte-self/Folder.svelte b/site/content/examples/17-special-elements/00-svelte-self/Folder.svelte
index c65e177983..7e9f667dd2 100644
--- a/site/content/examples/17-special-elements/00-svelte-self/Folder.svelte
+++ b/site/content/examples/17-special-elements/00-svelte-self/Folder.svelte
@@ -30,14 +30,14 @@
\ No newline at end of file
+
diff --git a/site/content/examples/17-special-elements/04-svelte-body/App.svelte b/site/content/examples/17-special-elements/04-svelte-body/App.svelte
index d3245ab447..fddc8f8d0a 100644
--- a/site/content/examples/17-special-elements/04-svelte-body/App.svelte
+++ b/site/content/examples/17-special-elements/04-svelte-body/App.svelte
@@ -14,7 +14,7 @@
\ No newline at end of file
+
diff --git a/site/content/examples/17-special-elements/05-svelte-head/App.svelte b/site/content/examples/17-special-elements/05-svelte-head/App.svelte
index 38089c9fdd..8323b56ad0 100644
--- a/site/content/examples/17-special-elements/05-svelte-head/App.svelte
+++ b/site/content/examples/17-special-elements/05-svelte-head/App.svelte
@@ -1,5 +1,5 @@
-
+
-Hello world!
\ No newline at end of file
+Hello world!
diff --git a/site/content/examples/20-7guis/02-7guis-temperature/App.svelte b/site/content/examples/20-7guis/02-7guis-temperature/App.svelte
index fce279ed76..a98a5fd06c 100644
--- a/site/content/examples/20-7guis/02-7guis-temperature/App.svelte
+++ b/site/content/examples/20-7guis/02-7guis-temperature/App.svelte
@@ -14,11 +14,11 @@
- °c =
- °f
+ °C =
+ °F
\ No newline at end of file
+
diff --git a/site/content/faq/100-im-new-to-svelte.md b/site/content/faq/100-im-new-to-svelte.md
index 0f1df9cff5..5bd7b96379 100644
--- a/site/content/faq/100-im-new-to-svelte.md
+++ b/site/content/faq/100-im-new-to-svelte.md
@@ -2,6 +2,6 @@
question: I'm new to Svelte. Where should I start?
---
-We think the best way to get started is playing through the interactive [Tutorial](tutorial). Each step there is mainly focused on one specific aspect and is easy to follow. You'll be editing and running real Svelte components right in your browser.
+We think the best way to get started is playing through the interactive [tutorial](/tutorial). Each step there is mainly focused on one specific aspect and is easy to follow. You'll be editing and running real Svelte components right in your browser.
-Five to ten minutes should be enough to get you up and running. An hour and a half should get you through the entire tutorial.
\ No newline at end of file
+Five to ten minutes should be enough to get you up and running. An hour and a half should get you through the entire tutorial.
diff --git a/site/content/faq/250-are-there-any-books.md b/site/content/faq/250-are-there-any-books.md
index 80870428ec..c21106e540 100644
--- a/site/content/faq/250-are-there-any-books.md
+++ b/site/content/faq/250-are-there-any-books.md
@@ -4,6 +4,6 @@ question: Are there any books?
There are a few books:
-- [Svelte Handbook](https://flaviocopes.com/page/download-svelte-handbook/) by Flavio Copes
+- [Svelte Handbook](https://flaviocopes.com/page/svelte-handbook/) by Flavio Copes
- [Svelte 3 Up and Running](https://www.amazon.com/dp/B08D6T6BKS/) by Alessandro Segala
- [Svelte and Sapper in Action](https://www.manning.com/books/svelte-and-sapper-in-action) by R. Mark Volkmann
diff --git a/site/content/faq/450-how-do-i-document-my-components.md b/site/content/faq/450-how-do-i-document-my-components.md
index 78177abd54..4574d02961 100644
--- a/site/content/faq/450-how-do-i-document-my-components.md
+++ b/site/content/faq/450-how-do-i-document-my-components.md
@@ -4,7 +4,7 @@ question: How do I document my components?
In editors which use the Svelte Language Server you can document Components, functions and exports using specially formatted comments.
-````svelte
+````sv
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte b/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte
index e61b4d48e0..f2f9101d51 100644
--- a/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte
+++ b/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte
@@ -1,5 +1,5 @@
diff --git a/site/content/tutorial/01-introduction/07-making-an-app/text.md b/site/content/tutorial/01-introduction/07-making-an-app/text.md
index 654ff87e2f..3e1589cd87 100644
--- a/site/content/tutorial/01-introduction/07-making-an-app/text.md
+++ b/site/content/tutorial/01-introduction/07-making-an-app/text.md
@@ -10,11 +10,11 @@ First, you'll need to integrate Svelte with a build tool. There are officially m
* [rollup-plugin-svelte](https://github.com/sveltejs/rollup-plugin-svelte)
* [svelte-loader](https://github.com/sveltejs/svelte-loader)
-...and a variety of [community-maintained ones](https://sveltesociety.dev/tooling).
+...and a variety of [community-maintained ones](https://sveltesociety.dev/tools).
-Don't worry if you're relatively new to web development and haven't used these tools before. We've prepared a simple step-by-step guide, [Svelte for new developers](blog/svelte-for-new-developers), which walks you through the process.
+Don't worry if you're relatively new to web development and haven't used these tools before. We've prepared a simple step-by-step guide, [Svelte for new developers](/blog/svelte-for-new-developers), which walks you through the process.
-You'll also want to configure your text editor. If you're using VS Code, install the [Svelte extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode), otherwise follow [this guide](blog/setting-up-your-editor) to configure your text editor to treat `.svelte` files the same as `.html` for the sake of syntax highlighting.
+You'll also want to configure your text editor. There are [plugins](https://sveltesociety.dev/tools#editor-support) for many popular editors as well as an official [VS Code extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If your editor does not have a Svelte plugin then you can follow [this guide](/blog/setting-up-your-editor) to configure your text editor to treat `.svelte` files the same as `.html` for the sake of syntax highlighting.
Then, once you've got your project set up, using Svelte components is easy. The compiler turns each component into a regular JavaScript class — just import it and instantiate with `new`:
@@ -30,4 +30,4 @@ const app = new App({
});
```
-You can then interact with `app` using the [component API](docs#Client-side_component_API) if you need to.
+You can then interact with `app` using the [component API](/docs#run-time-client-side-component-api) if you need to.
diff --git a/site/content/tutorial/02-reactivity/03-reactive-statements/app-b/App.svelte b/site/content/tutorial/02-reactivity/03-reactive-statements/app-b/App.svelte
index f757be6f51..3e82cd562c 100644
--- a/site/content/tutorial/02-reactivity/03-reactive-statements/app-b/App.svelte
+++ b/site/content/tutorial/02-reactivity/03-reactive-statements/app-b/App.svelte
@@ -2,7 +2,7 @@
let count = 0;
$: if (count >= 10) {
- alert(`count is dangerously high!`);
+ alert('count is dangerously high!');
count = 9;
}
diff --git a/site/content/tutorial/02-reactivity/03-reactive-statements/text.md b/site/content/tutorial/02-reactivity/03-reactive-statements/text.md
index 1b0e90b7d5..87dc9c14b6 100644
--- a/site/content/tutorial/02-reactivity/03-reactive-statements/text.md
+++ b/site/content/tutorial/02-reactivity/03-reactive-statements/text.md
@@ -5,15 +5,15 @@ title: Statements
We're not limited to declaring reactive *values* — we can also run arbitrary *statements* reactively. For example, we can log the value of `count` whenever it changes:
```js
-$: console.log(`the count is ${count}`);
+$: console.log('the count is ' + count);
```
You can easily group statements together with a block:
```js
$: {
- console.log(`the count is ${count}`);
- alert(`I SAID THE COUNT IS ${count}`);
+ console.log('the count is ' + count);
+ alert('I SAID THE COUNT IS ' + count);
}
```
@@ -21,7 +21,7 @@ You can even put the `$:` in front of things like `if` blocks:
```js
$: if (count >= 10) {
- alert(`count is dangerously high!`);
+ alert('count is dangerously high!');
count = 9;
}
```
\ No newline at end of file
diff --git a/site/content/tutorial/04-logic/06-await-blocks/app-a/App.svelte b/site/content/tutorial/04-logic/06-await-blocks/app-a/App.svelte
index ae2acecf8b..c473065f63 100644
--- a/site/content/tutorial/04-logic/06-await-blocks/app-a/App.svelte
+++ b/site/content/tutorial/04-logic/06-await-blocks/app-a/App.svelte
@@ -1,6 +1,6 @@
diff --git a/site/content/tutorial/06-bindings/05-textarea-inputs/app-b/App.svelte b/site/content/tutorial/06-bindings/05-textarea-inputs/app-b/App.svelte
index f9521d6db6..dbeaf9b67b 100644
--- a/site/content/tutorial/06-bindings/05-textarea-inputs/app-b/App.svelte
+++ b/site/content/tutorial/06-bindings/05-textarea-inputs/app-b/App.svelte
@@ -1,5 +1,5 @@
diff --git a/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md b/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md
index 42263e5ec1..e607100c56 100644
--- a/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md
+++ b/site/content/tutorial/06-bindings/07-multiple-select-bindings/text.md
@@ -4,7 +4,7 @@ title: Select multiple
A select can have a `multiple` attribute, in which case it will populate an array rather than selecting a single value.
-Returning to our [earlier ice cream example](tutorial/group-inputs), we can replace the checkboxes with a ``:
+Returning to our [earlier ice cream example](/tutorial/group-inputs), we can replace the checkboxes with a ``:
```html
Flavours
diff --git a/site/content/tutorial/06-bindings/09-each-block-bindings/text.md b/site/content/tutorial/06-bindings/09-each-block-bindings/text.md
index 9c352703f1..2174ec578f 100644
--- a/site/content/tutorial/06-bindings/09-each-block-bindings/text.md
+++ b/site/content/tutorial/06-bindings/09-each-block-bindings/text.md
@@ -6,15 +6,17 @@ You can even bind to properties inside an `each` block.
```html
{#each todos as todo}
-
+
+
-
+
+
{/each}
```
diff --git a/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte b/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte
index 0b3b4f0881..33d6e3f6eb 100644
--- a/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte
+++ b/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte
@@ -50,7 +50,7 @@
Caminandes: Llamigos
-From Blender Open Projects . CC-BY
+From Blender Studio . CC-BY
Caminandes: Llamigos
-From Blender Open Projects . CC-BY
+From Blender Studio . CC-BY
diff --git a/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte b/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte
index 0e53c533ac..5714f3149a 100644
--- a/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte
+++ b/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte
@@ -47,7 +47,7 @@
width: 100%;
height: 100%;
background-color: #666;
- -webkit-mask: url(svelte-logo-mask.svg) 50% 50% no-repeat;
- mask: url(svelte-logo-mask.svg) 50% 50% no-repeat;
+ -webkit-mask: url(/svelte-logo-mask.svg) 50% 50% no-repeat;
+ mask: url(/svelte-logo-mask.svg) 50% 50% no-repeat;
}
diff --git a/site/content/tutorial/06-bindings/12-bind-this/text.md b/site/content/tutorial/06-bindings/12-bind-this/text.md
index 4784b6b13f..6602e4de76 100644
--- a/site/content/tutorial/06-bindings/12-bind-this/text.md
+++ b/site/content/tutorial/06-bindings/12-bind-this/text.md
@@ -12,4 +12,4 @@ The readonly `this` binding applies to every element (and component) and allows
>
```
-Note that the value of `canvas` will be `undefined` until the component has mounted, so we put the logic inside the `onMount` [lifecycle function](tutorial/onmount).
+Note that the value of `canvas` will be `undefined` until the component has mounted, so we put the logic inside the `onMount` [lifecycle function](/tutorial/onmount).
diff --git a/site/content/tutorial/06-bindings/14-component-this/text.md b/site/content/tutorial/06-bindings/14-component-this/text.md
index 00af193604..e389dbbacf 100644
--- a/site/content/tutorial/06-bindings/14-component-this/text.md
+++ b/site/content/tutorial/06-bindings/14-component-this/text.md
@@ -2,9 +2,13 @@
title: Binding to component instances
---
-Just as you can bind to DOM elements, you can bind to component instances themselves. For example, we can bind the instance of `` to a prop named `field` in the same way we did when binding DOM Elements
+Just as you can bind to DOM elements, you can bind to component instances themselves. For example, we can bind the instance of `` to a variable named `field` in the same way we did when binding DOM Elements
```html
+
+
```
@@ -12,8 +16,8 @@ Now we can programmatically interact with this component using `field`.
```html
- Focus field
+ Focus field
```
-> Note that we can't do `{field.focus}` since field is undefined when the button is first rendered and throws an error.
\ No newline at end of file
+> Note that we can't do `{field.focus}` since field is undefined when the button is first rendered and throws an error.
diff --git a/site/content/tutorial/07-lifecycle/01-onmount/text.md b/site/content/tutorial/07-lifecycle/01-onmount/text.md
index 54b385e889..f24fce5fc2 100644
--- a/site/content/tutorial/07-lifecycle/01-onmount/text.md
+++ b/site/content/tutorial/07-lifecycle/01-onmount/text.md
@@ -4,7 +4,7 @@ title: onMount
Every component has a *lifecycle* that starts when it is created, and ends when it is destroyed. There are a handful of functions that allow you to run code at key moments during that lifecycle.
-The one you'll use most frequently is `onMount`, which runs after the component is first rendered to the DOM. We briefly encountered it [earlier](tutorial/bind-this) when we needed to interact with a `` element after it had been rendered.
+The one you'll use most frequently is `onMount`, which runs after the component is first rendered to the DOM. We briefly encountered it [earlier](/tutorial/bind-this) when we needed to interact with a `` element after it had been rendered.
We'll add an `onMount` handler that loads some data over the network:
diff --git a/site/content/tutorial/08-stores/01-writable-stores/app-a/App.svelte b/site/content/tutorial/08-stores/01-writable-stores/app-a/App.svelte
index f2a4023f25..481b3070dc 100644
--- a/site/content/tutorial/08-stores/01-writable-stores/app-a/App.svelte
+++ b/site/content/tutorial/08-stores/01-writable-stores/app-a/App.svelte
@@ -4,14 +4,14 @@
import Decrementer from './Decrementer.svelte';
import Resetter from './Resetter.svelte';
- let count_value;
+ let countValue;
count.subscribe(value => {
- count_value = value;
+ countValue = value;
});
-The count is {count_value}
+The count is {countValue}
diff --git a/site/content/tutorial/08-stores/01-writable-stores/app-b/App.svelte b/site/content/tutorial/08-stores/01-writable-stores/app-b/App.svelte
index ee542f789d..57bbde1c1e 100644
--- a/site/content/tutorial/08-stores/01-writable-stores/app-b/App.svelte
+++ b/site/content/tutorial/08-stores/01-writable-stores/app-b/App.svelte
@@ -4,14 +4,14 @@
import Decrementer from './Decrementer.svelte';
import Resetter from './Resetter.svelte';
- let count_value;
+ let countValue;
- const unsubscribe = count.subscribe(value => {
- count_value = value;
+ count.subscribe(value => {
+ countValue = value;
});
-The count is {count_value}
+The count is {countValue}
diff --git a/site/content/tutorial/08-stores/01-writable-stores/text.md b/site/content/tutorial/08-stores/01-writable-stores/text.md
index 247ef86e8d..dc7081f46a 100644
--- a/site/content/tutorial/08-stores/01-writable-stores/text.md
+++ b/site/content/tutorial/08-stores/01-writable-stores/text.md
@@ -4,7 +4,7 @@ title: Writable stores
Not all application state belongs inside your application's component hierarchy. Sometimes, you'll have values that need to be accessed by multiple unrelated components, or by a regular JavaScript module.
-In Svelte, we do this with *stores*. A store is simply an object with a `subscribe` method that allows interested parties to be notified whenever the store value changes. In `App.svelte`, `count` is a store, and we're setting `count_value` in the `count.subscribe` callback.
+In Svelte, we do this with *stores*. A store is simply an object with a `subscribe` method that allows interested parties to be notified whenever the store value changes. In `App.svelte`, `count` is a store, and we're setting `countValue` in the `count.subscribe` callback.
Click the `stores.js` tab to see the definition of `count`. It's a *writable* store, which means it has `set` and `update` methods in addition to `subscribe`.
diff --git a/site/content/tutorial/08-stores/02-auto-subscriptions/app-a/App.svelte b/site/content/tutorial/08-stores/02-auto-subscriptions/app-a/App.svelte
index f2a4023f25..481b3070dc 100644
--- a/site/content/tutorial/08-stores/02-auto-subscriptions/app-a/App.svelte
+++ b/site/content/tutorial/08-stores/02-auto-subscriptions/app-a/App.svelte
@@ -4,14 +4,14 @@
import Decrementer from './Decrementer.svelte';
import Resetter from './Resetter.svelte';
- let count_value;
+ let countValue;
count.subscribe(value => {
- count_value = value;
+ countValue = value;
});
-The count is {count_value}
+The count is {countValue}
diff --git a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md
index 27d3251c6e..2bed4a67d1 100644
--- a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md
+++ b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md
@@ -8,12 +8,12 @@ Start by declaring `unsubscribe` in `App.svelte`:
```js
const unsubscribe = count.subscribe(value => {
- count_value = value;
+ countValue = value;
});
```
> Calling a `subscribe` method returns an `unsubscribe` function.
-You now declared `unsubscribe`, but it still needs to be called, for example through the `onDestroy` [lifecycle hook](tutorial/ondestroy):
+You now declared `unsubscribe`, but it still needs to be called, for example through the `onDestroy` [lifecycle hook](/tutorial/ondestroy):
```html
-The count is {count_value}
+The count is {countValue}
```
It starts to get a bit boilerplatey though, especially if your component subscribes to multiple stores. Instead, Svelte has a trick up its sleeve — you can reference a store value by prefixing the store name with `$`:
diff --git a/site/content/tutorial/08-stores/04-derived-stores/text.md b/site/content/tutorial/08-stores/04-derived-stores/text.md
index 5663d3c81d..8c2c3e2839 100644
--- a/site/content/tutorial/08-stores/04-derived-stores/text.md
+++ b/site/content/tutorial/08-stores/04-derived-stores/text.md
@@ -11,4 +11,4 @@ export const elapsed = derived(
);
```
-> It's possible to derive a store from multiple inputs, and to explicitly `set` a value instead of returning it (which is useful for deriving values asynchronously). Consult the [API reference](docs#derived) for more information.
+> It's possible to derive a store from multiple inputs, and to explicitly `set` a value instead of returning it (which is useful for deriving values asynchronously). Consult the [API reference](/docs#run-time-svelte-store-derived) for more information.
diff --git a/site/content/tutorial/10-transitions/04-custom-css-transitions/app-b/App.svelte b/site/content/tutorial/10-transitions/04-custom-css-transitions/app-b/App.svelte
index a98f38272a..4bb475157c 100644
--- a/site/content/tutorial/10-transitions/04-custom-css-transitions/app-b/App.svelte
+++ b/site/content/tutorial/10-transitions/04-custom-css-transitions/app-b/App.svelte
@@ -13,7 +13,7 @@
return `
transform: scale(${eased}) rotate(${eased * 1080}deg);
color: hsl(
- ${~~(t * 360)},
+ ${Math.trunc(t * 360)},
${Math.min(100, 1000 - 1000 * t)}%,
${Math.min(50, 500 - 500 * t)}%
);`
diff --git a/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md b/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md
index 0745a5924d..138d3de3b6 100644
--- a/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md
+++ b/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md
@@ -23,7 +23,7 @@ The function takes two arguments — the node to which the transition is applied
* `delay` — milliseconds before the transition begins
* `duration` — length of the transition in milliseconds
-* `easing` — a `p => t` easing function (see the chapter on [tweening](tutorial/tweened))
+* `easing` — a `p => t` easing function (see the chapter on [tweening](/tutorial/tweened))
* `css` — a `(t, u) => css` function, where `u === 1 - t`
* `tick` — a `(t, u) => {...}` function that has some effect on the node
@@ -59,7 +59,7 @@ We can get a lot more creative though. Let's make something truly gratuitous:
return `
transform: scale(${eased}) rotate(${eased * 1080}deg);
color: hsl(
- ${~~(t * 360)},
+ ${Math.trunc(t * 360)},
${Math.min(100, 1000 - 1000 * t)}%,
${Math.min(50, 500 - 500 * t)}%
);`
diff --git a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte
index 11a8ec3ef5..7ce4a86e92 100644
--- a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte
+++ b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-a/App.svelte
@@ -16,7 +16,7 @@
{#if visible}
-
+
The quick brown fox jumps over the lazy dog
-{/if}
\ No newline at end of file
+{/if}
diff --git a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte
index 5e1ad9863c..563803387b 100644
--- a/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte
+++ b/site/content/tutorial/10-transitions/05-custom-js-transitions/app-b/App.svelte
@@ -17,7 +17,7 @@
return {
duration,
tick: t => {
- const i = ~~(text.length * t);
+ const i = Math.trunc(text.length * t);
node.textContent = text.slice(0, i);
}
};
@@ -30,7 +30,7 @@
{#if visible}
-
+
The quick brown fox jumps over the lazy dog
{/if}
diff --git a/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md b/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md
index 25b8d0bd52..38c716504e 100644
--- a/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md
+++ b/site/content/tutorial/10-transitions/05-custom-js-transitions/text.md
@@ -21,7 +21,7 @@ function typewriter(node, { speed = 1 }) {
return {
duration,
tick: t => {
- const i = ~~(text.length * t);
+ const i = Math.trunc(text.length * t);
node.textContent = text.slice(0, i);
}
};
diff --git a/site/content/tutorial/10-transitions/07-local-transitions/text.md b/site/content/tutorial/10-transitions/07-local-transitions/text.md
index 400fbcaacb..7b9b0ce7f4 100644
--- a/site/content/tutorial/10-transitions/07-local-transitions/text.md
+++ b/site/content/tutorial/10-transitions/07-local-transitions/text.md
@@ -6,7 +6,7 @@ Ordinarily, transitions will play on elements when any container block is added
Instead, we'd like transitions to play only when individual items are added and removed — in other words, when the user drags the slider.
-We can achieve this with a *local* transition, which only plays when the immediate parent block is added or removed:
+We can achieve this with a *local* transition, which only plays when the block with the transition itself is added or removed:
```html
diff --git a/site/content/tutorial/11-animations/01-animate/text.md b/site/content/tutorial/11-animations/01-animate/text.md
index 9a1808e259..fc09f39cad 100644
--- a/site/content/tutorial/11-animations/01-animate/text.md
+++ b/site/content/tutorial/11-animations/01-animate/text.md
@@ -2,7 +2,7 @@
title: The animate directive
---
-In the [previous chapter](tutorial/deferred-transitions), we used deferred transitions to create the illusion of motion as elements move from one todo list to the other.
+In the [previous chapter](/tutorial/deferred-transitions), we used deferred transitions to create the illusion of motion as elements move from one todo list to the other.
To complete the illusion, we also need to apply motion to the elements that *aren't* transitioning. For this, we use the `animate` directive.
diff --git a/site/content/tutorial/12-actions/01-actions/app-a/App.svelte b/site/content/tutorial/12-actions/01-actions/app-a/App.svelte
index feacc44c52..0e78f482c5 100644
--- a/site/content/tutorial/12-actions/01-actions/app-a/App.svelte
+++ b/site/content/tutorial/12-actions/01-actions/app-a/App.svelte
@@ -1,29 +1,16 @@
+
(showModal = true)}>Show Modal
+{#if showModal}
+
(showModal = false)}>
+ Click outside me!
+
+{/if}
+
-
-
\ No newline at end of file
diff --git a/site/content/tutorial/12-actions/01-actions/app-a/pannable.js b/site/content/tutorial/12-actions/01-actions/app-a/click_outside.js
similarity index 69%
rename from site/content/tutorial/12-actions/01-actions/app-a/pannable.js
rename to site/content/tutorial/12-actions/01-actions/app-a/click_outside.js
index 332cd3e147..c406f6e95c 100644
--- a/site/content/tutorial/12-actions/01-actions/app-a/pannable.js
+++ b/site/content/tutorial/12-actions/01-actions/app-a/click_outside.js
@@ -1,4 +1,4 @@
-export function pannable(node) {
+export function clickOutside(node) {
// setup work goes here...
return {
@@ -6,4 +6,4 @@ export function pannable(node) {
// ...cleanup goes here
}
};
-}
\ No newline at end of file
+}
diff --git a/site/content/tutorial/12-actions/01-actions/app-b/App.svelte b/site/content/tutorial/12-actions/01-actions/app-b/App.svelte
index 171f82762c..79214ec81f 100644
--- a/site/content/tutorial/12-actions/01-actions/app-b/App.svelte
+++ b/site/content/tutorial/12-actions/01-actions/app-b/App.svelte
@@ -1,30 +1,16 @@
+
(showModal = true)}>Show Modal
+{#if showModal}
+
(showModal = false)}>
+ Click outside me!
+
+{/if}
+
-
-
\ No newline at end of file
diff --git a/site/content/tutorial/12-actions/01-actions/app-b/click_outside.js b/site/content/tutorial/12-actions/01-actions/app-b/click_outside.js
new file mode 100644
index 0000000000..e8983c1457
--- /dev/null
+++ b/site/content/tutorial/12-actions/01-actions/app-b/click_outside.js
@@ -0,0 +1,15 @@
+export function clickOutside(node) {
+ const handleClick = (event) => {
+ if (!node.contains(event.target)) {
+ node.dispatchEvent(new CustomEvent("outclick"));
+ }
+ };
+
+ document.addEventListener("click", handleClick, true);
+
+ return {
+ destroy() {
+ document.removeEventListener("click", handleClick, true);
+ }
+ };
+}
diff --git a/site/content/tutorial/12-actions/01-actions/app-b/pannable.js b/site/content/tutorial/12-actions/01-actions/app-b/pannable.js
deleted file mode 100644
index f7d15328be..0000000000
--- a/site/content/tutorial/12-actions/01-actions/app-b/pannable.js
+++ /dev/null
@@ -1,47 +0,0 @@
-export function pannable(node) {
- let x;
- let y;
-
- function handleMousedown(event) {
- x = event.clientX;
- y = event.clientY;
-
- node.dispatchEvent(new CustomEvent('panstart', {
- detail: { x, y }
- }));
-
- window.addEventListener('mousemove', handleMousemove);
- window.addEventListener('mouseup', handleMouseup);
- }
-
- function handleMousemove(event) {
- const dx = event.clientX - x;
- const dy = event.clientY - y;
- x = event.clientX;
- y = event.clientY;
-
- node.dispatchEvent(new CustomEvent('panmove', {
- detail: { x, y, dx, dy }
- }));
- }
-
- function handleMouseup(event) {
- x = event.clientX;
- y = event.clientY;
-
- node.dispatchEvent(new CustomEvent('panend', {
- detail: { x, y }
- }));
-
- window.removeEventListener('mousemove', handleMousemove);
- window.removeEventListener('mouseup', handleMouseup);
- }
-
- node.addEventListener('mousedown', handleMousedown);
-
- return {
- destroy() {
- node.removeEventListener('mousedown', handleMousedown);
- }
- };
-}
\ No newline at end of file
diff --git a/site/content/tutorial/12-actions/01-actions/text.md b/site/content/tutorial/12-actions/01-actions/text.md
index 3706b31e7c..dfe75c192f 100644
--- a/site/content/tutorial/12-actions/01-actions/text.md
+++ b/site/content/tutorial/12-actions/01-actions/text.md
@@ -4,85 +4,45 @@ title: The use directive
Actions are essentially element-level lifecycle functions. They're useful for things like:
-* interfacing with third-party libraries
-* lazy-loaded images
-* tooltips
-* adding custom event handlers
+- interfacing with third-party libraries
+- lazy-loaded images
+- tooltips
+- adding custom event handlers
-In this app, we want to make the orange box 'pannable'. It has event handlers for the `panstart`, `panmove` and `panend` events, but these aren't native DOM events. We have to dispatch them ourselves. First, import the `pannable` function...
+In this app, we want to make the orange modal close when the user clicks outside it. It has an event handler for the `outclick` event, but it isn't a native DOM event. We have to dispatch it ourselves. First, import the `clickOutside` function...
```js
-import { pannable } from './pannable.js';
+import { clickOutside } from "./click_outside.js";
```
...then use it with the element:
```html
-
+
+ Click outside me!
+
```
-Open the `pannable.js` file. Like transition functions, an action function receives a `node` and some optional parameters, and returns an action object. That object can have a `destroy` function, which is called when the element is unmounted.
+Open the `click_outside.js` file. Like transition functions, an action function receives a `node` (which is the element that the action is applied to) and some optional parameters, and returns an action object. That object can have a `destroy` function, which is called when the element is unmounted.
-We want to fire `panstart` event when the user mouses down on the element, `panmove` events (with `dx` and `dy` properties showing how far the mouse moved) when they drag it, and `panend` events when they mouse up. One possible implementation looks like this:
+We want to fire the `outclick` event when the user clicks outside the orange box. One possible implementation looks like this:
```js
-export function pannable(node) {
- let x;
- let y;
-
- function handleMousedown(event) {
- x = event.clientX;
- y = event.clientY;
-
- node.dispatchEvent(new CustomEvent('panstart', {
- detail: { x, y }
- }));
-
- window.addEventListener('mousemove', handleMousemove);
- window.addEventListener('mouseup', handleMouseup);
- }
-
- function handleMousemove(event) {
- const dx = event.clientX - x;
- const dy = event.clientY - y;
- x = event.clientX;
- y = event.clientY;
-
- node.dispatchEvent(new CustomEvent('panmove', {
- detail: { x, y, dx, dy }
- }));
- }
-
- function handleMouseup(event) {
- x = event.clientX;
- y = event.clientY;
-
- node.dispatchEvent(new CustomEvent('panend', {
- detail: { x, y }
- }));
-
- window.removeEventListener('mousemove', handleMousemove);
- window.removeEventListener('mouseup', handleMouseup);
- }
+export function clickOutside(node) {
+ const handleClick = (event) => {
+ if (!node.contains(event.target)) {
+ node.dispatchEvent(new CustomEvent("outclick"));
+ }
+ };
- node.addEventListener('mousedown', handleMousedown);
+ document.addEventListener("click", handleClick, true);
return {
destroy() {
- node.removeEventListener('mousedown', handleMousedown);
- }
+ document.removeEventListener("click", handleClick, true);
+ },
};
}
```
-Update the `pannable` function and try moving the box around.
-
-> This implementation is for demonstration purposes — a more complete one would also consider touch events.
+Update the `clickOutside` function, click the button to show the modal and then click outside it to close it.
diff --git a/site/content/tutorial/14-composition/03-named-slots/app-a/ContactCard.svelte b/site/content/tutorial/14-composition/03-named-slots/app-a/ContactCard.svelte
index 4d8ba30e75..af21dbf379 100644
--- a/site/content/tutorial/14-composition/03-named-slots/app-a/ContactCard.svelte
+++ b/site/content/tutorial/14-composition/03-named-slots/app-a/ContactCard.svelte
@@ -42,12 +42,12 @@
}
.address {
- background-image: url(tutorial/icons/map-marker.svg);
+ background-image: url(/tutorial/icons/map-marker.svg);
}
.email {
- background-image: url(tutorial/icons/email.svg);
+ background-image: url(/tutorial/icons/email.svg);
}
.missing {
color: #999;
}
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/14-composition/03-named-slots/app-b/ContactCard.svelte b/site/content/tutorial/14-composition/03-named-slots/app-b/ContactCard.svelte
index 0348b70c55..6f07d2aecb 100644
--- a/site/content/tutorial/14-composition/03-named-slots/app-b/ContactCard.svelte
+++ b/site/content/tutorial/14-composition/03-named-slots/app-b/ContactCard.svelte
@@ -42,12 +42,12 @@
}
.address {
- background-image: url(tutorial/icons/map-marker.svg);
+ background-image: url(/tutorial/icons/map-marker.svg);
}
.email {
- background-image: url(tutorial/icons/email.svg);
+ background-image: url(/tutorial/icons/email.svg);
}
.missing {
color: #999;
}
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/15-context/01-context-api/app-a/Map.svelte b/site/content/tutorial/15-context/01-context-api/app-a/Map.svelte
index c6a660a49f..e94bd3f0cd 100644
--- a/site/content/tutorial/15-context/01-context-api/app-a/Map.svelte
+++ b/site/content/tutorial/15-context/01-context-api/app-a/Map.svelte
@@ -1,5 +1,5 @@
+
+
+
+
+
{#if map}
-
+
{/if}
@@ -45,4 +45,4 @@
width: 100%;
height: 100%;
}
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/15-context/01-context-api/app-a/mapbox.js b/site/content/tutorial/15-context/01-context-api/app-a/mapbox.js
index 55b4200038..9c5cec430c 100644
--- a/site/content/tutorial/15-context/01-context-api/app-a/mapbox.js
+++ b/site/content/tutorial/15-context/01-context-api/app-a/mapbox.js
@@ -3,6 +3,6 @@ import mapbox from 'mapbox-gl';
// https://docs.mapbox.com/help/glossary/access-token/
mapbox.accessToken = MAPBOX_ACCESS_TOKEN;
-const key = {};
+const key = Symbol();
export { mapbox, key };
\ No newline at end of file
diff --git a/site/content/tutorial/15-context/01-context-api/app-b/Map.svelte b/site/content/tutorial/15-context/01-context-api/app-b/Map.svelte
index 059fcca45b..bd4010e765 100644
--- a/site/content/tutorial/15-context/01-context-api/app-b/Map.svelte
+++ b/site/content/tutorial/15-context/01-context-api/app-b/Map.svelte
@@ -1,9 +1,9 @@
+
+
+
+
+
{#if map}
-
+
{/if}
@@ -47,4 +47,4 @@
width: 100%;
height: 100%;
}
-
\ No newline at end of file
+
diff --git a/site/content/tutorial/15-context/01-context-api/app-b/mapbox.js b/site/content/tutorial/15-context/01-context-api/app-b/mapbox.js
index 55b4200038..9c5cec430c 100644
--- a/site/content/tutorial/15-context/01-context-api/app-b/mapbox.js
+++ b/site/content/tutorial/15-context/01-context-api/app-b/mapbox.js
@@ -3,6 +3,6 @@ import mapbox from 'mapbox-gl';
// https://docs.mapbox.com/help/glossary/access-token/
mapbox.accessToken = MAPBOX_ACCESS_TOKEN;
-const key = {};
+const key = Symbol();
export { mapbox, key };
\ No newline at end of file
diff --git a/site/content/tutorial/15-context/01-context-api/text.md b/site/content/tutorial/15-context/01-context-api/text.md
index dc5f2d7e8b..e1f095c494 100644
--- a/site/content/tutorial/15-context/01-context-api/text.md
+++ b/site/content/tutorial/15-context/01-context-api/text.md
@@ -11,7 +11,7 @@ There are two halves to the context API — `setContext` and `getContext`. If a
Let's set the context first. In `Map.svelte`, import `setContext` from `svelte` and `key` from `mapbox.js` and call `setContext`:
```js
-import { onMount, setContext } from 'svelte';
+import { onDestroy, setContext } from 'svelte';
import { mapbox, key } from './mapbox.js';
setContext(key, {
@@ -19,7 +19,7 @@ setContext(key, {
});
```
-The context object can be anything you like. Like [lifecycle functions](tutorial/onmount), `setContext` and `getContext` must be called during component initialisation. Calling it afterwards - for example inside `onMount` - will throw an error. In this example, since `map` isn't created until the component has mounted, our context object contains a `getMap` function rather than `map` itself.
+The context object can be anything you like. Like [lifecycle functions](/tutorial/onmount), `setContext` and `getContext` must be called during component initialisation. Calling it afterwards - for example inside `onMount` - will throw an error. In this example, since `map` isn't created until the component has mounted, our context object contains a `getMap` function rather than `map` itself.
On the other side of the equation, in `MapMarker.svelte`, we can now get a reference to the Mapbox instance:
@@ -40,10 +40,10 @@ The markers can now add themselves to the map.
In `mapbox.js` you'll see this line:
```js
-const key = {};
+const key = Symbol();
```
-We can use anything as a key — we could do `setContext('mapbox', ...)` for example. The downside of using a string is that different component libraries might accidentally use the same one; using an object literal means the keys are guaranteed not to conflict in any circumstance (since an object only has referential equality to itself, i.e. `{} !== {}` whereas `"x" === "x"`), even when you have multiple different contexts operating across many component layers.
+Technically, we can use any value as a key — we could do `setContext('mapbox', ...)` for example. The downside of using a string is that different component libraries might accidentally use the same one; using [symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol), on the other hand, means that the keys are guaranteed not to conflict in any circumstance, even when you have multiple different contexts operating across many component layers, since a symbol is essentially a unique identifier.
## Contexts vs. stores
diff --git a/site/content/tutorial/16-special-elements/01-svelte-self/app-a/File.svelte b/site/content/tutorial/16-special-elements/01-svelte-self/app-a/File.svelte
index 8a0048dd68..e769ab4841 100644
--- a/site/content/tutorial/16-special-elements/01-svelte-self/app-a/File.svelte
+++ b/site/content/tutorial/16-special-elements/01-svelte-self/app-a/File.svelte
@@ -3,7 +3,7 @@
$: type = name.slice(name.lastIndexOf('.') + 1);
-
{name}
+
{name}
\ No newline at end of file
+
diff --git a/site/content/tutorial/16-special-elements/01-svelte-self/app-a/Folder.svelte b/site/content/tutorial/16-special-elements/01-svelte-self/app-a/Folder.svelte
index 1108b3575c..e93ffdc548 100644
--- a/site/content/tutorial/16-special-elements/01-svelte-self/app-a/Folder.svelte
+++ b/site/content/tutorial/16-special-elements/01-svelte-self/app-a/Folder.svelte
@@ -29,14 +29,14 @@
\ No newline at end of file
+
diff --git a/site/content/tutorial/16-special-elements/01-svelte-self/app-b/Folder.svelte b/site/content/tutorial/16-special-elements/01-svelte-self/app-b/Folder.svelte
index 11049c2e52..d3fc3a431f 100644
--- a/site/content/tutorial/16-special-elements/01-svelte-self/app-b/Folder.svelte
+++ b/site/content/tutorial/16-special-elements/01-svelte-self/app-b/Folder.svelte
@@ -29,14 +29,14 @@
-
-
-
-
\ No newline at end of file
diff --git a/site/src/components/Lazy.svelte b/site/src/components/Lazy.svelte
deleted file mode 100644
index ef81d68f00..0000000000
--- a/site/src/components/Lazy.svelte
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/site/src/components/PreloadingIndicator.svelte b/site/src/components/PreloadingIndicator.svelte
deleted file mode 100644
index 8b88029abb..0000000000
--- a/site/src/components/PreloadingIndicator.svelte
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-{#if visible}
-
-{/if}
-
-{#if p >= 0.4}
-
-{/if}
\ No newline at end of file
diff --git a/site/src/components/Repl/InputOutputToggle.svelte b/site/src/components/Repl/InputOutputToggle.svelte
deleted file mode 100644
index 8233ee58b2..0000000000
--- a/site/src/components/Repl/InputOutputToggle.svelte
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- input
-
- output
-
\ No newline at end of file
diff --git a/site/src/components/Repl/ReplWidget.svelte b/site/src/components/Repl/ReplWidget.svelte
deleted file mode 100644
index e83d53fb4d..0000000000
--- a/site/src/components/Repl/ReplWidget.svelte
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
- {#if process.browser}
-
- {/if}
-
-
- {#if mobile}
-
- {/if}
-
diff --git a/site/src/components/ScreenToggle.svelte b/site/src/components/ScreenToggle.svelte
deleted file mode 100644
index 87d90aa7a8..0000000000
--- a/site/src/components/ScreenToggle.svelte
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
- {#each labels as label, index}
- offset = index}
- >
- {label}
-
- {/each}
-
diff --git a/site/src/config.js b/site/src/config.js
deleted file mode 100644
index a97ea46599..0000000000
--- a/site/src/config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// REPL props
-
-export const svelteUrl = `https://unpkg.com/svelte@3`;
-export const rollupUrl = `https://unpkg.com/rollup@1/dist/rollup.browser.js`;
-export const mapbox_setup = `window.MAPBOX_ACCESS_TOKEN = process.env.MAPBOX_ACCESS_TOKEN;`;
diff --git a/site/src/routes/_components/Contributors.svelte b/site/src/routes/_components/Contributors.svelte
deleted file mode 100644
index 74eb3fa50f..0000000000
--- a/site/src/routes/_components/Contributors.svelte
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-{#each contributors as contributor, i}
-
- {contributor}
-
-{/each}
diff --git a/site/src/routes/_components/Example.svelte b/site/src/routes/_components/Example.svelte
deleted file mode 100644
index c07b4be0b5..0000000000
--- a/site/src/routes/_components/Example.svelte
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {#if intersecting}
-
-
- {/if}
-
-
-
-
\ No newline at end of file
diff --git a/site/src/routes/_components/WhosUsingSvelte.js b/site/src/routes/_components/WhosUsingSvelte.js
deleted file mode 100644
index 430bc95867..0000000000
--- a/site/src/routes/_components/WhosUsingSvelte.js
+++ /dev/null
@@ -1,80 +0,0 @@
-export const companies = [
- {
- href: "https://1password.com",
- filename: "1password.svg",
- alt: "1Password logo",
- },
- {
- href: "https://www.alaskaair.com/",
- style: "background-color: #01426a;",
- filename: "alaskaairlines.svg",
- alt: "Alaska Airlines logo",
- },
- {
- href: "https://avast.com",
- filename: "avast.svg",
- alt: "Avast logo",
- },
- {
- href: "https://chess.com",
- style: "background-color: #312e2b;",
- filename: "chess.svg",
- alt: "Chess.com logo",
- },
- {
- href: "https://fusioncharts.com",
- filename: "fusioncharts.svg",
- alt: "FusionCharts logo",
- },
- {
- href: "https://godaddy.com",
- filename: "godaddy.svg",
- alt: "GoDaddy logo",
- },
- {
- href: "https://www.ibm.com/",
- filename: "ibm.svg",
- alt: "IBM logo",
- },
- {
- href: "https://media.lesechos.fr/infographie",
- filename: "les-echos.svg",
- alt: "Les Echos",
- },
- {
- href: "https://www.philips.co.uk",
- filename: "philips.svg",
- alt: "Philips logo",
- },
- {
- href: "https://global.rakuten.com/corp/",
- filename: "rakuten.svg",
- alt: "Rakuten logo",
- },
- {
- href: "https://razorpay.com",
- filename: "razorpay.svg",
- alt: "Razorpay logo",
- },
- {
- href: "https://www.se.com",
- style: " background-color: #3dcd58; ",
- filename: "Schneider_Electric.svg",
- alt: "Schneider Electric",
- },
- {
- href: "https://squareup.com",
- filename: "square.svg",
- alt: "Square",
- },
- {
- href: "https://nytimes.com",
- filename: "nyt.svg",
- alt: "The New York Times logo",
- },
- {
- href: "https://transloadit.com",
- filename: "transloadit.svg",
- alt: "Transloadit",
- },
-];
diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte
deleted file mode 100644
index d1de57fd2a..0000000000
--- a/site/src/routes/_components/WhosUsingSvelte.svelte
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
diff --git a/site/src/routes/_error.svelte b/site/src/routes/_error.svelte
deleted file mode 100644
index 9d35dd905f..0000000000
--- a/site/src/routes/_error.svelte
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
- {status}
-
-
-
- {#if online}
-
Yikes!
-
- {#if error.message}
-
{status}: {error.message}
- {:else}
-
Encountered a {status} error
- {/if}
-
- {#if dev && error.stack}
-
{error.stack}
- {:else}
- {#if status >= 500}
-
Please try reloading the page.
- {/if}
-
-
If the error persists, please drop by Discord chatroom and let us know, or raise an issue on GitHub . Thanks!
- {/if}
- {:else}
-
It looks like you're offline
-
-
Reload the page once you've found the internet.
- {/if}
-
\ No newline at end of file
diff --git a/site/src/routes/_layout.svelte b/site/src/routes/_layout.svelte
deleted file mode 100644
index 936db61f8b..0000000000
--- a/site/src/routes/_layout.svelte
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-{#if $preloading}
-
-{/if}
-
-{#if $page.path !== '/repl/embed'}
-
- Tutorial
- Docs
- Examples
- REPL
- Blog
- FAQ
-
- SvelteKit
-
-
-
-
-
-
-
-
-
-{/if}
-
-
-
-
-
-
diff --git a/site/src/routes/apps/index.json.js b/site/src/routes/apps/index.json.js
deleted file mode 100644
index e6a09d52c5..0000000000
--- a/site/src/routes/apps/index.json.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import send from '@polka/send';
-import { query } from '../../utils/db';
-
-export async function get(req, res) {
- if (req.user) {
- const page_size = 100;
- const offset = req.query.offset ? parseInt(req.query.offset) : 0;
- const rows = await query(`
- select g.uid, g.name, coalesce(g.updated_at, g.created_at) as updated_at
- from gists g
- where g.user_id = $1
- order by id desc
- limit ${page_size + 1}
- offset $2
- `, [req.user.id, offset]);
-
- rows.forEach(row => {
- row.uid = row.uid.replace(/-/g, '');
- });
-
- const more = rows.length > page_size;
- send(res, 200, { apps: rows.slice(0, page_size), offset: more ? offset + page_size : null });
- } else {
- send(res, 401);
- }
-}
diff --git a/site/src/routes/apps/index.svelte b/site/src/routes/apps/index.svelte
deleted file mode 100644
index 36cd1a904c..0000000000
--- a/site/src/routes/apps/index.svelte
+++ /dev/null
@@ -1,140 +0,0 @@
-
-
-
-
-
- Your apps • Svelte
-
-
-
- {#if user}
-
- Your apps
-
-
-
-
- {user.name || user.username}
- (log out )
-
-
-
-
-
-
- {#if offset !== null}
-
- {/if}
- {:else}
-
Please log in to see your saved apps.
- {/if}
-
-
-
diff --git a/site/src/routes/auth/_config.js b/site/src/routes/auth/_config.js
deleted file mode 100644
index 7d1669cd72..0000000000
--- a/site/src/routes/auth/_config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-export const oauth = 'https://github.com/login/oauth';
-export const baseurl = process.env.BASEURL;
-export const secure = baseurl && baseurl.startsWith('https:');
-
-export const client_id = process.env.GITHUB_CLIENT_ID;
-export const client_secret = process.env.GITHUB_CLIENT_SECRET;
\ No newline at end of file
diff --git a/site/src/routes/auth/callback.js b/site/src/routes/auth/callback.js
deleted file mode 100644
index 7979b1c21f..0000000000
--- a/site/src/routes/auth/callback.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import send from '@polka/send';
-import devalue from 'devalue';
-import * as cookie from 'cookie';
-import * as httpie from 'httpie';
-import { parse, stringify } from 'querystring';
-import { sanitize_user, create_user, create_session } from '../../utils/auth';
-import { oauth, secure, client_id, client_secret } from './_config.js';
-
-export async function get(req, res) {
- try {
- // Trade "code" for "access_token"
- const r1 = await httpie.post(`${oauth}/access_token?` + stringify({
- code: req.query.code,
- client_id,
- client_secret,
- }));
-
- // Now fetch User details
- const { access_token } = parse(r1.data);
- const r2 = await httpie.get('https://api.github.com/user', {
- headers: {
- 'User-Agent': 'svelte.dev',
- Authorization: `token ${access_token}`
- }
- });
-
- const user = await create_user(r2.data, access_token);
- const session = await create_session(user);
-
- res.writeHead(200, {
- 'Set-Cookie': cookie.serialize('sid', session.uid, {
- maxAge: 31536000,
- path: '/',
- httpOnly: true,
- secure
- }),
- 'Content-Type': 'text/html; charset=utf-8'
- });
-
- res.end(`
-
- `);
- } catch (err) {
- console.error('GET /auth/callback', err);
- send(res, 500, err.data, {
- 'Content-Type': err.headers['content-type'],
- 'Content-Length': err.headers['content-length']
- });
- }
-}
\ No newline at end of file
diff --git a/site/src/routes/auth/login.js b/site/src/routes/auth/login.js
deleted file mode 100644
index 7240498418..0000000000
--- a/site/src/routes/auth/login.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import send from '@polka/send';
-import { stringify } from 'querystring';
-import { oauth, baseurl, client_id } from './_config.js';
-
-export const get = client_id
- ? (req, res) => {
- const Location = `${oauth}/authorize?` + stringify({
- scope: 'read:user',
- client_id,
- redirect_uri: `${baseurl}/auth/callback`,
- });
-
- send(res, 302, Location, { Location });
- }
- : (req, res) => {
- send(res, 500, `
-
-
Missing .env file
-
In order to use GitHub authentication, you will need to register an OAuth application and create a local .env file:
-
GITHUB_CLIENT_ID=[YOUR_APP_ID]\nGITHUB_CLIENT_SECRET=[YOUR_APP_SECRET]\nBASEURL=http://localhost:3000
-
The BASEURL variable should match the callback URL specified for your app.
-
See also here
-
- `, {
- 'Content-Type': 'text/html; charset=utf-8'
- });
- };
\ No newline at end of file
diff --git a/site/src/routes/auth/logout.js b/site/src/routes/auth/logout.js
deleted file mode 100644
index 7e132f0a41..0000000000
--- a/site/src/routes/auth/logout.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import send from '@polka/send';
-import * as cookie from 'cookie';
-import { secure } from './_config.js';
-import { delete_session } from '../../utils/auth.js';
-
-export async function get(req, res) {
- await delete_session(req.cookies.sid);
-
- send(res, 200, '', {
- 'Set-Cookie': cookie.serialize('sid', '', {
- maxAge: -1,
- path: '/',
- httpOnly: true,
- secure
- })
- });
-}
\ No newline at end of file
diff --git a/site/src/routes/blog/[slug].json.js b/site/src/routes/blog/[slug].json.js
deleted file mode 100644
index ee41d5826d..0000000000
--- a/site/src/routes/blog/[slug].json.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import send from '@polka/send';
-import get_posts from './_posts.js';
-
-let lookup;
-
-export function get(req, res) {
- if (!lookup || process.env.NODE_ENV !== 'production') {
- lookup = new Map();
- get_posts().forEach(post => {
- lookup.set(post.slug, post);
- });
- }
-
- const post = lookup.get(req.params.slug);
-
- if (post) {
- res.setHeader('Cache-Control', `max-age=${5 * 60 * 1e3}`); // 5 minutes
- send(res, 200, post);
- } else {
- send(res, 404, { message: 'not found' });
- }
-}
diff --git a/site/src/routes/blog/[slug].svelte b/site/src/routes/blog/[slug].svelte
deleted file mode 100644
index 236d649d56..0000000000
--- a/site/src/routes/blog/[slug].svelte
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
- {post.metadata.title}
-
-
-
-
-
-
-
- {post.metadata.title}
- {post.metadata.description}
-
- {post.metadata.author} {post.metadata.dateString}
-
- {@html post.html}
-
-
-
diff --git a/site/src/routes/blog/_posts.js b/site/src/routes/blog/_posts.js
deleted file mode 100644
index 2c86e13656..0000000000
--- a/site/src/routes/blog/_posts.js
+++ /dev/null
@@ -1,59 +0,0 @@
-import fs from 'fs';
-import path from 'path';
-import { extract_frontmatter, link_renderer } from '@sveltejs/site-kit/utils/markdown.js';
-import marked from 'marked';
-import { makeSlugProcessor } from '../../utils/slug';
-import { highlight } from '../../utils/highlight';
-import { SLUG_PRESERVE_UNICODE } from '../../../config';
-
-const makeSlug = makeSlugProcessor(SLUG_PRESERVE_UNICODE);
-
-export default function get_posts() {
- return fs
- .readdirSync('content/blog')
- .map(file => {
- if (path.extname(file) !== '.md') return;
-
- const match = /^(\d+-\d+-\d+)-(.+)\.md$/.exec(file);
- if (!match) throw new Error(`Invalid filename '${file}'`);
-
- const [, pubdate, slug] = match;
-
- const markdown = fs.readFileSync(`content/blog/${file}`, 'utf-8');
-
- const { content, metadata } = extract_frontmatter(markdown);
-
- const date = new Date(`${pubdate} EDT`); // cheeky hack
- metadata.pubdate = pubdate;
- metadata.dateString = date.toDateString();
-
- const renderer = new marked.Renderer();
-
- renderer.link = link_renderer;
-
- renderer.code = highlight;
-
- renderer.heading = (text, level, rawtext) => {
- const fragment = makeSlug(rawtext);
-
- return `
-
-
-
- ${text}
- `;
- };
-
- const html = marked(
- content.replace(/^\t+/gm, match => match.split('\t').join(' ')),
- { renderer }
- );
-
- return {
- html,
- metadata,
- slug
- };
- })
- .sort((a, b) => a.metadata.pubdate < b.metadata.pubdate ? 1 : -1);
-}
diff --git a/site/src/routes/blog/index.json.js b/site/src/routes/blog/index.json.js
deleted file mode 100644
index 75180e6e87..0000000000
--- a/site/src/routes/blog/index.json.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import send from '@polka/send';
-import get_posts from './_posts.js';
-
-let json;
-
-export function get(req, res) {
- if (!json || process.env.NODE_ENV !== 'production') {
- const posts = get_posts()
- .filter(post => !post.metadata.draft)
- .map(post => {
- return {
- slug: post.slug,
- metadata: post.metadata
- };
- });
-
- json = JSON.stringify(posts);
- }
-
- send(res, 200, json, {
- 'Content-Type': 'application/json',
- 'Cache-Control': `max-age=${5 * 60 * 1e3}` // 5 minutes
- });
-}
diff --git a/site/src/routes/blog/index.svelte b/site/src/routes/blog/index.svelte
deleted file mode 100644
index 9f4192975a..0000000000
--- a/site/src/routes/blog/index.svelte
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
- Blog • Svelte
-
-
-
-
-
-
-
-
Blog
-
-
-
diff --git a/site/src/routes/blog/rss.xml.js b/site/src/routes/blog/rss.xml.js
deleted file mode 100644
index 544474b274..0000000000
--- a/site/src/routes/blog/rss.xml.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import send from '@polka/send';
-import get_posts from '../blog/_posts.js';
-
-const months = ',Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(',');
-
-function formatPubdate(str) {
- const [y, m, d] = str.split('-');
- return `${d} ${months[+m]} ${y} 12:00 +0000`;
-}
-
-function escapeHTML(html) {
- const chars = {
- '"' : 'quot',
- "'": '#39',
- '&': 'amp',
- '<' : 'lt',
- '>' : 'gt'
- };
-
- return html.replace(/["'&<>]/g, c => `&${chars[c]};`);
-}
-
-const rss = `
-
-
-
-
- Svelte blog
- https://svelte.dev/blog
- News and information about the magical disappearing UI framework
-
- https://svelte.dev/favicon.png
- Svelte
- https://svelte.dev/blog
-
- ${get_posts().filter(post => !post.metadata.draft).map(post => `
- -
-
${escapeHTML(post.metadata.title)}
- https://svelte.dev/blog/${post.slug}
- ${escapeHTML(post.metadata.description)}
- ${formatPubdate(post.metadata.pubdate)}
-
- `).join('')}
-
-
-
-`.replace(/>[^\S]+/gm, '>').replace(/[^\S]+ file[0] !== '.' && path.extname(file) === '.md')
- .map(file => {
- const markdown = fs.readFileSync(`content/docs/${file}`, 'utf-8');
-
- const { content, metadata } = extract_frontmatter(markdown);
-
- const section_slug = make_slug(metadata.title);
-
- const subsections = [];
-
- const renderer = new marked.Renderer();
-
- let block_open = false;
-
- renderer.link = link_renderer;
-
- renderer.hr = () => {
- block_open = true;
-
- return '
';
- };
-
- renderer.code = (source, lang) => {
- source = source.replace(/^ +/gm, match =>
- match.split(' ').join('\t')
- );
-
- const lines = source.split('\n');
-
- const meta = extract_metadata(lines[0], lang);
-
- let prefix = '';
- let className = 'code-block';
-
- if (meta) {
- source = lines.slice(1).join('\n');
- const filename = meta.filename || (lang === 'html' && 'App.svelte');
- if (filename) {
- prefix = `
${prefix} ${filename} `;
- className += ' named';
- }
- }
-
- if (meta && meta.hidden) return '';
-
- const html = `
${prefix}${highlight(source, lang)}
`;
-
- if (block_open) {
- block_open = false;
- return `
${html}
`;
- }
-
- return html;
- };
-
- renderer.heading = (text, level, rawtext) => {
- let slug;
-
- const match = /
]*>(.+)<\/a>/.exec(text);
- if (match) {
- slug = match[1];
- text = match[2];
- } else {
- slug = make_slug(rawtext);
- }
-
- if (level === 3 || level === 4) {
- const title = text
- .replace(/<\/?code>/g, '')
- .replace(/\.(\w+)(\((.+)?\))?/, (m, $1, $2, $3) => {
- if ($3) return `.${$1}(...)`;
- if ($2) return `.${$1}()`;
- return `.${$1}`;
- });
-
- subsections.push({ slug, title, level });
- }
-
- return `
-
- 4 ? 'data-scrollignore' : ''}>
-
- ${text}
- `;
- };
-
- blockTypes.forEach(type => {
- const fn = renderer[type];
- renderer[type] = function() {
- return fn.apply(this, arguments);
- };
- });
-
- const html = marked(content, { renderer });
-
- const hashes = {};
-
- return {
- html: html.replace(/@@(\d+)/g, (m, id) => hashes[id] || m),
- metadata,
- subsections,
- slug: section_slug,
- file,
- };
- });
-}
diff --git a/site/src/routes/docs/index.json.js b/site/src/routes/docs/index.json.js
deleted file mode 100644
index 66d588a949..0000000000
--- a/site/src/routes/docs/index.json.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import send from '@polka/send';
-import get_sections from './_sections.js';
-
-let json;
-
-export function get(req, res) {
- if (!json || process.env.NODE_ENV !== 'production') {
- json = get_sections();
- }
-
- send(res, 200, json);
-}
diff --git a/site/src/routes/docs/index.svelte b/site/src/routes/docs/index.svelte
deleted file mode 100644
index ea79d7f5c9..0000000000
--- a/site/src/routes/docs/index.svelte
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
- API Docs • Svelte
-
-
-
-
-
-
-API Docs
-
diff --git a/site/src/routes/examples/[slug].json.js b/site/src/routes/examples/[slug].json.js
deleted file mode 100644
index 705a4e7e89..0000000000
--- a/site/src/routes/examples/[slug].json.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import send from '@polka/send';
-import { get_example } from './_examples.js';
-
-const cache = new Map();
-
-export function get(req, res) {
- const { slug } = req.params;
-
- let example = cache.get(slug);
-
- if (!example || process.env.NODE_ENV !== 'production') {
- example = get_example(slug);
- if (example) cache.set(slug, example);
- }
-
- if (example) {
- send(res, 200, example);
- } else {
- send(res, 404, {
- error: 'not found'
- });
- }
-}
diff --git a/site/src/routes/examples/_TableOfContents.svelte b/site/src/routes/examples/_TableOfContents.svelte
deleted file mode 100644
index d5a8b7240f..0000000000
--- a/site/src/routes/examples/_TableOfContents.svelte
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
- {#each sections as section}
-
- {section.title}
-
- {#each section.examples as example}
-
- {/each}
-
- {/each}
-
diff --git a/site/src/routes/examples/_examples.js b/site/src/routes/examples/_examples.js
deleted file mode 100644
index e4580d7fda..0000000000
--- a/site/src/routes/examples/_examples.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import fs from 'fs';
-
-let lookup;
-const titles = new Map();
-
-export function get_examples() {
- lookup = new Map();
-
- return fs.readdirSync(`content/examples`).map(group_dir => {
- const metadata = JSON.parse(fs.readFileSync(`content/examples/${group_dir}/meta.json`, 'utf-8'));
-
- return {
- title: metadata.title,
- examples: fs.readdirSync(`content/examples/${group_dir}`).filter(file => file !== 'meta.json').map(example_dir => {
- const slug = example_dir.replace(/^\d+-/, '');
-
- if (lookup.has(slug)) throw new Error(`Duplicate example slug "${slug}"`);
- lookup.set(slug, `${group_dir}/${example_dir}`);
-
- const metadata = JSON.parse(fs.readFileSync(`content/examples/${group_dir}/${example_dir}/meta.json`, 'utf-8'));
- titles.set(slug, metadata.title);
-
- return {
- slug,
- title: metadata.title
- };
- })
- };
- });
-}
-
-export function get_example(slug) {
- if (!lookup || !lookup.has(slug)) get_examples();
-
- const dir = lookup.get(slug);
- const title = titles.get(slug);
-
- if (!dir || !title) return null;
-
- const files = fs.readdirSync(`content/examples/${dir}`)
- .filter(name => name[0] !== '.' && name !== 'meta.json')
- .map(name => {
- return {
- name,
- source: fs.readFileSync(`content/examples/${dir}/${name}`, 'utf-8')
- };
- });
-
- return { title, files };
-}
diff --git a/site/src/routes/examples/index.json.js b/site/src/routes/examples/index.json.js
deleted file mode 100644
index 09876e1993..0000000000
--- a/site/src/routes/examples/index.json.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import send from '@polka/send';
-import { get_examples } from './_examples.js';
-
-let cached;
-
-export function get(req, res) {
- try {
- if (!cached || process.env.NODE_ENV !== 'production') {
- cached = get_examples().filter(section => section.title);
- }
-
- send(res, 200, cached);
- } catch (e) {
- send(res, e.status || 500, {
- message: e.message
- });
- }
-}
diff --git a/site/src/routes/examples/index.svelte b/site/src/routes/examples/index.svelte
deleted file mode 100644
index 070f12b1ac..0000000000
--- a/site/src/routes/examples/index.svelte
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-
-
-
- {title} {title ? '•' : ''} Svelte Examples
-
-
-
-
-
-
-Examples
-
-
- {#if mobile}
-
- {/if}
-
-
-
diff --git a/site/src/routes/faq/_faqs.js b/site/src/routes/faq/_faqs.js
deleted file mode 100644
index fa48e02282..0000000000
--- a/site/src/routes/faq/_faqs.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import fs from 'fs';
-import path from 'path';
-import { extract_frontmatter, link_renderer } from '@sveltejs/site-kit/utils/markdown.js';
-import marked from 'marked';
-import { makeSlugProcessor } from '../../utils/slug';
-import { highlight } from '../../utils/highlight';
-import { SLUG_PRESERVE_UNICODE } from '../../../config';
-
-const makeSlug = makeSlugProcessor(SLUG_PRESERVE_UNICODE);
-
-export default function get_faqs() {
- return fs
- .readdirSync('content/faq')
- .map(file => {
- if (path.extname(file) !== '.md') return;
-
- const match = /^([0-9]+)-(.+)\.md$/.exec(file);
- if (!match) throw new Error(`Invalid filename '${file}'`);
-
- const [, order, slug] = match;
-
- const markdown = fs.readFileSync(`content/faq/${file}`, 'utf-8');
-
- const { content, metadata } = extract_frontmatter(markdown);
-
- const renderer = new marked.Renderer();
-
- renderer.link = link_renderer;
-
- renderer.code = highlight;
-
- renderer.heading = (text, level, rawtext) => {
- const fragment = makeSlug(rawtext);
-
- return `
-
-
-
- ${text}
- `;
- };
-
- const answer = marked(
- content.replace(/^\t+/gm, match => match.split('\t').join(' ')),
- { renderer }
- );
-
- const fragment = makeSlug(slug);
-
- return {
- fragment,
- order,
- answer,
- metadata
- };
- })
- .sort((a, b) => a.order - b.order);
-}
diff --git a/site/src/routes/faq/index.json.js b/site/src/routes/faq/index.json.js
deleted file mode 100644
index b6810a984e..0000000000
--- a/site/src/routes/faq/index.json.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import send from '@polka/send';
-import get_faqs from './_faqs.js';
-
-let json;
-
-export function get(req, res) {
- if (!json || process.env.NODE_ENV !== 'production') {
- const faqs = get_faqs()
- .map(faq => {
- return {
- fragment: faq.fragment,
- answer: faq.answer,
- metadata: faq.metadata
- };
- });
-
- json = JSON.stringify(faqs);
- }
-
- send(res, 200, json, {
- 'Content-Type': 'application/json',
- 'Cache-Control': `max-age=${5 * 60 * 1e3}` // 5 minutes
- });
-}
diff --git a/site/src/routes/faq/index.svelte b/site/src/routes/faq/index.svelte
deleted file mode 100644
index c426f5bf3d..0000000000
--- a/site/src/routes/faq/index.svelte
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
- Frequently Asked Questions • Svelte
-
-
-
-
-
-
-
-
Frequently Asked Questions
- {#each faqs as faq}
-
-
-
-
-
- {faq.metadata.question}
-
- {@html faq.answer}
-
- {/each}
-
-
-
diff --git a/site/src/routes/index.svelte b/site/src/routes/index.svelte
deleted file mode 100644
index 3c84d6ea15..0000000000
--- a/site/src/routes/index.svelte
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
- Svelte • Cybernetically enhanced web apps
-
-
-
-
-
-
-Svelte
-
-
-
-
- Write less code
- Build boilerplate-free components using languages you already know — HTML, CSS and JavaScript
-
- learn more
-
-
-
- No virtual DOM
- Svelte compiles your code to tiny, framework-less vanilla JS — your app starts fast and stays fast
-
- learn more
-
-
-
- Truly reactive
- No more complex state management libraries — Svelte brings reactivity to JavaScript itself
-
- learn more
-
-
-
-
Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser , Svelte shifts that work into a compile step that happens when you build your app.
-
-
Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.
-
-
Read the introductory blog post to learn more.
-
-
-
-
-
-
-
- Svelte components are built on top of HTML. Just add data.
-
-
-
- CSS is component-scoped by default — no more style collisions or specificity wars. Or you can use your favourite CSS-in-JS library .
-
-
-
- Trigger efficient, granular updates by assigning to local variables. The compiler does the rest.
-
-
-
- Build beautiful UIs with a powerful, performant transition engine built right into the framework.
-
-
-
-
- Who's using Svelte?
-
-
-
-
-
- Contributors
-
- Svelte is free and open source software, made possible by the work of dozens of volunteers. Join us!
-
-
-
diff --git a/site/src/routes/repl/[id]/_components/AppControls/UserMenu.svelte b/site/src/routes/repl/[id]/_components/AppControls/UserMenu.svelte
deleted file mode 100644
index de400cbf29..0000000000
--- a/site/src/routes/repl/[id]/_components/AppControls/UserMenu.svelte
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
-
{name}
-
-
- {#if showMenu}
-
- {/if}
-
-
-
diff --git a/site/src/routes/repl/[id]/_components/AppControls/index.svelte b/site/src/routes/repl/[id]/_components/AppControls/index.svelte
deleted file mode 100644
index 55a1d24e28..0000000000
--- a/site/src/routes/repl/[id]/_components/AppControls/index.svelte
+++ /dev/null
@@ -1,280 +0,0 @@
-
-
-
-
-
-
-
-
-
- {#if zen_mode}
-
- {:else}
-
- {/if}
-
-
-
-
-
-
- fork(false)} title="fork">
- {#if justForked}
-
- {:else}
-
- {/if}
-
-
-
- {#if justSaved}
-
- {:else}
-
- {/if}
-
-
- {#if $session.user}
-
- {:else}
-
-
- Log in to save
-
- {/if}
-
-
-
-
diff --git a/site/src/routes/repl/[id]/index.json.js b/site/src/routes/repl/[id]/index.json.js
deleted file mode 100644
index de41a4cecd..0000000000
--- a/site/src/routes/repl/[id]/index.json.js
+++ /dev/null
@@ -1,149 +0,0 @@
-import send from '@polka/send';
-import body from '../_utils/body.js';
-import * as httpie from 'httpie';
-import { query, find } from '../../../utils/db';
-import { get_example } from '../../examples/_examples.js';
-
-const { GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET } = process.env;
-
-async function import_gist(req, res) {
- const base = `https://api.github.com/gists/${req.params.id}`;
- const url = `${base}?client_id=${GITHUB_CLIENT_ID}&client_secret=${GITHUB_CLIENT_SECRET}`;
-
- try {
- const { data } = await httpie.get(url, {
- headers: {
- 'User-Agent': 'https://svelte.dev'
- }
- });
-
- // create owner if necessary...
- let user = await find(`select * from users where uid = $1`, [data.owner.id]);
-
- if (!user) {
- const { id, name, login, avatar_url } = data.owner;
-
- user = await find(`
- insert into users(uid, name, username, avatar)
- values ($1, $2, $3, $4)
- returning *
- `, [id, name, login, avatar_url]);
- }
-
- delete data.files['README.md'];
- delete data.files['meta.json'];
-
- const files = Object.keys(data.files).map(key => {
- const name = key.replace(/\.html$/, '.svelte');
-
- return {
- name,
- source: data.files[key].content
- };
- });
-
- // add gist to database...
- await query(`
- insert into gists(uid, user_id, name, files)
- values ($1, $2, $3, $4)
- `, [req.params.id, user.id, data.description, JSON.stringify(files)]);
-
- send(res, 200, {
- uid: req.params.id,
- name: data.description,
- files,
- owner: data.owner.id
- });
- } catch (err) {
- send(res, err.statusCode, { error: err.message });
- }
-}
-
-export async function get(req, res) {
- // is this an example?
- const example = get_example(req.params.id);
-
- if (example) {
- return send(res, 200, {
- relaxed: true,
- uid: req.params.id,
- name: example.title,
- files: example.files,
- owner: null
- });
- }
-
- if (process.env.NODE_ENV === 'development') {
- // In dev, proxy requests to load particular REPLs to the real server.
- // This avoids needing to connect to the real database server.
- req.pipe(
- require('https').request({ host: 'svelte.dev', path: req.url })
- ).once('response', res_proxy => {
- res_proxy.pipe(res);
- res.writeHead(res_proxy.statusCode, res_proxy.headers);
- }).once('error', () => res.end());
- return;
- }
-
- const [row] = await query(`
- select g.*, u.uid as owner from gists g
- left join users u on g.user_id = u.id
- where g.uid = $1 limit 1
- `, [req.params.id]); // via filename pattern
-
- if (!row) {
- return import_gist(req, res);
- }
-
- send(res, 200, {
- uid: row.uid.replace(/-/g, ''),
- name: row.name,
- files: row.files,
- owner: row.owner
- });
-}
-
-export async function patch(req, res) {
- const { user } = req;
- if (!user) return;
-
- let id;
- const uid = req.params.id;
-
- try {
- const [row] = await query(`select * from gists where uid = $1 limit 1`, [uid]);
- if (!row) return send(res, 404, { error: 'Gist not found' });
- if (row.user_id !== user.id) return send(res, 403, { error: 'Item does not belong to you' });
- id = row.id;
- } catch (err) {
- console.error('PATCH /gists @ select', err);
- return send(res, 500);
- }
-
- try {
- const obj = await body(req);
- obj.updated_at = 'now()';
- let k;
- const cols = [];
- const vals = [];
- for (k in obj) {
- cols.push(k);
- vals.push(k === 'files' ? JSON.stringify(obj[k]) : obj[k]);
- }
-
- const tmp = vals.map((x, i) => `$${i + 1}`).join(',');
- const set = `set (${cols.join(',')}) = (${tmp})`;
-
- const [row] = await query(`update gists ${set} where id = ${id} returning *`, vals);
-
- send(res, 200, {
- uid: row.uid.replace(/-/g, ''),
- name: row.name,
- files: row.files,
- owner: user.uid,
- });
- } catch (err) {
- console.error('PATCH /gists @ update', err);
- send(res, 500, { error: err.message });
- }
-}
diff --git a/site/src/routes/repl/[id]/index.svelte b/site/src/routes/repl/[id]/index.svelte
deleted file mode 100644
index 70b843724c..0000000000
--- a/site/src/routes/repl/[id]/index.svelte
+++ /dev/null
@@ -1,212 +0,0 @@
-
-
-
-
-
-
-
- {name} • REPL • Svelte
-
-
-
-
-
-
-
-
-
-
-
- {#if process.browser}
-
-
-
-
- {#if mobile}
-
- {/if}
- {/if}
-
diff --git a/site/src/routes/repl/_utils/body.js b/site/src/routes/repl/_utils/body.js
deleted file mode 100644
index 950208ab56..0000000000
--- a/site/src/routes/repl/_utils/body.js
+++ /dev/null
@@ -1,19 +0,0 @@
-export default function body(req) {
- return new Promise((fulfil, reject) => {
- let str = '';
-
- req.on('error', reject);
-
- req.on('data', chunk => {
- str += chunk;
- });
-
- req.on('end', () => {
- try {
- fulfil(JSON.parse(str));
- } catch (err) {
- reject(err);
- }
- });
- });
-}
\ No newline at end of file
diff --git a/site/src/routes/repl/_utils/downloadBlob.js b/site/src/routes/repl/_utils/downloadBlob.js
deleted file mode 100644
index d90ed40530..0000000000
--- a/site/src/routes/repl/_utils/downloadBlob.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export default (blob, filename) => {
- const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = filename;
- link.style.display = 'none';
- document.body.appendChild(link);
- link.click();
- URL.revokeObjectURL(url);
- link.remove();
-};
diff --git a/site/src/routes/repl/create.json.js b/site/src/routes/repl/create.json.js
deleted file mode 100644
index 7bb809bd5f..0000000000
--- a/site/src/routes/repl/create.json.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import send from '@polka/send';
-import body from './_utils/body.js';
-import { query } from '../../utils/db';
-
-export async function post(req, res) {
- const { user } = req;
- if (!user) return; // response already sent
-
- try {
- const { name, files } = await body(req);
-
- const [row] = await query(`
- insert into gists(user_id, name, files)
- values ($1, $2, $3) returning *`, [user.id, name, JSON.stringify(files)]);
-
- send(res, 201, {
- uid: row.uid.replace(/-/g, ''),
- name: row.name,
- files: row.files,
- owner: user.uid,
- });
- } catch (err) {
- send(res, 500, {
- error: err.message
- });
- }
-}
diff --git a/site/src/routes/repl/embed.svelte b/site/src/routes/repl/embed.svelte
deleted file mode 100644
index b78e9e39c7..0000000000
--- a/site/src/routes/repl/embed.svelte
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
- REPL • Svelte
-
-
-
-
-
-
-
- {#if process.browser}
-
- {/if}
-
diff --git a/site/src/routes/repl/index.svelte b/site/src/routes/repl/index.svelte
deleted file mode 100644
index 0c7acfc9dc..0000000000
--- a/site/src/routes/repl/index.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
\ No newline at end of file
diff --git a/site/src/routes/repl/local/[...file].js b/site/src/routes/repl/local/[...file].js
deleted file mode 100644
index 7bd1c6a82c..0000000000
--- a/site/src/routes/repl/local/[...file].js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { createReadStream } from 'fs';
-
-export function get(req, res) {
- const path = req.params.file.join('/');
- if (process.env.NODE_ENV !== 'development' || ('/' + path).includes('/.')) {
- res.writeHead(403);
- res.end();
- return;
- }
- createReadStream('../' + path)
- .on('error', () => {
- res.writeHead(403);
- res.end();
- })
- .pipe(res);
- res.writeHead(200, { 'Content-Type': 'text/javascript' });
-}
diff --git a/site/src/routes/tutorial/[slug]/_TableOfContents.svelte b/site/src/routes/tutorial/[slug]/_TableOfContents.svelte
deleted file mode 100644
index 97a298bcca..0000000000
--- a/site/src/routes/tutorial/[slug]/_TableOfContents.svelte
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {selected.section.title} /
-
- {selected.chapter.title}
-
-
-
- {#each sections as section, i}
-
- {#each section.chapters as chapter, i}
- {String.fromCharCode(i + 97)}. {chapter.title}
- {/each}
-
- {/each}
-
-
-
-
-
-
-
diff --git a/site/src/routes/tutorial/[slug]/index.json.js b/site/src/routes/tutorial/[slug]/index.json.js
deleted file mode 100644
index 26f5d54b31..0000000000
--- a/site/src/routes/tutorial/[slug]/index.json.js
+++ /dev/null
@@ -1,102 +0,0 @@
-import * as fs from 'fs';
-import * as path from 'path';
-import marked from 'marked';
-import send from '@polka/send';
-import { extract_frontmatter, extract_metadata, link_renderer } from '@sveltejs/site-kit/utils/markdown';
-import { highlight } from '../../../utils/highlight';
-
-const cache = new Map();
-
-function find_tutorial(slug) {
- const sections = fs.readdirSync(`content/tutorial`);
-
- for (const section of sections) {
- const chapters = fs.readdirSync(`content/tutorial/${section}`).filter(dir => /^\d+/.test(dir));
- for (const chapter of chapters) {
- if (slug === chapter.replace(/^\d+-/, '')) {
- return { section, chapter };
- }
- }
- }
-}
-
-function get_tutorial(slug) {
- const found = find_tutorial(slug);
- if (!found) return found;
-
- const dir = `content/tutorial/${found.section}/${found.chapter}`;
-
- const markdown = fs.readFileSync(`${dir}/text.md`, 'utf-8');
- const app_a = fs.readdirSync(`${dir}/app-a`);
- const app_b = fs.existsSync(`${dir}/app-b`) && fs.readdirSync(`${dir}/app-b`);
-
- const { content } = extract_frontmatter(markdown);
-
- const renderer = new marked.Renderer();
-
- renderer.link = link_renderer;
-
- renderer.code = (source, lang) => {
- source = source.replace(/^ +/gm, match =>
- match.split(' ').join('\t')
- );
-
- const lines = source.split('\n');
-
- const meta = extract_metadata(lines[0], lang);
-
- let prefix = '';
- let className = 'code-block';
-
- if (meta) {
- source = lines.slice(1).join('\n');
- const filename = meta.filename || (lang === 'html' && 'App.svelte');
- if (filename) {
- prefix = `${prefix} ${filename} `;
- className += ' named';
- }
- }
-
- return `${prefix}${highlight(source, lang)}
`;
- };
-
- let html = marked(content, { renderer });
- if (found.chapter.startsWith('01')) {
- const meta = JSON.parse(fs.readFileSync(`content/tutorial/${found.section}/meta.json`));
- html = `${meta.title} \n${html}`;
- }
-
- function get_file(stage, file) {
- const ext = path.extname(file);
- const name = file.slice(0, -ext.length);
- const type = ext.slice(1);
-
- return {
- name,
- type,
- source: fs.readFileSync(`${dir}/${stage}/${file}`, 'utf-8')
- };
- }
-
- return {
- html,
- app_a: app_a.map(file => get_file('app-a', file)),
- app_b: app_b && app_b.map(file => get_file('app-b', file))
- };
-}
-
-export function get(req, res) {
- const { slug } = req.params;
-
- let tut = cache.get(slug);
- if (!tut || process.env.NODE_ENV !== 'production') {
- tut = get_tutorial(slug);
- cache.set(slug, tut);
- }
-
- if (tut) {
- send(res, 200, tut);
- } else {
- send(res, 404, { message: 'not found' });
- }
-}
diff --git a/site/src/routes/tutorial/[slug]/index.svelte b/site/src/routes/tutorial/[slug]/index.svelte
deleted file mode 100644
index bc7ed6bfe5..0000000000
--- a/site/src/routes/tutorial/[slug]/index.svelte
+++ /dev/null
@@ -1,317 +0,0 @@
-
-
-
-
-
-
-
- {selected.section.title} / {selected.chapter.title} • Svelte Tutorial
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {@html chapter.html}
-
-
- {#if chapter.app_b}
-
-
- {completed ? 'Reset' : 'Show me'}
-
- {/if}
-
- {#if selected.next}
-
Next
- {/if}
-
-
-
-
-
-
-
-
-
-
-
- {#if mobile}
-
- {/if}
-
diff --git a/site/src/routes/tutorial/_layout.svelte b/site/src/routes/tutorial/_layout.svelte
deleted file mode 100644
index c424fac2e6..0000000000
--- a/site/src/routes/tutorial/_layout.svelte
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/site/src/routes/tutorial/index.json.js b/site/src/routes/tutorial/index.json.js
deleted file mode 100644
index 5c7ec8efa1..0000000000
--- a/site/src/routes/tutorial/index.json.js
+++ /dev/null
@@ -1,63 +0,0 @@
-import * as fs from 'fs';
-import send from '@polka/send';
-import { extract_frontmatter } from '@sveltejs/site-kit/utils/markdown';
-
-let json;
-
-function get_sections() {
- const slugs = new Set();
-
- const sections = fs.readdirSync(`content/tutorial`)
- .filter(dir => /^\d+/.test(dir))
- .map(dir => {
- let meta;
-
- try {
- meta = JSON.parse(fs.readFileSync(`content/tutorial/${dir}/meta.json`, 'utf-8'));
- } catch (err) {
- throw new Error(`Error reading metadata for ${dir}`);
- }
-
- return {
- title: meta.title,
- chapters: fs.readdirSync(`content/tutorial/${dir}`)
- .filter(dir => /^\d+/.test(dir))
- .map(tutorial => {
- try {
- const md = fs.readFileSync(`content/tutorial/${dir}/${tutorial}/text.md`, 'utf-8');
- const { metadata } = extract_frontmatter(md);
-
- const slug = tutorial.replace(/^\d+-/, '');
-
- if (slugs.has(slug)) throw new Error(`Duplicate slug: ${slug}`);
- slugs.add(slug);
-
- return {
- slug,
- title: metadata.title,
- section_dir: dir,
- chapter_dir: tutorial,
- };
- } catch (err) {
- throw new Error(`Error building tutorial ${dir}/${tutorial}: ${err.message}`);
- }
- })
- };
- });
-
- return sections;
-}
-
-export function get(req, res) {
- try {
- if (!json || process.env.NODE_ENV !== 'production') {
- json = get_sections();
- }
-
- send(res, 200, json);
- } catch (err) {
- send(res, 500, {
- message: err.message
- });
- }
-}
diff --git a/site/src/routes/tutorial/index.svelte b/site/src/routes/tutorial/index.svelte
deleted file mode 100644
index 738a1b33e8..0000000000
--- a/site/src/routes/tutorial/index.svelte
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/site/src/routes/tutorial/random-number.js b/site/src/routes/tutorial/random-number.js
deleted file mode 100644
index 818a38fe6a..0000000000
--- a/site/src/routes/tutorial/random-number.js
+++ /dev/null
@@ -1,20 +0,0 @@
-export function get(req, res) {
- let { min = '0', max = '100' } = req.query;
- min = +min;
- max = +max;
-
- res.setHeader('Access-Control-Allow-Origin', '*');
-
- // simulate a long delay
- setTimeout(() => {
- // fail sometimes
- if (Math.random() < 0.333) {
- res.statusCode = 400;
- res.end(`Failed to generate random number. Please try again`);
- return;
- }
-
- const num = min + Math.round(Math.random() * (max - min));
- res.end(String(num));
- }, 1000);
-}
\ No newline at end of file
diff --git a/site/src/server.js b/site/src/server.js
deleted file mode 100644
index cb40b56fa5..0000000000
--- a/site/src/server.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import polka from 'polka';
-import send from '@polka/send';
-import sirv from 'sirv';
-import * as sapper from '@sapper/server';
-import { sanitize_user, authenticate } from './utils/auth';
-
-if (!process.env.PORT) {
- process.env.PORT = 3000;
-}
-
-const { PORT } = process.env;
-
-const app = polka({
- onError: (err, req, res) => {
- const error = err.message || err;
- const code = err.code || err.status || 500;
- res.headersSent || send(res, code, { error }, {
- 'content-type': 'text/plain'
- });
- }
-});
-
-if (process.env.PGHOST) {
- app.use(authenticate());
-}
-
-app.use(
- sirv('static', {
- dev: process.env.NODE_ENV === 'development',
- setHeaders(res) {
- res.setHeader('Access-Control-Allow-Origin', '*');
- res.hasHeader('Cache-Control') || res.setHeader('Cache-Control', 'max-age=600'); // 10min default
- }
- }),
-
- sapper.middleware({
- session: req => ({
- user: sanitize_user(req.user)
- })
- })
-);
-
-app.listen(PORT);
diff --git a/site/src/service-worker.js b/site/src/service-worker.js
deleted file mode 100644
index f7a76df99a..0000000000
--- a/site/src/service-worker.js
+++ /dev/null
@@ -1,87 +0,0 @@
-import { timestamp, files, shell } from '@sapper/service-worker';
-
-const ASSETS = `cache${timestamp}`;
-
-// `shell` is an array of all the files generated by Rollup,
-// `files` is an array of everything in the `static` directory
-const to_cache = shell.concat(files.filter(file => {
- const basename = file.split('/').pop();
- if (basename[0] === '.') return false; // .DS_Store and friends
- if (basename.endsWith('.mp3')) return false; // TODO others?
- return true;
-}));
-const cached = new Set(to_cache);
-
-self.addEventListener('install', event => {
- event.waitUntil(
- caches
- .open(ASSETS)
- .then(cache => cache.addAll(to_cache))
- .then(() => {
- self.skipWaiting();
- })
- );
-});
-
-self.addEventListener('activate', event => {
- event.waitUntil(
- caches.keys().then(async keys => {
- // delete old caches
- for (const key of keys) {
- if (key !== ASSETS) await caches.delete(key);
- }
-
- self.clients.claim();
- })
- );
-});
-
-self.addEventListener('fetch', event => {
- if (event.request.method !== 'GET' || event.request.headers.has('range')) return;
-
- const url = new URL(event.request.url);
-
- // don't try to handle e.g. data: URIs
- if (!url.protocol.startsWith('http')) return;
-
- // ignore dev server requests
- if (url.hostname === self.location.hostname && url.port !== self.location.port) return;
-
- // always serve static files and Rollup-generated assets from cache
- if (url.host === self.location.host && cached.has(url.pathname)) {
- event.respondWith(caches.match(event.request));
- return;
- }
-
- // for pages, you might want to serve a shell `index.html` file,
- // which Sapper has generated for you. It's not right for every
- // app, but if it's right for yours then uncomment this section
- /*
- if (url.origin === self.origin && routes.find(route => route.pattern.test(url.pathname))) {
- event.respondWith(caches.match('/index.html'));
- return;
- }
- */
-
- if (event.request.cache === 'only-if-cached') return;
-
- // for everything else, try the network first, falling back to
- // cache if the user is offline. (If the pages never change, you
- // might prefer a cache-first approach to a network-first one.)
- event.respondWith(
- caches
- .open(`offline${timestamp}`)
- .then(async cache => {
- try {
- const response = await fetch(event.request);
- cache.put(event.request, response.clone());
- return response;
- } catch (err) {
- const response = await cache.match(event.request);
- if (response) return response;
-
- throw err;
- }
- })
- );
-});
diff --git a/site/src/template.html b/site/src/template.html
deleted file mode 100644
index 28ea1910a5..0000000000
--- a/site/src/template.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
- %sapper.base%
-
-
-
-
-
-
-
-
-
-
-
-
-
- %sapper.styles%
-
-
- %sapper.head%
-
-
-
- %sapper.html%
-
-
- %sapper.scripts%
-
-
diff --git a/site/src/utils/auth.js b/site/src/utils/auth.js
deleted file mode 100644
index 1f7ccaf867..0000000000
--- a/site/src/utils/auth.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import * as cookie from 'cookie';
-import flru from 'flru';
-import { find, query } from './db';
-
-export const sanitize_user = obj => obj && ({
- uid: obj.uid,
- username: obj.username,
- name: obj.name,
- avatar: obj.avatar
-});
-
-const session_cache = flru(1000);
-
-export const create_user = async (gh_user, access_token) => {
- return await find(`
- insert into users(uid, name, username, avatar, github_token)
- values ($1, $2, $3, $4, $5) on conflict (uid) do update
- set (name, username, avatar, github_token, updated_at) = ($2, $3, $4, $5, now())
- returning id, uid, username, name, avatar
- `, [gh_user.id, gh_user.name, gh_user.login, gh_user.avatar_url, access_token]);
-};
-
-export const create_session = async user => {
- const session = await find(`
- insert into sessions(user_id)
- values ($1)
- returning uid
- `, [user.id]);
-
- session_cache.set(session.uid, user);
-
- return session;
-};
-
-export const delete_session = async sid => {
- await query(`delete from sessions where uid = $1`, [sid]);
- session_cache.set(sid, null);
-};
-
-const get_user = async sid => {
- if (!sid) return null;
-
- if (!session_cache.has(sid)) {
- session_cache.set(sid, await find(`
- select users.id, users.uid, users.username, users.name, users.avatar
- from sessions
- left join users on sessions.user_id = users.id
- where sessions.uid = $1 and expiry > now()
- `, [sid]));
- }
-
- return session_cache.get(sid);
-};
-
-export const authenticate = () => {
- // this is a convenient time to clear out expired sessions
- query(`delete from sessions where expiry < now()`);
-
- return async (req, res, next) => {
- req.cookies = cookie.parse(req.headers.cookie || '');
- req.user = await get_user(req.cookies.sid);
-
- next();
- };
-};
\ No newline at end of file
diff --git a/site/src/utils/compat.js b/site/src/utils/compat.js
deleted file mode 100644
index 0b0f1e954b..0000000000
--- a/site/src/utils/compat.js
+++ /dev/null
@@ -1 +0,0 @@
-export const isMac = typeof navigator !== 'undefined' && navigator.platform === 'MacIntel';
diff --git a/site/src/utils/db.js b/site/src/utils/db.js
deleted file mode 100644
index 069450b0f3..0000000000
--- a/site/src/utils/db.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { Pool } from 'pg';
-
-// Uses `PG*` ENV vars
-export const DB = process.env.PGHOST ? new Pool() : null;
-
-export function query(text, values=[]) {
- return DB.query(text, values).then(r => r.rows);
-}
-
-export function find(text, values=[]) {
- return query(text, values).then(arr => arr[0]);
-}
diff --git a/site/src/utils/events.js b/site/src/utils/events.js
deleted file mode 100644
index 5575812a95..0000000000
--- a/site/src/utils/events.js
+++ /dev/null
@@ -1,19 +0,0 @@
-export function keyEvent(code) {
- return function (node, callback) {
- node.addEventListener('keydown', handleKeydown);
-
- function handleKeydown(event) {
- if (event.keyCode === code) {
- callback.call(this, event);
- }
- }
-
- return {
- destroy() {
- node.removeEventListener('keydown', handleKeydown);
- }
- };
- };
-}
-
-export const enter = keyEvent(13);
diff --git a/site/src/utils/examples.js b/site/src/utils/examples.js
deleted file mode 100644
index fc61d79ad3..0000000000
--- a/site/src/utils/examples.js
+++ /dev/null
@@ -1,16 +0,0 @@
-export function process_example(files) {
- return files
- .map(file => {
- const [name, type] = file.name.split('.');
- return { name, type, source: file.source };
- })
- .sort((a, b) => {
- if (a.name === 'App' && a.type === 'svelte') return -1;
- if (b.name === 'App' && b.type === 'svelte') return 1;
-
- if (a.type === b.type) return a.name < b.name ? -1 : 1;
-
- if (a.type === 'svelte') return -1;
- if (b.type === 'svelte') return 1;
- });
-}
\ No newline at end of file
diff --git a/site/src/utils/highlight.js b/site/src/utils/highlight.js
deleted file mode 100644
index 124af2e6be..0000000000
--- a/site/src/utils/highlight.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import { langs } from '@sveltejs/site-kit/utils/markdown.js';
-import PrismJS from 'prismjs';
-import 'prismjs/components/prism-bash';
-import 'prismjs/components/prism-diff';
-import 'prism-svelte';
-
-export function highlight(source, lang) {
- const plang = langs[lang] || '';
- const highlighted = plang ? PrismJS.highlight(
- source,
- PrismJS.languages[plang],
- lang,
- ) : source.replace(/[&<>]/g, c => ({ '&': '&', '<': '<', '>': '>' })[c]);
-
- return `${highlighted} `;
-}
diff --git a/site/src/utils/slug.js b/site/src/utils/slug.js
deleted file mode 100644
index 05ec5512ca..0000000000
--- a/site/src/utils/slug.js
+++ /dev/null
@@ -1,78 +0,0 @@
-import slugify from '@sindresorhus/slugify';
-import {SLUG_SEPARATOR} from '../../config';
-
-/* url-safe processor */
-
-export const urlsafeSlugProcessor = string =>
- slugify(string, {
- customReplacements: [ // runs before any other transformations
- ['$', 'DOLLAR'], // `$destroy` & co
- ['-', 'DASH'], // conflicts with `separator`
- ],
- separator: SLUG_SEPARATOR,
- decamelize: false,
- lowercase: false
- })
- .replace(/DOLLAR/g, '$')
- .replace(/DASH/g, '-');
-
-/* unicode-preserver processor */
-
-const alphaNumRegex = /[a-zA-Z0-9]/;
-const unicodeRegex = /\p{Letter}/u;
-const isNonAlphaNumUnicode =
- string => !alphaNumRegex.test(string) && unicodeRegex.test(string);
-
-export const unicodeSafeProcessor = string =>
- string.split('')
- .reduce((accum, char, index, array) => {
- const type = isNonAlphaNumUnicode(char) ? 'pass' : 'process';
-
- if (index === 0) {
- accum.current = {type, string: char};
- } else if (type === accum.current.type) {
- accum.current.string += char;
- } else {
- accum.chunks.push(accum.current);
- accum.current = {type, string: char};
- }
-
- if (index === array.length - 1) {
- accum.chunks.push(accum.current);
- }
-
- return accum;
- }, {chunks: [], current: {type: '', string: ''}})
- .chunks
- .reduce((accum, chunk) => {
- const processed = chunk.type === 'process'
- ? urlsafeSlugProcessor(chunk.string)
- : chunk.string;
-
- processed.length > 0 && accum.push(processed);
-
- return accum;
- }, [])
- .join(SLUG_SEPARATOR);
-
-/* processor */
-
-export const makeSlugProcessor = (preserveUnicode = false) => preserveUnicode
- ? unicodeSafeProcessor
- : urlsafeSlugProcessor;
-
-/* session processor */
-
-export const makeSessionSlugProcessor = (preserveUnicode = false) => {
- const processor = makeSlugProcessor(preserveUnicode);
- const seen = new Set();
-
- return string => {
- const slug = processor(string);
-
- if (seen.has(slug)) throw new Error(`Duplicate slug ${slug}`);
- seen.add(slug);
-
- return slug;
- };
-};
diff --git a/site/static/examples/thumbnails/7guis-circles.jpg b/site/static/examples/thumbnails/7guis-circles.jpg
deleted file mode 100644
index e2d58b9f36..0000000000
Binary files a/site/static/examples/thumbnails/7guis-circles.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/7guis-counter.jpg b/site/static/examples/thumbnails/7guis-counter.jpg
deleted file mode 100644
index b0b525fc42..0000000000
Binary files a/site/static/examples/thumbnails/7guis-counter.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/7guis-crud.jpg b/site/static/examples/thumbnails/7guis-crud.jpg
deleted file mode 100644
index ccebfb8a6b..0000000000
Binary files a/site/static/examples/thumbnails/7guis-crud.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/7guis-flight-booker.jpg b/site/static/examples/thumbnails/7guis-flight-booker.jpg
deleted file mode 100644
index c0aecc9fe1..0000000000
Binary files a/site/static/examples/thumbnails/7guis-flight-booker.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/7guis-temperature.jpg b/site/static/examples/thumbnails/7guis-temperature.jpg
deleted file mode 100644
index b58e9e09b9..0000000000
Binary files a/site/static/examples/thumbnails/7guis-temperature.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/7guis-timer.jpg b/site/static/examples/thumbnails/7guis-timer.jpg
deleted file mode 100644
index 6fd89dd75a..0000000000
Binary files a/site/static/examples/thumbnails/7guis-timer.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/actions.jpg b/site/static/examples/thumbnails/actions.jpg
deleted file mode 100644
index 33986769df..0000000000
Binary files a/site/static/examples/thumbnails/actions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/adding-parameters-to-actions.jpg b/site/static/examples/thumbnails/adding-parameters-to-actions.jpg
deleted file mode 100644
index 1963b7f41e..0000000000
Binary files a/site/static/examples/thumbnails/adding-parameters-to-actions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/adding-parameters-to-transitions.jpg b/site/static/examples/thumbnails/adding-parameters-to-transitions.jpg
deleted file mode 100644
index db4f939d2a..0000000000
Binary files a/site/static/examples/thumbnails/adding-parameters-to-transitions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/animate.jpg b/site/static/examples/thumbnails/animate.jpg
deleted file mode 100644
index 48cc6eb45d..0000000000
Binary files a/site/static/examples/thumbnails/animate.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/area-chart.jpg b/site/static/examples/thumbnails/area-chart.jpg
deleted file mode 100644
index 4f6a2c8e64..0000000000
Binary files a/site/static/examples/thumbnails/area-chart.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/auto-subscriptions.jpg b/site/static/examples/thumbnails/auto-subscriptions.jpg
deleted file mode 100644
index 9f14c15036..0000000000
Binary files a/site/static/examples/thumbnails/auto-subscriptions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/await-blocks.jpg b/site/static/examples/thumbnails/await-blocks.jpg
deleted file mode 100644
index 3d3dbe60f5..0000000000
Binary files a/site/static/examples/thumbnails/await-blocks.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/bar-chart.jpg b/site/static/examples/thumbnails/bar-chart.jpg
deleted file mode 100644
index ce303b926c..0000000000
Binary files a/site/static/examples/thumbnails/bar-chart.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/bind-this.jpg b/site/static/examples/thumbnails/bind-this.jpg
deleted file mode 100644
index 61c1957f69..0000000000
Binary files a/site/static/examples/thumbnails/bind-this.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/checkbox-inputs.jpg b/site/static/examples/thumbnails/checkbox-inputs.jpg
deleted file mode 100644
index 2831b458d7..0000000000
Binary files a/site/static/examples/thumbnails/checkbox-inputs.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/class-shorthand.jpg b/site/static/examples/thumbnails/class-shorthand.jpg
deleted file mode 100644
index 3c3937e4e0..0000000000
Binary files a/site/static/examples/thumbnails/class-shorthand.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/classes.jpg b/site/static/examples/thumbnails/classes.jpg
deleted file mode 100644
index b2081309e1..0000000000
Binary files a/site/static/examples/thumbnails/classes.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/clock.jpg b/site/static/examples/thumbnails/clock.jpg
deleted file mode 100644
index 9cab05c8cc..0000000000
Binary files a/site/static/examples/thumbnails/clock.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/component-bindings.jpg b/site/static/examples/thumbnails/component-bindings.jpg
deleted file mode 100644
index a28af2440f..0000000000
Binary files a/site/static/examples/thumbnails/component-bindings.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/component-events.jpg b/site/static/examples/thumbnails/component-events.jpg
deleted file mode 100644
index 3199aff9c9..0000000000
Binary files a/site/static/examples/thumbnails/component-events.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/conditional-slots.jpg b/site/static/examples/thumbnails/conditional-slots.jpg
deleted file mode 100644
index 39bdbf3a3e..0000000000
Binary files a/site/static/examples/thumbnails/conditional-slots.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/context-api.jpg b/site/static/examples/thumbnails/context-api.jpg
deleted file mode 100644
index 5c283cd63e..0000000000
Binary files a/site/static/examples/thumbnails/context-api.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/custom-css-transitions.jpg b/site/static/examples/thumbnails/custom-css-transitions.jpg
deleted file mode 100644
index fb406bff92..0000000000
Binary files a/site/static/examples/thumbnails/custom-css-transitions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/custom-js-transitions.jpg b/site/static/examples/thumbnails/custom-js-transitions.jpg
deleted file mode 100644
index 4f43705d99..0000000000
Binary files a/site/static/examples/thumbnails/custom-js-transitions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/custom-stores.jpg b/site/static/examples/thumbnails/custom-stores.jpg
deleted file mode 100644
index 9f14c15036..0000000000
Binary files a/site/static/examples/thumbnails/custom-stores.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/debug.jpg b/site/static/examples/thumbnails/debug.jpg
deleted file mode 100644
index e65fa074e2..0000000000
Binary files a/site/static/examples/thumbnails/debug.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/declaring-props.jpg b/site/static/examples/thumbnails/declaring-props.jpg
deleted file mode 100644
index 94759bc743..0000000000
Binary files a/site/static/examples/thumbnails/declaring-props.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/default-values.jpg b/site/static/examples/thumbnails/default-values.jpg
deleted file mode 100644
index 94033260b2..0000000000
Binary files a/site/static/examples/thumbnails/default-values.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/deferred-transitions.jpg b/site/static/examples/thumbnails/deferred-transitions.jpg
deleted file mode 100644
index 3a7fe90f2f..0000000000
Binary files a/site/static/examples/thumbnails/deferred-transitions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/derived-stores.jpg b/site/static/examples/thumbnails/derived-stores.jpg
deleted file mode 100644
index a2aade2920..0000000000
Binary files a/site/static/examples/thumbnails/derived-stores.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/dimensions.jpg b/site/static/examples/thumbnails/dimensions.jpg
deleted file mode 100644
index 065a62207c..0000000000
Binary files a/site/static/examples/thumbnails/dimensions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/dom-event-forwarding.jpg b/site/static/examples/thumbnails/dom-event-forwarding.jpg
deleted file mode 100644
index 4c23217bba..0000000000
Binary files a/site/static/examples/thumbnails/dom-event-forwarding.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/dom-events.jpg b/site/static/examples/thumbnails/dom-events.jpg
deleted file mode 100644
index 365d26e705..0000000000
Binary files a/site/static/examples/thumbnails/dom-events.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/dynamic-attributes.jpg b/site/static/examples/thumbnails/dynamic-attributes.jpg
deleted file mode 100644
index a0d5898ce2..0000000000
Binary files a/site/static/examples/thumbnails/dynamic-attributes.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/each-block-bindings.jpg b/site/static/examples/thumbnails/each-block-bindings.jpg
deleted file mode 100644
index 931f1dcf42..0000000000
Binary files a/site/static/examples/thumbnails/each-block-bindings.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/each-blocks.jpg b/site/static/examples/thumbnails/each-blocks.jpg
deleted file mode 100644
index efc9dcb88f..0000000000
Binary files a/site/static/examples/thumbnails/each-blocks.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/easing.jpg b/site/static/examples/thumbnails/easing.jpg
deleted file mode 100644
index 11c4871c2a..0000000000
Binary files a/site/static/examples/thumbnails/easing.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/else-blocks.jpg b/site/static/examples/thumbnails/else-blocks.jpg
deleted file mode 100644
index 69426d5ec3..0000000000
Binary files a/site/static/examples/thumbnails/else-blocks.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/else-if-blocks.jpg b/site/static/examples/thumbnails/else-if-blocks.jpg
deleted file mode 100644
index 15996af39f..0000000000
Binary files a/site/static/examples/thumbnails/else-if-blocks.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/event-forwarding.jpg b/site/static/examples/thumbnails/event-forwarding.jpg
deleted file mode 100644
index 3199aff9c9..0000000000
Binary files a/site/static/examples/thumbnails/event-forwarding.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/event-modifiers.jpg b/site/static/examples/thumbnails/event-modifiers.jpg
deleted file mode 100644
index 752c5b1a0a..0000000000
Binary files a/site/static/examples/thumbnails/event-modifiers.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/file-inputs.jpg b/site/static/examples/thumbnails/file-inputs.jpg
deleted file mode 100644
index d302633f6b..0000000000
Binary files a/site/static/examples/thumbnails/file-inputs.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/group-inputs.jpg b/site/static/examples/thumbnails/group-inputs.jpg
deleted file mode 100644
index c70f2afcdc..0000000000
Binary files a/site/static/examples/thumbnails/group-inputs.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/hacker-news.jpg b/site/static/examples/thumbnails/hacker-news.jpg
deleted file mode 100644
index 1792586cef..0000000000
Binary files a/site/static/examples/thumbnails/hacker-news.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/hello-world.jpg b/site/static/examples/thumbnails/hello-world.jpg
deleted file mode 100644
index 3b8d871ade..0000000000
Binary files a/site/static/examples/thumbnails/hello-world.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/html-tags.jpg b/site/static/examples/thumbnails/html-tags.jpg
deleted file mode 100644
index f208c04e4f..0000000000
Binary files a/site/static/examples/thumbnails/html-tags.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/if-blocks.jpg b/site/static/examples/thumbnails/if-blocks.jpg
deleted file mode 100644
index 69426d5ec3..0000000000
Binary files a/site/static/examples/thumbnails/if-blocks.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/immutable-data.jpg b/site/static/examples/thumbnails/immutable-data.jpg
deleted file mode 100644
index e339b8d459..0000000000
Binary files a/site/static/examples/thumbnails/immutable-data.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/in-and-out.jpg b/site/static/examples/thumbnails/in-and-out.jpg
deleted file mode 100644
index 397ca3b51b..0000000000
Binary files a/site/static/examples/thumbnails/in-and-out.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/inline-handlers.jpg b/site/static/examples/thumbnails/inline-handlers.jpg
deleted file mode 100644
index 365d26e705..0000000000
Binary files a/site/static/examples/thumbnails/inline-handlers.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/keyed-each-blocks.jpg b/site/static/examples/thumbnails/keyed-each-blocks.jpg
deleted file mode 100644
index 8f3d85b288..0000000000
Binary files a/site/static/examples/thumbnails/keyed-each-blocks.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/media-elements.jpg b/site/static/examples/thumbnails/media-elements.jpg
deleted file mode 100644
index 579dcc707f..0000000000
Binary files a/site/static/examples/thumbnails/media-elements.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/modal.jpg b/site/static/examples/thumbnails/modal.jpg
deleted file mode 100644
index d6ec829865..0000000000
Binary files a/site/static/examples/thumbnails/modal.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/module-exports.jpg b/site/static/examples/thumbnails/module-exports.jpg
deleted file mode 100644
index 26c3e6a32f..0000000000
Binary files a/site/static/examples/thumbnails/module-exports.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/multiple-select-bindings.jpg b/site/static/examples/thumbnails/multiple-select-bindings.jpg
deleted file mode 100644
index ada9aaa433..0000000000
Binary files a/site/static/examples/thumbnails/multiple-select-bindings.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/named-slots.jpg b/site/static/examples/thumbnails/named-slots.jpg
deleted file mode 100644
index 54915f686f..0000000000
Binary files a/site/static/examples/thumbnails/named-slots.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/nested-components.jpg b/site/static/examples/thumbnails/nested-components.jpg
deleted file mode 100644
index 2352c21b6c..0000000000
Binary files a/site/static/examples/thumbnails/nested-components.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/numeric-inputs.jpg b/site/static/examples/thumbnails/numeric-inputs.jpg
deleted file mode 100644
index 0bcbbbbfd2..0000000000
Binary files a/site/static/examples/thumbnails/numeric-inputs.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/ondestroy.jpg b/site/static/examples/thumbnails/ondestroy.jpg
deleted file mode 100644
index c34d437017..0000000000
Binary files a/site/static/examples/thumbnails/ondestroy.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/onmount.jpg b/site/static/examples/thumbnails/onmount.jpg
deleted file mode 100644
index e42c874b90..0000000000
Binary files a/site/static/examples/thumbnails/onmount.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/reactive-assignments.jpg b/site/static/examples/thumbnails/reactive-assignments.jpg
deleted file mode 100644
index 3a57e27711..0000000000
Binary files a/site/static/examples/thumbnails/reactive-assignments.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/reactive-declarations.jpg b/site/static/examples/thumbnails/reactive-declarations.jpg
deleted file mode 100644
index 4f094d80ff..0000000000
Binary files a/site/static/examples/thumbnails/reactive-declarations.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/reactive-statements.jpg b/site/static/examples/thumbnails/reactive-statements.jpg
deleted file mode 100644
index 3a57e27711..0000000000
Binary files a/site/static/examples/thumbnails/reactive-statements.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/readable-stores.jpg b/site/static/examples/thumbnails/readable-stores.jpg
deleted file mode 100644
index 18b3ecc97f..0000000000
Binary files a/site/static/examples/thumbnails/readable-stores.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/scatterplot.jpg b/site/static/examples/thumbnails/scatterplot.jpg
deleted file mode 100644
index 065aabcc8b..0000000000
Binary files a/site/static/examples/thumbnails/scatterplot.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/select-bindings.jpg b/site/static/examples/thumbnails/select-bindings.jpg
deleted file mode 100644
index f1f2f1bf9c..0000000000
Binary files a/site/static/examples/thumbnails/select-bindings.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/sharing-code.jpg b/site/static/examples/thumbnails/sharing-code.jpg
deleted file mode 100644
index f3d5ec1045..0000000000
Binary files a/site/static/examples/thumbnails/sharing-code.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/slot-fallbacks.jpg b/site/static/examples/thumbnails/slot-fallbacks.jpg
deleted file mode 100644
index 44c083e49d..0000000000
Binary files a/site/static/examples/thumbnails/slot-fallbacks.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/slot-props.jpg b/site/static/examples/thumbnails/slot-props.jpg
deleted file mode 100644
index 424a0f2b1e..0000000000
Binary files a/site/static/examples/thumbnails/slot-props.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/slots.jpg b/site/static/examples/thumbnails/slots.jpg
deleted file mode 100644
index 845f3cb938..0000000000
Binary files a/site/static/examples/thumbnails/slots.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/spread-props.jpg b/site/static/examples/thumbnails/spread-props.jpg
deleted file mode 100644
index 0d0e2a9228..0000000000
Binary files a/site/static/examples/thumbnails/spread-props.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/spring.jpg b/site/static/examples/thumbnails/spring.jpg
deleted file mode 100644
index ca972a512d..0000000000
Binary files a/site/static/examples/thumbnails/spring.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/styling.jpg b/site/static/examples/thumbnails/styling.jpg
deleted file mode 100644
index 431c4bfe7b..0000000000
Binary files a/site/static/examples/thumbnails/styling.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/svelte-body.jpg b/site/static/examples/thumbnails/svelte-body.jpg
deleted file mode 100644
index 2494b1c95a..0000000000
Binary files a/site/static/examples/thumbnails/svelte-body.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/svelte-component.jpg b/site/static/examples/thumbnails/svelte-component.jpg
deleted file mode 100644
index b0b8922416..0000000000
Binary files a/site/static/examples/thumbnails/svelte-component.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/svelte-head.jpg b/site/static/examples/thumbnails/svelte-head.jpg
deleted file mode 100644
index fbf9c2a5e6..0000000000
Binary files a/site/static/examples/thumbnails/svelte-head.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/svelte-self.jpg b/site/static/examples/thumbnails/svelte-self.jpg
deleted file mode 100644
index d28a3ac940..0000000000
Binary files a/site/static/examples/thumbnails/svelte-self.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/svelte-window-bindings.jpg b/site/static/examples/thumbnails/svelte-window-bindings.jpg
deleted file mode 100644
index 4afdf49f7b..0000000000
Binary files a/site/static/examples/thumbnails/svelte-window-bindings.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/svelte-window.jpg b/site/static/examples/thumbnails/svelte-window.jpg
deleted file mode 100644
index ff2d91423d..0000000000
Binary files a/site/static/examples/thumbnails/svelte-window.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/svg-transitions.jpg b/site/static/examples/thumbnails/svg-transitions.jpg
deleted file mode 100644
index ff2874f622..0000000000
Binary files a/site/static/examples/thumbnails/svg-transitions.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/text-inputs.jpg b/site/static/examples/thumbnails/text-inputs.jpg
deleted file mode 100644
index e27418de53..0000000000
Binary files a/site/static/examples/thumbnails/text-inputs.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/textarea-inputs.jpg b/site/static/examples/thumbnails/textarea-inputs.jpg
deleted file mode 100644
index 6245fd8d88..0000000000
Binary files a/site/static/examples/thumbnails/textarea-inputs.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/tick.jpg b/site/static/examples/thumbnails/tick.jpg
deleted file mode 100644
index 660f5ba94e..0000000000
Binary files a/site/static/examples/thumbnails/tick.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/transition-events.jpg b/site/static/examples/thumbnails/transition-events.jpg
deleted file mode 100644
index 40e7b05a19..0000000000
Binary files a/site/static/examples/thumbnails/transition-events.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/transition.jpg b/site/static/examples/thumbnails/transition.jpg
deleted file mode 100644
index d99be156f8..0000000000
Binary files a/site/static/examples/thumbnails/transition.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/tweened.jpg b/site/static/examples/thumbnails/tweened.jpg
deleted file mode 100644
index 89433e9f86..0000000000
Binary files a/site/static/examples/thumbnails/tweened.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/update.jpg b/site/static/examples/thumbnails/update.jpg
deleted file mode 100644
index 95c4d22d6a..0000000000
Binary files a/site/static/examples/thumbnails/update.jpg and /dev/null differ
diff --git a/site/static/examples/thumbnails/writable-stores.jpg b/site/static/examples/thumbnails/writable-stores.jpg
deleted file mode 100644
index 9f14c15036..0000000000
Binary files a/site/static/examples/thumbnails/writable-stores.jpg and /dev/null differ
diff --git a/site/static/favicon.ico b/site/static/favicon.ico
deleted file mode 100644
index d75d248ef0..0000000000
Binary files a/site/static/favicon.ico and /dev/null differ
diff --git a/site/static/favicon.png b/site/static/favicon.png
deleted file mode 100644
index 21bc302b68..0000000000
Binary files a/site/static/favicon.png and /dev/null differ
diff --git a/site/static/fonts/fira-mono/fira-mono-latin-400.woff2 b/site/static/fonts/fira-mono/fira-mono-latin-400.woff2
deleted file mode 100644
index e81b9f3c56..0000000000
Binary files a/site/static/fonts/fira-mono/fira-mono-latin-400.woff2 and /dev/null differ
diff --git a/site/static/fonts/overpass/overpass-latin-100.woff2 b/site/static/fonts/overpass/overpass-latin-100.woff2
deleted file mode 100644
index a828f98880..0000000000
Binary files a/site/static/fonts/overpass/overpass-latin-100.woff2 and /dev/null differ
diff --git a/site/static/fonts/overpass/overpass-latin-300.woff2 b/site/static/fonts/overpass/overpass-latin-300.woff2
deleted file mode 100644
index 15e204c35e..0000000000
Binary files a/site/static/fonts/overpass/overpass-latin-300.woff2 and /dev/null differ
diff --git a/site/static/fonts/overpass/overpass-latin-400.woff2 b/site/static/fonts/overpass/overpass-latin-400.woff2
deleted file mode 100644
index 8f469bb22e..0000000000
Binary files a/site/static/fonts/overpass/overpass-latin-400.woff2 and /dev/null differ
diff --git a/site/static/fonts/overpass/overpass-latin-600.woff2 b/site/static/fonts/overpass/overpass-latin-600.woff2
deleted file mode 100644
index 1956aca6e0..0000000000
Binary files a/site/static/fonts/overpass/overpass-latin-600.woff2 and /dev/null differ
diff --git a/site/static/fonts/overpass/overpass-latin-700.woff2 b/site/static/fonts/overpass/overpass-latin-700.woff2
deleted file mode 100644
index 14a7f9cce5..0000000000
Binary files a/site/static/fonts/overpass/overpass-latin-700.woff2 and /dev/null differ
diff --git a/site/static/fonts/roboto/roboto-latin-400.woff2 b/site/static/fonts/roboto/roboto-latin-400.woff2
deleted file mode 100644
index 7e854e669b..0000000000
Binary files a/site/static/fonts/roboto/roboto-latin-400.woff2 and /dev/null differ
diff --git a/site/static/fonts/roboto/roboto-latin-400italic.woff2 b/site/static/fonts/roboto/roboto-latin-400italic.woff2
deleted file mode 100644
index 3791c883e8..0000000000
Binary files a/site/static/fonts/roboto/roboto-latin-400italic.woff2 and /dev/null differ
diff --git a/site/static/fonts/roboto/roboto-latin-500.woff2 b/site/static/fonts/roboto/roboto-latin-500.woff2
deleted file mode 100644
index 8dceabcf6b..0000000000
Binary files a/site/static/fonts/roboto/roboto-latin-500.woff2 and /dev/null differ
diff --git a/site/static/fonts/roboto/roboto-latin-500italic.woff2 b/site/static/fonts/roboto/roboto-latin-500italic.woff2
deleted file mode 100644
index 1b9589945e..0000000000
Binary files a/site/static/fonts/roboto/roboto-latin-500italic.woff2 and /dev/null differ
diff --git a/site/static/global.css b/site/static/global.css
deleted file mode 100644
index 329a811545..0000000000
--- a/site/static/global.css
+++ /dev/null
@@ -1,44 +0,0 @@
-/* headers anchors */
-
-.offset-anchor {
- position: relative;
- display: block;
- top: calc(-1 * (var(--nav-h) + var(--top-offset)) + 11rem);
- width: 0;
- height: 0;
-}
-
-.anchor {
- position: absolute;
- display: block;
- background: url(/icons/link.svg) 0 50% no-repeat;
- background-size: 1em 1em;
- width: 1.4em;
- height: 1em;
- top: calc(((var(--h3) - 24px) / 2) + 0.6em);
- left: -1.4em;
- opacity: 0;
- transition: opacity 0.2s;
- border: none !important; /* TODO get rid of linkify */
-}
-
-h2:hover .anchor,
-h3:hover .anchor,
-h4:hover .anchor,
-h5:hover .anchor,
-h6:hover .anchor {
- opacity: 1;
-}
-
-/* visually hidden, but accessible to assistive tech */
-.visually-hidden {
- border: 0;
- clip: rect(0 0 0 0);
- height: auto;
- margin: 0;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
- white-space: nowrap;
-}
diff --git a/site/static/icons/arrow-right.svg b/site/static/icons/arrow-right.svg
deleted file mode 100644
index 57bb51ed28..0000000000
--- a/site/static/icons/arrow-right.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/check.svg b/site/static/icons/check.svg
deleted file mode 100644
index c3e46a42b6..0000000000
--- a/site/static/icons/check.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/chevron.svg b/site/static/icons/chevron.svg
deleted file mode 100644
index 9d582fa803..0000000000
--- a/site/static/icons/chevron.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/collapse.svg b/site/static/icons/collapse.svg
deleted file mode 100644
index 795939aec8..0000000000
--- a/site/static/icons/collapse.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/download.svg b/site/static/icons/download.svg
deleted file mode 100644
index b286a882fe..0000000000
--- a/site/static/icons/download.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/dropdown.svg b/site/static/icons/dropdown.svg
deleted file mode 100644
index 69435856b4..0000000000
--- a/site/static/icons/dropdown.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/edit.svg b/site/static/icons/edit.svg
deleted file mode 100644
index 760321cd2f..0000000000
--- a/site/static/icons/edit.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/expand.svg b/site/static/icons/expand.svg
deleted file mode 100644
index a026808da3..0000000000
--- a/site/static/icons/expand.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/flip.svg b/site/static/icons/flip.svg
deleted file mode 100644
index 3a18d5ffa1..0000000000
--- a/site/static/icons/flip.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/fork.svg b/site/static/icons/fork.svg
deleted file mode 100644
index 3e21885495..0000000000
--- a/site/static/icons/fork.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/link.svg b/site/static/icons/link.svg
deleted file mode 100644
index 3345bdd0ba..0000000000
--- a/site/static/icons/link.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/icons/loading.svg b/site/static/icons/loading.svg
deleted file mode 100644
index e54abff1dd..0000000000
--- a/site/static/icons/loading.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/site/static/icons/save.svg b/site/static/icons/save.svg
deleted file mode 100644
index a8a5fa1618..0000000000
--- a/site/static/icons/save.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/images/svelte-android-chrome-192.png b/site/static/images/svelte-android-chrome-192.png
deleted file mode 100644
index e3ccf28087..0000000000
Binary files a/site/static/images/svelte-android-chrome-192.png and /dev/null differ
diff --git a/site/static/images/svelte-android-chrome-512.png b/site/static/images/svelte-android-chrome-512.png
deleted file mode 100644
index e673c91c7b..0000000000
Binary files a/site/static/images/svelte-android-chrome-512.png and /dev/null differ
diff --git a/site/static/images/svelte-apple-touch-icon.png b/site/static/images/svelte-apple-touch-icon.png
deleted file mode 100644
index 5600445b1c..0000000000
Binary files a/site/static/images/svelte-apple-touch-icon.png and /dev/null differ
diff --git a/site/static/images/svelte-mstile-150.png b/site/static/images/svelte-mstile-150.png
deleted file mode 100644
index 7694b20455..0000000000
Binary files a/site/static/images/svelte-mstile-150.png and /dev/null differ
diff --git a/site/static/images/twitter-card.png b/site/static/images/twitter-card.png
deleted file mode 100644
index 7a66e94003..0000000000
Binary files a/site/static/images/twitter-card.png and /dev/null differ
diff --git a/site/static/manifest.json b/site/static/manifest.json
deleted file mode 100644
index 45a9d5b907..0000000000
--- a/site/static/manifest.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "background_color": "#ffffff",
- "theme_color": "#ff3e00",
- "name": "Svelte",
- "short_name": "Svelte",
- "display": "minimal-ui",
- "start_url": "/",
- "icons": [
- {
- "src": "images/svelte-android-chrome-192.png",
- "sizes": "192x192",
- "type": "image/png"
- },
- {
- "src": "images/svelte-android-chrome-512.png",
- "sizes": "512x512",
- "type": "image/png"
- }
- ]
-}
diff --git a/site/static/media/rethinking-best-practices.jpg b/site/static/media/rethinking-best-practices.jpg
deleted file mode 100644
index fdbae403de..0000000000
Binary files a/site/static/media/rethinking-best-practices.jpg and /dev/null differ
diff --git a/site/static/media/svelte-ts.png b/site/static/media/svelte-ts.png
deleted file mode 100644
index ed562822c3..0000000000
Binary files a/site/static/media/svelte-ts.png and /dev/null differ
diff --git a/site/static/prism.css b/site/static/prism.css
deleted file mode 100644
index 0bedd0f02b..0000000000
--- a/site/static/prism.css
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
------------------------------------------------
- syntax-highlighting [prism]
------------------------------------------------
-*/
-
-/* colors --------------------------------- */
-pre[class*='language-'] {
- --background: var(--back-light);
- --base: #545454;
- --comment: #696969;
- --keyword: #007f8a;
- --function: #bb5525;
- --string: #856e3d;
- --number: #008000;
- --tags: var(--function);
- --important: var(--string);
-}
-
-/* type-base ------------------------------ */
-code[class*='language-'],
-pre[class*='language-'] {
- background: none;
- text-align: left;
- white-space: pre;
- word-spacing: normal;
- word-break: normal;
- word-wrap: normal;
- font: 300 var(--code-fs)/1.7 var(--font-mono);
- color: var(--base);
- tab-size: 2;
- -moz-tab-size: 2;
- -webkit-hyphens: none;
- hyphens: none;
-}
-
-/* code-blocks ---------------------------- */
-pre[class*='language-'] {
- overflow: auto;
- padding: 1.5rem 2rem;
- margin: .8rem 0 2.4rem;
- /* max-width: var(--code-w); */
- border-radius: var(--border-r);
- box-shadow: 1px 1px 1px rgba(68, 68, 68, .12) inset;
-}
-
-:not(pre) > code[class*='language-'],
-pre[class*='language-'] {
- background: var(--background);
-}
-
-/* tokens --------------------------------- */
-.token.comment,
-.token.prolog,
-.token.doctype,
-.token.cdata { color: var(--comment) }
-
-.token.punctuation { color: var(--base) }
-
-.token.property,
-.token.tag,
-.token.constant,
-.token.symbol,
-.token.deleted { color: var(--tags) }
-
-.token.boolean,
-.token.number { color: var(--number) }
-
-.token.selector,
-.token.attr-name,
-.token.string,
-.token.char,
-.token.builtin,
-.token.inserted { color: var(--string) }
-
-.token.operator,
-.token.entity,
-.token.url,
-.language-css .token.string,
-.style .token.string,
-.token.variable { color: var(--base) }
-
-.token.atrule,
-.token.attr-value,
-.token.function,
-.token.class-name { color: var(--function) }
-
-.token.keyword { color: var(--keyword) }
-
-.token.regex,
-.token.important { color: var(--important) }
-
-.token.important,
-.token.bold { font-weight: bold }
-.token.italic { font-style: italic }
-.token.entity { cursor: help }
\ No newline at end of file
diff --git a/site/static/svelte-logo-horizontal.svg b/site/static/svelte-logo-horizontal.svg
deleted file mode 100644
index 1d602a9051..0000000000
--- a/site/static/svelte-logo-horizontal.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/site/static/svelte-logo-mask.svg b/site/static/svelte-logo-mask.svg
deleted file mode 100644
index 8572d3da6c..0000000000
--- a/site/static/svelte-logo-mask.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/svelte-logo-outline.svg b/site/static/svelte-logo-outline.svg
deleted file mode 100644
index d93d71c593..0000000000
--- a/site/static/svelte-logo-outline.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/svelte-logo-vertical.svg b/site/static/svelte-logo-vertical.svg
deleted file mode 100644
index 7e2888234d..0000000000
--- a/site/static/svelte-logo-vertical.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/svelte-logo.svg b/site/static/svelte-logo.svg
deleted file mode 100644
index d8b477bee1..0000000000
--- a/site/static/svelte-logo.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/svelte-logotype.svg b/site/static/svelte-logotype.svg
deleted file mode 100644
index 1e0aec15ef..0000000000
--- a/site/static/svelte-logotype.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/site/static/tutorial/dark-theme.css b/site/static/tutorial/dark-theme.css
deleted file mode 100644
index e6bfb771f1..0000000000
--- a/site/static/tutorial/dark-theme.css
+++ /dev/null
@@ -1,5 +0,0 @@
-body {
- background-color: #333;
- color: whitesmoke;
- transition: all 0.5s;
-}
\ No newline at end of file
diff --git a/site/static/tutorial/icons/email.svg b/site/static/tutorial/icons/email.svg
deleted file mode 100644
index 70d92ca430..0000000000
--- a/site/static/tutorial/icons/email.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/tutorial/icons/folder-open.svg b/site/static/tutorial/icons/folder-open.svg
deleted file mode 100644
index b2a58e7432..0000000000
--- a/site/static/tutorial/icons/folder-open.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/tutorial/icons/folder.svg b/site/static/tutorial/icons/folder.svg
deleted file mode 100644
index 2e1246a7f9..0000000000
--- a/site/static/tutorial/icons/folder.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/tutorial/icons/gif.svg b/site/static/tutorial/icons/gif.svg
deleted file mode 100644
index 4b28abcecd..0000000000
--- a/site/static/tutorial/icons/gif.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/tutorial/icons/map-marker.svg b/site/static/tutorial/icons/map-marker.svg
deleted file mode 100644
index 40a702db9d..0000000000
--- a/site/static/tutorial/icons/map-marker.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/tutorial/icons/md.svg b/site/static/tutorial/icons/md.svg
deleted file mode 100644
index 582204d3b7..0000000000
--- a/site/static/tutorial/icons/md.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/tutorial/icons/xlsx.svg b/site/static/tutorial/icons/xlsx.svg
deleted file mode 100644
index 1a51093a97..0000000000
--- a/site/static/tutorial/icons/xlsx.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/tutorial/image.gif b/site/static/tutorial/image.gif
deleted file mode 100644
index 3ce9c237d5..0000000000
Binary files a/site/static/tutorial/image.gif and /dev/null differ
diff --git a/site/static/tutorial/kitten.png b/site/static/tutorial/kitten.png
deleted file mode 100644
index f1a0ecca19..0000000000
Binary files a/site/static/tutorial/kitten.png and /dev/null differ
diff --git a/site/static/whos-using-svelte/1password.svg b/site/static/whos-using-svelte/1password.svg
deleted file mode 100644
index ba8a63c014..0000000000
--- a/site/static/whos-using-svelte/1password.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/Schneider_Electric.svg b/site/static/whos-using-svelte/Schneider_Electric.svg
deleted file mode 100644
index c70ca1fceb..0000000000
--- a/site/static/whos-using-svelte/Schneider_Electric.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/alaskaairlines.svg b/site/static/whos-using-svelte/alaskaairlines.svg
deleted file mode 100644
index 15d172c08b..0000000000
--- a/site/static/whos-using-svelte/alaskaairlines.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/avast.svg b/site/static/whos-using-svelte/avast.svg
deleted file mode 100644
index 736eeff3d9..0000000000
--- a/site/static/whos-using-svelte/avast.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/chess.svg b/site/static/whos-using-svelte/chess.svg
deleted file mode 100644
index bd85352a52..0000000000
--- a/site/static/whos-using-svelte/chess.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/fusioncharts.svg b/site/static/whos-using-svelte/fusioncharts.svg
deleted file mode 100644
index 147dd9e026..0000000000
--- a/site/static/whos-using-svelte/fusioncharts.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/godaddy.svg b/site/static/whos-using-svelte/godaddy.svg
deleted file mode 100644
index df39638281..0000000000
--- a/site/static/whos-using-svelte/godaddy.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/ibm.svg b/site/static/whos-using-svelte/ibm.svg
deleted file mode 100644
index d8982a47ab..0000000000
--- a/site/static/whos-using-svelte/ibm.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/les-echos.svg b/site/static/whos-using-svelte/les-echos.svg
deleted file mode 100644
index 6ab7eddeef..0000000000
--- a/site/static/whos-using-svelte/les-echos.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/nyt.svg b/site/static/whos-using-svelte/nyt.svg
deleted file mode 100644
index cef76f1afb..0000000000
--- a/site/static/whos-using-svelte/nyt.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/philips.svg b/site/static/whos-using-svelte/philips.svg
deleted file mode 100644
index 5f6c7fa343..0000000000
--- a/site/static/whos-using-svelte/philips.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/rakuten.svg b/site/static/whos-using-svelte/rakuten.svg
deleted file mode 100644
index 67b59c8354..0000000000
--- a/site/static/whos-using-svelte/rakuten.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/razorpay.svg b/site/static/whos-using-svelte/razorpay.svg
deleted file mode 100644
index b430dc5a5b..0000000000
--- a/site/static/whos-using-svelte/razorpay.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/square.svg b/site/static/whos-using-svelte/square.svg
deleted file mode 100644
index d1b0689c61..0000000000
--- a/site/static/whos-using-svelte/square.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/static/whos-using-svelte/transloadit.svg b/site/static/whos-using-svelte/transloadit.svg
deleted file mode 100644
index f3383655bb..0000000000
--- a/site/static/whos-using-svelte/transloadit.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/site/test/utils/slug.js b/site/test/utils/slug.js
deleted file mode 100644
index 17262c5e83..0000000000
--- a/site/test/utils/slug.js
+++ /dev/null
@@ -1,423 +0,0 @@
-import {strict as assert} from 'assert';
-import {urlsafeSlugProcessor, unicodeSafeProcessor} from '../../src/utils/slug';
-import {SLUG_SEPARATOR as _} from '../../config';
-
-describe('slug', () => {
- describe('urlsafeSlugProcessor', () => {
- describe('ascii', () => {
- it('space separated words', () => {
- assert.equal(
- urlsafeSlugProcessor('Text expressions'),
- `Text${_}expressions`
- );
- });
- it('numbered text', () => {
- assert.equal(
- urlsafeSlugProcessor('1. export creates'),
- `1${_}export${_}creates`
- );
- });
- it('punctuated text', () => {
- assert.equal(
- urlsafeSlugProcessor('svelte.VERSION'),
- `svelte${_}VERSION`
- );
- });
- it('text starting with the dollar sign', () => {
- assert.equal(
- urlsafeSlugProcessor('$destroy method'),
- `$destroy${_}method`
- );
- });
- it('numbered text containing the dollar sign', () => {
- assert.equal(
- urlsafeSlugProcessor('1. export $destroy'),
- `1${_}export${_}$destroy`
- );
- });
- it('text containing the equal char', () => {
- assert.equal(
- urlsafeSlugProcessor('script context=module'),
- `script${_}context${_}module`
- );
- });
- it('text containing the colon char', () => {
- assert.equal(
- urlsafeSlugProcessor('svelte:body'),
- `svelte${_}body`
- );
- });
- it('text containing the slash char', () => {
- assert.equal(
- urlsafeSlugProcessor('svelte/motion'),
- `svelte${_}motion`
- );
- });
- it('text containing the comma char', () => {
- assert.equal(
- urlsafeSlugProcessor('svelte, motion'),
- `svelte${_}motion`
- );
- });
- });
- describe('unicode', () => {
- it('should translate symbols to English', () => {
- assert.equal(
- urlsafeSlugProcessor('Ich ♥ Deutsch'),
- `Ich${_}love${_}Deutsch`
- );
- });
- it('should remove emoji', () => {
- assert.equal(
- urlsafeSlugProcessor('Ich 😍 Deutsch'),
- `Ich${_}Deutsch`
- );
- });
- });
- describe('cyricllic', () => {
- it('space separated words', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие и перехват событий'),
- `Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('numbered text', () => {
- assert.equal(
- urlsafeSlugProcessor('1 Всплытие и перехват событий'),
- `1${_}Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('punctuated text', () => {
- assert.equal(
- urlsafeSlugProcessor('.Всплытие.и.перехват событий'),
- `Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('text starting with the dollar sign', () => {
- assert.equal(
- urlsafeSlugProcessor('$Всплытие $ перехват событий'),
- `$Vsplytie${_}$${_}perehvat${_}sobytij`
- );
- });
- it('text containing the dollar sign', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие$перехват'),
- `Vsplytie$perehvat`
- );
- });
- it('text containing the equal char', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие = перехват=событий'),
- `Vsplytie${_}perehvat${_}sobytij`
- );
- });
- it('text containing the colon char', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие : перехват:событий'),
- `Vsplytie${_}perehvat${_}sobytij`
- );
- });
- it('text containing the slash char', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие / перехват/событий'),
- `Vsplytie${_}perehvat${_}sobytij`
- );
- });
- it('text containing the comma char', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие, перехват'),
- `Vsplytie${_}perehvat`
- );
- });
- });
- describe('ascii + cyricllic', () => {
- it('space separated words', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие и export перехват событий'),
- `Vsplytie${_}i${_}export${_}perehvat${_}sobytij`
- );
- });
- it('ascii word concatenated to a cyricllic word', () => {
- assert.equal(
- urlsafeSlugProcessor('exportВсплытие'),
- 'exportVsplytie'
- );
- });
- it('cyricllic word concatenated to an ascii word', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытиеexport'),
- `Vsplytieexport`
- );
- });
- it('numbered text', () => {
- assert.equal(
- urlsafeSlugProcessor('1 export Всплытие и перехват событий'),
- `1${_}export${_}Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('punctuated text', () => {
- assert.equal(
- urlsafeSlugProcessor('.Всплытие.export.и.перехват событий'),
- `Vsplytie${_}export${_}i${_}perehvat${_}sobytij`
- );
- });
- it('text starting with the dollar sign, followed by ascii char', () => {
- assert.equal(
- urlsafeSlugProcessor('$exportВсплытие перехват событий'),
- `$exportVsplytie${_}perehvat${_}sobytij`
- );
- });
- it('text starting with the dollar sign, followed by unicode char', () => {
- assert.equal(
- urlsafeSlugProcessor('$Всплытие export перехват событий'),
- `$Vsplytie${_}export${_}perehvat${_}sobytij`
- );
- });
- it('text containing the dollar sign, followed by ascii char', () => {
- assert.equal(
- urlsafeSlugProcessor('export $destroy a component prop Всплытие и перехват событий'),
- `export${_}$destroy${_}a${_}component${_}prop${_}Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('text containing the dollar sign, followed by unicode char', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие export $Всплытие a component prop Всплытие и перехват событий'),
- `Vsplytie${_}export${_}$Vsplytie${_}a${_}component${_}prop${_}Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('text containing the equal char', () => {
- assert.equal(
- urlsafeSlugProcessor('script context=module Всплытие=и перехват событий'),
- `script${_}context${_}module${_}Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('text containing the colon char', () => {
- assert.equal(
- urlsafeSlugProcessor('svelte:body Всплытие и:перехват событий'),
- `svelte${_}body${_}Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('text containing the slash char', () => {
- assert.equal(
- urlsafeSlugProcessor('svelte/motion Всплытие и / перехват/событий'),
- `svelte${_}motion${_}Vsplytie${_}i${_}perehvat${_}sobytij`
- );
- });
- it('text containing the comma char', () => {
- assert.equal(
- urlsafeSlugProcessor('Всплытие, export'),
- `Vsplytie${_}export`
- );
- });
- });
- });
-
- describe('unicodeSafeProcessor (preserve unicode)', () => {
- describe('ascii', () => {
- it('space separated words', () => {
- assert.equal(
- unicodeSafeProcessor('Text expressions'),
- `Text${_}expressions`
- );
- });
- it('numbered text', () => {
- assert.equal(
- unicodeSafeProcessor('1. export creates'),
- `1${_}export${_}creates`
- );
- });
- it('punctuated text', () => {
- assert.equal(
- unicodeSafeProcessor('svelte.VERSION'),
- `svelte${_}VERSION`
- );
- });
- it('text starting with the dollar sign', () => {
- assert.equal(
- unicodeSafeProcessor('$destroy method'),
- `$destroy${_}method`
- );
- });
- it('numbered text containing the dollar sign', () => {
- assert.equal(
- unicodeSafeProcessor('1. export $destroy'),
- `1${_}export${_}$destroy`
- );
- });
- it('text containing the equal char', () => {
- assert.equal(
- unicodeSafeProcessor('script context=module'),
- `script${_}context${_}module`
- );
- });
- it('text containing the colon char', () => {
- assert.equal(
- unicodeSafeProcessor('svelte:body'),
- `svelte${_}body`
- );
- });
- it('text containing the slash char', () => {
- assert.equal(
- unicodeSafeProcessor('svelte/motion'),
- `svelte${_}motion`
- );
- });
- it('text containing the comma char', () => {
- assert.equal(
- unicodeSafeProcessor('svelte, motion'),
- `svelte${_}motion`
- );
- });
- });
- describe('unicode', () => {
- it('should preserve symbols', () => {
- assert.equal(
- unicodeSafeProcessor('Ich ♥ Deutsch'),
- `Ich${_}love${_}Deutsch`
- );
- });
- it('should remove emoji', () => {
- assert.equal(
- unicodeSafeProcessor('Ich 😍 Deutsch'),
- `Ich${_}Deutsch`
- );
- });
- });
- describe('cyricllic', () => {
- it('space separated words', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие и перехват событий'),
- `Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('numbered text', () => {
- assert.equal(
- unicodeSafeProcessor('1 Всплытие и перехват событий'),
- `1${_}Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('punctuated text', () => {
- assert.equal(
- unicodeSafeProcessor('.Всплытие.и.перехват событий'),
- `Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('text starting with the dollar sign', () => {
- assert.equal(
- unicodeSafeProcessor('$Всплытие $ перехват событий'),
- `$${_}Всплытие${_}$${_}перехват${_}событий`
- );
- });
- it('text containing the dollar sign', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие$перехват'),
- `Всплытие${_}$${_}перехват`
- );
- });
- it('text containing the equal char', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие = перехват=событий'),
- `Всплытие${_}перехват${_}событий`
- );
- });
- it('text containing the colon char', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие : перехват:событий'),
- `Всплытие${_}перехват${_}событий`
- );
- });
- it('text containing the slash char', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие / перехват/событий'),
- `Всплытие${_}перехват${_}событий`
- );
- });
- it('text containing the comma char', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие, перехват'),
- `Всплытие${_}перехват`
- );
- });
- });
- describe('ascii + cyricllic', () => {
- it('space separated words', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие и export перехват событий'),
- `Всплытие${_}и${_}export${_}перехват${_}событий`
- );
- });
- it('ascii word concatenated to a cyricllic word', () => {
- assert.equal(
- unicodeSafeProcessor('exportВсплытие'),
- `export${_}Всплытие`
- );
- });
- it('cyricllic word concatenated to an ascii word', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытиеexport'),
- `Всплытие${_}export`
- );
- });
- it('numbered text', () => {
- assert.equal(
- unicodeSafeProcessor('1 export Всплытие и перехват событий'),
- `1${_}export${_}Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('punctuated text', () => {
- assert.equal(
- unicodeSafeProcessor('.Всплытие.export.и.перехват событий'),
- `Всплытие${_}export${_}и${_}перехват${_}событий`
- );
- });
- it('text starting with the dollar sign, followed by ascii char', () => {
- assert.equal(
- unicodeSafeProcessor('$exportВсплытие перехват событий'),
- `$export${_}Всплытие${_}перехват${_}событий`
- );
- });
- it('text starting with the dollar sign, followed by unicode char', () => {
- assert.equal(
- unicodeSafeProcessor('$Всплытие export перехват событий'),
- `$${_}Всплытие${_}export${_}перехват${_}событий`
- );
- });
- it('text containing the dollar sign, followed by ascii char', () => {
- assert.equal(
- unicodeSafeProcessor('export $destroy a component prop Всплытие и перехват событий'),
- `export${_}$destroy${_}a${_}component${_}prop${_}Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('text containing the dollar sign, followed by unicode char', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие export $Всплытие a component prop Всплытие и перехват событий'),
- `Всплытие${_}export${_}$${_}Всплытие${_}a${_}component${_}prop${_}Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('text containing the equal char', () => {
- assert.equal(
- unicodeSafeProcessor('script context=module Всплытие=и перехват событий'),
- `script${_}context${_}module${_}Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('text containing the colon char', () => {
- assert.equal(
- unicodeSafeProcessor('svelte:body Всплытие и:перехват событий'),
- `svelte${_}body${_}Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('text containing the slash char', () => {
- assert.equal(
- unicodeSafeProcessor('svelte/motion Всплытие и / перехват/событий'),
- `svelte${_}motion${_}Всплытие${_}и${_}перехват${_}событий`
- );
- });
- it('text containing the comma char', () => {
- assert.equal(
- unicodeSafeProcessor('Всплытие, export'),
- `Всплытие${_}export`
- );
- });
- });
- });
-});
diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts
index 202e14fd98..5f7d4b9758 100644
--- a/src/compiler/compile/Component.ts
+++ b/src/compiler/compile/Component.ts
@@ -24,7 +24,7 @@ import TemplateScope from './nodes/shared/TemplateScope';
import fuzzymatch from '../utils/fuzzymatch';
import get_object from './utils/get_object';
import Slot from './nodes/Slot';
-import { Node, ImportDeclaration, ExportNamedDeclaration, Identifier, ExpressionStatement, AssignmentExpression, Literal, Property, RestElement, ExportDefaultDeclaration, ExportAllDeclaration } from 'estree';
+import { Node, ImportDeclaration, ExportNamedDeclaration, Identifier, ExpressionStatement, AssignmentExpression, Literal, Property, RestElement, ExportDefaultDeclaration, ExportAllDeclaration, FunctionDeclaration, FunctionExpression } from 'estree';
import add_to_set from './utils/add_to_set';
import check_graph_for_cycles from './utils/check_graph_for_cycles';
import { print, b } from 'code-red';
@@ -36,6 +36,7 @@ import { clone } from '../utils/clone';
import compiler_warnings from './compiler_warnings';
import compiler_errors from './compiler_errors';
import { extract_ignores_above_position, extract_svelte_ignore_from_comments } from '../utils/extract_svelte_ignore';
+import check_enable_sourcemap from './utils/check_enable_sourcemap';
interface ComponentOptions {
namespace?: string;
@@ -190,27 +191,33 @@ export default class Component {
this.stylesheet.warn_on_unused_selectors(this);
}
- add_var(variable: Var, add_to_lookup = true) {
+ add_var(node: Node, variable: Var, add_to_lookup = true) {
this.vars.push(variable);
if (add_to_lookup) {
+ if (this.var_lookup.has(variable.name)) {
+ const exists_var = this.var_lookup.get(variable.name);
+ if (exists_var.module && exists_var.imported) {
+ this.error(node as any, compiler_errors.illegal_variable_declaration);
+ }
+ }
this.var_lookup.set(variable.name, variable);
}
}
- add_reference(name: string) {
+ add_reference(node: Node, name: string) {
const variable = this.var_lookup.get(name);
if (variable) {
variable.referenced = true;
} else if (is_reserved_keyword(name)) {
- this.add_var({
+ this.add_var(node, {
name,
injected: true,
referenced: true
});
} else if (name[0] === '$') {
- this.add_var({
+ this.add_var(node, {
name,
injected: true,
referenced: true,
@@ -227,7 +234,7 @@ export default class Component {
}
} else {
if (this.compile_options.varsReport === 'full') {
- this.add_var({ name, referenced: true }, false);
+ this.add_var(node, { name, referenced: true }, false);
}
this.used_names.add(name);
@@ -343,21 +350,28 @@ export default class Component {
? { code: null, map: null }
: result.css;
- const sourcemap_source_filename = get_sourcemap_source_filename(compile_options);
+ const js_sourcemap_enabled = check_enable_sourcemap(compile_options.enableSourcemap, 'js');
- js = print(program, {
- sourceMapSource: sourcemap_source_filename
- });
+ if (!js_sourcemap_enabled) {
+ js = print(program);
+ js.map = null;
+ } else {
+ const sourcemap_source_filename = get_sourcemap_source_filename(compile_options);
+
+ js = print(program, {
+ sourceMapSource: sourcemap_source_filename
+ });
- js.map.sources = [
- sourcemap_source_filename
- ];
+ js.map.sources = [
+ sourcemap_source_filename
+ ];
- js.map.sourcesContent = [
- this.source
- ];
+ js.map.sourcesContent = [
+ this.source
+ ];
- js.map = apply_preprocessor_sourcemap(sourcemap_source_filename, js.map, compile_options.sourcemap as (string | RawSourceMap | DecodedSourceMap));
+ js.map = apply_preprocessor_sourcemap(sourcemap_source_filename, js.map, compile_options.sourcemap as (string | RawSourceMap | DecodedSourceMap));
+ }
}
return {
@@ -591,12 +605,14 @@ export default class Component {
}
const writable = node.type === 'VariableDeclaration' && (node.kind === 'var' || node.kind === 'let');
+ const imported = node.type.startsWith('Import');
- this.add_var({
+ this.add_var(node, {
name,
module: true,
hoistable: true,
- writable
+ writable,
+ imported
});
});
@@ -604,7 +620,7 @@ export default class Component {
if (name[0] === '$') {
return this.error(node as any, compiler_errors.illegal_subscription);
} else {
- this.add_var({
+ this.add_var(node, {
name,
global: true,
hoistable: true
@@ -666,7 +682,7 @@ export default class Component {
const writable = node.type === 'VariableDeclaration' && (node.kind === 'var' || node.kind === 'let');
const imported = node.type.startsWith('Import');
- this.add_var({
+ this.add_var(node, {
name,
initialised: instance_scope.initialised_declarations.has(name),
writable,
@@ -689,7 +705,7 @@ export default class Component {
const node = globals.get(name);
if (this.injected_reactive_declaration_vars.has(name)) {
- this.add_var({
+ this.add_var(node, {
name,
injected: true,
writable: true,
@@ -697,7 +713,7 @@ export default class Component {
initialised: true
});
} else if (is_reserved_keyword(name)) {
- this.add_var({
+ this.add_var(node, {
name,
injected: true
});
@@ -706,14 +722,14 @@ export default class Component {
return this.error(node as any, compiler_errors.illegal_global(name));
}
- this.add_var({
+ this.add_var(node, {
name,
injected: true,
mutated: true,
writable: true
});
- this.add_reference(name.slice(1));
+ this.add_reference(node, name.slice(1));
const variable = this.var_lookup.get(name.slice(1));
if (variable) {
@@ -721,7 +737,7 @@ export default class Component {
variable.referenced_from_script = true;
}
} else {
- this.add_var({
+ this.add_var(node, {
name,
global: true,
hoistable: true
@@ -758,12 +774,13 @@ export default class Component {
};
let scope_updated = false;
- let generator_count = 0;
+ const current_function_stack = [];
+ let current_function: FunctionDeclaration | FunctionExpression = null;
walk(content, {
enter(node: Node, parent: Node, prop, index) {
- if ((node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression') && node.generator === true) {
- generator_count++;
+ if ((node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression')) {
+ current_function_stack.push(current_function = node);
}
if (map.has(node)) {
@@ -792,12 +809,13 @@ export default class Component {
},
leave(node: Node) {
- if ((node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression') && node.generator === true) {
- generator_count--;
+ if ((node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression')) {
+ current_function_stack.pop();
+ current_function = current_function_stack[current_function_stack.length - 1];
}
// do it on leave, to prevent infinite loop
- if (component.compile_options.dev && component.compile_options.loopGuardTimeout > 0 && generator_count <= 0) {
+ if (component.compile_options.dev && component.compile_options.loopGuardTimeout > 0 && (!current_function || (!current_function.generator && !current_function.async))) {
const to_replace_for_loop_protect = component.loop_protect(node, scope, component.compile_options.loopGuardTimeout);
if (to_replace_for_loop_protect) {
this.replace(to_replace_for_loop_protect);
diff --git a/src/compiler/compile/compiler_errors.ts b/src/compiler/compile/compiler_errors.ts
index 54263c3eb9..df832373fc 100644
--- a/src/compiler/compile/compiler_errors.ts
+++ b/src/compiler/compile/compiler_errors.ts
@@ -40,6 +40,10 @@ export default {
code: 'invalid-binding',
message: 'Cannot bind to a variable declared with {#await ... then} or {:catch} blocks'
},
+ invalid_binding_const: {
+ code: 'invalid-binding',
+ message: 'Cannot bind to a variable declared with {@const ...}'
+ },
invalid_binding_writibale: {
code: 'invalid-binding',
message: 'Cannot bind to a variable which is not writable'
@@ -186,6 +190,10 @@ export default {
code: 'illegal-global',
message: `${name} is an illegal variable name`
}),
+ illegal_variable_declaration: {
+ code: 'illegal-variable-declaration',
+ message: 'Cannot declare same variable name which is imported inside
click me
{#if clicked}
clicked!
-{/if}
\ No newline at end of file
+{/if}
diff --git a/test/hydration/samples/raw-with-empty-line-at-top/_after.html b/test/hydration/samples/raw-with-empty-line-at-top/_after.html
new file mode 100644
index 0000000000..28ee6452d3
--- /dev/null
+++ b/test/hydration/samples/raw-with-empty-line-at-top/_after.html
@@ -0,0 +1,6 @@
+
+before
+
+
+a b c
+after
diff --git a/test/hydration/samples/raw-with-empty-line-at-top/_before.html b/test/hydration/samples/raw-with-empty-line-at-top/_before.html
new file mode 100644
index 0000000000..28ee6452d3
--- /dev/null
+++ b/test/hydration/samples/raw-with-empty-line-at-top/_before.html
@@ -0,0 +1,6 @@
+
+before
+
+
+a b c
+after
diff --git a/test/hydration/samples/raw-with-empty-line-at-top/main.svelte b/test/hydration/samples/raw-with-empty-line-at-top/main.svelte
new file mode 100644
index 0000000000..2d08a3f418
--- /dev/null
+++ b/test/hydration/samples/raw-with-empty-line-at-top/main.svelte
@@ -0,0 +1,11 @@
+
+
+before
+
+
+{#each content as c}
+ {@html c}
+{/each}
+after
diff --git a/test/js/samples/custom-svelte-path/_config.js b/test/js/samples/custom-svelte-path/_config.js
new file mode 100644
index 0000000000..19a7366845
--- /dev/null
+++ b/test/js/samples/custom-svelte-path/_config.js
@@ -0,0 +1,5 @@
+export default {
+ options: {
+ sveltePath: 'a/b/svelte'
+ }
+};
diff --git a/test/js/samples/custom-svelte-path/expected.js b/test/js/samples/custom-svelte-path/expected.js
new file mode 100644
index 0000000000..3210f216d3
--- /dev/null
+++ b/test/js/samples/custom-svelte-path/expected.js
@@ -0,0 +1,64 @@
+/* generated by Svelte vX.Y.Z */
+import {
+ SvelteComponent,
+ append,
+ detach,
+ element,
+ init,
+ insert,
+ noop,
+ safe_not_equal,
+ set_data,
+ text
+} from "a/b/svelte/internal";
+
+import { onMount } from "a/b/svelte";
+
+function create_fragment(ctx) {
+ let h1;
+ let t0;
+ let t1;
+ let t2;
+
+ return {
+ c() {
+ h1 = element("h1");
+ t0 = text("Hello ");
+ t1 = text(/*name*/ ctx[0]);
+ t2 = text("!");
+ },
+ m(target, anchor) {
+ insert(target, h1, anchor);
+ append(h1, t0);
+ append(h1, t1);
+ append(h1, t2);
+ },
+ p(ctx, [dirty]) {
+ if (dirty & /*name*/ 1) set_data(t1, /*name*/ ctx[0]);
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(h1);
+ }
+ };
+}
+
+function instance($$self, $$props, $$invalidate) {
+ let name = '';
+
+ onMount(() => {
+ $$invalidate(0, name = 'world');
+ });
+
+ return [name];
+}
+
+class Component extends SvelteComponent {
+ constructor(options) {
+ super();
+ init(this, options, instance, create_fragment, safe_not_equal, {});
+ }
+}
+
+export default Component;
\ No newline at end of file
diff --git a/test/js/samples/custom-svelte-path/input.svelte b/test/js/samples/custom-svelte-path/input.svelte
new file mode 100644
index 0000000000..03d31e7c7b
--- /dev/null
+++ b/test/js/samples/custom-svelte-path/input.svelte
@@ -0,0 +1,9 @@
+
+
+Hello {name}!
\ No newline at end of file
diff --git a/test/js/samples/debug-ssr-foo/expected.js b/test/js/samples/debug-ssr-foo/expected.js
index 69da37b2d9..e0a29f18de 100644
--- a/test/js/samples/debug-ssr-foo/expected.js
+++ b/test/js/samples/debug-ssr-foo/expected.js
@@ -7,8 +7,10 @@ const Component = create_ssr_component(($$result, $$props, $$bindings, slots) =>
if ($$props.things === void 0 && $$bindings.things && things !== void 0) $$bindings.things(things);
if ($$props.foo === void 0 && $$bindings.foo && foo !== void 0) $$bindings.foo(foo);
- return `${each(things, thing => `${escape(thing.name)}
- ${debug(null, 7, 2, { foo })}`)}
+ return `${each(things, thing => {
+ return `${escape(thing.name)}
+ ${debug(null, 7, 2, { foo })}`;
+ })}
foo: ${escape(foo)}
`;
});
diff --git a/test/js/samples/input-value/expected.js b/test/js/samples/input-value/expected.js
index 2491a24256..2f951c9ae1 100644
--- a/test/js/samples/input-value/expected.js
+++ b/test/js/samples/input-value/expected.js
@@ -2,12 +2,14 @@
import {
SvelteComponent,
append,
+ attr,
detach,
element,
init,
insert,
listen,
noop,
+ run_all,
safe_not_equal,
set_data,
space,
@@ -15,50 +17,388 @@ import {
} from "svelte/internal";
function create_fragment(ctx) {
- let input;
+ let input0;
let t0;
- let h1;
+ let input1;
let t1;
+ let input2;
let t2;
+ let input3;
+ let t3;
+ let input4;
+ let t4;
+ let input5;
+ let t5;
+ let input6;
+ let t6;
+ let input7;
+ let t7;
+ let input8;
+ let t8;
+ let input9;
+ let t9;
+ let input10;
+ let t10;
+ let input11;
+ let t11;
+ let input12;
+ let t12;
+ let input13;
+ let t13;
+ let input14;
+ let t14;
+ let input15;
+ let t15;
+ let input16;
+ let t16;
+ let input17;
+ let t17;
+ let input18;
+ let t18;
+ let input19;
+ let t19;
+ let input20;
+ let t20;
+ let input21;
+ let t21;
+ let input22;
+ let t22;
+ let h1;
+ let t23;
+ let t24;
let mounted;
let dispose;
return {
c() {
- input = element("input");
+ input0 = element("input");
t0 = space();
+ input1 = element("input");
+ t1 = space();
+ input2 = element("input");
+ t2 = space();
+ input3 = element("input");
+ t3 = space();
+ input4 = element("input");
+ t4 = space();
+ input5 = element("input");
+ t5 = space();
+ input6 = element("input");
+ t6 = space();
+ input7 = element("input");
+ t7 = space();
+ input8 = element("input");
+ t8 = space();
+ input9 = element("input");
+ t9 = space();
+ input10 = element("input");
+ t10 = space();
+ input11 = element("input");
+ t11 = space();
+ input12 = element("input");
+ t12 = space();
+ input13 = element("input");
+ t13 = space();
+ input14 = element("input");
+ t14 = space();
+ input15 = element("input");
+ t15 = space();
+ input16 = element("input");
+ t16 = space();
+ input17 = element("input");
+ t17 = space();
+ input18 = element("input");
+ t18 = space();
+ input19 = element("input");
+ t19 = space();
+ input20 = element("input");
+ t20 = space();
+ input21 = element("input");
+ t21 = space();
+ input22 = element("input");
+ t22 = space();
h1 = element("h1");
- t1 = text(/*name*/ ctx[0]);
- t2 = text("!");
- input.value = /*name*/ ctx[0];
+ t23 = text(/*name*/ ctx[0]);
+ t24 = text("!");
+ input0.value = /*name*/ ctx[0];
+ attr(input1, "type", "email");
+ input1.value = /*name*/ ctx[0];
+ attr(input2, "type", "month");
+ input2.value = /*name*/ ctx[0];
+ attr(input3, "type", "number");
+ input3.value = /*name*/ ctx[0];
+ attr(input4, "type", "password");
+ input4.value = /*name*/ ctx[0];
+ attr(input5, "type", "search");
+ input5.value = /*name*/ ctx[0];
+ attr(input6, "type", "tel");
+ input6.value = /*name*/ ctx[0];
+ attr(input7, "type", "text");
+ input7.value = /*name*/ ctx[0];
+ attr(input8, "type", "url");
+ input8.value = /*name*/ ctx[0];
+ attr(input9, "type", "week");
+ input9.value = /*name*/ ctx[0];
+ attr(input10, "type", "button");
+ input10.value = /*name*/ ctx[0];
+ attr(input11, "type", "checkbox");
+ input11.value = /*name*/ ctx[0];
+ attr(input12, "type", "color");
+ input12.value = /*name*/ ctx[0];
+ attr(input13, "type", "date");
+ input13.value = /*name*/ ctx[0];
+ attr(input14, "type", "datetime-local");
+ input14.value = /*name*/ ctx[0];
+ attr(input15, "type", "file");
+ input15.value = /*name*/ ctx[0];
+ attr(input16, "type", "hidden");
+ input16.value = /*name*/ ctx[0];
+ attr(input17, "type", "image");
+ input17.value = /*name*/ ctx[0];
+ attr(input17, "alt", /*name*/ ctx[0]);
+ attr(input18, "type", "radio");
+ input18.value = /*name*/ ctx[0];
+ attr(input19, "type", "range");
+ input19.value = /*name*/ ctx[0];
+ attr(input20, "type", "reset");
+ input20.value = /*name*/ ctx[0];
+ attr(input21, "type", "submit");
+ input21.value = /*name*/ ctx[0];
+ attr(input22, "type", "time");
+ input22.value = /*name*/ ctx[0];
},
m(target, anchor) {
- insert(target, input, anchor);
+ insert(target, input0, anchor);
insert(target, t0, anchor);
+ insert(target, input1, anchor);
+ insert(target, t1, anchor);
+ insert(target, input2, anchor);
+ insert(target, t2, anchor);
+ insert(target, input3, anchor);
+ insert(target, t3, anchor);
+ insert(target, input4, anchor);
+ insert(target, t4, anchor);
+ insert(target, input5, anchor);
+ insert(target, t5, anchor);
+ insert(target, input6, anchor);
+ insert(target, t6, anchor);
+ insert(target, input7, anchor);
+ insert(target, t7, anchor);
+ insert(target, input8, anchor);
+ insert(target, t8, anchor);
+ insert(target, input9, anchor);
+ insert(target, t9, anchor);
+ insert(target, input10, anchor);
+ insert(target, t10, anchor);
+ insert(target, input11, anchor);
+ insert(target, t11, anchor);
+ insert(target, input12, anchor);
+ insert(target, t12, anchor);
+ insert(target, input13, anchor);
+ insert(target, t13, anchor);
+ insert(target, input14, anchor);
+ insert(target, t14, anchor);
+ insert(target, input15, anchor);
+ insert(target, t15, anchor);
+ insert(target, input16, anchor);
+ insert(target, t16, anchor);
+ insert(target, input17, anchor);
+ insert(target, t17, anchor);
+ insert(target, input18, anchor);
+ insert(target, t18, anchor);
+ insert(target, input19, anchor);
+ insert(target, t19, anchor);
+ insert(target, input20, anchor);
+ insert(target, t20, anchor);
+ insert(target, input21, anchor);
+ insert(target, t21, anchor);
+ insert(target, input22, anchor);
+ insert(target, t22, anchor);
insert(target, h1, anchor);
- append(h1, t1);
- append(h1, t2);
+ append(h1, t23);
+ append(h1, t24);
if (!mounted) {
- dispose = listen(input, "input", /*onInput*/ ctx[1]);
+ dispose = [
+ listen(input0, "input", /*onInput*/ ctx[1]),
+ listen(input1, "input", /*onInput*/ ctx[1]),
+ listen(input2, "input", /*onInput*/ ctx[1]),
+ listen(input3, "input", /*onInput*/ ctx[1]),
+ listen(input4, "input", /*onInput*/ ctx[1]),
+ listen(input5, "input", /*onInput*/ ctx[1]),
+ listen(input6, "input", /*onInput*/ ctx[1]),
+ listen(input7, "input", /*onInput*/ ctx[1]),
+ listen(input8, "input", /*onInput*/ ctx[1]),
+ listen(input9, "input", /*onInput*/ ctx[1]),
+ listen(input10, "input", /*onInput*/ ctx[1]),
+ listen(input11, "input", /*onInput*/ ctx[1]),
+ listen(input12, "input", /*onInput*/ ctx[1]),
+ listen(input13, "input", /*onInput*/ ctx[1]),
+ listen(input14, "input", /*onInput*/ ctx[1]),
+ listen(input15, "input", /*onInput*/ ctx[1]),
+ listen(input16, "input", /*onInput*/ ctx[1]),
+ listen(input17, "input", /*onInput*/ ctx[1]),
+ listen(input18, "input", /*onInput*/ ctx[1]),
+ listen(input19, "input", /*onInput*/ ctx[1]),
+ listen(input20, "input", /*onInput*/ ctx[1]),
+ listen(input21, "input", /*onInput*/ ctx[1]),
+ listen(input22, "input", /*onInput*/ ctx[1])
+ ];
+
mounted = true;
}
},
p(ctx, [dirty]) {
- if (dirty & /*name*/ 1 && input.value !== /*name*/ ctx[0]) {
- input.value = /*name*/ ctx[0];
+ if (dirty & /*name*/ 1 && input0.value !== /*name*/ ctx[0]) {
+ input0.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input1.value !== /*name*/ ctx[0]) {
+ input1.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input2.value !== /*name*/ ctx[0]) {
+ input2.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input3.value !== /*name*/ ctx[0]) {
+ input3.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input4.value !== /*name*/ ctx[0]) {
+ input4.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input5.value !== /*name*/ ctx[0]) {
+ input5.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input6.value !== /*name*/ ctx[0]) {
+ input6.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input7.value !== /*name*/ ctx[0]) {
+ input7.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input8.value !== /*name*/ ctx[0]) {
+ input8.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input9.value !== /*name*/ ctx[0]) {
+ input9.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input10.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input11.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input12.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input13.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input14.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input15.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input16.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input17.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ attr(input17, "alt", /*name*/ ctx[0]);
+ }
+
+ if (dirty & /*name*/ 1) {
+ input18.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input19.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input20.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1) {
+ input21.value = /*name*/ ctx[0];
+ }
+
+ if (dirty & /*name*/ 1 && input22.value !== /*name*/ ctx[0]) {
+ input22.value = /*name*/ ctx[0];
}
- if (dirty & /*name*/ 1) set_data(t1, /*name*/ ctx[0]);
+ if (dirty & /*name*/ 1) set_data(t23, /*name*/ ctx[0]);
},
i: noop,
o: noop,
d(detaching) {
- if (detaching) detach(input);
+ if (detaching) detach(input0);
if (detaching) detach(t0);
+ if (detaching) detach(input1);
+ if (detaching) detach(t1);
+ if (detaching) detach(input2);
+ if (detaching) detach(t2);
+ if (detaching) detach(input3);
+ if (detaching) detach(t3);
+ if (detaching) detach(input4);
+ if (detaching) detach(t4);
+ if (detaching) detach(input5);
+ if (detaching) detach(t5);
+ if (detaching) detach(input6);
+ if (detaching) detach(t6);
+ if (detaching) detach(input7);
+ if (detaching) detach(t7);
+ if (detaching) detach(input8);
+ if (detaching) detach(t8);
+ if (detaching) detach(input9);
+ if (detaching) detach(t9);
+ if (detaching) detach(input10);
+ if (detaching) detach(t10);
+ if (detaching) detach(input11);
+ if (detaching) detach(t11);
+ if (detaching) detach(input12);
+ if (detaching) detach(t12);
+ if (detaching) detach(input13);
+ if (detaching) detach(t13);
+ if (detaching) detach(input14);
+ if (detaching) detach(t14);
+ if (detaching) detach(input15);
+ if (detaching) detach(t15);
+ if (detaching) detach(input16);
+ if (detaching) detach(t16);
+ if (detaching) detach(input17);
+ if (detaching) detach(t17);
+ if (detaching) detach(input18);
+ if (detaching) detach(t18);
+ if (detaching) detach(input19);
+ if (detaching) detach(t19);
+ if (detaching) detach(input20);
+ if (detaching) detach(t20);
+ if (detaching) detach(input21);
+ if (detaching) detach(t21);
+ if (detaching) detach(input22);
+ if (detaching) detach(t22);
if (detaching) detach(h1);
mounted = false;
- dispose();
+ run_all(dispose);
}
};
}
@@ -80,4 +420,4 @@ class Component extends SvelteComponent {
}
}
-export default Component;
\ No newline at end of file
+export default Component;
diff --git a/test/js/samples/input-value/input.svelte b/test/js/samples/input-value/input.svelte
index 476458a195..ee1d9e3de7 100644
--- a/test/js/samples/input-value/input.svelte
+++ b/test/js/samples/input-value/input.svelte
@@ -1,11 +1,33 @@
+
+
+
+
+
+
+
+
+
-{name}!
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+{name}!
diff --git a/test/js/samples/src-attribute-check-in-foreign/expected.js b/test/js/samples/src-attribute-check-in-foreign/expected.js
index 3d781b72d4..2eb4c0713c 100644
--- a/test/js/samples/src-attribute-check-in-foreign/expected.js
+++ b/test/js/samples/src-attribute-check-in-foreign/expected.js
@@ -18,8 +18,8 @@ function create_fragment(ctx) {
return {
c() {
- svg = document.createElementNS("https://svelte.dev/docs#svelte_options", "svg");
- img = document.createElementNS("https://svelte.dev/docs#svelte_options", "img");
+ svg = document.createElementNS("https://svelte.dev/docs#template-syntax-svelte-options", "svg");
+ img = document.createElementNS("https://svelte.dev/docs#template-syntax-svelte-options", "img");
this.h();
},
l(nodes) {
diff --git a/test/parser/samples/attribute-class-directive/input.svelte b/test/parser/samples/attribute-class-directive/input.svelte
new file mode 100644
index 0000000000..629df2e29f
--- /dev/null
+++ b/test/parser/samples/attribute-class-directive/input.svelte
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/test/parser/samples/attribute-class-directive/output.json b/test/parser/samples/attribute-class-directive/output.json
new file mode 100644
index 0000000000..abb2e0c0be
--- /dev/null
+++ b/test/parser/samples/attribute-class-directive/output.json
@@ -0,0 +1,41 @@
+{
+ "html": {
+ "start": 0,
+ "end": 29,
+ "type": "Fragment",
+ "children": [
+ {
+ "start": 0,
+ "end": 29,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 5,
+ "end": 22,
+ "type": "Class",
+ "name": "foo",
+ "modifiers": [],
+ "expression": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 21,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 16
+ },
+ "end": {
+ "line": 1,
+ "column": 21
+ }
+ },
+ "name": "isFoo"
+ }
+ }
+ ],
+ "children": []
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style-directive-shorthand/input.svelte b/test/parser/samples/attribute-style-directive-shorthand/input.svelte
new file mode 100644
index 0000000000..3e2c66f218
--- /dev/null
+++ b/test/parser/samples/attribute-style-directive-shorthand/input.svelte
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style-directive-shorthand/output.json b/test/parser/samples/attribute-style-directive-shorthand/output.json
new file mode 100644
index 0000000000..ac658408e6
--- /dev/null
+++ b/test/parser/samples/attribute-style-directive-shorthand/output.json
@@ -0,0 +1,25 @@
+{
+ "html": {
+ "start": 0,
+ "end": 23,
+ "type": "Fragment",
+ "children": [
+ {
+ "start": 0,
+ "end": 23,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 5,
+ "end": 16,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": true
+ }
+ ],
+ "children": []
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style-directive-string/input.svelte b/test/parser/samples/attribute-style-directive-string/input.svelte
new file mode 100644
index 0000000000..dd8ec8dc94
--- /dev/null
+++ b/test/parser/samples/attribute-style-directive-string/input.svelte
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style-directive-string/output.json b/test/parser/samples/attribute-style-directive-string/output.json
new file mode 100644
index 0000000000..e81e7be3c9
--- /dev/null
+++ b/test/parser/samples/attribute-style-directive-string/output.json
@@ -0,0 +1,355 @@
+{
+ "html": {
+ "start": 0,
+ "end": 252,
+ "type": "Fragment",
+ "children": [
+ {
+ "start": 0,
+ "end": 29,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 5,
+ "end": 22,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 18,
+ "end": 21,
+ "type": "Text",
+ "raw": "red",
+ "data": "red"
+ }
+ ]
+ }
+ ],
+ "children": []
+ },
+ {
+ "start": 29,
+ "end": 30,
+ "type": "Text",
+ "raw": "\n",
+ "data": "\n"
+ },
+ {
+ "start": 30,
+ "end": 59,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 35,
+ "end": 52,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 48,
+ "end": 51,
+ "type": "Text",
+ "raw": "red",
+ "data": "red"
+ }
+ ]
+ }
+ ],
+ "children": []
+ },
+ {
+ "start": 59,
+ "end": 60,
+ "type": "Text",
+ "raw": "\n",
+ "data": "\n"
+ },
+ {
+ "start": 60,
+ "end": 87,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 65,
+ "end": 80,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 77,
+ "end": 80,
+ "type": "Text",
+ "raw": "red",
+ "data": "red"
+ }
+ ]
+ }
+ ],
+ "children": []
+ },
+ {
+ "start": 87,
+ "end": 88,
+ "type": "Text",
+ "raw": "\n",
+ "data": "\n"
+ },
+ {
+ "start": 88,
+ "end": 127,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 93,
+ "end": 120,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 106,
+ "end": 109,
+ "type": "Text",
+ "raw": "red",
+ "data": "red"
+ },
+ {
+ "start": 109,
+ "end": 119,
+ "type": "MustacheTag",
+ "expression": {
+ "type": "Identifier",
+ "start": 110,
+ "end": 118,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 22
+ },
+ "end": {
+ "line": 4,
+ "column": 30
+ }
+ },
+ "name": "variable"
+ }
+ }
+ ]
+ }
+ ],
+ "children": []
+ },
+ {
+ "start": 127,
+ "end": 128,
+ "type": "Text",
+ "raw": "\n",
+ "data": "\n"
+ },
+ {
+ "start": 128,
+ "end": 167,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 133,
+ "end": 160,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 146,
+ "end": 149,
+ "type": "Text",
+ "raw": "red",
+ "data": "red"
+ },
+ {
+ "start": 149,
+ "end": 159,
+ "type": "MustacheTag",
+ "expression": {
+ "type": "Identifier",
+ "start": 150,
+ "end": 158,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 22
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "name": "variable"
+ }
+ }
+ ]
+ }
+ ],
+ "children": []
+ },
+ {
+ "start": 167,
+ "end": 168,
+ "type": "Text",
+ "raw": "\n",
+ "data": "\n"
+ },
+ {
+ "start": 168,
+ "end": 205,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 173,
+ "end": 198,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 185,
+ "end": 188,
+ "type": "Text",
+ "raw": "red",
+ "data": "red"
+ },
+ {
+ "start": 188,
+ "end": 198,
+ "type": "MustacheTag",
+ "expression": {
+ "type": "Identifier",
+ "start": 189,
+ "end": 197,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 21
+ },
+ "end": {
+ "line": 6,
+ "column": 29
+ }
+ },
+ "name": "variable"
+ }
+ }
+ ]
+ }
+ ],
+ "children": []
+ },
+ {
+ "start": 205,
+ "end": 206,
+ "type": "Text",
+ "raw": "\n",
+ "data": "\n"
+ },
+ {
+ "start": 206,
+ "end": 252,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 211,
+ "end": 245,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 223,
+ "end": 245,
+ "type": "MustacheTag",
+ "expression": {
+ "type": "TemplateLiteral",
+ "start": 224,
+ "end": 244,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 18
+ },
+ "end": {
+ "line": 7,
+ "column": 38
+ }
+ },
+ "expressions": [
+ {
+ "type": "Identifier",
+ "start": 235,
+ "end": 242,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 29
+ },
+ "end": {
+ "line": 7,
+ "column": 36
+ }
+ },
+ "name": "literal"
+ }
+ ],
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "start": 225,
+ "end": 233,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 19
+ },
+ "end": {
+ "line": 7,
+ "column": 27
+ }
+ },
+ "value": {
+ "raw": "template",
+ "cooked": "template"
+ },
+ "tail": false
+ },
+ {
+ "type": "TemplateElement",
+ "start": 243,
+ "end": 243,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 37
+ },
+ "end": {
+ "line": 7,
+ "column": 37
+ }
+ },
+ "value": {
+ "raw": "",
+ "cooked": ""
+ },
+ "tail": true
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "children": []
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style-directive/input.svelte b/test/parser/samples/attribute-style-directive/input.svelte
new file mode 100644
index 0000000000..536d162326
--- /dev/null
+++ b/test/parser/samples/attribute-style-directive/input.svelte
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style-directive/output.json b/test/parser/samples/attribute-style-directive/output.json
new file mode 100644
index 0000000000..f36ce6b01e
--- /dev/null
+++ b/test/parser/samples/attribute-style-directive/output.json
@@ -0,0 +1,47 @@
+{
+ "html": {
+ "start": 0,
+ "end": 33,
+ "type": "Fragment",
+ "children": [
+ {
+ "start": 0,
+ "end": 33,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 5,
+ "end": 26,
+ "type": "StyleDirective",
+ "name": "color",
+ "value": [
+ {
+ "start": 17,
+ "end": 26,
+ "type": "MustacheTag",
+ "expression": {
+ "type": "Identifier",
+ "start": 18,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "name": "myColor"
+ }
+ }
+ ]
+ }
+ ],
+ "children": []
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style/input.svelte b/test/parser/samples/attribute-style/input.svelte
new file mode 100644
index 0000000000..12872605ad
--- /dev/null
+++ b/test/parser/samples/attribute-style/input.svelte
@@ -0,0 +1 @@
+red
\ No newline at end of file
diff --git a/test/parser/samples/attribute-style/output.json b/test/parser/samples/attribute-style/output.json
new file mode 100644
index 0000000000..95c0c8a7a4
--- /dev/null
+++ b/test/parser/samples/attribute-style/output.json
@@ -0,0 +1,41 @@
+{
+ "html": {
+ "start": 0,
+ "end": 34,
+ "type": "Fragment",
+ "children": [
+ {
+ "start": 0,
+ "end": 34,
+ "type": "Element",
+ "name": "div",
+ "attributes": [
+ {
+ "start": 5,
+ "end": 24,
+ "type": "Attribute",
+ "name": "style",
+ "value": [
+ {
+ "start": 12,
+ "end": 23,
+ "type": "Text",
+ "raw": "color: red;",
+ "data": "color: red;"
+ }
+ ]
+ }
+ ],
+ "children": [
+ {
+ "start": 25,
+ "end": 28,
+ "type": "Text",
+ "raw": "red",
+ "data": "red"
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/runtime-puppeteer/index.ts b/test/runtime-puppeteer/index.ts
index b700d47945..8e6f813de4 100644
--- a/test/runtime-puppeteer/index.ts
+++ b/test/runtime-puppeteer/index.ts
@@ -9,7 +9,9 @@ import {
loadConfig,
loadSvelte,
mkdirp,
- prettyPrintPuppeteerAssertionError
+ prettyPrintPuppeteerAssertionError,
+ retryAsync,
+ executeBrowserTest
} from '../helpers';
import { deepEqual } from 'assert';
@@ -48,15 +50,21 @@ function create_server() {
});
}
+async function launchPuppeteer() {
+ return await retryAsync(() => puppeteer.launch());
+}
+
const assert = fs.readFileSync(`${__dirname}/assert.js`, 'utf-8');
-describe('runtime (puppeteer)', () => {
+describe('runtime (puppeteer)', function() {
+ // Note: Increase the timeout in preparation for restarting Chromium due to SIGSEGV.
+ this.timeout(10000);
before(async () => {
svelte = loadSvelte(false);
console.log('[runtime-puppeteer] Loaded Svelte');
server = await create_server();
console.log('[runtime-puppeteer] Started server');
- browser = await puppeteer.launch();
+ browser = await launchPuppeteer();
console.log('[runtime-puppeteer] Launched puppeteer browser');
});
@@ -205,27 +213,7 @@ describe('runtime (puppeteer)', () => {
const result = await bundle.generate({ format: 'iife', name: 'test' });
code = result.output[0].code;
- const page = await browser.newPage();
-
- page.on('console', (type) => {
- console[type._type](type._text);
- });
-
- page.on('error', error => {
- console.log('>>> an error happened');
- console.error(error);
- });
-
- try {
- await page.goto('http://localhost:6789');
-
- const result = await page.evaluate(() => test(document.querySelector('main')));
- if (result) console.log(result);
- } catch (err) {
- failed.add(dir);
- prettyPrintPuppeteerAssertionError(err.message);
- throw err;
- } finally {
+ function assertWarnings() {
if (config.warnings) {
deepEqual(warnings.map(w => ({
code: w.code,
@@ -240,6 +228,16 @@ describe('runtime (puppeteer)', () => {
throw new Error('Received unexpected warnings');
}
}
+
+ browser = await executeBrowserTest(
+ browser,
+ launchPuppeteer,
+ assertWarnings,
+ (err) => {
+ failed.add(dir);
+ prettyPrintPuppeteerAssertionError(err.message);
+ assertWarnings();
+ });
});
}
diff --git a/test/runtime/index.ts b/test/runtime/index.ts
index ff6d1039d3..f3c962f1d9 100644
--- a/test/runtime/index.ts
+++ b/test/runtime/index.ts
@@ -25,12 +25,13 @@ let compile = null;
const sveltePath = process.cwd().split('\\').join('/');
let unhandled_rejection = false;
-process.on('unhandledRejection', err => {
+function unhandledRejection_handler(err) {
unhandled_rejection = err;
-});
+}
describe('runtime', () => {
before(() => {
+ process.on('unhandledRejection', unhandledRejection_handler);
svelte = loadSvelte(false);
svelte$ = loadSvelte(true);
@@ -46,6 +47,7 @@ describe('runtime', () => {
return setupHtmlEqual();
});
+ after(() => process.removeListener('unhandledRejection', unhandledRejection_handler));
const failed = new Set();
@@ -63,7 +65,7 @@ describe('runtime', () => {
}
const testName = `${dir} ${hydrate ? `(with hydration${from_ssr_html ? ' from ssr rendered html' : ''})` : ''}`;
- (config.skip ? it.skip : solo ? it.only : it)(testName, () => {
+ (config.skip ? it.skip : solo ? it.only : it)(testName, (done) => {
if (failed.has(dir)) {
// this makes debugging easier, by only printing compiled output once
throw new Error('skipping test, already failed');
@@ -94,7 +96,7 @@ describe('runtime', () => {
glob('**/*.svelte', { cwd }).forEach(file => {
if (file[0] === '_') return;
- const dir = `${cwd}/_output/${hydrate ? 'hydratable' : 'normal'}`;
+ const dir = `${cwd}/_output/${hydrate ? 'hydratable' : 'normal'}`;
const out = `${dir}/${file.replace(/\.svelte$/, '.js')}`;
if (fs.existsSync(out)) {
@@ -118,7 +120,7 @@ describe('runtime', () => {
}
});
- return Promise.resolve()
+ Promise.resolve()
.then(() => {
// hack to support transition tests
clear_loops();
@@ -243,6 +245,7 @@ describe('runtime', () => {
.catch(err => {
// print a clickable link to open the directory
err.stack += `\n\ncmd-click: ${path.relative(process.cwd(), cwd)}/main.svelte`;
+ done(err);
throw err;
})
.then(() => {
@@ -253,6 +256,7 @@ describe('runtime', () => {
flush();
if (config.after_test) config.after_test();
+ done();
});
});
}
diff --git a/test/runtime/samples/$$slot/_config.js b/test/runtime/samples/$$slot/_config.js
index 13b2137cdb..46e435ae97 100644
--- a/test/runtime/samples/$$slot/_config.js
+++ b/test/runtime/samples/$$slot/_config.js
@@ -11,7 +11,7 @@ export default {
hello world
`,
- async test({ assert, target, component }) {
+ async test({ assert, component }) {
assert.equal(component.getA(), '');
assert.equal(component.getB(), 'foo');
}
diff --git a/test/runtime/samples/action-custom-event-handler-node-context/_config.js b/test/runtime/samples/action-custom-event-handler-node-context/_config.js
index ea94abe9b3..9a5d0d5f82 100644
--- a/test/runtime/samples/action-custom-event-handler-node-context/_config.js
+++ b/test/runtime/samples/action-custom-event-handler-node-context/_config.js
@@ -3,7 +3,7 @@ export default {
html: '10 ',
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const event = new window.MouseEvent('click');
const button = target.querySelector('button');
diff --git a/test/runtime/samples/action-custom-event-handler-this/_config.js b/test/runtime/samples/action-custom-event-handler-this/_config.js
index ec3fa373eb..29c2059d9f 100644
--- a/test/runtime/samples/action-custom-event-handler-this/_config.js
+++ b/test/runtime/samples/action-custom-event-handler-this/_config.js
@@ -1,7 +1,7 @@
export default {
html: ' ',
- test({ assert, component, target, window }) {
+ test({ assert, target, window }) {
const input = target.querySelector('input');
const event = new window.KeyboardEvent('keydown', {
key: 'Enter'
diff --git a/test/runtime/samples/action-custom-event-handler-with-context/_config.js b/test/runtime/samples/action-custom-event-handler-with-context/_config.js
index 104ec27503..41ea15151a 100644
--- a/test/runtime/samples/action-custom-event-handler-with-context/_config.js
+++ b/test/runtime/samples/action-custom-event-handler-with-context/_config.js
@@ -1,7 +1,7 @@
export default {
html: '??? ',
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const event = new window.MouseEvent('click', {
clientX: 42,
clientY: 42
diff --git a/test/runtime/samples/action-function/_config.js b/test/runtime/samples/action-function/_config.js
index 07b4087dcc..6aa972f1a8 100644
--- a/test/runtime/samples/action-function/_config.js
+++ b/test/runtime/samples/action-function/_config.js
@@ -3,7 +3,7 @@ export default {
action
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const eventEnter = new window.MouseEvent('mouseenter');
const eventLeave = new window.MouseEvent('mouseleave');
diff --git a/test/runtime/samples/action-object-deep/_config.js b/test/runtime/samples/action-object-deep/_config.js
index 7fdc11af2b..ce4981c568 100644
--- a/test/runtime/samples/action-object-deep/_config.js
+++ b/test/runtime/samples/action-object-deep/_config.js
@@ -2,7 +2,7 @@ export default {
html: `
action
`,
- async test({ assert, target, window }) {
+ async test({ assert, target }) {
assert.equal(target.querySelector('button').foo, 'bar1337');
}
};
diff --git a/test/runtime/samples/action-object/_config.js b/test/runtime/samples/action-object/_config.js
index 7fdc11af2b..ce4981c568 100644
--- a/test/runtime/samples/action-object/_config.js
+++ b/test/runtime/samples/action-object/_config.js
@@ -2,7 +2,7 @@ export default {
html: `
action
`,
- async test({ assert, target, window }) {
+ async test({ assert, target }) {
assert.equal(target.querySelector('button').foo, 'bar1337');
}
};
diff --git a/test/runtime/samples/action-receives-element-mounted/_config.js b/test/runtime/samples/action-receives-element-mounted/_config.js
index 0806d0fa90..c6f3fcd89f 100644
--- a/test/runtime/samples/action-receives-element-mounted/_config.js
+++ b/test/runtime/samples/action-receives-element-mounted/_config.js
@@ -2,7 +2,7 @@ const result = {};
export default {
props: { result },
- async test({ assert, component, target, window }) {
+ async test({ assert }) {
assert.notEqual(result.parentElement, null);
}
};
diff --git a/test/runtime/samples/action-ternary-template/_config.js b/test/runtime/samples/action-ternary-template/_config.js
index ecb18dceec..8e5e8e2236 100644
--- a/test/runtime/samples/action-ternary-template/_config.js
+++ b/test/runtime/samples/action-ternary-template/_config.js
@@ -8,7 +8,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const header = target.querySelector('h1');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/action-this/_config.js b/test/runtime/samples/action-this/_config.js
index 933ce993b9..85cb917d96 100644
--- a/test/runtime/samples/action-this/_config.js
+++ b/test/runtime/samples/action-this/_config.js
@@ -1,5 +1,5 @@
export default {
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/animation-js-delay/_config.js b/test/runtime/samples/animation-js-delay/_config.js
index 2cee51121f..d7eba13bd4 100644
--- a/test/runtime/samples/animation-js-delay/_config.js
+++ b/test/runtime/samples/animation-js-delay/_config.js
@@ -17,7 +17,7 @@ export default {
e
`,
- test({ assert, component, target, window, raf }) {
+ test({ assert, component, window, raf }) {
let divs = window.document.querySelectorAll('div');
divs.forEach(div => {
div.getBoundingClientRect = function() {
diff --git a/test/runtime/samples/animation-js-easing/_config.js b/test/runtime/samples/animation-js-easing/_config.js
index e466309f57..9cbb77275a 100644
--- a/test/runtime/samples/animation-js-easing/_config.js
+++ b/test/runtime/samples/animation-js-easing/_config.js
@@ -17,7 +17,7 @@ export default {
e
`,
- test({ assert, component, target, window, raf }) {
+ test({ assert, component, raf }) {
let divs = document.querySelectorAll('div');
divs.forEach(div => {
div.getBoundingClientRect = function() {
diff --git a/test/runtime/samples/animation-js/_config.js b/test/runtime/samples/animation-js/_config.js
index 5c5e874b3e..64373d08a3 100644
--- a/test/runtime/samples/animation-js/_config.js
+++ b/test/runtime/samples/animation-js/_config.js
@@ -17,7 +17,7 @@ export default {
e
`,
- test({ assert, component, target, window, raf }) {
+ test({ assert, component, raf }) {
let divs = document.querySelectorAll('div');
divs.forEach(div => {
div.getBoundingClientRect = function() {
diff --git a/test/runtime/samples/apply-directives-in-order-2/_config.js b/test/runtime/samples/apply-directives-in-order-2/_config.js
index caff97a5b9..6072a18b27 100644
--- a/test/runtime/samples/apply-directives-in-order-2/_config.js
+++ b/test/runtime/samples/apply-directives-in-order-2/_config.js
@@ -4,7 +4,7 @@ export default {
value
},
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const inputs = target.querySelectorAll('input');
const event = new window.Event('input');
diff --git a/test/runtime/samples/apply-directives-in-order/_config.js b/test/runtime/samples/apply-directives-in-order/_config.js
index 0c85c97f8b..2e057118b4 100644
--- a/test/runtime/samples/apply-directives-in-order/_config.js
+++ b/test/runtime/samples/apply-directives-in-order/_config.js
@@ -13,7 +13,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const input = target.querySelector('input');
const event = new window.Event('input');
diff --git a/test/runtime/samples/attribute-boolean-false/_config.js b/test/runtime/samples/attribute-boolean-false/_config.js
index 935b709fab..e4aaabecaf 100644
--- a/test/runtime/samples/attribute-boolean-false/_config.js
+++ b/test/runtime/samples/attribute-boolean-false/_config.js
@@ -1,6 +1,6 @@
export default {
html: '',
- test({ assert, component, target }) {
+ test({ assert, target }) {
const textarea = target.querySelector('textarea');
assert.ok(textarea.readOnly === false);
}
diff --git a/test/runtime/samples/attribute-boolean-true/_config.js b/test/runtime/samples/attribute-boolean-true/_config.js
index ccc0814296..89b2fc7c21 100644
--- a/test/runtime/samples/attribute-boolean-true/_config.js
+++ b/test/runtime/samples/attribute-boolean-true/_config.js
@@ -1,7 +1,8 @@
export default {
- html: '',
- test({ assert, component, target }) {
+ html: '',
+ test({ assert, target }) {
const textarea = target.querySelector('textarea');
+ assert.equal(textarea.dataset.attr, 'true');
assert.ok(textarea.readOnly);
}
};
diff --git a/test/runtime/samples/attribute-boolean-true/main.svelte b/test/runtime/samples/attribute-boolean-true/main.svelte
index 04d5cab8f9..6474644749 100644
--- a/test/runtime/samples/attribute-boolean-true/main.svelte
+++ b/test/runtime/samples/attribute-boolean-true/main.svelte
@@ -1 +1 @@
-
\ No newline at end of file
+
diff --git a/test/runtime/samples/attribute-namespaced/_config.js b/test/runtime/samples/attribute-namespaced/_config.js
index 275a198219..f3a7f28a93 100644
--- a/test/runtime/samples/attribute-namespaced/_config.js
+++ b/test/runtime/samples/attribute-namespaced/_config.js
@@ -7,7 +7,7 @@ export default {
`,
- test({ assert, component, target }) {
+ test({ assert, target }) {
const use = target.querySelector( 'use' );
assert.equal( use.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ), '#bar' );
}
diff --git a/test/runtime/samples/attribute-static-boolean/_config.js b/test/runtime/samples/attribute-static-boolean/_config.js
index 3dba036319..2d31b26747 100644
--- a/test/runtime/samples/attribute-static-boolean/_config.js
+++ b/test/runtime/samples/attribute-static-boolean/_config.js
@@ -1,6 +1,6 @@
export default {
html: '',
- test({ assert, component, target }) {
+ test({ assert, target }) {
const textarea = target.querySelector( 'textarea' );
assert.ok( textarea.readOnly );
}
diff --git a/test/runtime/samples/await-conservative-update/_config.js b/test/runtime/samples/await-conservative-update/_config.js
index 20a9448ebd..c548a400af 100644
--- a/test/runtime/samples/await-conservative-update/_config.js
+++ b/test/runtime/samples/await-conservative-update/_config.js
@@ -5,7 +5,7 @@ export default {
loading...
`,
- test({ assert, component, target }) {
+ test({ assert, target }) {
return sleep(50).then(() => {
assert.htmlEqual(target.innerHTML, `
the answer is 42
diff --git a/test/runtime/samples/await-in-each/_config.js b/test/runtime/samples/await-in-each/_config.js
index a648bbe38a..617194a95c 100644
--- a/test/runtime/samples/await-in-each/_config.js
+++ b/test/runtime/samples/await-in-each/_config.js
@@ -18,7 +18,7 @@ export default {
a title: loading...
`,
- test({ assert, component, target }) {
+ test({ assert, target }) {
fulfil(42);
return thePromise
diff --git a/test/runtime/samples/await-then-catch-order/_config.js b/test/runtime/samples/await-then-catch-order/_config.js
index f972520904..29fc074162 100644
--- a/test/runtime/samples/await-then-catch-order/_config.js
+++ b/test/runtime/samples/await-then-catch-order/_config.js
@@ -13,7 +13,7 @@ export default {
loading...
true!
`,
- test({ assert, component, target }) {
+ test({ assert, target }) {
fulfil(42);
return thePromise
diff --git a/test/runtime/samples/await-then-catch-static/_config.js b/test/runtime/samples/await-then-catch-static/_config.js
index 35fc865d44..6918986950 100644
--- a/test/runtime/samples/await-then-catch-static/_config.js
+++ b/test/runtime/samples/await-then-catch-static/_config.js
@@ -22,7 +22,7 @@ export default {
loaded
`);
- promise = new Promise((f, r) => {
+ promise = new Promise((f, _) => {
fulfil = f;
});
diff --git a/test/runtime/samples/await-then-destruct-array/_config.js b/test/runtime/samples/await-then-destruct-array/_config.js
index 55c48481e0..58a66a698d 100644
--- a/test/runtime/samples/await-then-destruct-array/_config.js
+++ b/test/runtime/samples/await-then-destruct-array/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- thePromise: new Promise(resolve => {})
+ thePromise: new Promise(_ => {})
},
html: `
diff --git a/test/runtime/samples/await-then-destruct-default/_config.js b/test/runtime/samples/await-then-destruct-default/_config.js
index d0e5a49f28..151f2c91f7 100644
--- a/test/runtime/samples/await-then-destruct-default/_config.js
+++ b/test/runtime/samples/await-then-destruct-default/_config.js
@@ -1,5 +1,5 @@
export default {
- async test({ assert, component, target }) {
+ async test({ assert, target }) {
await Promise.resolve();
assert.htmlEqual(
diff --git a/test/runtime/samples/await-then-destruct-object/_config.js b/test/runtime/samples/await-then-destruct-object/_config.js
index 7d08ad3711..47e8422cc4 100644
--- a/test/runtime/samples/await-then-destruct-object/_config.js
+++ b/test/runtime/samples/await-then-destruct-object/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- thePromise: new Promise(resolve => {})
+ thePromise: new Promise(_ => {})
},
html: `
diff --git a/test/runtime/samples/await-then-destruct-rest/_config.js b/test/runtime/samples/await-then-destruct-rest/_config.js
index 528568e569..0a7445b535 100644
--- a/test/runtime/samples/await-then-destruct-rest/_config.js
+++ b/test/runtime/samples/await-then-destruct-rest/_config.js
@@ -1,5 +1,5 @@
export default {
- async test({ assert, component, target }) {
+ async test({ assert, target }) {
await Promise.resolve();
assert.htmlEqual(
diff --git a/test/runtime/samples/await-then-if/_config.js b/test/runtime/samples/await-then-if/_config.js
index f9e81dd2cc..f29f5df0e5 100644
--- a/test/runtime/samples/await-then-if/_config.js
+++ b/test/runtime/samples/await-then-if/_config.js
@@ -13,11 +13,11 @@ export default {
loading...
`,
- async test({ assert, component, target }) {
+ async test({ assert, target }) {
fulfil([]);
await thePromise;
-
+
assert.htmlEqual(target.innerHTML, `
promise array is empty
`);
diff --git a/test/runtime/samples/binding-input-group-duplicate-value/_config.js b/test/runtime/samples/binding-input-group-duplicate-value/_config.js
index b5f3ae0115..db7dd84dee 100644
--- a/test/runtime/samples/binding-input-group-duplicate-value/_config.js
+++ b/test/runtime/samples/binding-input-group-duplicate-value/_config.js
@@ -17,7 +17,7 @@ export default {
d
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const inputs = target.querySelectorAll('input');
const p = target.querySelector('p');
diff --git a/test/runtime/samples/binding-input-group-each-6/_config.js b/test/runtime/samples/binding-input-group-each-6/_config.js
index 4d280ed7ac..7fd1232a27 100644
--- a/test/runtime/samples/binding-input-group-each-6/_config.js
+++ b/test/runtime/samples/binding-input-group-each-6/_config.js
@@ -13,7 +13,7 @@ export default {
z
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const inputs = target.querySelectorAll('input');
assert.equal(inputs[0].checked, false);
assert.equal(inputs[1].checked, false);
diff --git a/test/runtime/samples/binding-input-group-each-7/_config.js b/test/runtime/samples/binding-input-group-each-7/_config.js
index 3063141983..7535001f67 100644
--- a/test/runtime/samples/binding-input-group-each-7/_config.js
+++ b/test/runtime/samples/binding-input-group-each-7/_config.js
@@ -20,7 +20,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const inputs = target.querySelectorAll('input');
const checked = new Set();
const checkInbox = async (i) => {
diff --git a/test/runtime/samples/binding-input-member-expression-update/_config.js b/test/runtime/samples/binding-input-member-expression-update/_config.js
new file mode 100644
index 0000000000..c0dfc3bbe8
--- /dev/null
+++ b/test/runtime/samples/binding-input-member-expression-update/_config.js
@@ -0,0 +1,18 @@
+// binding member expression shouldn't invalidate the property name
+export default {
+ async test({ assert, component, target, window }) {
+ const input = target.querySelector('input');
+ assert.deepEqual(component.logs.length, 1);
+ assert.equal(input.value, 'abc');
+
+ input.value = 'hij';
+ await input.dispatchEvent(new window.Event('input'));
+
+ assert.deepEqual(component.values.a, 'hij');
+ assert.deepEqual(component.logs.length, 1);
+
+ component.paths = ['b'];
+ assert.deepEqual(component.logs.length, 2);
+ assert.equal(input.value, 'def');
+ }
+};
diff --git a/test/runtime/samples/binding-input-member-expression-update/main.svelte b/test/runtime/samples/binding-input-member-expression-update/main.svelte
new file mode 100644
index 0000000000..dc72b229ba
--- /dev/null
+++ b/test/runtime/samples/binding-input-member-expression-update/main.svelte
@@ -0,0 +1,9 @@
+
+
+
diff --git a/test/runtime/samples/binding-input-text-undefined/_config.js b/test/runtime/samples/binding-input-text-undefined/_config.js
index fa59b1f796..82cada3b15 100644
--- a/test/runtime/samples/binding-input-text-undefined/_config.js
+++ b/test/runtime/samples/binding-input-text-undefined/_config.js
@@ -7,7 +7,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
const input = target.querySelector('input');
assert.equal(input.value, '');
diff --git a/test/runtime/samples/binding-select-initial-value/_config.js b/test/runtime/samples/binding-select-initial-value/_config.js
index 517107c4fb..5dbd761b61 100644
--- a/test/runtime/samples/binding-select-initial-value/_config.js
+++ b/test/runtime/samples/binding-select-initial-value/_config.js
@@ -15,7 +15,7 @@ export default {
selected: 'b'
},
- test({ assert, component, target }) {
+ test({ assert, target }) {
const select = target.querySelector('select');
const options = [...target.querySelectorAll('option')];
diff --git a/test/runtime/samples/binding-this-each-key/_config.js b/test/runtime/samples/binding-this-each-key/_config.js
new file mode 100644
index 0000000000..332e14fda8
--- /dev/null
+++ b/test/runtime/samples/binding-this-each-key/_config.js
@@ -0,0 +1,10 @@
+export default {
+ html: 'content
content
content
',
+
+ test({ assert, target, component }) {
+ const divs = target.querySelectorAll('div');
+ assert.equal(component.refs[0], divs[0]);
+ assert.equal(component.refs[1], divs[1]);
+ assert.equal(component.refs[2], divs[2]);
+ }
+};
diff --git a/test/runtime/samples/binding-this-each-key/main.svelte b/test/runtime/samples/binding-this-each-key/main.svelte
new file mode 100644
index 0000000000..cff2ffa226
--- /dev/null
+++ b/test/runtime/samples/binding-this-each-key/main.svelte
@@ -0,0 +1,15 @@
+
+
+{#each list as { id }, index (id)}
+
+ content
+
+{/each}
diff --git a/test/runtime/samples/binding-this-member-expression-update/_config.js b/test/runtime/samples/binding-this-member-expression-update/_config.js
new file mode 100644
index 0000000000..782d44311c
--- /dev/null
+++ b/test/runtime/samples/binding-this-member-expression-update/_config.js
@@ -0,0 +1,8 @@
+// binding member expression shouldn't invalidate the property name
+export default {
+ test({ assert, component, target }) {
+ const div = target.querySelector('div');
+ assert.equal(div, component.container.a);
+ assert.deepEqual(component.logs.length, 1);
+ }
+};
diff --git a/test/runtime/samples/binding-this-member-expression-update/main.svelte b/test/runtime/samples/binding-this-member-expression-update/main.svelte
new file mode 100644
index 0000000000..327d63d494
--- /dev/null
+++ b/test/runtime/samples/binding-this-member-expression-update/main.svelte
@@ -0,0 +1,9 @@
+
+
+
diff --git a/test/runtime/samples/bitmask-overflow-if/_config.js b/test/runtime/samples/bitmask-overflow-if/_config.js
index 49f48925c5..39ddc997fc 100644
--- a/test/runtime/samples/bitmask-overflow-if/_config.js
+++ b/test/runtime/samples/bitmask-overflow-if/_config.js
@@ -6,7 +6,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
await button.dispatchEvent(new window.MouseEvent('click'));
diff --git a/test/runtime/samples/bitmask-overflow-slot-6/_config.js b/test/runtime/samples/bitmask-overflow-slot-6/_config.js
index 7cf7538b69..3bcf4b98e4 100644
--- a/test/runtime/samples/bitmask-overflow-slot-6/_config.js
+++ b/test/runtime/samples/bitmask-overflow-slot-6/_config.js
@@ -7,11 +7,11 @@ export default {
Toggle outside
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelectorAll('button')[1];
const div = target.querySelector('div');
await div.dispatchEvent(new window.MouseEvent('click'));
-
+
assert.htmlEqual(target.innerHTML, `
Toggle inside 1
@@ -19,7 +19,7 @@ export default {
Toggle outside
`);
-
+
await button.dispatchEvent(new window.MouseEvent('click'));
assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/class-shortcut-with-class/_config.js b/test/runtime/samples/class-shortcut-with-class/_config.js
index 6d647e8f9d..5f2f28555e 100644
--- a/test/runtime/samples/class-shortcut-with-class/_config.js
+++ b/test/runtime/samples/class-shortcut-with-class/_config.js
@@ -7,7 +7,7 @@ export default {
html: '
',
- test({ assert, component, target, window }) {
+ test({ assert, component, target }) {
component.foo = false;
assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/class-shortcut/_config.js b/test/runtime/samples/class-shortcut/_config.js
index aba7e0e031..ac5be276b0 100644
--- a/test/runtime/samples/class-shortcut/_config.js
+++ b/test/runtime/samples/class-shortcut/_config.js
@@ -6,7 +6,7 @@ export default {
html: '
',
- test({ assert, component, target, window }) {
+ test({ assert, component, target }) {
component.foo = false;
assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js b/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js
index f704e9327f..0c357926e2 100644
--- a/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js
+++ b/test/runtime/samples/class-with-dynamic-attribute-and-spread/_config.js
@@ -8,7 +8,7 @@ export default {
html: '
',
- test({ assert, component, target, window }) {
+ test({ assert, component, target }) {
component.myClass = 'one';
component.attributes = {
'aria-label': 'Test'
diff --git a/test/runtime/samples/class-with-dynamic-attribute/_config.js b/test/runtime/samples/class-with-dynamic-attribute/_config.js
index 2be6500674..8e05c72065 100644
--- a/test/runtime/samples/class-with-dynamic-attribute/_config.js
+++ b/test/runtime/samples/class-with-dynamic-attribute/_config.js
@@ -5,7 +5,7 @@ export default {
html: '
',
- test({ assert, component, target, window }) {
+ test({ assert, component, target }) {
component.myClass = 'one';
assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/class-with-spread-and-bind/_config.js b/test/runtime/samples/class-with-spread-and-bind/_config.js
index 7b50502f34..d1f3503b6c 100644
--- a/test/runtime/samples/class-with-spread-and-bind/_config.js
+++ b/test/runtime/samples/class-with-spread-and-bind/_config.js
@@ -5,7 +5,7 @@ export default {
html: '
',
- test({ assert, component, target, window }) {
+ test({ assert, component, target }) {
component.primary = true;
assert.htmlEqual(
diff --git a/test/runtime/samples/class-with-spread/_config.js b/test/runtime/samples/class-with-spread/_config.js
index c7c85e38b0..d49b3f053e 100644
--- a/test/runtime/samples/class-with-spread/_config.js
+++ b/test/runtime/samples/class-with-spread/_config.js
@@ -8,7 +8,7 @@ export default {
html: '
',
- test({ assert, component, target, window }) {
+ test({ assert, component, target }) {
component.myClass = 'one';
component.attributes = {
'aria-label': 'Test'
diff --git a/test/runtime/samples/component-binding-accessors/_config.js b/test/runtime/samples/component-binding-accessors/_config.js
index 0fb83df870..4513b43a0b 100644
--- a/test/runtime/samples/component-binding-accessors/_config.js
+++ b/test/runtime/samples/component-binding-accessors/_config.js
@@ -1,5 +1,5 @@
export default {
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [input1, input2] = target.querySelectorAll('input');
assert.equal(input1.value, 'something');
assert.equal(input2.value, 'something');
diff --git a/test/runtime/samples/component-binding-blowback-b/_config.js b/test/runtime/samples/component-binding-blowback-b/_config.js
index 69af7917ca..2f6350c4fb 100644
--- a/test/runtime/samples/component-binding-blowback-b/_config.js
+++ b/test/runtime/samples/component-binding-blowback-b/_config.js
@@ -14,7 +14,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const input = target.querySelector('input');
input.value = 4;
diff --git a/test/runtime/samples/component-binding-onMount/Mount.svelte b/test/runtime/samples/component-binding-onMount/Mount.svelte
new file mode 100644
index 0000000000..ce3b0c48f8
--- /dev/null
+++ b/test/runtime/samples/component-binding-onMount/Mount.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+ Bound? {bound}
+
diff --git a/test/runtime/samples/component-binding-onMount/_config.js b/test/runtime/samples/component-binding-onMount/_config.js
new file mode 100644
index 0000000000..4ae78b588a
--- /dev/null
+++ b/test/runtime/samples/component-binding-onMount/_config.js
@@ -0,0 +1,11 @@
+export default {
+ async test({ assert, target }) {
+ assert.htmlEqual(target.innerHTML, `
+
+ `);
+ }
+};
diff --git a/test/runtime/samples/component-binding-onMount/main.svelte b/test/runtime/samples/component-binding-onMount/main.svelte
new file mode 100644
index 0000000000..971b13c1ce
--- /dev/null
+++ b/test/runtime/samples/component-binding-onMount/main.svelte
@@ -0,0 +1,13 @@
+
+
+
diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js b/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js
index bf6312f5ad..4e31a4d79c 100644
--- a/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js
+++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js
@@ -4,7 +4,7 @@ export default {
x in parent: yes
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
component.a = false;
assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js b/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js
index bf6312f5ad..4e31a4d79c 100644
--- a/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js
+++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js
@@ -4,7 +4,7 @@ export default {
x in parent: yes
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
component.a = false;
assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/component-binding-private-state/_config.js b/test/runtime/samples/component-binding-private-state/_config.js
index bd8a25d490..f4f2fd6f83 100644
--- a/test/runtime/samples/component-binding-private-state/_config.js
+++ b/test/runtime/samples/component-binding-private-state/_config.js
@@ -4,7 +4,7 @@ export default {
x in parent: undefined
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
component.a = false;
assert.htmlEqual(target.innerHTML, `
diff --git a/test/runtime/samples/component-binding-reactive-statement/_config.js b/test/runtime/samples/component-binding-reactive-statement/_config.js
index 49342d0645..8b8d091c73 100644
--- a/test/runtime/samples/component-binding-reactive-statement/_config.js
+++ b/test/runtime/samples/component-binding-reactive-statement/_config.js
@@ -4,7 +4,7 @@ export default {
button 0
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const event = new window.MouseEvent('click');
const buttons = target.querySelectorAll('button');
diff --git a/test/runtime/samples/component-event-handler-contenteditable/_config.js b/test/runtime/samples/component-event-handler-contenteditable/_config.js
index 3a85734975..1628e22d01 100644
--- a/test/runtime/samples/component-event-handler-contenteditable/_config.js
+++ b/test/runtime/samples/component-event-handler-contenteditable/_config.js
@@ -3,7 +3,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const div = target.querySelector('div');
const text = window.document.createTextNode('a');
div.insertBefore(text, null);
diff --git a/test/runtime/samples/component-events-console/_config.js b/test/runtime/samples/component-events-console/_config.js
index 39ccbd719f..fc3b4daa85 100644
--- a/test/runtime/samples/component-events-console/_config.js
+++ b/test/runtime/samples/component-events-console/_config.js
@@ -1,7 +1,7 @@
export default {
html: '
click me ',
- test({ assert, component, target }) {
+ test({ assert, target }) {
const button = target.querySelector('button');
const messages = [];
diff --git a/test/runtime/samples/component-nested-deep/_config.js b/test/runtime/samples/component-nested-deep/_config.js
index 0114e79223..3d5305529e 100644
--- a/test/runtime/samples/component-nested-deep/_config.js
+++ b/test/runtime/samples/component-nested-deep/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component }) {
+ test({ component }) {
component.l1.$destroy();
}
};
diff --git a/test/runtime/samples/component-nested-deeper/_config.js b/test/runtime/samples/component-nested-deeper/_config.js
index 86993b3e9a..828a3169ac 100644
--- a/test/runtime/samples/component-nested-deeper/_config.js
+++ b/test/runtime/samples/component-nested-deeper/_config.js
@@ -3,7 +3,7 @@ export default {
values: [1, 2, 3, 4]
},
- test({ assert, component }) {
+ test({ component }) {
component.values = [2, 3];
}
};
diff --git a/test/runtime/samples/component-slot-attribute-order/_config.js b/test/runtime/samples/component-slot-attribute-order/_config.js
index 54dc21c446..f4572317ca 100644
--- a/test/runtime/samples/component-slot-attribute-order/_config.js
+++ b/test/runtime/samples/component-slot-attribute-order/_config.js
@@ -4,7 +4,7 @@ export default {
Button
Button
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [btn, btn1, btn2] = target.querySelectorAll('button');
await btn.dispatchEvent(new window.MouseEvent('click'));
diff --git a/test/runtime/samples/component-slot-dynamic/_config.js b/test/runtime/samples/component-slot-dynamic/_config.js
index 9e43ff15fe..9a6ed1a057 100644
--- a/test/runtime/samples/component-slot-dynamic/_config.js
+++ b/test/runtime/samples/component-slot-dynamic/_config.js
@@ -3,7 +3,7 @@ export default {
override default slot
`,
- test({ assert, component }) {
+ test({ component }) {
component.nested.foo = 'b';
}
};
diff --git a/test/runtime/samples/component-slot-let-destructured-2/_config.js b/test/runtime/samples/component-slot-let-destructured-2/_config.js
index 38b04b7b5e..e407dcf2f8 100644
--- a/test/runtime/samples/component-slot-let-destructured-2/_config.js
+++ b/test/runtime/samples/component-slot-let-destructured-2/_config.js
@@ -13,7 +13,7 @@ export default {
Increment
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [button1, button2, button3] = target.querySelectorAll('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/component-slot-nested-if/_config.js b/test/runtime/samples/component-slot-nested-if/_config.js
index 45c570fc22..e4af352970 100644
--- a/test/runtime/samples/component-slot-nested-if/_config.js
+++ b/test/runtime/samples/component-slot-nested-if/_config.js
@@ -2,7 +2,7 @@ export default {
html: `
`,
- async test({ assert, target, snapshot, component, window }) {
+ async test({ assert, target, window }) {
const input = target.querySelector('input');
input.value = 'a';
diff --git a/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js b/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js
index 38b04b7b5e..e407dcf2f8 100644
--- a/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js
+++ b/test/runtime/samples/component-svelte-slot-let-destructured-2/_config.js
@@ -13,7 +13,7 @@ export default {
Increment
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [button1, button2, button3] = target.querySelectorAll('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/component-yield-placement/_config.js b/test/runtime/samples/component-yield-placement/_config.js
index eaa600b07d..089b3ce752 100644
--- a/test/runtime/samples/component-yield-placement/_config.js
+++ b/test/runtime/samples/component-yield-placement/_config.js
@@ -12,7 +12,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/const-tag-await-then-destructuring/_config.js b/test/runtime/samples/const-tag-await-then-destructuring/_config.js
new file mode 100644
index 0000000000..cb40e7c456
--- /dev/null
+++ b/test/runtime/samples/const-tag-await-then-destructuring/_config.js
@@ -0,0 +1,19 @@
+export default {
+ html: '12 120 70, 30+4=34
',
+ async test({ component, target, assert }) {
+ component.promise1 = Promise.resolve({width: 5, height: 6});
+ component.promise2 = Promise.reject({width: 6, height: 7});
+
+ await Promise.resolve();
+ assert.htmlEqual(target.innerHTML, `
+ 30 300 110, 50+6=56
+ 42 420 130, 60+7=67
+ `);
+
+ component.constant = 20;
+ assert.htmlEqual(target.innerHTML, `
+ 30 600 220, 100+6=106
+ 42 840 260, 120+7=127
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-await-then-destructuring/main.svelte b/test/runtime/samples/const-tag-await-then-destructuring/main.svelte
new file mode 100644
index 0000000000..ab450822c6
--- /dev/null
+++ b/test/runtime/samples/const-tag-await-then-destructuring/main.svelte
@@ -0,0 +1,23 @@
+
+
+{#await promise1 then { width, height }}
+ {@const {area, volume} = calculate(width, height, constant)}
+ {@const perimeter = (width + height) * constant}
+ {@const [_width, _height, sum] = [width * constant, height, width * constant + height]}
+ {area} {volume} {perimeter}, {_width}+{_height}={sum}
+{/await}
+
+{#await promise2 catch { width, height }}
+ {@const {area, volume} = calculate(width, height, constant)}
+ {@const perimeter = (width + height) * constant}
+ {@const [_width, _height, sum] = [width * constant, height, width * constant + height]}
+ {area} {volume} {perimeter}, {_width}+{_height}={sum}
+{/await}
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-await-then/_config.js b/test/runtime/samples/const-tag-await-then/_config.js
new file mode 100644
index 0000000000..cb40e7c456
--- /dev/null
+++ b/test/runtime/samples/const-tag-await-then/_config.js
@@ -0,0 +1,19 @@
+export default {
+ html: '12 120 70, 30+4=34
',
+ async test({ component, target, assert }) {
+ component.promise1 = Promise.resolve({width: 5, height: 6});
+ component.promise2 = Promise.reject({width: 6, height: 7});
+
+ await Promise.resolve();
+ assert.htmlEqual(target.innerHTML, `
+ 30 300 110, 50+6=56
+ 42 420 130, 60+7=67
+ `);
+
+ component.constant = 20;
+ assert.htmlEqual(target.innerHTML, `
+ 30 600 220, 100+6=106
+ 42 840 260, 120+7=127
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-await-then/main.svelte b/test/runtime/samples/const-tag-await-then/main.svelte
new file mode 100644
index 0000000000..f8eed87115
--- /dev/null
+++ b/test/runtime/samples/const-tag-await-then/main.svelte
@@ -0,0 +1,23 @@
+
+
+{#await promise1 then box}
+ {@const {area, volume} = calculate(box.width, box.height, constant)}
+ {@const perimeter = (box.width + box.height) * constant}
+ {@const [width, height, sum] = [box.width * constant, box.height, box.width * constant + box.height]}
+ {area} {volume} {perimeter}, {width}+{height}={sum}
+{/await}
+
+{#await promise2 catch box}
+ {@const {area, volume} = calculate(box.width, box.height, constant)}
+ {@const perimeter = (box.width + box.height) * constant}
+ {@const [width, height, sum] = [box.width * constant, box.height, box.width * constant + box.height]}
+ {area} {volume} {perimeter}, {width}+{height}={sum}
+{/await}
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-component/Component.svelte b/test/runtime/samples/const-tag-component/Component.svelte
new file mode 100644
index 0000000000..68ba82f245
--- /dev/null
+++ b/test/runtime/samples/const-tag-component/Component.svelte
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-component/_config.js b/test/runtime/samples/const-tag-component/_config.js
new file mode 100644
index 0000000000..66399a06fa
--- /dev/null
+++ b/test/runtime/samples/const-tag-component/_config.js
@@ -0,0 +1,46 @@
+export default {
+ html: `
+ 12 120 70, 30+4=34
+ 12 120 70, 30+4=34
+ 12 120 70, 30+4=34
+
+
+ 12 120 70, 30+4=34
+ 12 120 70, 30+4=34
+ `,
+ async test({ component, target, assert }) {
+ component.constant = 20;
+ assert.htmlEqual(target.innerHTML, `
+ 12 240 140, 60+4=64
+ 12 240 140, 60+4=64
+ 12 240 140, 60+4=64
+
+
+ 12 240 140, 60+4=64
+ 12 240 140, 60+4=64
+ `);
+
+ component.box = {width: 5, height: 6};
+ assert.htmlEqual(target.innerHTML, `
+ 30 600 220, 100+6=106
+ 30 600 220, 100+6=106
+ 30 600 220, 100+6=106
+
+
30 600 220, 100+6=106
+
+
+
30 600 220, 100+6=106
+
+ 30 600 220, 100+6=106
+ 30 600 220, 100+6=106
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-component/main.svelte b/test/runtime/samples/const-tag-component/main.svelte
new file mode 100644
index 0000000000..1854c3fba9
--- /dev/null
+++ b/test/runtime/samples/const-tag-component/main.svelte
@@ -0,0 +1,60 @@
+
+
+
+
+ {@const {area, volume} = calculate(box.width, box.height, constant)}
+ {@const perimeter = (box.width + box.height) * constant}
+ {@const [width, height, sum] = [box.width * constant, box.height, box.width * constant + box.height]}
+ {area} {volume} {perimeter}, {width}+{height}={sum}
+
+
+
+ {@const {area, volume} = calculate(width, height, constant)}
+ {@const perimeter = (width + height) * constant}
+ {@const [_width, _height, sum] = [width * constant, height, width * constant + height]}
+ {area} {volume} {perimeter}, {_width}+{_height}={sum}
+
+
+
+ {@const {area, volume} = calculate(width, height, constant)}
+ {@const perimeter = (width + height) * constant}
+ {@const [_width, _height, sum] = [width * constant, height, width * constant + height]}
+ {area} {volume} {perimeter}, {_width}+{_height}={sum}
+
+
+
+
+
+ {@const {area, volume} = calculate(box.width, box.height, constant)}
+ {@const perimeter = (box.width + box.height) * constant}
+ {@const [width, height, sum] = [box.width * constant, box.height, box.width * constant + box.height]}
+
{area} {volume} {perimeter}, {width}+{height}={sum}
+
+
+
+ {@const {area, volume} = calculate(width, height, constant)}
+ {@const perimeter = (width + height) * constant}
+ {@const [_width, _height, sum] = [width * constant, height, width * constant + height]}
+
{area} {volume} {perimeter}, {_width}+{_height}={sum}
+
+
+ {@const {area, volume} = calculate(box.width, box.height, constant)}
+ {@const perimeter = (box.width + box.height) * constant}
+ {@const [width, height, sum] = [box.width * constant, box.height, box.width * constant + box.height]}
+ {area} {volume} {perimeter}, {width}+{height}={sum}
+
+
+
+ {@const {area, volume} = calculate(width, height, constant)}
+ {@const perimeter = (width + height) * constant}
+ {@const [_width, _height, sum] = [width * constant, height, width * constant + height]}
+ {area} {volume} {perimeter}, {_width}+{_height}={sum}
+
diff --git a/test/runtime/samples/const-tag-dependencies/_config.js b/test/runtime/samples/const-tag-dependencies/_config.js
new file mode 100644
index 0000000000..5cbb2da587
--- /dev/null
+++ b/test/runtime/samples/const-tag-dependencies/_config.js
@@ -0,0 +1,12 @@
+export default {
+ html: `
+ 7
+ `,
+ async test({ component, target, assert }) {
+ component.a = 5;
+
+ assert.htmlEqual(target.innerHTML, `
+ 9
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-dependencies/main.svelte b/test/runtime/samples/const-tag-dependencies/main.svelte
new file mode 100644
index 0000000000..cce3b0c1f7
--- /dev/null
+++ b/test/runtime/samples/const-tag-dependencies/main.svelte
@@ -0,0 +1,10 @@
+
+
+{#each [value] as n}
+ {@const ab = a + b}
+ {ab}
+{/each}
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-each-arrow/_config.js b/test/runtime/samples/const-tag-each-arrow/_config.js
new file mode 100644
index 0000000000..8e8036b851
--- /dev/null
+++ b/test/runtime/samples/const-tag-each-arrow/_config.js
@@ -0,0 +1,47 @@
+export default {
+ html: `
+ #FF0000
+ #00FF00
+ #0000FF
+ `,
+ async test({ component, target, assert }) {
+ component.constant = 20;
+
+ assert.htmlEqual(target.innerHTML, `
+ #FF0000
+ #00FF00
+ #0000FF
+ `);
+
+ component.tags = [
+ {
+ name: 'Red',
+ color: '#FF0000'
+ },
+ {
+ name: 'Green',
+ color: '#00FF00'
+ },
+ {
+ name: 'Blue',
+ color: '#0000FF'
+ },
+ {
+ name: 'Black',
+ color: '#000000'
+ },
+ {
+ name: 'White',
+ color: '#FFFFFF'
+ }
+ ];
+
+ assert.htmlEqual(target.innerHTML, `
+ #FF0000
+ #00FF00
+ #0000FF
+ #000000
+ #FFFFFF
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-each-arrow/main.svelte b/test/runtime/samples/const-tag-each-arrow/main.svelte
new file mode 100644
index 0000000000..7292a7d485
--- /dev/null
+++ b/test/runtime/samples/const-tag-each-arrow/main.svelte
@@ -0,0 +1,21 @@
+
+
+{#each tags as tag}
+ {@const tagColor = tags.find(t => t.name === tag.name).color}
+ {tagColor}
+{/each}
diff --git a/test/runtime/samples/const-tag-each-destructure/_config.js b/test/runtime/samples/const-tag-each-destructure/_config.js
new file mode 100644
index 0000000000..00f8b31540
--- /dev/null
+++ b/test/runtime/samples/const-tag-each-destructure/_config.js
@@ -0,0 +1,30 @@
+export default {
+ html: `
+ 12 120 70, 30+4=34
+ 35 350 120, 50+7=57
+ 48 480 140, 60+8=68
+ `,
+ async test({ component, target, assert }) {
+ component.constant = 20;
+
+ assert.htmlEqual(target.innerHTML, `
+ 12 240 140, 60+4=64
+ 35 700 240, 100+7=107
+ 48 960 280, 120+8=128
+ `);
+
+ component.boxes = [
+ {width: 3, height: 4},
+ {width: 4, height: 5},
+ {width: 5, height: 6},
+ {width: 6, height: 7}
+ ];
+
+ assert.htmlEqual(target.innerHTML, `
+ 12 240 140, 60+4=64
+ 20 400 180, 80+5=85
+ 30 600 220, 100+6=106
+ 42 840 260, 120+7=127
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-each-destructure/main.svelte b/test/runtime/samples/const-tag-each-destructure/main.svelte
new file mode 100644
index 0000000000..7f0391d5e6
--- /dev/null
+++ b/test/runtime/samples/const-tag-each-destructure/main.svelte
@@ -0,0 +1,19 @@
+
+
+{#each boxes as { width, height }}
+ {@const {area, volume} = calculate(width, height, constant)}
+ {@const perimeter = (width + height) * constant}
+ {@const [_width, _height, sum] = [width * constant, height, width * constant + height]}
+ {area} {volume} {perimeter}, {_width}+{_height}={sum}
+{/each}
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-each/_config.js b/test/runtime/samples/const-tag-each/_config.js
new file mode 100644
index 0000000000..00f8b31540
--- /dev/null
+++ b/test/runtime/samples/const-tag-each/_config.js
@@ -0,0 +1,30 @@
+export default {
+ html: `
+ 12 120 70, 30+4=34
+ 35 350 120, 50+7=57
+ 48 480 140, 60+8=68
+ `,
+ async test({ component, target, assert }) {
+ component.constant = 20;
+
+ assert.htmlEqual(target.innerHTML, `
+ 12 240 140, 60+4=64
+ 35 700 240, 100+7=107
+ 48 960 280, 120+8=128
+ `);
+
+ component.boxes = [
+ {width: 3, height: 4},
+ {width: 4, height: 5},
+ {width: 5, height: 6},
+ {width: 6, height: 7}
+ ];
+
+ assert.htmlEqual(target.innerHTML, `
+ 12 240 140, 60+4=64
+ 20 400 180, 80+5=85
+ 30 600 220, 100+6=106
+ 42 840 260, 120+7=127
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-each/main.svelte b/test/runtime/samples/const-tag-each/main.svelte
new file mode 100644
index 0000000000..004f81cd83
--- /dev/null
+++ b/test/runtime/samples/const-tag-each/main.svelte
@@ -0,0 +1,19 @@
+
+
+{#each boxes as box}
+ {@const {area, volume} = calculate(box.width, box.height, constant)}
+ {@const perimeter = (box.width + box.height) * constant}
+ {@const [width, height, sum] = [box.width * constant, box.height, box.width * constant + box.height]}
+ {area} {volume} {perimeter}, {width}+{height}={sum}
+{/each}
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-hoisting/_config.js b/test/runtime/samples/const-tag-hoisting/_config.js
new file mode 100644
index 0000000000..f8f4a5c85e
--- /dev/null
+++ b/test/runtime/samples/const-tag-hoisting/_config.js
@@ -0,0 +1,12 @@
+export default {
+ html: `
+ 4 ^ 4 = 256
+ `,
+ async test({ component, target, assert }) {
+ component.value = 3;
+
+ assert.htmlEqual(target.innerHTML, `
+ 3 ^ 4 = 81
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-hoisting/main.svelte b/test/runtime/samples/const-tag-hoisting/main.svelte
new file mode 100644
index 0000000000..49fce93274
--- /dev/null
+++ b/test/runtime/samples/const-tag-hoisting/main.svelte
@@ -0,0 +1,11 @@
+
+
+{#each [value] as n}
+ {n} ^ 4 = {hypercubed}
+
+ {@const squared = n * n}
+ {@const cubed = squared * n}
+ {@const hypercubed = cubed * n}
+{/each}
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-ordering/_config.js b/test/runtime/samples/const-tag-ordering/_config.js
new file mode 100644
index 0000000000..f8f4a5c85e
--- /dev/null
+++ b/test/runtime/samples/const-tag-ordering/_config.js
@@ -0,0 +1,12 @@
+export default {
+ html: `
+ 4 ^ 4 = 256
+ `,
+ async test({ component, target, assert }) {
+ component.value = 3;
+
+ assert.htmlEqual(target.innerHTML, `
+ 3 ^ 4 = 81
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-ordering/main.svelte b/test/runtime/samples/const-tag-ordering/main.svelte
new file mode 100644
index 0000000000..49fce93274
--- /dev/null
+++ b/test/runtime/samples/const-tag-ordering/main.svelte
@@ -0,0 +1,11 @@
+
+
+{#each [value] as n}
+ {n} ^ 4 = {hypercubed}
+
+ {@const squared = n * n}
+ {@const cubed = squared * n}
+ {@const hypercubed = cubed * n}
+{/each}
\ No newline at end of file
diff --git a/test/runtime/samples/const-tag-shadow/_config.js b/test/runtime/samples/const-tag-shadow/_config.js
new file mode 100644
index 0000000000..312235f113
--- /dev/null
+++ b/test/runtime/samples/const-tag-shadow/_config.js
@@ -0,0 +1,43 @@
+export default {
+ html: `
+ 7
+ 11
+ 15
+ 7
+ 19
+ 23
+ 27
+ 19
+ `,
+ async test({ component, target, assert }) {
+ component.numbers = [
+ {
+ a: 4,
+ b: 5,
+ children: [
+ { a: 6, b: 7 },
+ { a: 8, b: 9 }
+ ]
+ },
+ {
+ a: 10,
+ b: 11,
+ children: [
+ { a: 12, b: 13 },
+ { a: 14, b: 15 }
+ ]
+ }
+ ];
+
+ assert.htmlEqual(target.innerHTML, `
+ 9
+ 13
+ 17
+ 9
+ 21
+ 25
+ 29
+ 21
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-shadow/main.svelte b/test/runtime/samples/const-tag-shadow/main.svelte
new file mode 100644
index 0000000000..725121c733
--- /dev/null
+++ b/test/runtime/samples/const-tag-shadow/main.svelte
@@ -0,0 +1,31 @@
+
+
+{#each numbers as {a, b, children}}
+ {@const ab = a + b}
+ {ab}
+ {#each children as {a, b}}
+ {@const ab = a + b}
+ {ab}
+ {/each}
+ {ab}
+{/each}
\ No newline at end of file
diff --git a/test/runtime/samples/css-comments/_config.js b/test/runtime/samples/css-comments/_config.js
index 7f11f792c7..baf571fcd1 100644
--- a/test/runtime/samples/css-comments/_config.js
+++ b/test/runtime/samples/css-comments/_config.js
@@ -1,6 +1,6 @@
// JSDOM makes this test pass when it should fail. weird
export default {
- test({ assert, component, target, window }) {
+ test({ assert, target, window }) {
const p = target.querySelector( 'p' );
assert.equal( window.getComputedStyle( p ).color, 'red' );
}
diff --git a/test/runtime/samples/css-false/_config.js b/test/runtime/samples/css-false/_config.js
index 2ade2acf83..320efce35b 100644
--- a/test/runtime/samples/css-false/_config.js
+++ b/test/runtime/samples/css-false/_config.js
@@ -3,7 +3,7 @@ export default {
css: false
},
- test({ assert, component, target, window }) {
+ test({ assert, target, window }) {
const [ control, test ] = target.querySelectorAll( 'p' );
assert.equal( window.getComputedStyle( control ).color, '' );
diff --git a/test/runtime/samples/css-space-in-attribute/_config.js b/test/runtime/samples/css-space-in-attribute/_config.js
index dc931217fc..c88f72cafa 100644
--- a/test/runtime/samples/css-space-in-attribute/_config.js
+++ b/test/runtime/samples/css-space-in-attribute/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component, target, window }) {
+ test({ assert, target, window }) {
const [ control, test ] = target.querySelectorAll( 'p' );
assert.equal( window.getComputedStyle( control ).color, '' );
diff --git a/test/runtime/samples/css/_config.js b/test/runtime/samples/css/_config.js
index c4500e7441..6119af94de 100644
--- a/test/runtime/samples/css/_config.js
+++ b/test/runtime/samples/css/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component, target, window }) {
+ test({ assert, target, window }) {
const [control, test] = target.querySelectorAll('p');
assert.equal(window.getComputedStyle(control).color, '');
diff --git a/test/runtime/samples/destroy-twice/_config.js b/test/runtime/samples/destroy-twice/_config.js
index 1279b2315d..39f6cdcd57 100644
--- a/test/runtime/samples/destroy-twice/_config.js
+++ b/test/runtime/samples/destroy-twice/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component }) {
+ test({ component }) {
component.$destroy();
component.$destroy();
}
diff --git a/test/runtime/samples/dynamic-component-destroy-null/_config.js b/test/runtime/samples/dynamic-component-destroy-null/_config.js
index 00f7d47d0f..c9bc1a05c0 100644
--- a/test/runtime/samples/dynamic-component-destroy-null/_config.js
+++ b/test/runtime/samples/dynamic-component-destroy-null/_config.js
@@ -3,7 +3,7 @@ export default {
x: true
},
- test({ assert, component }) {
+ test({ component }) {
component.x = false;
}
};
diff --git a/test/runtime/samples/each-block-keyed-component-action/_config.js b/test/runtime/samples/each-block-keyed-component-action/_config.js
index a1afc44c93..af621330d3 100644
--- a/test/runtime/samples/each-block-keyed-component-action/_config.js
+++ b/test/runtime/samples/each-block-keyed-component-action/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component, raf }) {
+ test({ assert, component }) {
assert.equal(component.count, 0);
component.arr = ['2'];
diff --git a/test/runtime/samples/each-block-keyed-dynamic-2/_config.js b/test/runtime/samples/each-block-keyed-dynamic-2/_config.js
index e25083c751..0c28656f5f 100644
--- a/test/runtime/samples/each-block-keyed-dynamic-2/_config.js
+++ b/test/runtime/samples/each-block-keyed-dynamic-2/_config.js
@@ -5,7 +5,7 @@ export default {
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/each-blocks-assignment-2/_config.js b/test/runtime/samples/each-blocks-assignment-2/_config.js
index f69b4fe9f6..93f06956d0 100644
--- a/test/runtime/samples/each-blocks-assignment-2/_config.js
+++ b/test/runtime/samples/each-blocks-assignment-2/_config.js
@@ -3,7 +3,7 @@ export default {
foo
Test
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const clickEvent = new window.MouseEvent('click');
diff --git a/test/runtime/samples/each-blocks-assignment/_config.js b/test/runtime/samples/each-blocks-assignment/_config.js
index b651e3e02b..5e22381e9e 100644
--- a/test/runtime/samples/each-blocks-assignment/_config.js
+++ b/test/runtime/samples/each-blocks-assignment/_config.js
@@ -8,7 +8,7 @@ export default {
3
Test
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
let [incrementBtn, ...buttons] = target.querySelectorAll('button');
const clickEvent = new window.MouseEvent('click');
@@ -92,6 +92,6 @@ export default {
8
Test
`
- );
+ );
}
};
diff --git a/test/runtime/samples/each-blocks-nested-b/_config.js b/test/runtime/samples/each-blocks-nested-b/_config.js
index 7b13d988b4..ab008b4249 100644
--- a/test/runtime/samples/each-blocks-nested-b/_config.js
+++ b/test/runtime/samples/each-blocks-nested-b/_config.js
@@ -29,7 +29,7 @@ export default {
]
},
html: 'animals: aardvark
animals: buffalo
animals: chinchilla
countries: albania
countries: brazil
countries: china
people: alice
people: bob
people: carol
people: dave
',
- test({ assert, component, target }) {
+ test() {
// TODO
}
};
diff --git a/test/runtime/samples/each-blocks-nested/_config.js b/test/runtime/samples/each-blocks-nested/_config.js
index 3318bc344d..04d9bd11c5 100644
--- a/test/runtime/samples/each-blocks-nested/_config.js
+++ b/test/runtime/samples/each-blocks-nested/_config.js
@@ -6,7 +6,6 @@ export default {
html: 'a, 1
a, 2
a, 3
b, 1
b, 2
b, 3
c, 1
c, 2
c, 3
',
- test({ assert, component, target }) {
- // TODO
- }
+ // TODO
+ test() {}
};
diff --git a/test/runtime/samples/element-source-location/_config.js b/test/runtime/samples/element-source-location/_config.js
index 101cc2cad1..be528d15eb 100644
--- a/test/runtime/samples/element-source-location/_config.js
+++ b/test/runtime/samples/element-source-location/_config.js
@@ -5,7 +5,7 @@ export default {
dev: true
},
- test({ assert, component, target }) {
+ test({ assert, target }) {
const h1 = target.querySelector('h1');
const p = target.querySelector('p');
diff --git a/test/runtime/samples/event-handler-console-log/_config.js b/test/runtime/samples/event-handler-console-log/_config.js
index 35e447c45b..289a84e44c 100644
--- a/test/runtime/samples/event-handler-console-log/_config.js
+++ b/test/runtime/samples/event-handler-console-log/_config.js
@@ -7,7 +7,7 @@ export default {
click me
`,
- test({ assert, component, target, window }) {
+ test({ assert, target, window }) {
const button = target.querySelector('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/event-handler-destructured/_config.js b/test/runtime/samples/event-handler-destructured/_config.js
index b32fe76c0a..2c37a17c75 100644
--- a/test/runtime/samples/event-handler-destructured/_config.js
+++ b/test/runtime/samples/event-handler-destructured/_config.js
@@ -3,7 +3,7 @@ export default {
clicked: false
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/event-handler-dynamic-bound-var/_config.js b/test/runtime/samples/event-handler-dynamic-bound-var/_config.js
index c490db000a..fbbfee221d 100644
--- a/test/runtime/samples/event-handler-dynamic-bound-var/_config.js
+++ b/test/runtime/samples/event-handler-dynamic-bound-var/_config.js
@@ -3,7 +3,7 @@ export default {
Click Me
Hello World
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/event-handler-dynamic-expression/_config.js b/test/runtime/samples/event-handler-dynamic-expression/_config.js
index f479c9cef2..f2c876cdeb 100644
--- a/test/runtime/samples/event-handler-dynamic-expression/_config.js
+++ b/test/runtime/samples/event-handler-dynamic-expression/_config.js
@@ -1,7 +1,7 @@
export default {
html: 'bar ',
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [button] = target.querySelectorAll(
'button'
);
@@ -10,10 +10,10 @@ export default {
await button.dispatchEvent(event);
assert.htmlEqual(target.innerHTML, 'foo ');
-
+
await button.dispatchEvent(event);
assert.htmlEqual(target.innerHTML, 'bar ');
-
+
await button.dispatchEvent(event);
assert.htmlEqual(target.innerHTML, 'foo ');
}
diff --git a/test/runtime/samples/event-handler-dynamic-hash/_config.js b/test/runtime/samples/event-handler-dynamic-hash/_config.js
index 35f5fa103d..e98d0f6104 100644
--- a/test/runtime/samples/event-handler-dynamic-hash/_config.js
+++ b/test/runtime/samples/event-handler-dynamic-hash/_config.js
@@ -8,7 +8,7 @@ export default {
click
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [updateButton1, updateButton2, button] = target.querySelectorAll(
'button'
);
diff --git a/test/runtime/samples/event-handler-dynamic-invalid/_config.js b/test/runtime/samples/event-handler-dynamic-invalid/_config.js
index 0ed298c95a..beebd4459e 100644
--- a/test/runtime/samples/event-handler-dynamic-invalid/_config.js
+++ b/test/runtime/samples/event-handler-dynamic-invalid/_config.js
@@ -3,7 +3,7 @@ export default {
null
invalid `,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [buttonUndef, buttonNull, buttonInvalid] = target.querySelectorAll(
'button'
);
diff --git a/test/runtime/samples/event-handler-dynamic/_config.js b/test/runtime/samples/event-handler-dynamic/_config.js
index 35f5fa103d..e98d0f6104 100644
--- a/test/runtime/samples/event-handler-dynamic/_config.js
+++ b/test/runtime/samples/event-handler-dynamic/_config.js
@@ -8,7 +8,7 @@ export default {
click
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const [updateButton1, updateButton2, button] = target.querySelectorAll(
'button'
);
diff --git a/test/runtime/samples/event-handler-each/_config.js b/test/runtime/samples/event-handler-each/_config.js
index 281f6d0d7c..9c0407860e 100644
--- a/test/runtime/samples/event-handler-each/_config.js
+++ b/test/runtime/samples/event-handler-each/_config.js
@@ -15,7 +15,7 @@ export default {
selected: foo
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const buttons = target.querySelectorAll('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/event-handler-sanitize/_config.js b/test/runtime/samples/event-handler-sanitize/_config.js
index 9f16b14093..ddc15724a3 100644
--- a/test/runtime/samples/event-handler-sanitize/_config.js
+++ b/test/runtime/samples/event-handler-sanitize/_config.js
@@ -3,7 +3,7 @@ export default {
toggle
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const div = target.querySelector('div');
const event = new window.MouseEvent('some-event');
diff --git a/test/runtime/samples/event-handler-this-methods/_config.js b/test/runtime/samples/event-handler-this-methods/_config.js
index 8be56cf1a6..d7907f752d 100644
--- a/test/runtime/samples/event-handler-this-methods/_config.js
+++ b/test/runtime/samples/event-handler-this-methods/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component, target, window }) {
+ test({ assert, target, window }) {
// Click events don't focus elements in JSDOM – obviously they would
// in real browsers. More realistically, you'd use this for e.g.
// this.select(), but that's harder to test than this.focus()
diff --git a/test/runtime/samples/event-handler/_config.js b/test/runtime/samples/event-handler/_config.js
index 3a5ac7a18b..f142fc9daa 100644
--- a/test/runtime/samples/event-handler/_config.js
+++ b/test/runtime/samples/event-handler/_config.js
@@ -3,7 +3,7 @@ export default {
toggle
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
const event = new window.MouseEvent('click');
diff --git a/test/runtime/samples/globals-accessible-directly/_config.js b/test/runtime/samples/globals-accessible-directly/_config.js
index ad010356c8..30e176ae1b 100644
--- a/test/runtime/samples/globals-accessible-directly/_config.js
+++ b/test/runtime/samples/globals-accessible-directly/_config.js
@@ -1,7 +1,7 @@
export default {
html: '',
- test({ assert, component, target }) {
+ test({ assert, target }) {
assert.htmlEqual(target.innerHTML, 'NaN');
}
};
diff --git a/test/runtime/samples/head-if-else-block/_config.js b/test/runtime/samples/head-if-else-block/_config.js
index 7665bfe90b..64da6ff796 100644
--- a/test/runtime/samples/head-if-else-block/_config.js
+++ b/test/runtime/samples/head-if-else-block/_config.js
@@ -3,7 +3,7 @@ export default {
condition: false
},
- test({ assert, component, target, window }) {
+ test({ assert, component, window }) {
assert.equal(window.document.title, '');
assert.equal(Boolean(window.document.getElementById('meta')), true);
diff --git a/test/runtime/samples/head-title-dynamic-simple/_config.js b/test/runtime/samples/head-title-dynamic-simple/_config.js
index cc2301a2f9..7a086419ee 100644
--- a/test/runtime/samples/head-title-dynamic-simple/_config.js
+++ b/test/runtime/samples/head-title-dynamic-simple/_config.js
@@ -3,7 +3,7 @@ export default {
foo: 'A Title'
},
- test({ assert, component, target, window }) {
+ test({ assert, component, window }) {
assert.equal(window.document.title, 'A Title');
component.foo = 'Also A Title';
diff --git a/test/runtime/samples/head-title-dynamic/_config.js b/test/runtime/samples/head-title-dynamic/_config.js
index 95d5f8debf..2555e55b8c 100644
--- a/test/runtime/samples/head-title-dynamic/_config.js
+++ b/test/runtime/samples/head-title-dynamic/_config.js
@@ -3,7 +3,7 @@ export default {
adjective: 'custom'
},
- test({ assert, component, target, window }) {
+ test({ assert, component, window }) {
assert.equal(window.document.title, 'a custom title');
component.adjective = 'different';
diff --git a/test/runtime/samples/head-title-static/_config.js b/test/runtime/samples/head-title-static/_config.js
index ee9a0316b5..184d04c092 100644
--- a/test/runtime/samples/head-title-static/_config.js
+++ b/test/runtime/samples/head-title-static/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component, target, window }) {
+ test({ assert, window }) {
assert.equal(window.document.title, 'changed');
}
};
diff --git a/test/runtime/samples/if-block-else-update/_config.js b/test/runtime/samples/if-block-else-update/_config.js
new file mode 100644
index 0000000000..db35ca8488
--- /dev/null
+++ b/test/runtime/samples/if-block-else-update/_config.js
@@ -0,0 +1,46 @@
+export default {
+ async test({ assert, component, target, window }) {
+ const [btn1, btn2] = target.querySelectorAll('button');
+
+ const clickEvent = new window.MouseEvent('click');
+
+ await btn2.dispatchEvent(clickEvent);
+ assert.htmlEqual(target.innerHTML, `
+ Toggle foo
+ Toggle bar
+
+ foo: false, bar: true
+
+ bar!
+ `);
+
+ await btn1.dispatchEvent(clickEvent);
+ assert.htmlEqual(target.innerHTML, `
+ Toggle foo
+ Toggle bar
+
+ foo: true, bar: true
+
+ foo!
+ `);
+
+ await btn2.dispatchEvent(clickEvent);
+ assert.htmlEqual(target.innerHTML, `
+ Toggle foo
+ Toggle bar
+
+ foo: true, bar: false
+
+ foo!
+ `);
+
+ await btn1.dispatchEvent(clickEvent);
+ assert.htmlEqual(target.innerHTML, `
+ Toggle foo
+ Toggle bar
+
+ foo: false, bar: false
+
+ `);
+ }
+};
diff --git a/test/runtime/samples/if-block-else-update/main.svelte b/test/runtime/samples/if-block-else-update/main.svelte
new file mode 100644
index 0000000000..258d0422ba
--- /dev/null
+++ b/test/runtime/samples/if-block-else-update/main.svelte
@@ -0,0 +1,21 @@
+
+
+ foo = !foo}>
+ Toggle foo
+
+ bar[0] = !bar[0]}>
+ Toggle bar
+
+
+
+{@html `foo: ${foo}, bar: ${bar.every(x => x)}`}
+
+
+{#if foo}
+ foo!
+{:else if bar.every(x => x)}
+ bar!
+{/if}
\ No newline at end of file
diff --git a/test/runtime/samples/if-block-outro-nested-else/_config.js b/test/runtime/samples/if-block-outro-nested-else/_config.js
index 226116fe13..06b89ea723 100644
--- a/test/runtime/samples/if-block-outro-nested-else/_config.js
+++ b/test/runtime/samples/if-block-outro-nested-else/_config.js
@@ -1,5 +1,5 @@
export default {
- test({ assert, component, target }) {
+ test({ component }) {
// Would cause "TypeError: Cannot read property 'o' of undefined"
component.foo = false;
}
diff --git a/test/runtime/samples/inline-style-directive-and-style-attr-merged/_config.js b/test/runtime/samples/inline-style-directive-and-style-attr-merged/_config.js
new file mode 100644
index 0000000000..f5780daf80
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-and-style-attr-merged/_config.js
@@ -0,0 +1,13 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, target, window }) {
+ const p = target.querySelector('p');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'red');
+ assert.equal(styles.height, '40px');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-and-style-attr-merged/main.svelte b/test/runtime/samples/inline-style-directive-and-style-attr-merged/main.svelte
new file mode 100644
index 0000000000..6f3e86b9bf
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-and-style-attr-merged/main.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-and-style-attr/_config.js b/test/runtime/samples/inline-style-directive-and-style-attr/_config.js
new file mode 100644
index 0000000000..f5780daf80
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-and-style-attr/_config.js
@@ -0,0 +1,13 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, target, window }) {
+ const p = target.querySelector('p');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'red');
+ assert.equal(styles.height, '40px');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-and-style-attr/main.svelte b/test/runtime/samples/inline-style-directive-and-style-attr/main.svelte
new file mode 100644
index 0000000000..e2ba0fa591
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-and-style-attr/main.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-css-vars/_config.js b/test/runtime/samples/inline-style-directive-css-vars/_config.js
new file mode 100644
index 0000000000..c8b239a42b
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-css-vars/_config.js
@@ -0,0 +1,9 @@
+export default {
+ html: '
',
+
+ test({ assert, component, target }) {
+ component.myColor = 'blue';
+
+ assert.htmlEqual(target.innerHTML, '
');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-css-vars/main.svelte b/test/runtime/samples/inline-style-directive-css-vars/main.svelte
new file mode 100644
index 0000000000..689a2333f5
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-css-vars/main.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-dynamic/_config.js b/test/runtime/samples/inline-style-directive-dynamic/_config.js
new file mode 100644
index 0000000000..a2214fd872
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-dynamic/_config.js
@@ -0,0 +1,10 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, component, target }) {
+ component.myColor = 'blue';
+ assert.htmlEqual(target.innerHTML, '
');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-dynamic/main.svelte b/test/runtime/samples/inline-style-directive-dynamic/main.svelte
new file mode 100644
index 0000000000..1d60aefa6f
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-dynamic/main.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-multiple/_config.js b/test/runtime/samples/inline-style-directive-multiple/_config.js
new file mode 100644
index 0000000000..725d03c4fe
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-multiple/_config.js
@@ -0,0 +1,27 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, component, target, window }) {
+ const p = target.querySelector('p');
+
+ let styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'red');
+
+ component.myColor = 'pink';
+ component.width = '100vh';
+ component.absolute = true;
+ component.bold = false;
+
+ styles = window.getComputedStyle(p);
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+ assert.equal(styles.color, 'pink');
+ assert.equal(styles.width, '100vh');
+ assert.equal(styles.fontWeight, '100');
+ assert.equal(styles.position, 'absolute');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-multiple/main.svelte b/test/runtime/samples/inline-style-directive-multiple/main.svelte
new file mode 100644
index 0000000000..06f03206d5
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-multiple/main.svelte
@@ -0,0 +1,13 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-shorthand/_config.js b/test/runtime/samples/inline-style-directive-shorthand/_config.js
new file mode 100644
index 0000000000..352d4a139c
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-shorthand/_config.js
@@ -0,0 +1,25 @@
+export default {
+ html: `
+
+
+ `,
+
+ test({ assert, component, target, window }) {
+ const [p1, p2] = target.querySelectorAll('p');
+
+ assert.equal(window.getComputedStyle(p1).color, 'red');
+ assert.equal(window.getComputedStyle(p2).color, 'red');
+
+ component.color = 'blue';
+ assert.htmlEqual(
+ target.innerHTML,
+ `
+
+
+ `
+ );
+
+ assert.equal(window.getComputedStyle(p1).color, 'blue');
+ assert.equal(window.getComputedStyle(p2).color, 'blue');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-shorthand/main.svelte b/test/runtime/samples/inline-style-directive-shorthand/main.svelte
new file mode 100644
index 0000000000..2b5f8e3db7
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-shorthand/main.svelte
@@ -0,0 +1,9 @@
+
+
+
+
+{#each [1] as _}
+
+{/each}
diff --git a/test/runtime/samples/inline-style-directive-spread-and-attr-empty/_config.js b/test/runtime/samples/inline-style-directive-spread-and-attr-empty/_config.js
new file mode 100644
index 0000000000..f3dcbc8823
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread-and-attr-empty/_config.js
@@ -0,0 +1,5 @@
+export default {
+ html: `
+
+ `
+};
diff --git a/test/runtime/samples/inline-style-directive-spread-and-attr-empty/main.svelte b/test/runtime/samples/inline-style-directive-spread-and-attr-empty/main.svelte
new file mode 100644
index 0000000000..c2d5cb4d3f
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread-and-attr-empty/main.svelte
@@ -0,0 +1,11 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-spread-and-attr/_config.js b/test/runtime/samples/inline-style-directive-spread-and-attr/_config.js
new file mode 100644
index 0000000000..b3660bd5ca
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread-and-attr/_config.js
@@ -0,0 +1,43 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, component, target, window }) {
+ const p = target.querySelector('p');
+
+ let styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'green');
+
+ component.color = null;
+ assert.htmlEqual(target.innerHTML, '
');
+ styles = window.getComputedStyle(p);
+ assert.equal(styles.color, '');
+
+ component.spread = { style: 'color: yellow; padding: 30px;' };
+
+ assert.htmlEqual(target.innerHTML, '
');
+ styles = window.getComputedStyle(p);
+ assert.equal(styles.color, '');
+ assert.equal(styles.padding, '30px');
+
+ component.spread = {};
+ component.style = 'color: blue; background-color: green;';
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+ styles = window.getComputedStyle(p);
+ assert.equal(styles.color, '');
+ assert.equal(styles.backgroundColor, 'green');
+
+ component.color = 'purple';
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+ styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'purple');
+ assert.equal(styles.backgroundColor, 'green');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-spread-and-attr/main.svelte b/test/runtime/samples/inline-style-directive-spread-and-attr/main.svelte
new file mode 100644
index 0000000000..a9696df675
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread-and-attr/main.svelte
@@ -0,0 +1,11 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-spread-dynamic/_config.js b/test/runtime/samples/inline-style-directive-spread-dynamic/_config.js
new file mode 100644
index 0000000000..152e4036a0
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread-dynamic/_config.js
@@ -0,0 +1,39 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, component, target, window }) {
+ const p = target.querySelector('p');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'blue');
+ assert.equal(styles.width, '65px');
+ assert.equal(p.id, 'my-id');
+
+ component.color = 'red';
+
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+
+ component.obj = { style: 'height: 72px;' };
+
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+
+ component.obj = { style: 'border-radius: 2px; color: orange' };
+
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+
+ component.obj = {};
+
+ assert.htmlEqual(target.innerHTML, '
');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-spread-dynamic/main.svelte b/test/runtime/samples/inline-style-directive-spread-dynamic/main.svelte
new file mode 100644
index 0000000000..a514e4856f
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread-dynamic/main.svelte
@@ -0,0 +1,5 @@
+
+
diff --git a/test/runtime/samples/inline-style-directive-spread/_config.js b/test/runtime/samples/inline-style-directive-spread/_config.js
new file mode 100644
index 0000000000..adb8a26544
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread/_config.js
@@ -0,0 +1,14 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, target, window }) {
+ const p = target.querySelector('p');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'blue');
+ assert.equal(styles.width, '65px');
+ assert.equal(p.id, 'my-id');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-spread/main.svelte b/test/runtime/samples/inline-style-directive-spread/main.svelte
new file mode 100644
index 0000000000..51291146c7
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-spread/main.svelte
@@ -0,0 +1 @@
+
diff --git a/test/runtime/samples/inline-style-directive-string-variable-kebab-case/_config.js b/test/runtime/samples/inline-style-directive-string-variable-kebab-case/_config.js
new file mode 100644
index 0000000000..3bd6d38ea5
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-string-variable-kebab-case/_config.js
@@ -0,0 +1,18 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, target, window }) {
+ const div = target.querySelector('div');
+ const styles = window.getComputedStyle(div);
+
+ assert.equal(styles['background-image'], 'url(https://raw.githubusercontent.com/sveltejs/branding/master/svelte-vertical.png)');
+ assert.equal(styles.getPropertyValue('--css-variable'), 'rgba(0, 0, 0, 1)');
+
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-string-variable-kebab-case/main.svelte b/test/runtime/samples/inline-style-directive-string-variable-kebab-case/main.svelte
new file mode 100644
index 0000000000..dbfba08d64
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-string-variable-kebab-case/main.svelte
@@ -0,0 +1,11 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-string-variable/_config.js b/test/runtime/samples/inline-style-directive-string-variable/_config.js
new file mode 100644
index 0000000000..411a42db8e
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-string-variable/_config.js
@@ -0,0 +1,23 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, component, target, window }) {
+ const p = target.querySelector('p');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'green');
+ assert.equal(styles.transform, 'translateX(45px)');
+ assert.equal(styles.border, '100px solid pink');
+
+ component.translate_x = '100%';
+ component.border_width = 20;
+ component.border_color = 'yellow';
+
+ assert.htmlEqual(
+ target.innerHTML,
+ '
'
+ );
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-string-variable/main.svelte b/test/runtime/samples/inline-style-directive-string-variable/main.svelte
new file mode 100644
index 0000000000..1f0b5019f4
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-string-variable/main.svelte
@@ -0,0 +1,7 @@
+
+
+
diff --git a/test/runtime/samples/inline-style-directive-string/_config.js b/test/runtime/samples/inline-style-directive-string/_config.js
new file mode 100644
index 0000000000..ec32e157e5
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-string/_config.js
@@ -0,0 +1,12 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, target, window }) {
+ const p = target.querySelector('p');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'red');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive-string/main.svelte b/test/runtime/samples/inline-style-directive-string/main.svelte
new file mode 100644
index 0000000000..4e7ce22b22
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive-string/main.svelte
@@ -0,0 +1 @@
+
diff --git a/test/runtime/samples/inline-style-directive/_config.js b/test/runtime/samples/inline-style-directive/_config.js
new file mode 100644
index 0000000000..ec32e157e5
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive/_config.js
@@ -0,0 +1,12 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, target, window }) {
+ const p = target.querySelector('p');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'red');
+ }
+};
diff --git a/test/runtime/samples/inline-style-directive/main.svelte b/test/runtime/samples/inline-style-directive/main.svelte
new file mode 100644
index 0000000000..1d60aefa6f
--- /dev/null
+++ b/test/runtime/samples/inline-style-directive/main.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/runtime/samples/inline-style/_config.js b/test/runtime/samples/inline-style/_config.js
new file mode 100644
index 0000000000..3e984d4c69
--- /dev/null
+++ b/test/runtime/samples/inline-style/_config.js
@@ -0,0 +1,12 @@
+export default {
+ html: `
+
+ `,
+
+ test({ assert, component, target, window }) {
+ const p = target.querySelector('div');
+
+ const styles = window.getComputedStyle(p);
+ assert.equal(styles.color, 'red');
+ }
+};
diff --git a/test/runtime/samples/inline-style/main.svelte b/test/runtime/samples/inline-style/main.svelte
new file mode 100644
index 0000000000..0f37a04c99
--- /dev/null
+++ b/test/runtime/samples/inline-style/main.svelte
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/test/runtime/samples/instrumentation-script-destructuring/_config.js b/test/runtime/samples/instrumentation-script-destructuring/_config.js
index 2b677a8b3a..b8ccf586ae 100644
--- a/test/runtime/samples/instrumentation-script-destructuring/_config.js
+++ b/test/runtime/samples/instrumentation-script-destructuring/_config.js
@@ -6,7 +6,7 @@ export default {
x: 0
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const buttons = target.querySelectorAll('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/instrumentation-script-loop-scope/_config.js b/test/runtime/samples/instrumentation-script-loop-scope/_config.js
index 069114c523..1b57ed1e72 100644
--- a/test/runtime/samples/instrumentation-script-loop-scope/_config.js
+++ b/test/runtime/samples/instrumentation-script-loop-scope/_config.js
@@ -4,7 +4,7 @@ export default {
x: 0
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const buttons = target.querySelectorAll('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/instrumentation-script-update/_config.js b/test/runtime/samples/instrumentation-script-update/_config.js
index 223904ad63..d662856a7b 100644
--- a/test/runtime/samples/instrumentation-script-update/_config.js
+++ b/test/runtime/samples/instrumentation-script-update/_config.js
@@ -4,7 +4,7 @@ export default {
x: 0
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const buttons = target.querySelectorAll('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/instrumentation-template-destructuring/_config.js b/test/runtime/samples/instrumentation-template-destructuring/_config.js
index 2b677a8b3a..b8ccf586ae 100644
--- a/test/runtime/samples/instrumentation-template-destructuring/_config.js
+++ b/test/runtime/samples/instrumentation-template-destructuring/_config.js
@@ -6,7 +6,7 @@ export default {
x: 0
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const buttons = target.querySelectorAll('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/instrumentation-template-loop-scope/_config.js b/test/runtime/samples/instrumentation-template-loop-scope/_config.js
index 069114c523..1b57ed1e72 100644
--- a/test/runtime/samples/instrumentation-template-loop-scope/_config.js
+++ b/test/runtime/samples/instrumentation-template-loop-scope/_config.js
@@ -4,7 +4,7 @@ export default {
x: 0
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const buttons = target.querySelectorAll('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/instrumentation-template-update/_config.js b/test/runtime/samples/instrumentation-template-update/_config.js
index 223904ad63..d662856a7b 100644
--- a/test/runtime/samples/instrumentation-template-update/_config.js
+++ b/test/runtime/samples/instrumentation-template-update/_config.js
@@ -4,7 +4,7 @@ export default {
x: 0
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const buttons = target.querySelectorAll('button');
const click = new window.MouseEvent('click');
diff --git a/test/runtime/samples/key-block-2/_config.js b/test/runtime/samples/key-block-2/_config.js
index 9bbf1f199f..9bb7f17140 100644
--- a/test/runtime/samples/key-block-2/_config.js
+++ b/test/runtime/samples/key-block-2/_config.js
@@ -1,7 +1,7 @@
// with reactive content beside `key`
export default {
html: '00
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
const div = target.querySelector('div');
component.reactive = 2;
assert.htmlEqual(target.innerHTML, '02
');
diff --git a/test/runtime/samples/key-block-3/_config.js b/test/runtime/samples/key-block-3/_config.js
index 17b6146827..6a41869f9b 100644
--- a/test/runtime/samples/key-block-3/_config.js
+++ b/test/runtime/samples/key-block-3/_config.js
@@ -1,7 +1,7 @@
// key is not used in the template
export default {
html: '
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
const div = target.querySelector('div');
component.value = 5;
diff --git a/test/runtime/samples/key-block-array-immutable/_config.js b/test/runtime/samples/key-block-array-immutable/_config.js
index b1ffd6cd15..02823ec98a 100644
--- a/test/runtime/samples/key-block-array-immutable/_config.js
+++ b/test/runtime/samples/key-block-array-immutable/_config.js
@@ -1,6 +1,6 @@
export default {
html: '1
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
let div = target.querySelector('div');
await component.append(2);
assert.htmlEqual(target.innerHTML, '1
');
diff --git a/test/runtime/samples/key-block-array/_config.js b/test/runtime/samples/key-block-array/_config.js
index 374175177d..6c22a03ed4 100644
--- a/test/runtime/samples/key-block-array/_config.js
+++ b/test/runtime/samples/key-block-array/_config.js
@@ -1,6 +1,6 @@
export default {
html: '1
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
let div = target.querySelector('div');
await component.append(2);
assert.htmlEqual(target.innerHTML, '1,2
');
diff --git a/test/runtime/samples/key-block-expression-2/_config.js b/test/runtime/samples/key-block-expression-2/_config.js
index bab23d2a84..602a8364ee 100644
--- a/test/runtime/samples/key-block-expression-2/_config.js
+++ b/test/runtime/samples/key-block-expression-2/_config.js
@@ -1,6 +1,6 @@
export default {
html: '3
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
const div = target.querySelector('div');
await component.mutate();
diff --git a/test/runtime/samples/key-block-expression/_config.js b/test/runtime/samples/key-block-expression/_config.js
index c04d55bd29..85de9f8e88 100644
--- a/test/runtime/samples/key-block-expression/_config.js
+++ b/test/runtime/samples/key-block-expression/_config.js
@@ -1,6 +1,6 @@
export default {
html: '000
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
let div = target.querySelector('div');
component.value = 2;
assert.htmlEqual(target.innerHTML, '200
');
diff --git a/test/runtime/samples/key-block-static-if/_config.js b/test/runtime/samples/key-block-static-if/_config.js
index 2926ad7c24..2dfca9d8b6 100644
--- a/test/runtime/samples/key-block-static-if/_config.js
+++ b/test/runtime/samples/key-block-static-if/_config.js
@@ -5,7 +5,7 @@ export default {
Click
`,
- async test({ assert, component, target, window }) {
+ async test({ assert, target, window }) {
const button = target.querySelector('button');
await button.dispatchEvent(new window.Event('click'));
diff --git a/test/runtime/samples/key-block-static/_config.js b/test/runtime/samples/key-block-static/_config.js
index 8323336615..8c327bcefd 100644
--- a/test/runtime/samples/key-block-static/_config.js
+++ b/test/runtime/samples/key-block-static/_config.js
@@ -1,6 +1,6 @@
export default {
html: '00
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
const div = target.querySelector('div');
component.anotherValue = 2;
assert.htmlEqual(target.innerHTML, '02
');
diff --git a/test/runtime/samples/key-block-transition/_config.js b/test/runtime/samples/key-block-transition/_config.js
index 53de6b333c..d4bef20311 100644
--- a/test/runtime/samples/key-block-transition/_config.js
+++ b/test/runtime/samples/key-block-transition/_config.js
@@ -1,8 +1,8 @@
export default {
html: '0
',
- async test({ assert, component, target, window, raf }) {
+ async test({ assert, component, target, raf }) {
component.value = 2;
-
+
const [div1, div2] = target.querySelectorAll('div');
assert.htmlEqual(div1.outerHTML, '0
');
diff --git a/test/runtime/samples/key-block/_config.js b/test/runtime/samples/key-block/_config.js
index b25ca901f8..119c50e21d 100644
--- a/test/runtime/samples/key-block/_config.js
+++ b/test/runtime/samples/key-block/_config.js
@@ -1,6 +1,6 @@
export default {
html: '0
0
',
- async test({ assert, component, target, window }) {
+ async test({ assert, component, target }) {
let [div1, div2] = target.querySelectorAll('div');
component.value = 5;
@@ -8,7 +8,7 @@ export default {
assert.notStrictEqual(div1, target.querySelectorAll('div')[0]);
assert.strictEqual(div2, target.querySelectorAll('div')[1]);
[div1, div2] = target.querySelectorAll('div');
-
+
component.reactive = 10;
assert.htmlEqual(target.innerHTML, '5
10
');
assert.strictEqual(div1, target.querySelectorAll('div')[0]);
diff --git a/test/runtime/samples/lifecycle-render-order-for-children/_config.js b/test/runtime/samples/lifecycle-render-order-for-children/_config.js
index b85c91d07f..32bc35d49c 100644
--- a/test/runtime/samples/lifecycle-render-order-for-children/_config.js
+++ b/test/runtime/samples/lifecycle-render-order-for-children/_config.js
@@ -5,7 +5,7 @@ export default {
before_test() {
order.length = 0;
},
- test({ assert, component, target, compileOptions }) {
+ test({ assert, compileOptions }) {
if (compileOptions.hydratable) {
assert.deepEqual(order, [
'0: beforeUpdate',
diff --git a/test/runtime/samples/loop-protect-async-opt-out/_config.js b/test/runtime/samples/loop-protect-async-opt-out/_config.js
new file mode 100644
index 0000000000..b1855c83eb
--- /dev/null
+++ b/test/runtime/samples/loop-protect-async-opt-out/_config.js
@@ -0,0 +1,9 @@
+export default {
+ compileOptions: {
+ dev: true,
+ loopGuardTimeout: 1
+ },
+ async test({ component }) {
+ await component.run_async_function();
+ }
+};
diff --git a/test/runtime/samples/loop-protect-async-opt-out/main.svelte b/test/runtime/samples/loop-protect-async-opt-out/main.svelte
new file mode 100644
index 0000000000..bc711ac5a3
--- /dev/null
+++ b/test/runtime/samples/loop-protect-async-opt-out/main.svelte
@@ -0,0 +1,12 @@
+
diff --git a/test/runtime/samples/loop-protect-generator-opt-out/_config.js b/test/runtime/samples/loop-protect-generator-opt-out/_config.js
index 0fe83a36db..2680ecfdfb 100644
--- a/test/runtime/samples/loop-protect-generator-opt-out/_config.js
+++ b/test/runtime/samples/loop-protect-generator-opt-out/_config.js
@@ -2,5 +2,8 @@ export default {
compileOptions: {
dev: true,
loopGuardTimeout: 1
+ },
+ async test({ component }) {
+ await component.run_generator();
}
};
diff --git a/test/runtime/samples/loop-protect-generator-opt-out/main.svelte b/test/runtime/samples/loop-protect-generator-opt-out/main.svelte
index a7aa790681..514089435d 100644
--- a/test/runtime/samples/loop-protect-generator-opt-out/main.svelte
+++ b/test/runtime/samples/loop-protect-generator-opt-out/main.svelte
@@ -1,10 +1,12 @@
+
+{foo}
+
+
diff --git a/test/sourcemaps/samples/no-sourcemap/test.js b/test/sourcemaps/samples/no-sourcemap/test.js
new file mode 100644
index 0000000000..127459a54e
--- /dev/null
+++ b/test/sourcemaps/samples/no-sourcemap/test.js
@@ -0,0 +1,4 @@
+export function test({ assert, js, css }) {
+ assert.equal(js.map, null);
+ assert.equal(css.map, null);
+}
diff --git a/test/sourcemaps/samples/only-css-sourcemap/_config.js b/test/sourcemaps/samples/only-css-sourcemap/_config.js
new file mode 100644
index 0000000000..767e10a4b9
--- /dev/null
+++ b/test/sourcemaps/samples/only-css-sourcemap/_config.js
@@ -0,0 +1,5 @@
+export default {
+ compile_options: {
+ enableSourcemap: { css: true }
+ }
+};
diff --git a/test/sourcemaps/samples/only-css-sourcemap/input.svelte b/test/sourcemaps/samples/only-css-sourcemap/input.svelte
new file mode 100644
index 0000000000..6d39eaad0e
--- /dev/null
+++ b/test/sourcemaps/samples/only-css-sourcemap/input.svelte
@@ -0,0 +1,11 @@
+
+
+{foo}
+
+
diff --git a/test/sourcemaps/samples/only-css-sourcemap/test.js b/test/sourcemaps/samples/only-css-sourcemap/test.js
new file mode 100644
index 0000000000..a7ac6a9b0b
--- /dev/null
+++ b/test/sourcemaps/samples/only-css-sourcemap/test.js
@@ -0,0 +1,4 @@
+export function test({ assert, js, css }) {
+ assert.equal(js.map, null);
+ assert.notEqual(css.map, null);
+}
diff --git a/test/sourcemaps/samples/only-js-sourcemap/_config.js b/test/sourcemaps/samples/only-js-sourcemap/_config.js
new file mode 100644
index 0000000000..0b3b7987f1
--- /dev/null
+++ b/test/sourcemaps/samples/only-js-sourcemap/_config.js
@@ -0,0 +1,5 @@
+export default {
+ compile_options: {
+ enableSourcemap: { js: true }
+ }
+};
diff --git a/test/sourcemaps/samples/only-js-sourcemap/input.svelte b/test/sourcemaps/samples/only-js-sourcemap/input.svelte
new file mode 100644
index 0000000000..6d39eaad0e
--- /dev/null
+++ b/test/sourcemaps/samples/only-js-sourcemap/input.svelte
@@ -0,0 +1,11 @@
+
+
+{foo}
+
+
diff --git a/test/sourcemaps/samples/only-js-sourcemap/test.js b/test/sourcemaps/samples/only-js-sourcemap/test.js
new file mode 100644
index 0000000000..b150653c3d
--- /dev/null
+++ b/test/sourcemaps/samples/only-js-sourcemap/test.js
@@ -0,0 +1,4 @@
+export function test({ assert, js, css }) {
+ assert.notEqual(js.map, null);
+ assert.equal(css.map, null);
+}
diff --git a/test/utils/index.ts b/test/utils/index.ts
new file mode 100644
index 0000000000..a8aed9387a
--- /dev/null
+++ b/test/utils/index.ts
@@ -0,0 +1,16 @@
+import * as assert from 'assert';
+import { trim_start, trim_end } from '../../src/compiler/utils/trim';
+
+describe('utils', () => {
+ describe('trim', () => {
+ it('trim_start', () => {
+ const value = trim_start(' \r\n\t svelte content \r\n\t ');
+ assert.equal(value, 'svelte content \r\n\t ');
+ });
+
+ it('trim_end', () => {
+ const value = trim_end(' \r\n\t svelte content \r\n\t ');
+ assert.equal(value, ' \r\n\t svelte content');
+ });
+ });
+});
diff --git a/test/validator/samples/a11y-no-redundant-roles/input.svelte b/test/validator/samples/a11y-no-redundant-roles/input.svelte
new file mode 100644
index 0000000000..05525effb6
--- /dev/null
+++ b/test/validator/samples/a11y-no-redundant-roles/input.svelte
@@ -0,0 +1,44 @@
+a link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
heading
+
heading
+
heading
+
heading
+
heading
+
heading
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/validator/samples/a11y-no-redundant-roles/warnings.json b/test/validator/samples/a11y-no-redundant-roles/warnings.json
new file mode 100644
index 0000000000..8aa3520b32
--- /dev/null
+++ b/test/validator/samples/a11y-no-redundant-roles/warnings.json
@@ -0,0 +1,632 @@
+[
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 23,
+ "column": 23,
+ "line": 1
+ },
+ "message": "A11y: Redundant role 'link'",
+ "pos": 12,
+ "start": {
+ "character": 12,
+ "column": 12,
+ "line": 1
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 58,
+ "column": 23,
+ "line": 2
+ },
+ "message": "A11y: Redundant role 'article'",
+ "pos": 44,
+ "start": {
+ "character": 44,
+ "column": 9,
+ "line": 2
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 89,
+ "column": 27,
+ "line": 3
+ },
+ "message": "A11y: Redundant role 'complementary'",
+ "pos": 69,
+ "start": {
+ "character": 69,
+ "column": 7,
+ "line": 3
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 114,
+ "column": 21,
+ "line": 4
+ },
+ "message": "A11y: Redundant role 'document'",
+ "pos": 99,
+ "start": {
+ "character": 99,
+ "column": 6,
+ "line": 4
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 139,
+ "column": 21,
+ "line": 5
+ },
+ "message": "A11y: Redundant role 'button'",
+ "pos": 126,
+ "start": {
+ "character": 126,
+ "column": 8,
+ "line": 5
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 167,
+ "column": 24,
+ "line": 6
+ },
+ "message": "A11y: Redundant role 'listbox'",
+ "pos": 153,
+ "start": {
+ "character": 153,
+ "column": 10,
+ "line": 6
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 192,
+ "column": 21,
+ "line": 7
+ },
+ "message": "A11y: Redundant role 'definition'",
+ "pos": 175,
+ "start": {
+ "character": 175,
+ "column": 4,
+ "line": 7
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 212,
+ "column": 16,
+ "line": 8
+ },
+ "message": "A11y: Redundant role 'term'",
+ "pos": 201,
+ "start": {
+ "character": 201,
+ "column": 5,
+ "line": 8
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 237,
+ "column": 21,
+ "line": 9
+ },
+ "message": "A11y: Redundant role 'group'",
+ "pos": 225,
+ "start": {
+ "character": 225,
+ "column": 9,
+ "line": 9
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 262,
+ "column": 21,
+ "line": 10
+ },
+ "message": "A11y: Redundant role 'dialog'",
+ "pos": 249,
+ "start": {
+ "character": 249,
+ "column": 8,
+ "line": 10
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 281,
+ "column": 15,
+ "line": 11
+ },
+ "message": "A11y: Redundant role 'term'",
+ "pos": 270,
+ "start": {
+ "character": 270,
+ "column": 4,
+ "line": 11
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 307,
+ "column": 22,
+ "line": 12
+ },
+ "message": "A11y: Redundant role 'group'",
+ "pos": 295,
+ "start": {
+ "character": 295,
+ "column": 10,
+ "line": 12
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 332,
+ "column": 21,
+ "line": 13
+ },
+ "message": "A11y: Redundant role 'figure'",
+ "pos": 319,
+ "start": {
+ "character": 319,
+ "column": 8,
+ "line": 13
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 353,
+ "column": 17,
+ "line": 14
+ },
+ "message": "A11y: Redundant role 'form'",
+ "pos": 342,
+ "start": {
+ "character": 342,
+ "column": 6,
+ "line": 14
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 383,
+ "column": 18,
+ "line": 15
+ },
+ "message": "A11y: Redundant role 'heading'",
+ "pos": 369,
+ "start": {
+ "character": 369,
+ "column": 4,
+ "line": 15
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 415,
+ "column": 18,
+ "line": 16
+ },
+ "message": "A11y: Redundant role 'heading'",
+ "pos": 401,
+ "start": {
+ "character": 401,
+ "column": 4,
+ "line": 16
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 447,
+ "column": 18,
+ "line": 17
+ },
+ "message": "A11y: Redundant role 'heading'",
+ "pos": 433,
+ "start": {
+ "character": 433,
+ "column": 4,
+ "line": 17
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 479,
+ "column": 18,
+ "line": 18
+ },
+ "message": "A11y: Redundant role 'heading'",
+ "pos": 465,
+ "start": {
+ "character": 465,
+ "column": 4,
+ "line": 18
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 511,
+ "column": 18,
+ "line": 19
+ },
+ "message": "A11y: Redundant role 'heading'",
+ "pos": 497,
+ "start": {
+ "character": 497,
+ "column": 4,
+ "line": 19
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 543,
+ "column": 18,
+ "line": 20
+ },
+ "message": "A11y: Redundant role 'heading'",
+ "pos": 529,
+ "start": {
+ "character": 529,
+ "column": 4,
+ "line": 20
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 577,
+ "column": 20,
+ "line": 21
+ },
+ "message": "A11y: Redundant role 'separator'",
+ "pos": 561,
+ "start": {
+ "character": 561,
+ "column": 4,
+ "line": 21
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 600,
+ "column": 19,
+ "line": 22
+ },
+ "message": "A11y: Redundant role 'listitem'",
+ "pos": 585,
+ "start": {
+ "character": 585,
+ "column": 4,
+ "line": 22
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 621,
+ "column": 17,
+ "line": 23
+ },
+ "message": "A11y: Redundant role 'link'",
+ "pos": 610,
+ "start": {
+ "character": 610,
+ "column": 6,
+ "line": 23
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 642,
+ "column": 17,
+ "line": 24
+ },
+ "message": "A11y: Redundant role 'main'",
+ "pos": 631,
+ "start": {
+ "character": 631,
+ "column": 6,
+ "line": 24
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 668,
+ "column": 17,
+ "line": 25
+ },
+ "message": "A11y: Redundant role 'list'",
+ "pos": 657,
+ "start": {
+ "character": 657,
+ "column": 6,
+ "line": 25
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 694,
+ "column": 22,
+ "line": 26
+ },
+ "message": "A11y: Redundant role 'navigation'",
+ "pos": 677,
+ "start": {
+ "character": 677,
+ "column": 5,
+ "line": 26
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 713,
+ "column": 15,
+ "line": 27
+ },
+ "message": "A11y: Redundant role 'list'",
+ "pos": 702,
+ "start": {
+ "character": 702,
+ "column": 4,
+ "line": 27
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 739,
+ "column": 22,
+ "line": 28
+ },
+ "message": "A11y: Redundant role 'group'",
+ "pos": 727,
+ "start": {
+ "character": 727,
+ "column": 10,
+ "line": 28
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 764,
+ "column": 21,
+ "line": 29
+ },
+ "message": "A11y: Redundant role 'option'",
+ "pos": 751,
+ "start": {
+ "character": 751,
+ "column": 8,
+ "line": 29
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 789,
+ "column": 21,
+ "line": 30
+ },
+ "message": "A11y: Redundant role 'status'",
+ "pos": 776,
+ "start": {
+ "character": 776,
+ "column": 8,
+ "line": 30
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 821,
+ "column": 28,
+ "line": 31
+ },
+ "message": "A11y: Redundant role 'progressbar'",
+ "pos": 803,
+ "start": {
+ "character": 803,
+ "column": 10,
+ "line": 31
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 847,
+ "column": 22,
+ "line": 32
+ },
+ "message": "A11y: Redundant role 'region'",
+ "pos": 834,
+ "start": {
+ "character": 834,
+ "column": 9,
+ "line": 32
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 873,
+ "column": 22,
+ "line": 33
+ },
+ "message": "A11y: Redundant role 'button'",
+ "pos": 860,
+ "start": {
+ "character": 860,
+ "column": 9,
+ "line": 33
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 896,
+ "column": 19,
+ "line": 34
+ },
+ "message": "A11y: Redundant role 'table'",
+ "pos": 884,
+ "start": {
+ "character": 884,
+ "column": 7,
+ "line": 34
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 922,
+ "column": 22,
+ "line": 35
+ },
+ "message": "A11y: Redundant role 'rowgroup'",
+ "pos": 907,
+ "start": {
+ "character": 907,
+ "column": 7,
+ "line": 35
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 950,
+ "column": 24,
+ "line": 36
+ },
+ "message": "A11y: Redundant role 'textbox'",
+ "pos": 936,
+ "start": {
+ "character": 936,
+ "column": 10,
+ "line": 36
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 976,
+ "column": 22,
+ "line": 37
+ },
+ "message": "A11y: Redundant role 'rowgroup'",
+ "pos": 961,
+ "start": {
+ "character": 961,
+ "column": 7,
+ "line": 37
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 1002,
+ "column": 22,
+ "line": 38
+ },
+ "message": "A11y: Redundant role 'rowgroup'",
+ "pos": 987,
+ "start": {
+ "character": 987,
+ "column": 7,
+ "line": 38
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 1020,
+ "column": 14,
+ "line": 39
+ },
+ "message": "A11y: Redundant role 'row'",
+ "pos": 1010,
+ "start": {
+ "character": 1010,
+ "column": 4,
+ "line": 39
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 1039,
+ "column": 15,
+ "line": 40
+ },
+ "message": "A11y: Redundant role 'list'",
+ "pos": 1028,
+ "start": {
+ "character": 1028,
+ "column": 4,
+ "line": 40
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 1125,
+ "column": 21,
+ "line": 43
+ },
+ "message": "A11y: Redundant role 'banner'",
+ "pos": 1112,
+ "start": {
+ "character": 1112,
+ "column": 8,
+ "line": 43
+ }
+ },
+ {
+ "code": "a11y-no-redundant-roles",
+ "end": {
+ "character": 1162,
+ "column": 26,
+ "line": 44
+ },
+ "message": "A11y: Redundant role 'contentinfo'",
+ "pos": 1144,
+ "start": {
+ "character": 1144,
+ "column": 8,
+ "line": 44
+ }
+ }
+]
\ No newline at end of file
diff --git a/test/validator/samples/animation-each-with-const/errors.json b/test/validator/samples/animation-each-with-const/errors.json
new file mode 100644
index 0000000000..0637a088a0
--- /dev/null
+++ b/test/validator/samples/animation-each-with-const/errors.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/validator/samples/animation-each-with-const/input.svelte b/test/validator/samples/animation-each-with-const/input.svelte
new file mode 100644
index 0000000000..1e236de76f
--- /dev/null
+++ b/test/validator/samples/animation-each-with-const/input.svelte
@@ -0,0 +1,10 @@
+
+
+
+ {#each [] as n (n)}
+ {@const a = n}
+
+ {/each}
+
diff --git a/test/validator/samples/animation-each-with-whitespace/errors.json b/test/validator/samples/animation-each-with-whitespace/errors.json
new file mode 100644
index 0000000000..0637a088a0
--- /dev/null
+++ b/test/validator/samples/animation-each-with-whitespace/errors.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/validator/samples/animation-each-with-whitespace/input.svelte b/test/validator/samples/animation-each-with-whitespace/input.svelte
new file mode 100644
index 0000000000..3e063716ab
--- /dev/null
+++ b/test/validator/samples/animation-each-with-whitespace/input.svelte
@@ -0,0 +1,7 @@
+
+
+
+ {#each [] as n (n)}
{/each}
+
diff --git a/test/validator/samples/component-invalid-style-directive/errors.json b/test/validator/samples/component-invalid-style-directive/errors.json
new file mode 100644
index 0000000000..087f0db651
--- /dev/null
+++ b/test/validator/samples/component-invalid-style-directive/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-component-style-directive",
+ "message": "Style directives cannot be used on components",
+ "start": { "line": 7, "column": 19, "character": 97 },
+ "end": { "line": 7, "column": 36, "character": 114 },
+ "pos": 97
+ }
+]
diff --git a/test/validator/samples/component-invalid-style-directive/input.svelte b/test/validator/samples/component-invalid-style-directive/input.svelte
new file mode 100644
index 0000000000..975621088f
--- /dev/null
+++ b/test/validator/samples/component-invalid-style-directive/input.svelte
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-conflict-1/errors.json b/test/validator/samples/const-tag-conflict-1/errors.json
new file mode 100644
index 0000000000..59c72eccaf
--- /dev/null
+++ b/test/validator/samples/const-tag-conflict-1/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-const-declaration",
+ "message": "'a' has already been declared",
+ "start": { "line": 7, "column": 2, "character": 84 },
+ "end": { "line": 7, "column": 19, "character": 101 },
+ "pos": 84
+ }
+]
diff --git a/test/validator/samples/const-tag-conflict-1/input.svelte b/test/validator/samples/const-tag-conflict-1/input.svelte
new file mode 100644
index 0000000000..6633eeacdf
--- /dev/null
+++ b/test/validator/samples/const-tag-conflict-1/input.svelte
@@ -0,0 +1,8 @@
+
+
+{#each array as item}
+ {@const a = item}
+ {@const a = item}
+{/each}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-conflict-2/errors.json b/test/validator/samples/const-tag-conflict-2/errors.json
new file mode 100644
index 0000000000..11e2535091
--- /dev/null
+++ b/test/validator/samples/const-tag-conflict-2/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-const-declaration",
+ "message": "'item' has already been declared",
+ "start": { "line": 6, "column": 2, "character": 64 },
+ "end": { "line": 6, "column": 21, "character": 83 },
+ "pos": 64
+ }
+]
diff --git a/test/validator/samples/const-tag-conflict-2/input.svelte b/test/validator/samples/const-tag-conflict-2/input.svelte
new file mode 100644
index 0000000000..2be7207691
--- /dev/null
+++ b/test/validator/samples/const-tag-conflict-2/input.svelte
@@ -0,0 +1,7 @@
+
+
+{#each array as item}
+ {@const item = 123}
+{/each}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-cyclical/errors.json b/test/validator/samples/const-tag-cyclical/errors.json
new file mode 100644
index 0000000000..1436747798
--- /dev/null
+++ b/test/validator/samples/const-tag-cyclical/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "cyclical-const-tags",
+ "message": "Cyclical dependency detected: b → c → b",
+ "start": { "line": 6, "column": 2, "character": 61 },
+ "end": { "line": 6, "column": 20, "character": 79 },
+ "pos": 61
+ }
+]
diff --git a/test/validator/samples/const-tag-cyclical/input.svelte b/test/validator/samples/const-tag-cyclical/input.svelte
new file mode 100644
index 0000000000..2f694be808
--- /dev/null
+++ b/test/validator/samples/const-tag-cyclical/input.svelte
@@ -0,0 +1,8 @@
+
+
+{#each array as a}
+ {@const b = a + c}
+ {@const c = b + a}
+{/each}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-out-of-scope/input.svelte b/test/validator/samples/const-tag-out-of-scope/input.svelte
new file mode 100644
index 0000000000..d1c2723e22
--- /dev/null
+++ b/test/validator/samples/const-tag-out-of-scope/input.svelte
@@ -0,0 +1,10 @@
+
+
+{#each array as a}
+ {@const b = a + 1}
+
+{/each}
+
+{b}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-out-of-scope/warnings.json b/test/validator/samples/const-tag-out-of-scope/warnings.json
new file mode 100644
index 0000000000..c85b417fe4
--- /dev/null
+++ b/test/validator/samples/const-tag-out-of-scope/warnings.json
@@ -0,0 +1,17 @@
+[
+ {
+ "code": "missing-declaration",
+ "message": "'b' is not defined",
+ "pos": 100,
+ "start": {
+ "character": 100,
+ "column": 1,
+ "line": 10
+ },
+ "end": {
+ "character": 101,
+ "column": 2,
+ "line": 10
+ }
+ }
+]
diff --git a/test/validator/samples/const-tag-placement-1/errors.json b/test/validator/samples/const-tag-placement-1/errors.json
new file mode 100644
index 0000000000..52de84e2be
--- /dev/null
+++ b/test/validator/samples/const-tag-placement-1/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-const-placement",
+ "message": "{@const} must be the immediate child of {#each}, {:then}, {:catch},
or ",
+ "start": { "line": 5, "column": 0, "character": 36 },
+ "end": { "line": 5, "column": 18, "character": 54 },
+ "pos": 36
+ }
+]
diff --git a/test/validator/samples/const-tag-placement-1/input.svelte b/test/validator/samples/const-tag-placement-1/input.svelte
new file mode 100644
index 0000000000..14ea3085e7
--- /dev/null
+++ b/test/validator/samples/const-tag-placement-1/input.svelte
@@ -0,0 +1,5 @@
+
+
+{@const b = a + 1}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-placement-2/errors.json b/test/validator/samples/const-tag-placement-2/errors.json
new file mode 100644
index 0000000000..005b3ff8b7
--- /dev/null
+++ b/test/validator/samples/const-tag-placement-2/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-const-placement",
+ "message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, or ",
+ "start": { "line": 6, "column": 2, "character": 46 },
+ "end": { "line": 6, "column": 20, "character": 64 },
+ "pos": 46
+ }
+]
diff --git a/test/validator/samples/const-tag-placement-2/input.svelte b/test/validator/samples/const-tag-placement-2/input.svelte
new file mode 100644
index 0000000000..a843f9d58f
--- /dev/null
+++ b/test/validator/samples/const-tag-placement-2/input.svelte
@@ -0,0 +1,7 @@
+
+
+{#if a}
+ {@const b = a + 1}
+{/if}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-placement-3/errors.json b/test/validator/samples/const-tag-placement-3/errors.json
new file mode 100644
index 0000000000..cc0ba4d74d
--- /dev/null
+++ b/test/validator/samples/const-tag-placement-3/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-const-placement",
+ "message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, or ",
+ "start": { "line": 7, "column": 4, "character": 63 },
+ "end": { "line": 7, "column": 18, "character": 77 },
+ "pos": 63
+ }
+]
diff --git a/test/validator/samples/const-tag-placement-3/input.svelte b/test/validator/samples/const-tag-placement-3/input.svelte
new file mode 100644
index 0000000000..2519482a98
--- /dev/null
+++ b/test/validator/samples/const-tag-placement-3/input.svelte
@@ -0,0 +1,9 @@
+
+
+{#each a as i}
+
+ {@const b = i}
+
+{/each}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-readonly-1/errors.json b/test/validator/samples/const-tag-readonly-1/errors.json
new file mode 100644
index 0000000000..ed60c529fd
--- /dev/null
+++ b/test/validator/samples/const-tag-readonly-1/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-const-update",
+ "message": "'b' is declared using {@const ...} and is read-only",
+ "start": { "line": 7, "column": 26, "character": 106 },
+ "end": { "line": 7, "column": 30, "character": 110 },
+ "pos": 106
+ }
+]
diff --git a/test/validator/samples/const-tag-readonly-1/input.svelte b/test/validator/samples/const-tag-readonly-1/input.svelte
new file mode 100644
index 0000000000..b5a37c8608
--- /dev/null
+++ b/test/validator/samples/const-tag-readonly-1/input.svelte
@@ -0,0 +1,8 @@
+
+
+{#each array as a}
+ {@const b = a + 1}
+ b ++} />
+{/each}
\ No newline at end of file
diff --git a/test/validator/samples/const-tag-readonly-2/errors.json b/test/validator/samples/const-tag-readonly-2/errors.json
new file mode 100644
index 0000000000..746a21e86a
--- /dev/null
+++ b/test/validator/samples/const-tag-readonly-2/errors.json
@@ -0,0 +1,9 @@
+[
+ {
+ "code": "invalid-binding",
+ "message": "Cannot bind to a variable declared with {@const ...}",
+ "start": { "line": 7, "column": 9, "character": 89 },
+ "end": { "line": 7, "column": 23, "character": 103 },
+ "pos": 89
+ }
+]
diff --git a/test/validator/samples/const-tag-readonly-2/input.svelte b/test/validator/samples/const-tag-readonly-2/input.svelte
new file mode 100644
index 0000000000..466aac9804
--- /dev/null
+++ b/test/validator/samples/const-tag-readonly-2/input.svelte
@@ -0,0 +1,8 @@
+
+
+{#each array as a}
+ {@const b = a + 1}
+
+{/each}
\ No newline at end of file
diff --git a/test/validator/samples/illegal-variable-declaration/errors.json b/test/validator/samples/illegal-variable-declaration/errors.json
new file mode 100644
index 0000000000..e3d273138e
--- /dev/null
+++ b/test/validator/samples/illegal-variable-declaration/errors.json
@@ -0,0 +1,17 @@
+[
+ {
+ "code": "illegal-variable-declaration",
+ "message": "Cannot declare same variable name which is imported inside
+
+
+
+{FOO}
diff --git a/test/validator/samples/unreferenced-variables-each/input.svelte b/test/validator/samples/unreferenced-variables-each/input.svelte
new file mode 100644
index 0000000000..a96f9189a2
--- /dev/null
+++ b/test/validator/samples/unreferenced-variables-each/input.svelte
@@ -0,0 +1,20 @@
+
+
+
+
+ {#each array as default_value_5}
+ {#each array as { a = default_value_1, b: { b = [default_value_2, default_value_3], c: [c = default_value_4] }, d = default_value_5, e = default_value_6 }}
+ {a}{b}{c}{d}{e}
+ {/each}
+ {/each}
+
+
diff --git a/test/validator/samples/unreferenced-variables-each/warnings.json b/test/validator/samples/unreferenced-variables-each/warnings.json
new file mode 100644
index 0000000000..fa89da0e68
--- /dev/null
+++ b/test/validator/samples/unreferenced-variables-each/warnings.json
@@ -0,0 +1,32 @@
+[
+ {
+ "code": "unused-export-let",
+ "message": "Component_1 has unused export property 'default_value_5'. If it is for external reference only, please consider using `export const default_value_5`",
+ "pos": 172,
+ "start": {
+ "character": 172,
+ "column": 12,
+ "line": 8
+ },
+ "end": {
+ "character": 187,
+ "column": 27,
+ "line": 8
+ }
+ },
+ {
+ "code": "unused-export-let",
+ "message": "Component_1 has unused export property 'default_value_6'. If it is for external reference only, please consider using `export const default_value_6`",
+ "pos": 201,
+ "start": {
+ "character": 201,
+ "column": 12,
+ "line": 9
+ },
+ "end": {
+ "character": 216,
+ "column": 27,
+ "line": 9
+ }
+ }
+]