diff --git a/.eslintrc.json b/.eslintrc.json index c5da7150a7..7e8c26382a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -33,9 +33,8 @@ "plugin:import/errors", "plugin:import/warnings" ], - "plugins": ["svelte3"], "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 9, "sourceType": "module" }, "settings": { diff --git a/.gitignore b/.gitignore index a999190ceb..3a7d2ce532 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .nyc_output node_modules *.map +/src/compile/internal-exports.ts /cli/ /compiler.js /index.js diff --git a/index.mjs b/index.mjs index 44031c35c8..ee5b575171 100644 --- a/index.mjs +++ b/index.mjs @@ -3,5 +3,8 @@ export { onDestroy, beforeUpdate, afterUpdate, + setContext, + getContext, + tick, createEventDispatcher } from './internal'; diff --git a/package-lock.json b/package-lock.json index ce46cbb8b8..86ad4a2ec3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha13", + "version": "3.0.0-beta.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -13,62 +13,6 @@ "@babel/highlight": "^7.0.0" } }, - "@babel/generator": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", - "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51", - "jsesc": "^2.5.1", - "lodash": "^4.17.5", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", - "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", - "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", - "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", - "dev": true, - "requires": { - "@babel/types": "7.0.0-beta.51" - } - }, "@babel/highlight": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", @@ -80,124 +24,24 @@ "js-tokens": "^4.0.0" } }, - "@babel/parser": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", - "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", + "@bcoe/v8-coverage": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.1.0.tgz", + "integrity": "sha512-UdVB1rSL7H8TS8674fH02p5lRbhfIqQ18YKLxLKEnHFztHUH6bhMqjebMxgSTmWVrs5raS5JSLJIKKHFT4WfPg==", "dev": true }, - "@babel/template": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", - "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "lodash": "^4.17.5" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", - "dev": true, - "requires": { - "@babel/highlight": "7.0.0-beta.51" - } - }, - "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - } - } - }, - "@babel/traverse": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", - "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", - "dev": true, - "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "@babel/generator": "7.0.0-beta.51", - "@babel/helper-function-name": "7.0.0-beta.51", - "@babel/helper-split-export-declaration": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.17.5" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", - "dev": true, - "requires": { - "@babel/highlight": "7.0.0-beta.51" - } - }, - "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - } - }, - "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" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", - "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.5", - "to-fast-properties": "^2.0.0" - } - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "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/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -205,9 +49,9 @@ "dev": true }, "@types/node": { - "version": "10.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.12.tgz", - "integrity": "sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A==", + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", "dev": true }, "abab": { @@ -217,19 +61,16 @@ "dev": true }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz", + "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==", "dev": true }, "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true }, "acorn-globals": { "version": "4.3.0", @@ -239,14 +80,6 @@ "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" - }, - "dependencies": { - "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", - "dev": true - } } }, "acorn-jsx": { @@ -284,9 +117,9 @@ } }, "ajv": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", - "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", + "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -297,7 +130,7 @@ }, "ansi-escapes": { "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -316,6 +149,12 @@ "color-convert": "^1.9.0" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, "anymatch": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", @@ -326,6 +165,12 @@ "normalize-path": "^2.0.0" } }, + "arg": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", + "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -364,7 +209,7 @@ }, "array-equal": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, @@ -413,6 +258,15 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", @@ -582,6 +436,72 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "c8": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-3.4.0.tgz", + "integrity": "sha512-LJcCHZlcWzTeRdUciC3fTq2AoIjBAZ18oHMG3StFVpKHxN+6IDUesrG6uiK3DlRm2PaDBfEOyp2N69VqQte1XA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.1.0", + "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.0.0", + "rimraf": "^2.6.2", + "test-exclude": "^5.0.0", + "uuid": "^3.3.2", + "v8-to-istanbul": "^2.0.2", + "yargs": "^12.0.5", + "yargs-parser": "^10.1.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + } + } + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -607,19 +527,10 @@ } } }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, "callsites": { - "version": "0.2.0", - "resolved": "http://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, "camelcase": { @@ -630,7 +541,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -645,9 +556,9 @@ "dev": true }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -728,6 +639,17 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -789,16 +711,10 @@ }, "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, - "compare-versions": { - "version": "2.0.1", - "resolved": "http://registry.npmjs.org/compare-versions/-/compare-versions-2.0.1.tgz", - "integrity": "sha1-Htwfk2h/2XoyXFn1XkWgfbEGrKY=", - "dev": true - }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -825,7 +741,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -840,7 +756,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -940,25 +856,12 @@ "abab": "^2.0.0", "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } } }, "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "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" @@ -1092,7 +995,7 @@ "dependencies": { "domelementtype": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", "dev": true } @@ -1154,9 +1057,9 @@ }, "dependencies": { "@types/node": { - "version": "8.10.38", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.38.tgz", - "integrity": "sha512-EibsnbJerd0hBFaDjJStFrVbVBAtOy4dgL8zZFw0uOvPqzBAX59Ci8cgjg3+RgJIWhsB5A4c+pi+D4P9tQQh/A==", + "version": "8.10.39", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.39.tgz", + "integrity": "sha512-rE7fktr02J8ybFf6eysife+WF+L4sAHWzw09DgdCebEu+qDwMvv4zl6Bc+825ttGZP73kCKxa3dhJOoGJ8+5mA==", "dev": true } } @@ -1189,7 +1092,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -1198,9 +1101,27 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } } } }, + "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" + } + }, "enqueue": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/enqueue/-/enqueue-1.0.2.tgz", @@ -1267,9 +1188,9 @@ } }, "eslint": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.10.0.tgz", - "integrity": "sha512-HpqzC+BHULKlnPwWae9MaVZ5AXJKpkxCVXQHrFaRw3hbDj26V/9ArYM4Rr/SQ8pi6qUPLXSSXC4RBJlyq2Z2OQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.12.1.tgz", + "integrity": "sha512-54NV+JkTpTu0d8+UYSA8mMKAG4XAsaOrozA9rCW7tgneg1mevcL7wIotPC+fZ0SkWwdhNqoXoxnQCTBp7UvTsg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1289,6 +1210,7 @@ "glob": "^7.1.2", "globals": "^11.7.0", "ignore": "^4.0.6", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "inquirer": "^6.1.0", "js-yaml": "^3.12.0", @@ -1303,7 +1225,6 @@ "pluralize": "^7.0.0", "progress": "^2.0.0", "regexpp": "^2.0.1", - "require-uncached": "^1.0.3", "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", @@ -1339,13 +1260,13 @@ } }, "eslint-module-utils": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", - "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz", + "integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==", "dev": true, "requires": { "debug": "^2.6.8", - "pkg-dir": "^1.0.0" + "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { @@ -1366,30 +1287,30 @@ } }, "eslint-plugin-html": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-4.0.6.tgz", - "integrity": "sha512-nj6A9oK+7BKnMm0E7dMRH3r75BfpkXtcVIb3pFC4AcDdBTNyg2NGxHXyFNT1emW4VsR7P2SZvRXXQtUR+kY08w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-5.0.0.tgz", + "integrity": "sha512-f7p/7YQdgQUFVAX3nB4dnMQbrDeTalcA01PDhuvTLk0ZadCwM4Pb+639SRuqEf1zMkIxckLY+ckCr0hVP5zl6A==", "dev": true, "requires": { - "htmlparser2": "^3.8.2" + "htmlparser2": "^3.10.0" } }, "eslint-plugin-import": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", - "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.15.0.tgz", + "integrity": "sha512-LEHqgR+RcnpGqYW7h9WMkPb/tP+ekKxWdQDztfTtZeV43IHF+X8lXU+1HOCcR4oXD24qRgEwNSxIweD5uNKGVg==", "dev": true, "requires": { "contains-path": "^0.1.0", - "debug": "^2.6.8", + "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.2.0", - "has": "^1.0.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.3", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.3.0", + "has": "^1.0.3", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", "read-pkg-up": "^2.0.0", - "resolve": "^1.6.0" + "resolve": "^1.9.0" }, "dependencies": { "debug": { @@ -1403,7 +1324,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -1450,14 +1371,6 @@ "acorn": "^6.0.2", "acorn-jsx": "^5.0.0", "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", - "dev": true - } } }, "esprima": { @@ -1502,6 +1415,21 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "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" + } + }, "expand-brackets": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", @@ -1513,7 +1441,7 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { @@ -1668,13 +1596,12 @@ } }, "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -1704,6 +1631,28 @@ "for-in": "^1.0.1" } }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1732,7 +1681,7 @@ }, "fs-extra": { "version": "0.30.0", - "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { @@ -1750,9 +1699,9 @@ "dev": true }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", "dev": true, "optional": true, "requires": { @@ -1778,7 +1727,7 @@ "optional": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "dev": true, "optional": true, @@ -1802,7 +1751,7 @@ } }, "chownr": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true @@ -1838,7 +1787,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true, "dev": true, "optional": true @@ -1887,7 +1836,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "dev": true, "optional": true, @@ -1907,12 +1856,12 @@ "optional": true }, "iconv-lite": { - "version": "0.4.21", + "version": "0.4.24", "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { @@ -1973,16 +1922,16 @@ "dev": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.5", "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "dev": true, "optional": true, @@ -2005,7 +1954,7 @@ "optional": true }, "needle": { - "version": "2.2.0", + "version": "2.2.4", "bundled": true, "dev": true, "optional": true, @@ -2016,18 +1965,18 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.3", "bundled": true, "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -2044,13 +1993,13 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.2.0", "bundled": true, "dev": true, "optional": true, @@ -2125,12 +2074,12 @@ "optional": true }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -2160,16 +2109,16 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", "bundled": true, "dev": true }, @@ -2186,7 +2135,7 @@ "optional": true }, "semver": { - "version": "5.5.0", + "version": "5.6.0", "bundled": true, "dev": true, "optional": true @@ -2237,17 +2186,17 @@ "optional": true }, "tar": { - "version": "4.4.1", + "version": "4.4.8", "bundled": true, "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, @@ -2258,12 +2207,12 @@ "optional": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -2272,7 +2221,7 @@ "dev": true }, "yallist": { - "version": "3.0.2", + "version": "3.0.3", "bundled": true, "dev": true } @@ -2296,12 +2245,37 @@ "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": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, "get-stdin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, + "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-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -2351,9 +2325,9 @@ } }, "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.10.0.tgz", + "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==", "dev": true }, "globalyzer": { @@ -2363,9 +2337,9 @@ "dev": true }, "globrex": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.1.tgz", - "integrity": "sha512-bqKcPhb+ZtrISivpu6oLmwIyINlPlzueO/BDCdfnzUeu7SYxnHTXmWP7uQI5PnQXc5yGXOscGBEGagloA2hcSw==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, "graceful-fs": { @@ -2380,6 +2354,18 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "handlebars": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", + "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "dev": true, + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2547,6 +2533,16 @@ "minimatch": "^3.0.4" } }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2623,19 +2619,16 @@ } }, "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } + "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 }, "is-accessor-descriptor": { "version": "0.1.6", @@ -2669,7 +2662,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -2814,6 +2807,12 @@ "@types/estree": "0.0.39" } }, + "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-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -2865,19 +2864,24 @@ "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", "dev": true }, - "istanbul-lib-instrument": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", - "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", + "istanbul-lib-report": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz", + "integrity": "sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==", "dev": true, "requires": { - "@babel/generator": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/traverse": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", "istanbul-lib-coverage": "^2.0.1", - "semver": "^5.5.0" + "make-dir": "^1.3.0", + "supports-color": "^5.4.0" + } + }, + "istanbul-reports": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.0.1.tgz", + "integrity": "sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==", + "dev": true, + "requires": { + "handlebars": "^4.0.11" } }, "js-tokens": { @@ -2887,9 +2891,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2903,45 +2907,50 @@ "dev": true }, "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-12.2.0.tgz", + "integrity": "sha512-QPOggIJ8fquWPLaYYMoh+zqUmdphDtu1ju0QGTitZT1Yd8I5qenPpXM1etzUegu3MjVp8XPzgZxdn8Yj7e40ig==", "dev": true, "requires": { "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", + "acorn": "^6.0.2", + "acorn-globals": "^4.3.0", "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", + "cssom": "^0.3.4", + "cssstyle": "^1.1.1", + "data-urls": "^1.0.1", "domexception": "^1.0.1", - "escodegen": "^1.9.1", + "escodegen": "^1.11.0", "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", + "nwsapi": "^2.0.9", + "parse5": "5.1.0", "pn": "^1.1.0", - "request": "^2.87.0", + "request": "^2.88.0", "request-promise-native": "^1.0.5", - "sax": "^1.2.4", + "saxes": "^3.1.3", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", + "tough-cookie": "^2.4.3", "w3c-hr-time": "^1.0.1", "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0", + "ws": "^6.1.0", "xml-name-validator": "^3.0.0" } }, "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -2968,7 +2977,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "dev": true, "requires": { @@ -3017,11 +3026,14 @@ "integrity": "sha512-P3kRv+B+Ra070ng2VKQqW4qW7gd/v3iD8sy/zOdcYRsfiD+QBokQNOps/AfP6Hr48cBhIIBFWckB9aO+IZhrWg==", "dev": true }, - "left-pad": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", - "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", - "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", @@ -3033,9 +3045,15 @@ "type-check": "~0.3.2" } }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -3059,14 +3077,6 @@ "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } } }, "lodash": { @@ -3081,15 +3091,6 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -3100,13 +3101,40 @@ "signal-exit": "^3.0.0" } }, + "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.1", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", - "integrity": "sha512-sCuTz6pYom8Rlt4ISPFn6wuFodbKMIHUMv4Qko9P17dpxb7s52KJTmRuZZqHdGmLCK9AOcDare039nRIcfdkEg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", + "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "sourcemap-codec": "^1.4.1" + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "make-error": { @@ -3115,6 +3143,15 @@ "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", "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" + } + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -3137,9 +3174,9 @@ } }, "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, "mdn-data": { @@ -3148,9 +3185,20 @@ "integrity": "sha512-esDqNvsJB2q5V28+u7NdtdMg6Rmg4khQmAVSjUiX7BY/7haIv0K2yWM43hYp0or+3nvG7+UaTF1JHz31hgU1TA==", "dev": true }, + "mem": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", + "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^1.1.0" + } + }, "meow": { "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -3166,9 +3214,19 @@ "trim-newlines": "^1.0.0" }, "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -3181,10 +3239,19 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -3281,7 +3348,7 @@ }, "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, @@ -3296,7 +3363,7 @@ "dependencies": { "commander": { "version": "1.0.4", - "resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz", "integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=", "dev": true, "requires": { @@ -3328,7 +3395,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -3395,9 +3462,9 @@ } }, "mri": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.1.tgz", - "integrity": "sha1-haom09ru7t+A3FmEr5XMXKXK2fE=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", + "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", "dev": true }, "ms": { @@ -3408,7 +3475,7 @@ }, "multiline": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", "integrity": "sha1-abHyX/B00oKJBPJE3dBrfZbvbJM=", "dev": true, "requires": { @@ -3421,10 +3488,21 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "dev": true, "optional": true }, @@ -3479,2196 +3557,158 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "nightmare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nightmare/-/nightmare-3.0.1.tgz", - "integrity": "sha512-WptvyPfp5mHRRYHzt6+4xazaR9cc437BuLJI6cLFnqwwgxgdtsFImfBVDeTUCPAeLrkp5VryX5jlw7Wwg+UnFQ==", - "dev": true, - "requires": { - "debug": "^2.2.0", - "deep-defaults": "^1.0.3", - "defaults": "^1.0.2", - "electron": "^1.8.4", - "enqueue": "^1.0.2", - "function-source": "^0.1.0", - "jsesc": "^0.5.0", - "minstache": "^1.2.0", - "mkdirp": "^0.5.1", - "multiline": "^1.0.2", - "once": "^1.3.3", - "rimraf": "^2.4.3", - "sliced": "1.0.1", - "split2": "^2.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "node-resolve": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/node-resolve/-/node-resolve-1.3.4.tgz", - "integrity": "sha512-yQ8Qn3GGR4cyunvggEHg7fb37V/6atft1K/xU6b2OEfJDbi8zbRSNIKxClzJszAV6tjtYyZt1vHlBgdORMcPXg==", - "dev": true, - "requires": { - "is-builtin-module": "^3.0.0", - "lodash": "^4.13.1" - }, - "dependencies": { - "builtin-modules": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz", - "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==", - "dev": true - }, - "is-builtin-module": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.0.0.tgz", - "integrity": "sha512-/93sDihsAD652hrMEbJGbMAVBf1qc96kyThHQ0CAOONHaE3aROLpTjDe4WQ5aoC5ITHFxEq1z8XqSU7km+8amw==", - "dev": true, - "requires": { - "builtin-modules": "^3.0.0" - } - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "nugget": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", - "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", - "dev": true, - "requires": { - "debug": "^2.1.3", - "minimist": "^1.1.0", - "pretty-bytes": "^1.0.2", - "progress-stream": "^1.1.0", - "request": "^2.45.0", - "single-line-log": "^1.1.2", - "throttleit": "0.0.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "nwsapi": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz", - "integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==", - "dev": true - }, - "nyc": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-12.0.2.tgz", - "integrity": "sha1-ikpO1pCWbBHsWH/4fuoMEsl0upk=", - "dev": true, - "requires": { - "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.5.1", - "debug-log": "^1.0.1", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^2.1.0", - "foreground-child": "^1.5.3", - "glob": "^7.0.6", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^2.1.0", - "istanbul-lib-report": "^1.1.3", - "istanbul-lib-source-maps": "^1.2.5", - "istanbul-reports": "^1.4.1", - "md5-hex": "^1.2.0", - "merge-source-map": "^1.1.0", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.0", - "resolve-from": "^2.0.0", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.1", - "spawn-wrap": "^1.4.2", - "test-exclude": "^4.2.0", - "yargs": "11.1.0", - "yargs-parser": "^8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "atob": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "base": { - "version": "0.11.2", - "bundled": true, - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "^1.2.0", - "mkdirp": "^0.5.1", - "write-file-atomic": "^1.1.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "class-utils": { - "version": "0.3.6", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^2.0.0" - } - }, - "define-property": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.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": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extend-shallow": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "fill-range": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fragment-cache": { - "version": "0.2.1", - "bundled": true, - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "get-value": { - "version": "2.0.6", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "has-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hosted-git-info": { - "version": "2.6.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "bundled": true, - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-odd": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "bundled": true, - "dev": true - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^0.4.0" - } - }, - "istanbul-lib-report": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^1.1.2", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" - }, - "dependencies": { - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" - } - }, - "istanbul-reports": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.0.3" - } - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-cache": { - "version": "0.2.2", - "bundled": true, - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "^0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "micromatch": { - "version": "3.1.10", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "nanomatch": { - "version": "1.2.9", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pascalcase": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "regex-not": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "ret": { - "version": "0.1.15", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-regex": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "set-value": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "bundled": true, - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "split-string": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "bundled": true, - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "micromatch": "^3.1.8", - "object-assign": "^4.1.0", - "read-pkg-up": "^1.0.1", - "require-main-filename": "^1.0.1" - } - }, - "to-object-path": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "union-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "bundled": true, - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unset-value": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "bundled": true, - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "bundled": true, - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "bundled": true, - "dev": true - }, - "use": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "bundled": true, - "dev": true - } - } - }, - "validate-npm-package-license": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, + "nightmare": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nightmare/-/nightmare-3.0.1.tgz", + "integrity": "sha512-WptvyPfp5mHRRYHzt6+4xazaR9cc437BuLJI6cLFnqwwgxgdtsFImfBVDeTUCPAeLrkp5VryX5jlw7Wwg+UnFQ==", + "dev": true, + "requires": { + "debug": "^2.2.0", + "deep-defaults": "^1.0.3", + "defaults": "^1.0.2", + "electron": "^1.8.4", + "enqueue": "^1.0.2", + "function-source": "^0.1.0", + "jsesc": "^0.5.0", + "minstache": "^1.2.0", + "mkdirp": "^0.5.1", + "multiline": "^1.0.2", + "once": "^1.3.3", + "rimraf": "^2.4.3", + "sliced": "1.0.1", + "split2": "^2.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "ms": "2.0.0" } }, - "y18n": { - "version": "3.2.1", - "bundled": true, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, + } + } + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-resolve": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/node-resolve/-/node-resolve-1.3.4.tgz", + "integrity": "sha512-yQ8Qn3GGR4cyunvggEHg7fb37V/6atft1K/xU6b2OEfJDbi8zbRSNIKxClzJszAV6tjtYyZt1vHlBgdORMcPXg==", + "dev": true, + "requires": { + "is-builtin-module": "^3.0.0", + "lodash": "^4.13.1" + }, + "dependencies": { + "builtin-modules": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz", + "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==", "dev": true }, - "yargs": { - "version": "11.1.0", - "bundled": true, + "is-builtin-module": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.0.0.tgz", + "integrity": "sha512-/93sDihsAD652hrMEbJGbMAVBf1qc96kyThHQ0CAOONHaE3aROLpTjDe4WQ5aoC5ITHFxEq1z8XqSU7km+8amw==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "yargs-parser": { - "version": "9.0.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } + "builtin-modules": "^3.0.0" } - }, - "yargs-parser": { - "version": "8.1.0", - "bundled": true, + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "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" + } + }, + "nugget": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", + "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", + "dev": true, + "requires": { + "debug": "^2.1.3", + "minimist": "^1.1.0", + "pretty-bytes": "^1.0.2", + "progress-stream": "^1.1.0", + "request": "^2.45.0", + "single-line-log": "^1.1.2", + "throttleit": "0.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } + "ms": "2.0.0" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwsapi": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz", + "integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==", + "dev": true + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -5771,6 +3811,24 @@ "mimic-fn": "^1.0.0" } }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -5785,12 +3843,41 @@ "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" + } + }, "os-tmpdir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "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": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -5815,13 +3902,13 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, - "pad-right": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/pad-right/-/pad-right-0.2.2.tgz", - "integrity": "sha1-b7ySQEXSRPKiokRQMGDTv8YAl3Q=", + "parent-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", + "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", "dev": true, "requires": { - "repeat-string": "^1.5.2" + "callsites": "^3.0.0" } }, "parse-glob": { @@ -5846,9 +3933,9 @@ } }, "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", "dev": true }, "pascalcase": { @@ -5858,17 +3945,14 @@ "dev": true }, "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5913,7 +3997,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -5932,13 +4016,22 @@ "pinkie": "^2.0.0" } }, + "pirates": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.0.tgz", + "integrity": "sha512-8t5BsXy1LUIjn3WWOlOuFDuKswhQb/tkak641lvBgmPOBUQHXveORtlMCp6OdPV1dtuTaEahKA8VNz6uLfKBtA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "^2.1.0" } }, "pluralize": { @@ -5971,15 +4064,9 @@ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", "dev": true }, - "prettier": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.3.tgz", - "integrity": "sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg==", - "dev": true - }, "pretty-bytes": { "version": "1.0.4", - "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { @@ -6009,12 +4096,28 @@ "through2": "~0.2.3" } }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", "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", @@ -6066,7 +4169,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -6091,23 +4194,12 @@ "requires": { "find-up": "^2.0.0", "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - } } }, "readable-stream": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.0.6.tgz", - "integrity": "sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", + "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -6417,7 +4509,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -6432,7 +4524,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -6560,35 +4652,37 @@ "tough-cookie": ">=2.3.3" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, "require-relative": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", "dev": true }, - "require-uncached": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "resolve-url": { @@ -6614,22 +4708,23 @@ "dev": true }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "rollup": { - "version": "0.63.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.63.5.tgz", - "integrity": "sha512-dFf8LpUNzIj3oE0vCvobX6rqOzHzLBoblyFp+3znPbjiSmSvOoK2kMKx+Fv9jYduG1rvcCfCveSgEaQHjWRF6g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.1.2.tgz", + "integrity": "sha512-OkdMxqMl8pWoQc5D8y1cIinYQPPLV8ZkfLgCzL6SytXeNA2P7UHynEQXI9tYxuAjAMsSyvRaWnyJDLHMxq0XAg==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "*" + "@types/node": "*", + "acorn": "^6.0.5" } }, "rollup-plugin-commonjs": { @@ -6662,20 +4757,20 @@ } }, "rollup-plugin-node-resolve": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", - "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz", + "integrity": "sha512-7Ni+/M5RPSUBfUaP9alwYQiIKnKeXCOHiqBpKUl9kwp3jX5ZJtgXAait1cne6pGEVUUztPD6skIKH9Kq9sNtfw==", "dev": true, "requires": { - "builtin-modules": "^2.0.0", + "builtin-modules": "^3.0.0", "is-module": "^1.0.0", - "resolve": "^1.1.6" + "resolve": "^1.8.1" }, "dependencies": { "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz", + "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==", "dev": true } } @@ -6690,42 +4785,25 @@ "minimatch": "^3.0.2", "rollup-pluginutils": "^2.0.1" } - }, - "rollup-plugin-typescript": { - "version": "0.8.1", - "resolved": "http://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz", - "integrity": "sha1-L/fuzCHPa7K0P8J+W2iJUs5xkko=", - "dev": true, - "requires": { - "compare-versions": "2.0.1", - "object-assign": "^4.0.1", - "rollup-pluginutils": "^1.3.1", - "tippex": "^2.1.1", - "typescript": "^1.8.9" - }, - "dependencies": { - "estree-walker": { - "version": "0.2.1", - "resolved": "http://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", - "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=", - "dev": true - }, - "rollup-pluginutils": { - "version": "1.5.2", - "resolved": "http://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", - "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=", - "dev": true, - "requires": { - "estree-walker": "^0.2.1", - "minimatch": "^3.0.2" - } - }, - "typescript": { - "version": "1.8.10", - "resolved": "http://registry.npmjs.org/typescript/-/typescript-1.8.10.tgz", - "integrity": "sha1-tHXW4N/wv1DyluXKbvn7tccyDx4=", - "dev": true - } + }, + "rollup-plugin-sucrase": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-sucrase/-/rollup-plugin-sucrase-2.1.0.tgz", + "integrity": "sha512-chdA3OruR1FH/IIKrzZCpGKLXAx3DOHoK24RIPtlVccK0wbTpHE0HpGEQYCxte1XaB17NgRe/frFyKR7g45qxQ==", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.3.0", + "sucrase": "3.x" + } + }, + "rollup-plugin-typescript": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.0.tgz", + "integrity": "sha512-d2KDNMJXgaaB//dDGd/YmyMiopt1Pz965Iu3zmEoL08YqNcKRBz26uHqqc47rFGfrJV5kFqifC9IYlh6dpSCLg==", + "dev": true, + "requires": { + "resolve": "^1.8.1", + "rollup-pluginutils": "^2.3.1" } }, "rollup-plugin-virtual": { @@ -6782,13 +4860,12 @@ } }, "sade": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.4.1.tgz", - "integrity": "sha512-r2S6GwNeYFYx02w2SYUfhYI9PzxdfNWxsX1QpI3Z4rK9bu9K3FtNVg2awp54Y9iivcYqR2iWqI3nT5jEihNyBg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.4.2.tgz", + "integrity": "sha512-MTrQm+Nhl4m1mbssYDgAculC/HbShjj08QtHnA2GTpzivfU5aUp8EoHlECmrIHEaa8hZRZSp2Gygv8VMlpXEBw==", "dev": true, "requires": { - "mri": "^1.1.0", - "pad-right": "^0.2.2" + "mri": "^1.1.0" } }, "safe-buffer": { @@ -6799,7 +4876,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -6823,11 +4900,14 @@ "rimraf": "^2.5.2" } }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true + "saxes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.6.tgz", + "integrity": "sha512-LAYs+lChg1v5uKNzPtsgTxSS5hLo8aIhSMCJt1WMpefAxm3D1RTpMwSpb6ebdL31cubiLTnhokVktBW+cv9Y9w==", + "dev": true, + "requires": { + "xmlchars": "^1.3.1" + } }, "semver": { "version": "5.6.0", @@ -6835,6 +4915,12 @@ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", @@ -6927,7 +5013,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7102,9 +5188,9 @@ } }, "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -7150,9 +5236,9 @@ } }, "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "speedometer": { @@ -7181,7 +5267,7 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -7196,7 +5282,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -7228,9 +5314,9 @@ "dev": true }, "sshpk": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", - "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz", + "integrity": "sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -7305,6 +5391,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-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", @@ -7320,6 +5412,26 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "sucrase": { + "version": "3.9.5", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.9.5.tgz", + "integrity": "sha512-gvNjd3PJ0WAXxWUAQzCw/nlG4J5a2j7q8jN+sX8Fwe3ryIsl9UrEcWPxWoEzBPrj3Fias4U05iN84m4/IFQLdw==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.0" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + } + } + }, "sumchecker": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-1.3.1.tgz", @@ -7363,9 +5475,9 @@ "dev": true }, "table": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/table/-/table-5.1.1.tgz", - "integrity": "sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/table/-/table-5.2.1.tgz", + "integrity": "sha512-qmhNs2GEHNqY5fd2Mo+8N1r2sw/rvTAAvBZTaTx+Y7PHLypqyrxr1MdIu0pLw6Xvl/Gi4ONu/sdceP8vvUjkyA==", "dev": true, "requires": { "ajv": "^6.6.1", @@ -7374,12 +5486,145 @@ "string-width": "^2.1.1" } }, + "test-exclude": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.0.0.tgz", + "integrity": "sha512-bO3Lj5+qFa9YLfYW2ZcXMOV1pmQvw+KS/DpjqhyX6Y6UZ8zstpZJ+mA2ERkXfpOqhxsJlQiLeVXD3Smsrs6oLw==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "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" + } + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "throttleit": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", @@ -7388,13 +5633,13 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { "version": "0.2.3", - "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", "dev": true, "requires": { @@ -7410,7 +5655,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -7422,7 +5667,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } @@ -7438,12 +5683,6 @@ "globrex": "^0.1.1" } }, - "tippex": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tippex/-/tippex-2.3.1.tgz", - "integrity": "sha1-ov1bcIfXy/sgyYBqbBYQjCwPr9o=", - "dev": true - }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -7453,12 +5692,6 @@ "os-tmpdir": "~1.0.2" } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -7534,34 +5767,17 @@ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", + "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==", "dev": true, "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", + "arg": "^4.1.0", "diff": "^3.1.0", "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } + "yn": "^3.0.0" } }, "tslib": { @@ -7601,11 +5817,31 @@ "dev": true }, "typescript": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.2.tgz", - "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", + "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", "dev": true }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true, + "optional": true + } + } + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -7726,6 +5962,12 @@ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, + "v8-to-istanbul": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-2.0.2.tgz", + "integrity": "sha512-39Z8JhWATTDDHlTEbSOv/G4j4xFWJy7ESMhfCLoj6IEd6yu4DOaexdTW89GTqE29d51PyH2lSS12c2HJhlRd1A==", + "dev": true + }, "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", @@ -7778,9 +6020,9 @@ "dev": true }, "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", + "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", "dev": true, "requires": { "lodash.sortby": "^4.7.0", @@ -7797,12 +6039,65 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7819,9 +6114,9 @@ } }, "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.3.tgz", + "integrity": "sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg==", "dev": true, "requires": { "async-limiter": "~1.0.0" @@ -7833,6 +6128,12 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "xmlchars": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz", + "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==", + "dev": true + }, "xtend": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", @@ -7842,6 +6143,116 @@ "object-keys": "~0.4.0" } }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "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": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + }, + "dependencies": { + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "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 + } + } + }, "yauzl": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", @@ -7852,9 +6263,9 @@ } }, "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.0.0.tgz", + "integrity": "sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==", "dev": true } } diff --git a/package.json b/package.json index d4766ee63b..21885c6ad5 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "svelte", - "version": "3.0.0-alpha15", + "version": "3.0.0-beta.3", "description": "The magical disappearing UI framework", "module": "index.mjs", - "main": "index.js", + "main": "index", "bin": { "svelte": "svelte" }, @@ -23,18 +23,17 @@ "scripts": { "test": "mocha --opts mocha.opts", "quicktest": "mocha --opts mocha.opts", - "precoverage": "export COVERAGE=true && nyc mocha --opts mocha.coverage.opts", - "coverage": "nyc report --reporter=text-lcov > coverage.lcov", + "precoverage": "c8 mocha --opts mocha.coverage.opts", + "coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html", "codecov": "codecov", "precodecov": "npm run coverage", "lint": "eslint src test/*.js", "build": "rollup -c", "prepare": "npm run build", - "dev": "rollup -c -w", + "dev": "rollup -cw", "pretest": "npm run build", "posttest": "agadoo src/internal/index.js", - "prepublishOnly": "npm run lint && npm test", - "prettier": "prettier --write \"src/**/*.ts\"" + "prepublishOnly": "export PUBLISH=true && npm run lint && npm test" }, "repository": { "type": "git", @@ -55,31 +54,31 @@ "devDependencies": { "@types/mocha": "^5.2.0", "@types/node": "^10.5.5", - "acorn": "^5.4.1", - "acorn-dynamic-import": "^3.0.0", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", "agadoo": "^1.0.1", + "c8": "^3.4.0", "codecov": "^3.0.0", "css-tree": "1.0.0-alpha22", "eslint": "^5.3.0", - "eslint-plugin-html": "^4.0.3", + "eslint-plugin-html": "^5.0.0", "eslint-plugin-import": "^2.11.0", "estree-walker": "^0.6.0", "is-reference": "^1.1.1", - "jsdom": "^11.8.0", + "jsdom": "^12.2.0", "kleur": "^3.0.0", "locate-character": "^2.0.5", - "magic-string": "^0.25.0", + "magic-string": "^0.25.2", "mocha": "^5.2.0", "nightmare": "^3.0.1", "node-resolve": "^1.3.3", - "nyc": "^12.0.2", - "prettier": "^1.12.1", - "rollup": "^0.63.5", + "rollup": "^1.1.2", "rollup-plugin-commonjs": "^9.1.0", "rollup-plugin-json": "^3.0.0", - "rollup-plugin-node-resolve": "^3.3.0", + "rollup-plugin-node-resolve": "^4.0.0", "rollup-plugin-replace": "^2.0.0", - "rollup-plugin-typescript": "^0.8.1", + "rollup-plugin-sucrase": "^2.1.0", + "rollup-plugin-typescript": "^1.0.0", "rollup-plugin-virtual": "^1.0.1", "rollup-watch": "^4.3.1", "sade": "^1.4.0", @@ -88,7 +87,7 @@ "source-map": "0.6", "source-map-support": "^0.5.4", "tiny-glob": "^0.2.1", - "ts-node": "^7.0.0", + "ts-node": "^8.0.2", "tslib": "^1.8.0", "typescript": "^3.0.1" }, diff --git a/register.js b/register.js index cbd4a387ac..2c0069c241 100644 --- a/register.js +++ b/register.js @@ -2,21 +2,21 @@ const fs = require('fs'); const path = require('path'); const { compile } = require('./compiler.js'); -let compileOptions = { - extensions: ['.html'] -}; +let extensions = ['.svelte', '.html']; +let compileOptions = {}; function capitalise(name) { return name[0].toUpperCase() + name.slice(1); } -function register(options) { +function register(options = {}) { if (options.extensions) { - compileOptions.extensions.forEach(deregisterExtension); + extensions.forEach(deregisterExtension); options.extensions.forEach(registerExtension); } - compileOptions = options; + compileOptions = Object.assign({}, options); + delete compileOptions.extensions; } function deregisterExtension(extension) { @@ -43,6 +43,7 @@ function registerExtension(extension) { }; } +registerExtension('.svelte'); registerExtension('.html'); module.exports = register; \ No newline at end of file diff --git a/rollup.config.js b/rollup.config.js index 6f15775016..ad58d25f22 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,11 +1,41 @@ +import fs from 'fs'; import replace from 'rollup-plugin-replace'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import json from 'rollup-plugin-json'; +import sucrase from 'rollup-plugin-sucrase'; import typescript from 'rollup-plugin-typescript'; import pkg from './package.json'; +const is_publish = !!process.env.PUBLISH; + export default [ + /* internal.[m]js */ + { + input: `src/internal/index.js`, + output: [ + { + file: `internal.mjs`, + format: 'esm', + paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') + }, + { + file: `internal.js`, + format: 'cjs', + paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') + } + ], + external: id => id.startsWith('svelte/'), + plugins: [{ + generateBundle(options, bundle) { + const mod = bundle['internal.mjs']; + if (mod) { + fs.writeFileSync('src/compile/internal-exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`); + } + } + }] + }, + /* compiler.js */ { input: 'src/index.ts', @@ -14,20 +44,29 @@ export default [ __VERSION__: pkg.version }), resolve(), - commonjs(), + commonjs({ + include: ['node_modules/**'] + }), json(), - typescript({ - include: 'src/**', - exclude: 'src/internal/**', - typescript: require('typescript') - }) + is_publish + ? typescript({ + include: 'src/**', + exclude: 'src/internal/**', + typescript: require('typescript') + }) + : sucrase({ + transforms: ['typescript'] + }) ], output: { file: 'compiler.js', - format: 'umd', + format: is_publish ? 'umd' : 'cjs', name: 'svelte', - sourcemap: true - } + sourcemap: true, + }, + external: is_publish + ? [] + : id => id === 'acorn' || id === 'magic-string' || id.startsWith('css-tree') }, /* cli/*.js */ @@ -48,27 +87,26 @@ export default [ typescript({ typescript: require('typescript') }) - ], - experimentalCodeSplitting: true + ] }, - /* internal.[m]js, motion.mjs */ - ...['internal', 'motion'].map(name => ({ - input: `src/${name}/index.js`, + /* motion.mjs */ + { + input: `src/motion/index.js`, output: [ { - file: `${name}.mjs`, + file: `motion.mjs`, format: 'esm', paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') }, { - file: `${name}.js`, + file: `motion.js`, format: 'cjs', paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') } ], external: id => id.startsWith('svelte/') - })), + }, // everything else ...['index', 'store', 'easing', 'transition'].map(name => ({ diff --git a/site/.eslintrc.json b/site/.eslintrc.json index cb0d06a2ec..0032aca092 100644 --- a/site/.eslintrc.json +++ b/site/.eslintrc.json @@ -35,7 +35,7 @@ ], "plugins": ["svelte3"], "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 8, "sourceType": "module" }, "settings": { diff --git a/site/README.md b/site/README.md index eb3c7013ce..e7ecdeb2e3 100644 --- a/site/README.md +++ b/site/README.md @@ -1,75 +1,26 @@ -# sapper-template-rollup +## Running locally -A version of the default [Sapper](https://github.com/sveltejs/sapper) template that uses Rollup instead of webpack. To clone it and get started: +Set up the project: ```bash -npx degit sveltejs/sapper-template#rollup my-app -cd my-app -npm install # or yarn! -npm run dev +git clone https://github.com/sveltejs/svelte.git +cd svelte/site +npm ci +npm run update ``` -Open up [localhost:3000](http://localhost:3000) and start clicking around. +Start the server with `npm run dev`, and navigate to [localhost:3000](http://localhost:3000). -Consult [sapper.svelte.technology](https://sapper.svelte.technology) for help getting started. +## Using a local copy of Svelte -*[Click here for the webpack version of this template](https://github.com/sveltejs/sapper-template)* +By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. To use the local copy of the compiler and runtime from this repo, you can navigate to [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). -## Structure +## REPL GitHub integration -Sapper expects to find three directories in the root of your project — `app`, `assets` and `routes`. +In order for the REPL's GitHub integration to work properly when running locally, you will need to create a GitHub OAuth app. Set its authorization callback URL to `http://localhost:3000/auth/callback`, and in this project, create `site/.env` containing: - -### app - -The [app](app) directory contains the entry points for your app — `client.js`, `server.js` and (optionally) a `service-worker.js` — along with a `template.html` file. - - -### assets - -The [assets](assets) directory contains any static assets that should be available. These are served using [sirv](https://github.com/lukeed/sirv). - -In your [service-worker.js](app/service-worker.js) file, you can import these as `assets` from the generated manifest... - -```js -import { assets } from './manifest/service-worker.js'; ``` - -...so that you can cache them (though you can choose not to, for example if you don't want to cache very large files). - - -### routes - -This is the heart of your Sapper app. There are two kinds of routes — *pages*, and *server routes*. - -**Pages** are Svelte components written in `.html` files. When a user first visits the application, they will be served a server-rendered version of the route in question, plus some JavaScript that 'hydrates' the page and initialises a client-side router. From that point forward, navigating to other pages is handled entirely on the client for a fast, app-like feel. (Sapper will preload and cache the code for these subsequent pages, so that navigation is instantaneous.) - -**Server routes** are modules written in `.js` files, that export functions corresponding to HTTP methods. Each function receives Express `request` and `response` objects as arguments, plus a `next` function. This is useful for creating a JSON API, for example. - -There are three simple rules for naming the files that define your routes: - -* A file called `routes/about.html` corresponds to the `/about` route. A file called `routes/blog/[slug].html` corresponds to the `/blog/:slug` route, in which case `params.slug` is available to the route -* The file `routes/index.html` (or `routes/index.js`) corresponds to the root of your app. `routes/about/index.html` is treated the same as `routes/about.html`. -* Files and directories with a leading underscore do *not* create routes. This allows you to colocate helper modules and components with the routes that depend on them — for example you could have a file called `routes/_helpers/datetime.js` and it would *not* create a `/_helpers/datetime` route - - -## Rollup config - -Sapper uses Rollup to provide code-splitting and dynamic imports, as well as compiling your Svelte components. As long as you don't do anything daft, you can edit the configuration files to add whatever plugins you'd like. - - -## Production mode and deployment - -To start a production version of your app, run `npm run build && npm start`. - -You can deploy your application to any environment that supports Node 8 or above. As an example, to deploy to [Now](https://zeit.co/now), run these commands: - -```bash -npm install -g now -now +GITHUB_CLIENT_ID=[your app's client id] +GITHUB_CLIENT_SECRET=[your app's client secret] +BASEURL=http://localhost:3000 ``` - - -## Bugs and feedback - -Sapper is in early development, and may have the odd rough edge here and there. Please be vocal over on the [Sapper issue tracker](https://github.com/sveltejs/sapper/issues). diff --git a/site/content/blog/2019-01-31-svelte-on-the-changelog.md b/site/content/blog/2019-01-31-svelte-on-the-changelog.md new file mode 100644 index 0000000000..79ad985bf9 --- /dev/null +++ b/site/content/blog/2019-01-31-svelte-on-the-changelog.md @@ -0,0 +1,23 @@ +--- +title: Svelte on The Changelog +description: Listen to the interview here +pubdate: 2019-01-31 +author: Rich Harris +authorURL: https://twitter.com/Rich_Harris +--- + +Earlier this month, I had the privilege of appearing on [The Changelog](https://changelog.com/podcast), a podcast about software development. We had a fun (for me) and wide-ranging conversation: + +* life as a coder inside a newsroom +* the big compilers-as-frameworks trend +* scalability +* the [Great Divide](https://css-tricks.com/the-great-divide/) + +...and, most importantly, Svelte 3. + +Unless you hang out in our [Discord server](https://discord.gg/yy75DKs) or follow [@sveltejs](https://twitter.com/sveltejs) on Twitter, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it *will* be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it. + +On the podcast [Adam](https://twitter.com/adamstac), [Jerod](https://twitter.com/jerodsanto) and I talk about some of the changes and why we're making them. You can listen here or on the [podcast page](https://changelog.com/podcast/332). + +

The Changelog 332: A UI framework without the framework – Listen on Changelog.com

+ diff --git a/site/content/examples/7guis-circles/App.html b/site/content/examples/7guis-circles/App.svelte similarity index 100% rename from site/content/examples/7guis-circles/App.html rename to site/content/examples/7guis-circles/App.svelte diff --git a/site/content/examples/7guis-counter/App.html b/site/content/examples/7guis-counter/App.svelte similarity index 100% rename from site/content/examples/7guis-counter/App.html rename to site/content/examples/7guis-counter/App.svelte diff --git a/site/content/examples/7guis-crud/App.html b/site/content/examples/7guis-crud/App.svelte similarity index 90% rename from site/content/examples/7guis-crud/App.html rename to site/content/examples/7guis-crud/App.svelte index 82ce893aac..388a2f4ea3 100644 --- a/site/content/examples/7guis-crud/App.html +++ b/site/content/examples/7guis-crud/App.svelte @@ -1,17 +1,24 @@ @@ -81,4 +78,4 @@ - \ No newline at end of file + diff --git a/site/content/examples/7guis-flight-booker/App.html b/site/content/examples/7guis-flight-booker/App.svelte similarity index 73% rename from site/content/examples/7guis-flight-booker/App.html rename to site/content/examples/7guis-flight-booker/App.svelte index 1cb45371e1..c4a4cde0cb 100644 --- a/site/content/examples/7guis-flight-booker/App.html +++ b/site/content/examples/7guis-flight-booker/App.svelte @@ -1,33 +1,31 @@ @@ -21,4 +19,4 @@ {:catch error}

well that's odd

{/await} -{/if} \ No newline at end of file +{/if} diff --git a/site/content/examples/bar-chart/App.html b/site/content/examples/bar-chart/App.svelte similarity index 98% rename from site/content/examples/bar-chart/App.html rename to site/content/examples/bar-chart/App.svelte index 0098454e91..82af1834a8 100644 --- a/site/content/examples/bar-chart/App.html +++ b/site/content/examples/bar-chart/App.svelte @@ -1,5 +1,4 @@ \ No newline at end of file + diff --git a/site/content/examples/modal-with-slot/App.html b/site/content/examples/modal-with-slot/App.svelte similarity index 95% rename from site/content/examples/modal-with-slot/App.html rename to site/content/examples/modal-with-slot/App.svelte index 621dfdd203..665a89554e 100644 --- a/site/content/examples/modal-with-slot/App.html +++ b/site/content/examples/modal-with-slot/App.svelte @@ -1,5 +1,5 @@ diff --git a/site/content/examples/modal-with-slot/Modal.html b/site/content/examples/modal-with-slot/Modal.svelte similarity index 100% rename from site/content/examples/modal-with-slot/Modal.html rename to site/content/examples/modal-with-slot/Modal.svelte diff --git a/site/content/examples/motion-spring/App.html b/site/content/examples/motion-spring/App.svelte similarity index 100% rename from site/content/examples/motion-spring/App.html rename to site/content/examples/motion-spring/App.svelte diff --git a/site/content/examples/nested-components/App.html b/site/content/examples/nested-components/App.svelte similarity index 53% rename from site/content/examples/nested-components/App.html rename to site/content/examples/nested-components/App.svelte index a00cb18a41..83cc0c6eb5 100644 --- a/site/content/examples/nested-components/App.html +++ b/site/content/examples/nested-components/App.svelte @@ -1,5 +1,5 @@

This is a top-level element.

diff --git a/site/content/examples/nested-components/Nested.html b/site/content/examples/nested-components/Nested.svelte similarity index 100% rename from site/content/examples/nested-components/Nested.html rename to site/content/examples/nested-components/Nested.svelte diff --git a/site/content/examples/parallax/App.html b/site/content/examples/parallax/App.svelte similarity index 100% rename from site/content/examples/parallax/App.html rename to site/content/examples/parallax/App.svelte diff --git a/site/content/examples/scatterplot/App.html b/site/content/examples/scatterplot/App.svelte similarity index 87% rename from site/content/examples/scatterplot/App.html rename to site/content/examples/scatterplot/App.svelte index e45d6f8f7f..8e88532ab5 100644 --- a/site/content/examples/scatterplot/App.html +++ b/site/content/examples/scatterplot/App.svelte @@ -1,5 +1,5 @@ - - - - - - - {#each yTicks as tick} - - - {tick} - - {/each} - - - - - {#each xTicks as tick} - - - {tick} - - {/each} - - - - {#each points as point} - - {/each} - - - \ No newline at end of file diff --git a/site/content/examples/scatterplot/Scatterplot.svelte b/site/content/examples/scatterplot/Scatterplot.svelte new file mode 100644 index 0000000000..b1ee52a149 --- /dev/null +++ b/site/content/examples/scatterplot/Scatterplot.svelte @@ -0,0 +1,96 @@ + + + + + + + + {#each yTicks as tick} + + + {tick} + + {/each} + + + + + {#each xTicks as tick} + + + {tick} + + {/each} + + + + {#each points as point} + + {/each} + + + diff --git a/site/content/examples/scoped-styles/App.html b/site/content/examples/scoped-styles/App.svelte similarity index 100% rename from site/content/examples/scoped-styles/App.html rename to site/content/examples/scoped-styles/App.svelte diff --git a/site/content/examples/self-references/App.html b/site/content/examples/self-references/App.svelte similarity index 100% rename from site/content/examples/self-references/App.html rename to site/content/examples/self-references/App.svelte diff --git a/site/content/examples/svg-clock/App.html b/site/content/examples/svg-clock/App.svelte similarity index 100% rename from site/content/examples/svg-clock/App.html rename to site/content/examples/svg-clock/App.svelte diff --git a/site/content/examples/transitions-custom/App.html b/site/content/examples/transitions-custom/App.svelte similarity index 97% rename from site/content/examples/transitions-custom/App.html rename to site/content/examples/transitions-custom/App.svelte index fcf221f0ae..bee159e4c5 100644 --- a/site/content/examples/transitions-custom/App.html +++ b/site/content/examples/transitions-custom/App.svelte @@ -2,7 +2,7 @@ import * as eases from 'svelte/easing'; import { fade } from 'svelte/transition'; - export let visible; + let visible; const wheee = (node, params) => { return { diff --git a/site/content/examples/transitions-fade/App.html b/site/content/examples/transitions-fade/App.svelte similarity index 86% rename from site/content/examples/transitions-fade/App.html rename to site/content/examples/transitions-fade/App.svelte index b7fc840d9c..528d495361 100644 --- a/site/content/examples/transitions-fade/App.html +++ b/site/content/examples/transitions-fade/App.svelte @@ -1,11 +1,11 @@ visible {#if visible}

fades in and out

-{/if} \ No newline at end of file +{/if} diff --git a/site/content/examples/transitions-fly/App.html b/site/content/examples/transitions-fly/App.svelte similarity index 89% rename from site/content/examples/transitions-fly/App.html rename to site/content/examples/transitions-fly/App.svelte index dc63d6d003..43e4a1dd2d 100644 --- a/site/content/examples/transitions-fly/App.html +++ b/site/content/examples/transitions-fly/App.svelte @@ -1,11 +1,11 @@ visible {#if visible}

flies 200 pixels up, slowly

-{/if} \ No newline at end of file +{/if} diff --git a/site/content/examples/transitions-in-out/App.html b/site/content/examples/transitions-in-out/App.svelte similarity index 88% rename from site/content/examples/transitions-in-out/App.html rename to site/content/examples/transitions-in-out/App.svelte index bf91453870..7b995bc04d 100644 --- a/site/content/examples/transitions-in-out/App.html +++ b/site/content/examples/transitions-in-out/App.svelte @@ -1,11 +1,11 @@ visible {#if visible}

flies up, fades out

-{/if} \ No newline at end of file +{/if} diff --git a/site/content/guide/06-special-components.md b/site/content/guide/06-special-components.md index 47c31c3733..56ee2b4964 100644 --- a/site/content/guide/06-special-components.md +++ b/site/content/guide/06-special-components.md @@ -114,11 +114,9 @@ You can also bind to certain values — so far `innerWidth`, `outerWidth`, `inne ``` -### `` +### `` -TODO REPLACE THIS WITH svelte:body - -The `` tag, just like ``, gives you a convenient way to declaratively add event listeners to the `document` object. This is useful for listening to events that don't fire on `window`, such as `mouseenter` and `mouseleave`. +The `` tag, just like ``, gives you a convenient way to declaratively add event listeners to the `document.body` object. This is useful for listening to events that don't fire on `window`, such as `mouseenter` and `mouseleave`. ### `` diff --git a/site/content/guide/08-bindings.md b/site/content/guide/08-bindings.md index 588111baa2..92e058c5ae 100644 --- a/site/content/guide/08-bindings.md +++ b/site/content/guide/08-bindings.md @@ -36,7 +36,7 @@ Element bindings make it easy to respond to user interactions: ```html

Hello {name}!

- + ``` ```json @@ -158,4 +158,4 @@ export default function createRenderer(canvas, ctx) { ctx.putImageData(imageData, 0, 0); } } -``` \ No newline at end of file +``` diff --git a/site/content/guide/18-advanced.md b/site/content/guide/18-advanced.md index 7ebd2ef850..51e4622176 100644 --- a/site/content/guide/18-advanced.md +++ b/site/content/guide/18-advanced.md @@ -18,7 +18,7 @@ It's easier to show the effect of this than to describe it. Open the following e ```html - +

Keyed

@@ -46,29 +46,21 @@ It's easier to show the effect of this than to describe it. Open the following e ``` diff --git a/site/package-lock.json b/site/package-lock.json index 20e0cc283c..a1e899703d 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -1,6 +1,6 @@ { - "name": "TODO", - "version": "0.0.1", + "name": "svelte.technology", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -36,9 +36,9 @@ }, "dependencies": { "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "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" @@ -53,12 +53,12 @@ } }, "@babel/generator": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.2.tgz", - "integrity": "sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.2.tgz", + "integrity": "sha512-f3QCuPppXxtZOEm5GWPra/uYUjmNQlu9pbAD8D/9jze4pTY83rTtB1igTBSwvkeNlC5gR24zFFkz+2WHLFQhqQ==", "dev": true, "requires": { - "@babel/types": "^7.2.2", + "@babel/types": "^7.3.2", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", @@ -215,14 +215,14 @@ } }, "@babel/helper-replace-supers": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz", - "integrity": "sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz", + "integrity": "sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.1.0", + "@babel/traverse": "^7.2.3", "@babel/types": "^7.0.0" } }, @@ -258,14 +258,14 @@ } }, "@babel/helpers": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.2.0.tgz", - "integrity": "sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.3.1.tgz", + "integrity": "sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA==", "dev": true, "requires": { "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.5", - "@babel/types": "^7.2.0" + "@babel/types": "^7.3.0" } }, "@babel/highlight": { @@ -280,9 +280,9 @@ } }, "@babel/parser": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.2.tgz", - "integrity": "sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.2.tgz", + "integrity": "sha512-QzNUC2RO1gadg+fs21fi0Uu0OuGNzRKEmgCxoLNzbCdoprLwjfmZwzUrpUNfJPaVRwBpDY47A17yYEGWyRelnQ==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -307,9 +307,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.2.tgz", + "integrity": "sha512-DjeMS+J2+lpANkYLLO+m6GjoTMygYglKmRe6cDTbFv3L9i6mmiE8fe6B8MtCSLZpVXscD5kn7s6SgtHrDoBWoA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -447,9 +447,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz", - "integrity": "sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz", + "integrity": "sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -554,6 +554,15 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.3.0.tgz", + "integrity": "sha512-NxIoNVhk9ZxS+9lSoAQ/LM0V2UEvARLttEHUrRDGKFaAxOYQcrkN/nLRE+BbbicCAvZPl7wMP0X60HsHE5DtQw==", + "dev": true, + "requires": { + "regexp-tree": "^0.1.0" + } + }, "@babel/plugin-transform-new-target": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz", @@ -664,19 +673,20 @@ } }, "@babel/preset-env": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.2.0.tgz", - "integrity": "sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.1.tgz", + "integrity": "sha512-FHKrD6Dxf30e8xgHQO0zJZpUPfVZg+Xwgz5/RdSWCbza9QLNk4Qbp40ctRoqDxml3O8RMzB1DU55SXeDG6PqHQ==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.3.1", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-json-strings": "^7.2.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", @@ -696,6 +706,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.2.0", "@babel/plugin-transform-modules-systemjs": "^7.2.0", "@babel/plugin-transform-modules-umd": "^7.2.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/plugin-transform-object-super": "^7.2.0", "@babel/plugin-transform-parameters": "^7.2.0", @@ -713,9 +724,9 @@ } }, "@babel/runtime": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.2.0.tgz", - "integrity": "sha512-oouEibCbHMVdZSDlJBO6bZmID/zA/G/Qx3H1d3rSNPTD+L8UNKvCat7aKWSJ74zYbm5zWGh0GQN0hKj8zYFTCg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz", + "integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==", "dev": true, "requires": { "regenerator-runtime": "^0.12.0" @@ -733,16 +744,16 @@ } }, "@babel/traverse": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.2.tgz", - "integrity": "sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/generator": "^7.2.2", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.2", + "@babel/parser": "^7.2.3", "@babel/types": "^7.2.2", "debug": "^4.1.0", "globals": "^11.1.0", @@ -750,9 +761,9 @@ }, "dependencies": { "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "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" @@ -767,9 +778,9 @@ } }, "@babel/types": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz", - "integrity": "sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.2.tgz", + "integrity": "sha512-3Y6H8xlUlpbGR+XvawiH0UXehqydTmNmEpozWcXymqwcrwYAl5KMvKtQ+TF6f6E08V6Jur7v/ykdDSF+WDEIXQ==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -789,9 +800,9 @@ "dev": true }, "@types/node": { - "version": "10.12.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.15.tgz", - "integrity": "sha512-9kROxduaN98QghwwHmxXO2Xz3MaWf+I1sLVAA6KJDF5xix+IyXVhds0MAfdNwtcpSrzhaTsNB0/jnL86fgUhqA==", + "version": "10.12.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.21.tgz", + "integrity": "sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==", "dev": true }, "accepts": { @@ -803,6 +814,18 @@ "negotiator": "0.6.1" } }, + "acorn": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.7.tgz", + "integrity": "sha512-HNJNgE60C9eOTgn974Tlp3dpLZdUr+SoxxDwPaY9J/kDNOLQTkaDgwBUXAF4SSsrAwD9RpdxuHK/EbuF+W9Ahw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -820,6 +843,17 @@ "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } } }, "arr-diff": { @@ -848,7 +882,7 @@ }, "array-flatten": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-map": { @@ -895,8 +929,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -954,9 +987,9 @@ } }, "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", + "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", "dev": true }, "body-parser": { @@ -980,7 +1013,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1016,14 +1048,14 @@ } }, "browserslist": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.6.tgz", - "integrity": "sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", + "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000921", - "electron-to-chromium": "^1.3.92", - "node-releases": "^1.1.1" + "caniuse-lite": "^1.0.30000929", + "electron-to-chromium": "^1.3.103", + "node-releases": "^1.1.3" } }, "buffer-from": { @@ -1033,9 +1065,9 @@ "dev": true }, "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz", + "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==", "dev": true }, "bytes": { @@ -1070,16 +1102,22 @@ "upper-case": "^1.1.1" } }, + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, "caniuse-lite": { - "version": "1.0.30000921", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz", - "integrity": "sha512-Bu09ciy0lMWLgpYC77I0YGuI8eFRBPPzaSOYJK1jTI64txCphYCqnWbxJYjHABYVt/TYX/p3jNjLBR87u1Bfpw==", + "version": "1.0.30000935", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000935.tgz", + "integrity": "sha512-1Y2uJ5y56qDt3jsDTdBHL1OqiImzjoQcBG6Yl3Qizq8mcc2SgCFpi+ZwLLqkztYnk9l87IYqRlNBnPSOTbFkXQ==", "dev": true }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -1088,24 +1126,23 @@ } }, "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.0.tgz", + "integrity": "sha512-5t6G2SH8eO6lCvYOoUpaRnF5Qfd//gd7qJAkwRUw9qlGVkiQ13uwQngqbWWaurOsaAm9+kUGbITADxt6H0XFNQ==", "dev": true, "requires": { "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", "glob-parent": "^3.1.0", - "inherits": "^2.0.1", + "inherits": "^2.0.3", "is-binary-path": "^1.0.0", "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", + "normalize-path": "^3.0.0", "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" + "readdirp": "^2.2.1", + "upath": "^1.1.0" } }, "chownr": { @@ -1154,6 +1191,17 @@ } } }, + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + } + }, "clipboard": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", @@ -1165,10 +1213,27 @@ "tiny-emitter": "^2.0.0" } }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, "codemirror": { - "version": "5.42.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.42.0.tgz", - "integrity": "sha512-pbApC8zDzItP3HRphD6kQVwS976qB5Qi0hU3MZMixLk+AyugOW1RF+8XJEjeyl5yWsHNe88tDUxzeRh5AOxPRw==" + "version": "5.43.0", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.43.0.tgz", + "integrity": "sha512-mljwQWUaWIf85I7QwTBryF2ASaIvmYAL4s5UCanCJFfKeXOKhrqdHWdHiZWAMNT+hjLTCnVx2S/SYTORIgxsgA==" }, "collection-visit": { "version": "1.0.0", @@ -1195,6 +1260,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "dev": true + }, "commander": { "version": "2.17.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", @@ -1232,8 +1303,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "content-disposition": { "version": "0.5.2", @@ -1302,6 +1372,12 @@ "ms": "2.0.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -1408,9 +1484,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.92.tgz", - "integrity": "sha512-En051LMzMl3/asMWGZEtU808HOoVWIpmmZx1Ep8N+TT9e7z/X8RcLeBU2kLSNLGQ+5SuKELzMx+MVuTBXk6Q9w==", + "version": "1.3.113", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.113.tgz", + "integrity": "sha512-De+lPAxEcpxvqPTyZAXELNpRZXABRxf+uL/rSykstQhzj/B0l1150G/ExIIxKc16lI89Hgz81J0BHAcbTqK49g==", "dev": true }, "encodeurl": { @@ -1418,6 +1494,15 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, + "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" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1428,16 +1513,17 @@ } }, "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", "dev": true, "requires": { - "es-to-primitive": "^1.1.1", + "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" } }, "es-to-primitive": { @@ -1463,8 +1549,8 @@ "dev": true }, "eslint-plugin-svelte3": { - "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#d4da8a7d98f2efa70266313ab798cd4d400ca86c", - "from": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git", + "version": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#5fc4861d4b191649b0badf4f9a4c2470f08b237e", + "from": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#semver:*", "dev": true }, "estree-walker": { @@ -1484,6 +1570,21 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "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" + } + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1521,7 +1622,7 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { @@ -1740,7 +1841,7 @@ }, "finalhandler": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { "debug": "2.6.9", @@ -1752,6 +1853,15 @@ "unpipe": "~1.0.0" } }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1808,13 +1918,12 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", "dev": true, "optional": true, "requires": { @@ -1840,7 +1949,7 @@ "optional": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "dev": true, "optional": true, @@ -1864,7 +1973,7 @@ } }, "chownr": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true @@ -1900,7 +2009,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true, "dev": true, "optional": true @@ -1949,7 +2058,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "dev": true, "optional": true, @@ -1969,12 +2078,12 @@ "optional": true }, "iconv-lite": { - "version": "0.4.21", + "version": "0.4.24", "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { @@ -2035,16 +2144,16 @@ "dev": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.5", "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "dev": true, "optional": true, @@ -2067,7 +2176,7 @@ "optional": true }, "needle": { - "version": "2.2.0", + "version": "2.2.4", "bundled": true, "dev": true, "optional": true, @@ -2078,18 +2187,18 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.3", "bundled": true, "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -2106,13 +2215,13 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.2.0", "bundled": true, "dev": true, "optional": true, @@ -2187,12 +2296,12 @@ "optional": true }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -2222,16 +2331,16 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", "bundled": true, "dev": true }, @@ -2248,7 +2357,7 @@ "optional": true }, "semver": { - "version": "5.5.0", + "version": "5.6.0", "bundled": true, "dev": true, "optional": true @@ -2299,17 +2408,17 @@ "optional": true }, "tar": { - "version": "4.4.1", + "version": "4.4.8", "bundled": true, "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, @@ -2320,12 +2429,12 @@ "optional": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -2334,7 +2443,7 @@ "dev": true }, "yallist": { - "version": "3.0.2", + "version": "3.0.3", "bundled": true, "dev": true } @@ -2346,6 +2455,21 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "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-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -2356,7 +2480,6 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2424,9 +2547,9 @@ } }, "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.10.0.tgz", + "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==", "dev": true }, "globalyzer": { @@ -2546,7 +2669,7 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { "depd": "~1.1.2", @@ -2555,6 +2678,12 @@ "statuses": ">= 1.4.0 < 2" } }, + "http-link-header": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.0.2.tgz", + "integrity": "sha512-z6YOZ8ZEnejkcCWlGZzYXNa6i+ZaTfiTg3WhlV/YvnNya3W/RbX1bMVUMTuCrg/DrtTCQxaFCkXCz4FtLpcebg==", + "dev": true + }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -2572,7 +2701,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2583,6 +2711,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -2592,6 +2725,12 @@ "loose-envify": "^1.0.0" } }, + "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 + }, "ipaddr.js": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", @@ -2599,7 +2738,7 @@ }, "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { @@ -2638,15 +2777,6 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", @@ -2655,7 +2785,7 @@ }, "is-data-descriptor": { "version": "0.1.4", - "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { @@ -2725,6 +2855,12 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", @@ -2790,6 +2926,12 @@ "has": "^1.0.1" } }, + "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-symbol": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", @@ -2823,10 +2965,31 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, + "jest-worker": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.0.0.tgz", + "integrity": "sha512-s64/OThpfQvoCeHG963MiEZOAAxu8kHsaL/rCMF7lpdzo7vgF0CtPml9hfguOMgykgH/eOm4jFP4ibfHLruytg==", + "dev": true, + "requires": { + "merge-stream": "^1.0.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "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" + } + } + } + }, "js-levenshtein": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.4.tgz", - "integrity": "sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", "dev": true }, "js-tokens": { @@ -2876,6 +3039,15 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "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" + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -2888,18 +3060,22 @@ "strip-bom": "^3.0.0" } }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2916,12 +3092,21 @@ "dev": true }, "magic-string": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", - "integrity": "sha512-sCuTz6pYom8Rlt4ISPFn6wuFodbKMIHUMv4Qko9P17dpxb7s52KJTmRuZZqHdGmLCK9AOcDare039nRIcfdkEg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", + "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "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": { - "sourcemap-codec": "^1.4.1" + "p-defer": "^1.0.0" } }, "map-cache": { @@ -2940,21 +3125,32 @@ } }, "marked": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.5.2.tgz", - "integrity": "sha512-fdZvBa7/vSQIZCi4uuwo2N3q+7jJURpMVCcbaX0S1Mg65WZ5ilXvC67MviJAsdjqqgD+CEq4RKo5AYGgINkVAA==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.0.tgz", + "integrity": "sha512-HduzIW2xApSXKXJSpCipSxKyvMbwRRa/TwMbepmlZziKdH8548WSoDP4SxzulEKjlo8BE39l+2fwJZuRKOln6g==" }, "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, "media-typer": { "version": "0.3.0", - "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "mem": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz", + "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^2.0.0" + } + }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -2966,6 +3162,15 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -2993,9 +3198,9 @@ } }, "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, "mime-db": { "version": "1.37.0", @@ -3010,18 +3215,23 @@ "mime-db": "~1.37.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -3067,7 +3277,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -3076,7 +3286,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -3094,9 +3304,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.0.tgz", - "integrity": "sha512-zT5nC0JhbljmyEf+Z456nvm7iO7XgRV2hYxoBtPpnyp+0Q4aCoP6uWNn76v/I6k2kCYNLWqWbwBWQcjsNI/bjw==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "dev": true, "optional": true }, @@ -3145,39 +3355,36 @@ "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==" }, "node-releases": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.1.tgz", - "integrity": "sha512-2UXrBr6gvaebo5TNF84C66qyJJ6r0kxBObgZIDX3D3/mt1ADKiHux3NJPWisq0wxvJJdkjECH+9IIKYViKj71Q==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.7.tgz", + "integrity": "sha512-bKdrwaqJUPHqlCzDD7so/R+Nk0jGv9a11ZhLrD9f6i947qGLrGAhU3OxRENa19QQmwzGy/g6zCDEuLGDO8HPvA==", "dev": true, "requires": { "semver": "^5.3.0" } }, "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", + "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "now": { - "version": "12.1.14", - "resolved": "https://registry.npmjs.org/now/-/now-12.1.14.tgz", - "integrity": "sha512-DsEvELqGbxwKMHI3Xpf+CoAeIsvj0bKOCoOXmaf8F6cAAh9N20DhTFl1wFGylpjPgd3lj8SGfQuiSbpUV5CTjQ==", + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/now/-/now-13.1.3.tgz", + "integrity": "sha512-DYRaOqYblnyXF8Awzy/1+mCWjXESxVe7H9phXRGOUm6Vu2dXuJ07yOU37BYESmRue+Aw4sc51W2duzkhwBuCOA==", "dev": true }, "npm-run-all": { @@ -3197,6 +3404,21 @@ "string.prototype.padend": "^3.0.0" } }, + "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" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, "oauth": { "version": "0.9.15", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", @@ -3289,11 +3511,63 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } }, + "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.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -3392,11 +3666,16 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { "version": "2.0.1", @@ -3407,8 +3686,7 @@ "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==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { "version": "0.1.7", @@ -3482,6 +3760,16 @@ "ipaddr.js": "1.8.0" } }, + "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" + } + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -3540,7 +3828,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -3564,6 +3852,14 @@ "readable-stream": "^2.0.2" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -3613,6 +3909,17 @@ "safe-regex": "^1.1.0" } }, + "regexp-tree": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.1.tgz", + "integrity": "sha512-HwRjOquc9QOwKTgbxvZTcddS5mlNlwePMQ3NFL8broajMLD5CXDAqas8Y5yxJH5QtZp5iRor3YCILd5pz71Cgw==", + "dev": true, + "requires": { + "cli-table3": "^0.5.0", + "colors": "^1.1.2", + "yargs": "^12.0.5" + } + }, "regexpu-core": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", @@ -3644,7 +3951,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -3674,6 +3981,18 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, "require-relative": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", @@ -3681,12 +4000,11 @@ "dev": true }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resolve-url": { @@ -3707,28 +4025,29 @@ "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "rollup": { - "version": "0.68.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.68.0.tgz", - "integrity": "sha512-UbmntCf8QBlOqJnwsNWQCI0oonHOgs9y1OLoO8BHf2r8gCyRLp3JzLHXARJpsNDAS08Qm3LDjzyWma5sqnCxDQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.1.2.tgz", + "integrity": "sha512-OkdMxqMl8pWoQc5D8y1cIinYQPPLV8ZkfLgCzL6SytXeNA2P7UHynEQXI9tYxuAjAMsSyvRaWnyJDLHMxq0XAg==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "*" + "@types/node": "*", + "acorn": "^6.0.5" } }, "rollup-plugin-babel": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.1.0.tgz", - "integrity": "sha512-4IYv/yTNyH4P/Cma1mWdqy42gc051i1mTe/6oe8F055WzJGSb2qs1mSDwZTo93wA6kMBgHBIR/OcBk7JMnL59Q==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz", + "integrity": "sha512-KfnizE258L/4enADKX61ozfwGHoqYauvoofghFJBhFnpH9Sb9dNPpWg8QHOaAfVASUYV8w0mCx430i9z0LJoJg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -3757,22 +4076,14 @@ } }, "rollup-plugin-node-resolve": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", - "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz", + "integrity": "sha512-7Ni+/M5RPSUBfUaP9alwYQiIKnKeXCOHiqBpKUl9kwp3jX5ZJtgXAait1cne6pGEVUUztPD6skIKH9Kq9sNtfw==", "dev": true, "requires": { - "builtin-modules": "^2.0.0", + "builtin-modules": "^3.0.0", "is-module": "^1.0.0", - "resolve": "^1.1.6" - }, - "dependencies": { - "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", - "dev": true - } + "resolve": "^1.8.1" } }, "rollup-plugin-replace": { @@ -3787,24 +4098,26 @@ } }, "rollup-plugin-svelte": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-4.5.0.tgz", - "integrity": "sha512-mueHEp59mmyYIJQDF9LWfUetFJN18qDwcqcnik7NrPJwHHepptIEzuWoqaWjl954t9Oj0QRkyU9nmxyAX5ZPLA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.0.1.tgz", + "integrity": "sha512-iwm4ANbdoEQqoCL8m70R3F2Oe/auSr0zIOBVVJWx7IMSkzFZjhd0PeqzKe3BWCllLAnBXIbqTSOHmU2mnvy0SA==", "dev": true, "requires": { "require-relative": "^0.8.7", - "rollup-pluginutils": "^2.3.0", - "sourcemap-codec": "^1.4.1" + "rollup-pluginutils": "^2.3.3", + "sourcemap-codec": "^1.4.4" } }, "rollup-plugin-terser": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-1.0.1.tgz", - "integrity": "sha512-VC6chT7QnrV6JzdgkPE0hP/atRBxaa3CPbVXfZJ8nJLjcidSdWftOst098RasYRUTKxJWAgdaJN1+uiZM6iffA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-4.0.4.tgz", + "integrity": "sha512-wPANT5XKVJJ8RDUN0+wIr7UPd0lIXBo4UdJ59VmlPCtlFsE20AM+14pe+tk7YunCsWEiuzkDBY3QIkSCjtrPXg==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.47", - "terser": "^3.7.5" + "@babel/code-frame": "^7.0.0", + "jest-worker": "^24.0.0", + "serialize-javascript": "^1.6.1", + "terser": "^3.14.1" } }, "rollup-pluginutils": { @@ -3905,6 +4218,15 @@ "parse-glob": "^3.0.4", "regex-cache": "^0.4.2" } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } } } }, @@ -3915,7 +4237,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -3939,17 +4261,16 @@ } }, "sapper": { - "version": "0.25.0-alpha2", - "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.25.0-alpha2.tgz", - "integrity": "sha512-GAYdwyDLo6XYJxJDFtpY1BcHPVjibYY/x/DvUEpH9rsH0fLF67SWAf0RokGs1lvhOMd1O6nxtR7KztwIeNIkZA==", + "version": "0.26.0-alpha.8", + "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.26.0-alpha.8.tgz", + "integrity": "sha512-2Tre33WHBBBYbXQLmVlgALK4AEJ2QD9l6zRJT+w6CSqw+74fegw50XQcLbnzRxjNQ9menQPpaJE1hmz6jTAwxg==", "dev": true, "requires": { - "html-minifier": "^3.5.20", + "html-minifier": "^3.5.21", + "http-link-header": "^1.0.2", "shimport": "0.0.14", - "source-map-support": "^0.5.9", - "sourcemap-codec": "^1.4.3", - "string-hash": "^1.1.3", - "tslib": "^1.9.3" + "sourcemap-codec": "^1.4.4", + "string-hash": "^1.1.3" } }, "select": { @@ -3982,15 +4303,14 @@ "on-finished": "~2.3.0", "range-parser": "~1.2.0", "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" - } } }, + "serialize-javascript": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "dev": true + }, "serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", @@ -4014,6 +4334,12 @@ "write-file-atomic": "1.3.1" } }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", @@ -4069,12 +4395,28 @@ "jsonify": "~0.0.0" } }, + "shelljs": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, "shimport": { "version": "0.0.14", "resolved": "https://registry.npmjs.org/shimport/-/shimport-0.0.14.tgz", "integrity": "sha512-JfzpHhyZ6CYuPYUSitFNw2/IxWEABLN1chs9xDHnn4tPXXCmfIn1METCmIl8Vwvm2FZGW7b8WB4zMCKaJEhY6A==", "dev": true }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, "sirv": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/sirv/-/sirv-0.2.2.tgz", @@ -4083,6 +4425,13 @@ "@polka/url": "^0.5.0", "mime": "^2.3.1", "tiny-glob": "^0.2.0" + }, + "dependencies": { + "mime": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", + "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==" + } } }, "slide": { @@ -4217,9 +4566,9 @@ } }, "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -4273,9 +4622,9 @@ } }, "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "split-string": { @@ -4319,6 +4668,16 @@ "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, "string.prototype.padend": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", @@ -4332,19 +4691,34 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" } }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "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 + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4355,9 +4729,9 @@ } }, "svelte": { - "version": "3.0.0-alpha10", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.0.0-alpha10.tgz", - "integrity": "sha512-SmEI9Heks28DeBF26GZuViYXBwkqVXiqGbpH1CZ/HowGzTDVib2peWBpwaGjKHg1nX9zicNFTRa9E2Ebb/sWoQ==", + "version": "3.0.0-beta.3", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.0.0-beta.3.tgz", + "integrity": "sha512-kEPbvpmzZqVsUMgMQ1DFx1W+05hWiHVSQaQYPv55AzcCAeXHRZD9N55Pv4LKH6sOHvvNhkb4GVLSK2yBQZn5CQ==", "dev": true }, "tar": { @@ -4376,14 +4750,14 @@ } }, "terser": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.11.0.tgz", - "integrity": "sha512-5iLMdhEPIq3zFWskpmbzmKwMQixKmTYwY3Ox9pjtSklBLnHiuQ0GKJLhL1HSYtyffHM3/lDIFBnb82m9D7ewwQ==", + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.16.1.tgz", + "integrity": "sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow==", "dev": true, "requires": { "commander": "~2.17.1", "source-map": "~0.6.1", - "source-map-support": "~0.5.6" + "source-map-support": "~0.5.9" }, "dependencies": { "source-map": { @@ -4395,9 +4769,9 @@ } }, "tiny-emitter": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz", - "integrity": "sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", "optional": true }, "tiny-glob": { @@ -4463,12 +4837,6 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", @@ -4681,11 +5049,63 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { "version": "1.3.1", @@ -4697,12 +5117,48 @@ "slide": "^1.1.5" } }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, "yootils": { "version": "0.0.14", "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.14.tgz", diff --git a/site/package.json b/site/package.json index 623f059d4c..a542d2dd9c 100644 --- a/site/package.json +++ b/site/package.json @@ -1,57 +1,58 @@ { - "name": "TODO", - "description": "TODO", - "version": "0.0.1", + "name": "svelte.technology", + "version": "1.0.0", + "description": "Docs and examples for Svelte", "scripts": { "dev": "sapper dev", "sapper": "sapper build --legacy", - "update_template": "sh ./scripts/update_template.sh", + "update": "node scripts/update_template.js && node scripts/get-contributors.js", "start": "node __sapper__/build", "cy:run": "cypress run", "cy:open": "cypress open", "test": "run-p --race dev cy:run", "deploy": "npm run stage && now alias", - "prestage": "npm run update_template && node scripts/get-contributors.js && npm run sapper", + "prestage": "npm run update && npm run sapper", "stage": "now" }, "dependencies": { - "codemirror": "^5.42.0", - "compression": "^1.7.1", + "codemirror": "^5.43.0", + "compression": "^1.7.3", "devalue": "^1.1.0", "do-not-zip": "^1.0.0", "dotenv": "^6.2.0", "express": "^4.16.4", "express-session": "^1.15.6", "golden-fleece": "^1.0.9", - "marked": "^0.5.2", + "marked": "^0.6.0", "node-fetch": "^2.3.0", "passport": "^0.4.0", "passport-github": "^1.1.0", "prismjs": "^1.15.0", "session-file-store": "^1.2.0", - "sirv": "^0.2.0", + "shelljs": "^0.8.3", + "sirv": "^0.2.2", "yootils": "0.0.14" }, "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/runtime": "^7.0.0", - "chokidar": "^2.0.4", + "@babel/core": "^7.2.2", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/plugin-transform-runtime": "^7.2.0", + "@babel/preset-env": "^7.3.1", + "@babel/runtime": "^7.3.1", + "chokidar": "^2.1.0", "degit": "^2.1.3", - "eslint-plugin-svelte3": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git", - "now": "^12.1.14", + "eslint-plugin-svelte3": "git+https://github.com/sveltejs/eslint-plugin-svelte3.git#semver:*", + "now": "^13.1.3", "npm-run-all": "^4.1.5", - "rollup": "^0.68.0", - "rollup-plugin-babel": "^4.0.2", - "rollup-plugin-commonjs": "^9.1.6", + "rollup": "^1.1.2", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-commonjs": "^9.2.0", "rollup-plugin-json": "^3.1.0", - "rollup-plugin-node-resolve": "^3.3.0", - "rollup-plugin-replace": "^2.0.0", - "rollup-plugin-svelte": "^4.2.1", - "rollup-plugin-terser": "^1.0.1", - "sapper": "^0.25.0-alpha2", - "svelte": "^3.0.0-alpha10" + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-plugin-replace": "^2.1.0", + "rollup-plugin-svelte": "^5.0.1", + "rollup-plugin-terser": "^4.0.4", + "sapper": "^0.26.0-alpha.8", + "svelte": "^3.0.0-beta.3" } } diff --git a/site/scripts/update_template.js b/site/scripts/update_template.js new file mode 100644 index 0000000000..23e2333bab --- /dev/null +++ b/site/scripts/update_template.js @@ -0,0 +1,26 @@ +const sh = require('shelljs'); +const fs = require('fs') + +sh.cd(__dirname+'/../') + +// fetch svelte app +sh.rm('-rf','scripts/svelte-app') +sh.exec('npx degit sveltejs/template scripts/svelte-app') + +// update repl-viewer.css based on template +sh.cp('scripts/svelte-app/public/global.css', 'static/repl-viewer.css') + +// remove src (will be recreated client-side) and node_modules +sh.rm('-rf', 'scripts/svelte-app/src') +sh.rm('-rf', 'scripts/svelte-app/node_modules') + +// build svelte-app.json +const appPath = 'scripts/svelte-app' +let files = [] + +for (const path of sh.find(appPath).filter(p => fs.lstatSync(p).isFile()) ) { + files.push({ path: path.slice(appPath.length + 1), data: fs.readFileSync(path).toString() }); +} + +fs.writeFileSync('static/svelte-app.json', JSON.stringify(files)); + diff --git a/site/scripts/update_template.sh b/site/scripts/update_template.sh deleted file mode 100755 index 59ab3cb0cd..0000000000 --- a/site/scripts/update_template.sh +++ /dev/null @@ -1,15 +0,0 @@ -cd `dirname $0`/.. - -# fetch svelte-app -rm -rf scripts/svelte-app -node_modules/.bin/degit sveltejs/template scripts/svelte-app - -# update repl-viewer.css based on template -cp scripts/svelte-app/public/global.css static/repl-viewer.css - -# remove src (will be recreated client-side) and node_modules -rm -rf scripts/svelte-app/src -rm -rf scripts/svelte-app/node_modules - -# build svelte-app.json -node scripts/build-svelte-app-json.js `find scripts/svelte-app -type f` diff --git a/site/src/client.js b/site/src/client.js index 4a61c78d0e..cec91725f0 100644 --- a/site/src/client.js +++ b/site/src/client.js @@ -1,4 +1,4 @@ -import * as sapper from '../__sapper__/client.js'; +import * as sapper from '@sapper/app'; sapper.start({ target: document.querySelector('#sapper') diff --git a/site/src/components/Icon.html b/site/src/components/Icon.svelte similarity index 100% rename from site/src/components/Icon.html rename to site/src/components/Icon.svelte diff --git a/site/src/components/InlineSvg.html b/site/src/components/InlineSvg.svelte similarity index 100% rename from site/src/components/InlineSvg.html rename to site/src/components/InlineSvg.svelte diff --git a/site/src/components/Logo.html b/site/src/components/Logo.svelte similarity index 100% rename from site/src/components/Logo.html rename to site/src/components/Logo.svelte diff --git a/site/src/components/TopNav.html b/site/src/components/TopNav.svelte similarity index 98% rename from site/src/components/TopNav.html rename to site/src/components/TopNav.svelte index 831ca598fd..c9945b912b 100644 --- a/site/src/components/TopNav.html +++ b/site/src/components/TopNav.svelte @@ -1,7 +1,7 @@ + '> diff --git a/site/src/routes/repl/_components/Output/index.html b/site/src/routes/repl/_components/Output/index.svelte similarity index 94% rename from site/src/routes/repl/_components/Output/index.html rename to site/src/routes/repl/_components/Output/index.svelte index 467cc439b4..b97ec17aa6 100644 --- a/site/src/routes/repl/_components/Output/index.html +++ b/site/src/routes/repl/_components/Output/index.svelte @@ -1,9 +1,9 @@ + + '; -injectDynamicImport(acorn); +function get_context(parser: Parser, attributes: Node[], start: number) { + const context = attributes.find(attribute => attribute.name === 'context'); + if (!context) return 'default'; + + if (context.value.length !== 1 || context.value[0].type !== 'Text') { + parser.error({ + code: 'invalid-script', + message: `context attribute must be static` + }, start); + } + + const value = context.value[0].data; + + if (value !== 'module') { + parser.error({ + code: `invalid-script`, + message: `If the context attribute is supplied, its value must be "module"` + }, context.start); + } + + return value; +} export default function readScript(parser: Parser, start: number, attributes: Node[]) { const scriptStart = parser.index; @@ -24,13 +44,7 @@ export default function readScript(parser: Parser, start: number, attributes: No let ast; try { - ast = acorn.parse(source, { - ecmaVersion: 9, - sourceType: 'module', - plugins: { - dynamicImport: true - } - }); + ast = acorn.parse(source); } catch (err) { parser.acornError(err); } @@ -39,7 +53,7 @@ export default function readScript(parser: Parser, start: number, attributes: No return { start, end: parser.index, - attributes, + context: get_context(parser, attributes, start), content: ast, }; } diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 43e685017b..f62ac527bf 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -5,16 +5,20 @@ import { decodeCharacterReferences } from '../utils/html'; import isVoidElementName from '../../utils/isVoidElementName'; import { Parser } from '../index'; import { Node } from '../../interfaces'; +import fuzzymatch from '../../utils/fuzzymatch'; +import list from '../../utils/list'; const validTagName = /^\!?[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/; const metaTags = new Map([ - ['svelte:document', 'Document'], + ['svelte:head', 'Head'], + ['svelte:options', 'Options'], ['svelte:window', 'Window'], - ['svelte:meta', 'Meta'], - ['svelte:head', 'Head'] + ['svelte:body', 'Body'] ]); +const valid_meta_tags = Array.from(metaTags.keys()).concat('svelte:self', 'svelte:component'); + const specials = new Map([ [ 'script', @@ -32,8 +36,8 @@ const specials = new Map([ ], ]); -const SELF = 'svelte:self'; -const COMPONENT = 'svelte:component'; +const SELF = /^svelte:self(?=[\s\/>])/; +const COMPONENT = /^svelte:component(?=[\s\/>])/; // based on http://developers.whatwg.org/syntax.html#syntax-tag-omission const disallowedContents = new Map([ @@ -97,7 +101,7 @@ export default function tag(parser: Parser) { const slug = metaTags.get(name).toLowerCase(); if (isClosingTag) { if ( - (name === 'svelte:window' || name === 'svelte:document') && + (name === 'svelte:window' || name === 'svelte:body') && parser.current().children.length ) { parser.error({ @@ -178,18 +182,19 @@ export default function tag(parser: Parser) { } } - if (name === 'slot') { - let i = parser.stack.length; - while (i--) { - const item = parser.stack[i]; - if (item.type === 'EachBlock') { - parser.error({ - code: `invalid-slot-placement`, - message: ` cannot be a child of an each-block` - }, start); - } - } - } + // TODO should this still error in in web component mode? + // if (name === 'slot') { + // let i = parser.stack.length; + // while (i--) { + // const item = parser.stack[i]; + // if (item.type === 'EachBlock') { + // parser.error({ + // code: `invalid-slot-placement`, + // message: ` cannot be a child of an each-block` + // }, start); + // } + // } + // } const uniqueNames = new Set(); @@ -278,7 +283,7 @@ export default function tag(parser: Parser) { function readTagName(parser: Parser) { const start = parser.index; - if (parser.eat(SELF)) { + if (parser.read(SELF)) { // check we're inside a block, otherwise this // will cause infinite recursion let i = parser.stack.length; @@ -295,19 +300,31 @@ function readTagName(parser: Parser) { if (!legal) { parser.error({ code: `invalid-self-placement`, - message: `<${SELF}> components can only exist inside if-blocks or each-blocks` + message: ` components can only exist inside if-blocks or each-blocks` }, start); } - return SELF; + return 'svelte:self'; } - if (parser.eat(COMPONENT)) return COMPONENT; + if (parser.read(COMPONENT)) return 'svelte:component'; const name = parser.readUntil(/(\s|\/|>)/); if (metaTags.has(name)) return name; + if (name.startsWith('svelte:')) { + const match = fuzzymatch(name.slice(7), valid_meta_tags); + + let message = `Valid tag names are ${list(valid_meta_tags)}`; + if (match) message += ` (did you mean '${match}'?)`; + + parser.error({ + code: 'invalid-tag-name', + message + }, start); + } + if (!validTagName.test(name)) { parser.error({ code: `invalid-tag-name`, @@ -379,7 +396,7 @@ function readAttribute(parser: Parser, uniqueNames: Set) { parser.allowWhitespace(); const colon_index = name.indexOf(':'); - const type = colon_index !== 1 && get_directive_type(name.slice(0, colon_index)); + const type = colon_index !== -1 && get_directive_type(name.slice(0, colon_index)); let value: any[] | true = true; if (parser.eat('=')) { @@ -448,6 +465,7 @@ function get_directive_type(name) { if (name === 'bind') return 'Binding'; if (name === 'class') return 'Class'; if (name === 'on') return 'EventHandler'; + if (name === 'let') return 'Let'; if (name === 'ref') return 'Ref'; if (name === 'in' || name === 'out' || name === 'transition') return 'Transition'; } @@ -524,4 +542,4 @@ function readSequence(parser: Parser, done: () => boolean) { code: `unexpected-eof`, message: `Unexpected end of input` }); -} \ No newline at end of file +} diff --git a/src/preprocess/index.ts b/src/preprocess/index.ts index 5abde887dc..4aaa033270 100644 --- a/src/preprocess/index.ts +++ b/src/preprocess/index.ts @@ -1,25 +1,25 @@ import { SourceMap } from 'magic-string'; import replaceAsync from '../utils/replaceAsync'; -export interface PreprocessOptions { +export interface PreprocessorGroup { markup?: (options: { content: string, filename: string - }) => { code: string, map?: SourceMap | string }; + }) => { code: string, map?: SourceMap | string, dependencies?: string[] }; style?: Preprocessor; script?: Preprocessor; - filename?: string } export type Preprocessor = (options: { content: string, attributes: Record, filename?: string -}) => { code: string, map?: SourceMap | string }; +}) => { code: string, map?: SourceMap | string, dependencies?: string[] }; interface Processed { code: string; map?: SourceMap | string; + dependencies?: string[]; } function parseAttributeValue(value: string) { @@ -39,28 +39,55 @@ function parseAttributes(str: string) { export default async function preprocess( source: string, - options: PreprocessOptions + preprocessor: PreprocessorGroup | PreprocessorGroup[], + options?: { filename?: string } ) { - if (options.markup) { - const processed: Processed = await options.markup({ + const filename = (options && options.filename) || preprocessor.filename; // legacy + const dependencies = []; + + const preprocessors = Array.isArray(preprocessor) ? preprocessor : [preprocessor]; + + const markup = preprocessors.map(p => p.markup).filter(Boolean); + const script = preprocessors.map(p => p.script).filter(Boolean); + const style = preprocessors.map(p => p.style).filter(Boolean); + + for (const fn of markup) { + const processed: Processed = await fn({ content: source, - filename: options.filename, + filename }); + if (processed && processed.dependencies) dependencies.push(...processed.dependencies); source = processed ? processed.code : source; } - if (options.style || options.script) { + + for (const fn of script) { + source = await replaceAsync( + source, + /([^]*?)<\/script>/gi, + async (match, attributes, content) => { + const processed: Processed = await fn({ + content, + attributes: parseAttributes(attributes), + filename + }); + if (processed && processed.dependencies) dependencies.push(...processed.dependencies); + return processed ? `${processed.code}` : match; + } + ); + } + + for (const fn of style) { source = await replaceAsync( source, - /<(script|style)([^]*?)>([^]*?)<\/\1>/gi, - async (match, type, attributes, content) => { - const processed: Processed = - type in options && - (await options[type]({ - content, - attributes: parseAttributes(attributes), - filename: options.filename, - })); - return processed ? `<${type}>${processed.code}` : match; + /([^]*?)<\/style>/gi, + async (match, attributes, content) => { + const processed: Processed = await fn({ + content, + attributes: parseAttributes(attributes), + filename + }); + if (processed && processed.dependencies) dependencies.push(...processed.dependencies); + return processed ? `${processed.code}` : match; } ); } @@ -71,6 +98,9 @@ export default async function preprocess( // script { code: scriptCode, map: scriptMap }, // markup { code: markupCode, map: markupMap }, + code: source, + dependencies: [...new Set(dependencies)], + toString() { return source; } diff --git a/src/utils/CodeBuilder.ts b/src/utils/CodeBuilder.ts index 05e26b232c..e192377cab 100644 --- a/src/utils/CodeBuilder.ts +++ b/src/utils/CodeBuilder.ts @@ -1,168 +1,103 @@ import repeat from './repeat'; -enum ChunkType { - Line, - Block +const whitespace = /^\s+$/; + +interface Chunk { + parent?: BlockChunk; + type: 'root'|'line'|'condition'; + children?: Chunk[]; + line?: string; + block?: boolean; + condition?: string; } -interface Condition { - condition: string; - used: boolean; +interface BlockChunk extends Chunk { + type: 'root'|'condition'; + children: Chunk[]; + parent: BlockChunk; } export default class CodeBuilder { - result: string; - first: ChunkType; - last: ChunkType; - lastCondition: string; - conditionStack: Condition[]; - indent: string; + root: BlockChunk = { type: 'root', children: [], parent: null }; + last: Chunk; + current: BlockChunk; constructor(str = '') { - this.result = str; - - const initial = str - ? /\n/.test(str) ? ChunkType.Block : ChunkType.Line - : null; - this.first = initial; - this.last = initial; - - this.lastCondition = null; - this.conditionStack = []; - this.indent = ''; + this.current = this.last = this.root; + this.addLine(str); } addConditional(condition: string, body: string) { - this.reifyConditions(); - - const indent = this.indent + (condition ? '\t' : ''); - body = body.replace(/^/gm, indent); - - if (condition === this.lastCondition) { - this.result += `\n${body}`; + if (this.last.type === 'condition' && this.last.condition === condition) { + if (body && !whitespace.test(body)) this.last.children.push({ type: 'line', line: body }); } else { - if (this.lastCondition) { - this.result += `\n${this.indent}}`; - } - - const block = condition - ? `if (${condition}) {\n${body}` - : body; - - this.result += `${this.last === ChunkType.Block ? '\n\n' : '\n'}${this.indent}${block}`; - this.lastCondition = condition; + const next = this.last = { type: 'condition', condition, parent: this.current, children: [] }; + this.current.children.push(next); + if (body && !whitespace.test(body)) next.children.push({ type: 'line', line: body }); } - - this.last = ChunkType.Block; } addLine(line: string) { - this.reifyConditions(); - - if (this.lastCondition) { - this.result += `\n${this.indent}}`; - this.lastCondition = null; - } - - if (this.last === ChunkType.Block) { - this.result += `\n\n${this.indent}${line}`; - } else if (this.last === ChunkType.Line) { - this.result += `\n${this.indent}${line}`; - } else { - this.result += line; - } - - this.last = ChunkType.Line; - if (!this.first) this.first = ChunkType.Line; - } - - addLineAtStart(line: string) { - this.reifyConditions(); - - if (this.first === ChunkType.Block) { - this.result = `${line}\n\n${this.indent}${this.result}`; - } else if (this.first === ChunkType.Line) { - this.result = `${line}\n${this.indent}${this.result}`; - } else { - this.result += line; - } - - this.first = ChunkType.Line; - if (!this.last) this.last = ChunkType.Line; + if (line && !whitespace.test(line)) this.current.children.push(this.last = { type: 'line', line }); } addBlock(block: string) { - this.reifyConditions(); - - if (this.indent) block = block.replace(/^/gm, `${this.indent}`); - - if (this.lastCondition) { - this.result += `\n${this.indent}}`; - this.lastCondition = null; - } - - if (this.result) { - this.result += `\n\n${this.indent}${block}`; - } else { - this.result += block; - } - - this.last = ChunkType.Block; - if (!this.first) this.first = ChunkType.Block; + if (block && !whitespace.test(block)) this.current.children.push(this.last = { type: 'line', line: block, block: true }); } - addBlockAtStart(block: string) { - this.reifyConditions(); + isEmpty() { return !findLine(this.root); } - if (this.result) { - this.result = `${block}\n\n${this.indent}${this.result}`; + pushCondition(condition: string) { + if (this.last.type === 'condition' && this.last.condition === condition) { + this.current = this.last as BlockChunk; } else { - this.result += block; + const next = this.last = { type: 'condition', condition, parent: this.current, children: [] }; + this.current.children.push(next); + this.current = next; } - - this.first = ChunkType.Block; - if (!this.last) this.last = ChunkType.Block; - } - - isEmpty() { - return this.result === ''; - } - - pushCondition(condition: string) { - this.conditionStack.push({ condition, used: false }); } popCondition() { - const { used } = this.conditionStack.pop(); + if (!this.current.parent) throw new Error(`Popping a condition that maybe wasn't pushed.`); + this.current = this.current.parent; + } - this.indent = repeat('\t', this.conditionStack.length); - if (used) this.addLine('}'); + toString() { + return chunkToString(this.root); } +} - reifyConditions() { - for (let i = 0; i < this.conditionStack.length; i += 1) { - const condition = this.conditionStack[i]; - if (!condition.used) { - const line = `if (${condition.condition}) {`; - - if (this.last === ChunkType.Block) { - this.result += `\n\n${this.indent}${line}`; - } else if (this.last === ChunkType.Line) { - this.result += `\n${this.indent}${line}`; - } else { - this.result += line; - } - - this.last = ChunkType.Line; - if (!this.first) this.first = ChunkType.Line; - - this.indent = repeat('\t', this.conditionStack.length); - condition.used = true; - } - } +function findLine(chunk: BlockChunk) { + for (const c of chunk.children) { + if (c.type === 'line' || findLine(c as BlockChunk)) return true; } + return false; +} - toString() { - return this.result.trim() + (this.lastCondition ? `\n}` : ``); +function chunkToString(chunk: Chunk, level: number = 0, lastBlock?: boolean, first?: boolean): string { + if (chunk.type === 'line') { + return `${lastBlock || (!first && chunk.block) ? '\n' : ''}${chunk.line.replace(/^/gm, repeat('\t', level))}`; + } else if (chunk.type === 'condition') { + let t = false; + const lines = chunk.children.map((c, i) => { + const str = chunkToString(c, level + 1, t, i === 0); + t = c.type !== 'line' || c.block; + return str; + }).filter(l => !!l); + + if (!lines.length) return ''; + + return `${lastBlock || (!first) ? '\n' : ''}${repeat('\t', level)}if (${chunk.condition}) {\n${lines.join('\n')}\n${repeat('\t', level)}}`; + } else if (chunk.type === 'root') { + let t = false; + const lines = chunk.children.map((c, i) => { + const str = chunkToString(c, 0, t, i === 0); + t = c.type !== 'line' || c.block; + return str; + }).filter(l => !!l); + + if (!lines.length) return ''; + + return lines.join('\n'); } } diff --git a/src/utils/__test__.ts b/src/utils/__test__.ts index c1681dd8d6..9e7c9f9937 100644 --- a/src/utils/__test__.ts +++ b/src/utils/__test__.ts @@ -124,67 +124,4 @@ describe('CodeBuilder', () => { ` ); }); - - it('adds a line at start', () => { - const builder = new CodeBuilder(); - - builder.addLine('// second'); - builder.addLineAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - // second - ` - ); - }); - - it('adds a line at start before a block', () => { - const builder = new CodeBuilder(); - - builder.addBlock('// second'); - builder.addLineAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - - // second - ` - ); - }); - - it('adds a block at start', () => { - const builder = new CodeBuilder(); - - builder.addLine('// second'); - builder.addBlockAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - - // second - ` - ); - }); - - it('adds a block at start before a block', () => { - const builder = new CodeBuilder(); - - builder.addBlock('// second'); - builder.addBlockAtStart('// first'); - - assert.equal( - builder.toString(), - deindent` - // first - - // second - ` - ); - }); }); diff --git a/src/utils/annotateWithScopes.ts b/src/utils/annotateWithScopes.ts index 96459e1ede..adf7619bed 100644 --- a/src/utils/annotateWithScopes.ts +++ b/src/utils/annotateWithScopes.ts @@ -52,6 +52,10 @@ export function createScopes(expression: Node) { }, }); + scope.declarations.forEach((node, name) => { + globals.delete(name); + }); + return { map, scope, globals }; } @@ -60,7 +64,6 @@ export class Scope { block: boolean; declarations: Map = new Map(); - writable_declarations: Set = new Set(); initialised_declarations: Set = new Set(); constructor(parent: Scope, block: boolean) { @@ -72,13 +75,11 @@ export class Scope { if (node.kind === 'var' && this.block && this.parent) { this.parent.addDeclaration(node); } else if (node.type === 'VariableDeclaration') { - const writable = node.kind !== 'const'; const initialised = !!node.init; node.declarations.forEach((declarator: Node) => { extractNames(declarator.id).forEach(name => { this.declarations.set(name, node); - if (writable) this.writable_declarations.add(name); if (initialised) this.initialised_declarations.add(name); }); }); diff --git a/src/utils/createDebuggingComment.ts b/src/utils/createDebuggingComment.ts index 15b8b12267..c90d7cf860 100644 --- a/src/utils/createDebuggingComment.ts +++ b/src/utils/createDebuggingComment.ts @@ -13,9 +13,16 @@ export default function createDebuggingComment( while (source[c - 1] === '{') c -= 1; } - let d = node.expression ? node.expression.node.end : c; - while (source[d] !== '}') d += 1; - while (source[d] === '}') d += 1; + let d; + + if (node.type === 'InlineComponent' || node.type === 'Element') { + d = node.children[0].start; + while (source[d - 1] !== '>') d -= 1; + } else { + d = node.expression ? node.expression.node.end : c; + while (source[d] !== '}') d += 1; + while (source[d] === '}') d += 1; + } const start = locate(c); const loc = `(${start.line + 1}:${start.column})`; diff --git a/src/utils/get_slot_data.ts b/src/utils/get_slot_data.ts new file mode 100644 index 0000000000..b7b08db341 --- /dev/null +++ b/src/utils/get_slot_data.ts @@ -0,0 +1,18 @@ +import { snip } from './snip'; +import { stringify_attribute } from './stringify_attribute'; + +export default function get_slot_data(attributes, is_ssr: boolean) { + return attributes + .filter(attribute => attribute.name !== 'name') + .map(attribute => { + const value = attribute.isTrue + ? 'true' + : attribute.chunks.length === 0 + ? '""' + : attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text' + ? snip(attribute.chunks[0]) + : '`' + stringify_attribute(attribute, is_ssr) + '`'; + + return `${attribute.name}: ${value}`; + }); +} \ No newline at end of file diff --git a/src/utils/replaceAsync.ts b/src/utils/replaceAsync.ts index 362b76b41d..fe76cf2e6d 100644 --- a/src/utils/replaceAsync.ts +++ b/src/utils/replaceAsync.ts @@ -10,11 +10,11 @@ export default async function replaceAsync( replacements.push( func(...args).then( res => - { + ({ offset: args[args.length - 2], length: args[0].length, replacement: res, - } + }) ) ); return ''; diff --git a/src/compile/render-ssr/utils.ts b/src/utils/snip.ts similarity index 100% rename from src/compile/render-ssr/utils.ts rename to src/utils/snip.ts diff --git a/src/utils/stringify_attribute.ts b/src/utils/stringify_attribute.ts new file mode 100644 index 0000000000..8cd7e2101c --- /dev/null +++ b/src/utils/stringify_attribute.ts @@ -0,0 +1,18 @@ +import Attribute from '../compile/nodes/Attribute'; +import Node from '../compile/nodes/shared/Node'; +import { escapeTemplate, escape } from './stringify'; +import { snip } from './snip'; + +export function stringify_attribute(attribute: Attribute, is_ssr: boolean) { + return attribute.chunks + .map((chunk: Node) => { + if (chunk.type === 'Text') { + return escapeTemplate(escape(chunk.data).replace(/"/g, '"')); + } + + return is_ssr + ? '${@escape(' + snip(chunk) + ')}' + : '${' + snip(chunk) + '}'; + }) + .join(''); +} \ No newline at end of file diff --git a/store.mjs b/store.mjs index ffdd90bf0e..5f005f15d5 100644 --- a/store.mjs +++ b/store.mjs @@ -34,7 +34,8 @@ export function readable(start, value) { }; } -export function writable(value) { +export function writable(value, start = noop) { + let stop; const subscribers = []; function set(newValue) { @@ -51,11 +52,13 @@ export function writable(value) { function subscribe(run, invalidate = noop) { const subscriber = [run, invalidate]; subscribers.push(subscriber); + if (subscribers.length === 1) stop = start() || noop; run(value); return () => { const index = subscribers.indexOf(subscriber); if (index !== -1) subscribers.splice(index, 1); + if (subscribers.length === 0) stop(); }; } @@ -66,7 +69,7 @@ export function derive(stores, fn) { const single = !Array.isArray(stores); if (single) stores = [stores]; - const auto = fn.length === 1; + const auto = fn.length < 2; let value = {}; return readable(set => { diff --git a/test/cli/samples/basic/command.sh b/test/cli/samples/basic/command.sh index 0ae80e4c95..9e272a7d5b 100644 --- a/test/cli/samples/basic/command.sh +++ b/test/cli/samples/basic/command.sh @@ -1 +1 @@ -svelte compile src/Main.html > actual/Main.js +svelte compile src/Main.svelte > actual/Main.js diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js index ba35a0c1e9..ecc2beb83c 100644 --- a/test/cli/samples/basic/expected/Main.js +++ b/test/cli/samples/basic/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/basic/src/Main.html b/test/cli/samples/basic/src/Main.svelte similarity index 100% rename from test/cli/samples/basic/src/Main.html rename to test/cli/samples/basic/src/Main.svelte diff --git a/test/cli/samples/custom-element/command.sh b/test/cli/samples/custom-element/command.sh index b93c2cb16a..ee9f854e9b 100644 --- a/test/cli/samples/custom-element/command.sh +++ b/test/cli/samples/custom-element/command.sh @@ -1 +1 @@ -svelte compile src/Main.html --customElement > actual/Main.js +svelte compile src/Main.svelte --customElement > actual/Main.js diff --git a/test/cli/samples/custom-element/expected/Main.js b/test/cli/samples/custom-element/expected/Main.js index 40865a2c81..f6befc4e3b 100644 --- a/test/cli/samples/custom-element/expected/Main.js +++ b/test/cli/samples/custom-element/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/custom-element/src/Main.html b/test/cli/samples/custom-element/src/Main.html deleted file mode 100644 index 3ac2c716c2..0000000000 --- a/test/cli/samples/custom-element/src/Main.html +++ /dev/null @@ -1,3 +0,0 @@ - - -

Hello world!

\ No newline at end of file diff --git a/test/cli/samples/custom-element/src/Main.svelte b/test/cli/samples/custom-element/src/Main.svelte new file mode 100644 index 0000000000..6323e9e8d1 --- /dev/null +++ b/test/cli/samples/custom-element/src/Main.svelte @@ -0,0 +1,3 @@ + + +

Hello world!

diff --git a/test/cli/samples/dev/command.sh b/test/cli/samples/dev/command.sh index 37d9b87fc0..b9dc99e7d1 100644 --- a/test/cli/samples/dev/command.sh +++ b/test/cli/samples/dev/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -d > actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -d > actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js index be11885fa0..db75c4a5c1 100644 --- a/test/cli/samples/dev/expected/Main.js +++ b/test/cli/samples/dev/expected/Main.js @@ -1,6 +1,6 @@ -/* src/Main.html generated by Svelte v2.13.4 */ +/* src/Main.svelte generated by Svelte v2.13.4 */ -const file = "src/Main.html"; +const file = "src/Main.svelte"; function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dev/src/Main.html b/test/cli/samples/dev/src/Main.svelte similarity index 100% rename from test/cli/samples/dev/src/Main.html rename to test/cli/samples/dev/src/Main.svelte diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js b/test/cli/samples/dir-sourcemap/expected/Main.js index 0c0fab6094..e164569e1c 100644 --- a/test/cli/samples/dir-sourcemap/expected/Main.js +++ b/test/cli/samples/dir-sourcemap/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './Widget.svelte'; diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js.map b/test/cli/samples/dir-sourcemap/expected/Main.js.map index 621cf85109..a0f4cf48c7 100644 --- a/test/cli/samples/dir-sourcemap/expected/Main.js.map +++ b/test/cli/samples/dir-sourcemap/expected/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Main.js","sources":["../src/Main.svelte"],"sourcesContent":["\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js b/test/cli/samples/dir-sourcemap/expected/Widget.js index b6019a73fd..d55dcbda4c 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js @@ -1,4 +1,4 @@ -/* src/Widget.html generated by Svelte vx.y.z */ +/* src/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js.map b/test/cli/samples/dir-sourcemap/expected/Widget.js.map index 57807d3fc0..37247333ed 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js.map +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js.map @@ -1 +1 @@ -{"version":3,"file":"Widget.js","sources":["../src/Widget.html"],"sourcesContent":["

widget

"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Widget.js","sources":["../src/Widget.svelte"],"sourcesContent":["

widget

"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/src/Main.html b/test/cli/samples/dir-sourcemap/src/Main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/cli/samples/dir-sourcemap/src/Main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/src/Main.svelte b/test/cli/samples/dir-sourcemap/src/Main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/cli/samples/dir-sourcemap/src/Main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/cli/samples/dir-sourcemap/src/Widget.html b/test/cli/samples/dir-sourcemap/src/Widget.svelte similarity index 100% rename from test/cli/samples/dir-sourcemap/src/Widget.html rename to test/cli/samples/dir-sourcemap/src/Widget.svelte diff --git a/test/cli/samples/dir-subdir/expected/Main.js b/test/cli/samples/dir-subdir/expected/Main.js index 2778c8c868..3026a122e2 100644 --- a/test/cli/samples/dir-subdir/expected/Main.js +++ b/test/cli/samples/dir-subdir/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './widget/Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './widget/Widget.svelte'; diff --git a/test/cli/samples/dir-subdir/expected/widget/Widget.js b/test/cli/samples/dir-subdir/expected/widget/Widget.js index 9282b7ddb4..e63ac2dad7 100644 --- a/test/cli/samples/dir-subdir/expected/widget/Widget.js +++ b/test/cli/samples/dir-subdir/expected/widget/Widget.js @@ -1,4 +1,4 @@ -/* src/widget/Widget.html generated by Svelte vx.y.z */ +/* src/widget/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir-subdir/src/Main.html b/test/cli/samples/dir-subdir/src/Main.html deleted file mode 100644 index 89391562d5..0000000000 --- a/test/cli/samples/dir-subdir/src/Main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/cli/samples/dir-subdir/src/Main.svelte b/test/cli/samples/dir-subdir/src/Main.svelte new file mode 100644 index 0000000000..ac663b4338 --- /dev/null +++ b/test/cli/samples/dir-subdir/src/Main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/cli/samples/dir-subdir/src/widget/Widget.html b/test/cli/samples/dir-subdir/src/widget/Widget.svelte similarity index 100% rename from test/cli/samples/dir-subdir/src/widget/Widget.html rename to test/cli/samples/dir-subdir/src/widget/Widget.svelte diff --git a/test/cli/samples/dir/expected/Main.js b/test/cli/samples/dir/expected/Main.js index bbc005da76..d87ac37939 100644 --- a/test/cli/samples/dir/expected/Main.js +++ b/test/cli/samples/dir/expected/Main.js @@ -1,5 +1,5 @@ -/* src/Main.html generated by Svelte vx.y.z */ -import Widget from './Widget.html'; +/* src/Main.svelte generated by Svelte vx.y.z */ +import Widget from './Widget.svelte'; diff --git a/test/cli/samples/dir/expected/Widget.js b/test/cli/samples/dir/expected/Widget.js index c5981a4c53..eeb37e3cfa 100644 --- a/test/cli/samples/dir/expected/Widget.js +++ b/test/cli/samples/dir/expected/Widget.js @@ -1,4 +1,4 @@ -/* src/Widget.html generated by Svelte vx.y.z */ +/* src/Widget.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/dir/src/Main.html b/test/cli/samples/dir/src/Main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/cli/samples/dir/src/Main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/cli/samples/dir/src/Main.svelte b/test/cli/samples/dir/src/Main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/cli/samples/dir/src/Main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/cli/samples/dir/src/Widget.html b/test/cli/samples/dir/src/Widget.svelte similarity index 100% rename from test/cli/samples/dir/src/Widget.html rename to test/cli/samples/dir/src/Widget.svelte diff --git a/test/cli/samples/globals/command.sh b/test/cli/samples/globals/command.sh index 9ed0c2a844..9e1a2de74a 100644 --- a/test/cli/samples/globals/command.sh +++ b/test/cli/samples/globals/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -f iife -g the-answer:theAnswer > actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -f iife -g the-answer:theAnswer > actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/globals/expected/Main.js b/test/cli/samples/globals/expected/Main.js index 1c6e01cdb8..8e526b08bf 100644 --- a/test/cli/samples/globals/expected/Main.js +++ b/test/cli/samples/globals/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ var Main = (function(answer) { "use strict"; answer = (answer && answer.__esModule) ? answer["default"] : answer; diff --git a/test/cli/samples/globals/src/Main.html b/test/cli/samples/globals/src/Main.svelte similarity index 100% rename from test/cli/samples/globals/src/Main.html rename to test/cli/samples/globals/src/Main.svelte diff --git a/test/cli/samples/sourcemap-inline/command.sh b/test/cli/samples/sourcemap-inline/command.sh index 36b5b71b8d..073fa7d259 100644 --- a/test/cli/samples/sourcemap-inline/command.sh +++ b/test/cli/samples/sourcemap-inline/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -m inline -o actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -m inline -o actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/sourcemap-inline/expected/Main.js b/test/cli/samples/sourcemap-inline/expected/Main.js index 668ff8b1bf..534c6734f2 100644 --- a/test/cli/samples/sourcemap-inline/expected/Main.js +++ b/test/cli/samples/sourcemap-inline/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/sourcemap-inline/src/Main.html b/test/cli/samples/sourcemap-inline/src/Main.svelte similarity index 100% rename from test/cli/samples/sourcemap-inline/src/Main.html rename to test/cli/samples/sourcemap-inline/src/Main.svelte diff --git a/test/cli/samples/sourcemap/command.sh b/test/cli/samples/sourcemap/command.sh index 4309d50b89..9164b1760c 100644 --- a/test/cli/samples/sourcemap/command.sh +++ b/test/cli/samples/sourcemap/command.sh @@ -1 +1 @@ -svelte compile src/Main.html -m -o actual/Main.js \ No newline at end of file +svelte compile src/Main.svelte -m -o actual/Main.js \ No newline at end of file diff --git a/test/cli/samples/sourcemap/expected/Main.js b/test/cli/samples/sourcemap/expected/Main.js index 95e6718715..59059aadcb 100644 --- a/test/cli/samples/sourcemap/expected/Main.js +++ b/test/cli/samples/sourcemap/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var p; diff --git a/test/cli/samples/sourcemap/expected/Main.js.map b/test/cli/samples/sourcemap/expected/Main.js.map index a3be94cb9a..a31dec16ab 100644 --- a/test/cli/samples/sourcemap/expected/Main.js.map +++ b/test/cli/samples/sourcemap/expected/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["

Hello world!

\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Main.js","sources":["../src/Main.svelte"],"sourcesContent":["

Hello world!

\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/sourcemap/src/Main.html b/test/cli/samples/sourcemap/src/Main.svelte similarity index 100% rename from test/cli/samples/sourcemap/src/Main.html rename to test/cli/samples/sourcemap/src/Main.svelte diff --git a/test/cli/samples/ssr/command.sh b/test/cli/samples/ssr/command.sh index 30e155691a..878f6038ab 100644 --- a/test/cli/samples/ssr/command.sh +++ b/test/cli/samples/ssr/command.sh @@ -1 +1 @@ -svelte compile --generate ssr src/Main.html > actual/Main.js +svelte compile --generate ssr src/Main.svelte > actual/Main.js diff --git a/test/cli/samples/ssr/expected/Main.js b/test/cli/samples/ssr/expected/Main.js index adf4e19fa0..b7a4f4addf 100644 --- a/test/cli/samples/ssr/expected/Main.js +++ b/test/cli/samples/ssr/expected/Main.js @@ -2,7 +2,7 @@ var Main = {}; -Main.filename = "src/Main.html"; +Main.filename = "src/Main.svelte"; Main.data = function() { return {}; diff --git a/test/cli/samples/ssr/src/Main.html b/test/cli/samples/ssr/src/Main.svelte similarity index 100% rename from test/cli/samples/ssr/src/Main.html rename to test/cli/samples/ssr/src/Main.svelte diff --git a/test/cli/samples/store/command.sh b/test/cli/samples/store/command.sh index a734fdc772..dedeae05ef 100644 --- a/test/cli/samples/store/command.sh +++ b/test/cli/samples/store/command.sh @@ -1 +1 @@ -svelte compile src/Main.html --store > actual/Main.js +svelte compile src/Main.svelte --store > actual/Main.js diff --git a/test/cli/samples/store/expected/Main.js b/test/cli/samples/store/expected/Main.js index dbd365c15d..28bc62b786 100644 --- a/test/cli/samples/store/expected/Main.js +++ b/test/cli/samples/store/expected/Main.js @@ -1,4 +1,4 @@ -/* src/Main.html generated by Svelte vx.y.z */ +/* src/Main.svelte generated by Svelte vx.y.z */ function create_main_fragment(component, ctx) { var h1, text0, text1; diff --git a/test/cli/samples/store/src/Main.html b/test/cli/samples/store/src/Main.svelte similarity index 100% rename from test/cli/samples/store/src/Main.html rename to test/cli/samples/store/src/Main.svelte diff --git a/test/css/index.js b/test/css/index.js index 224af150bd..684c310526 100644 --- a/test/css/index.js +++ b/test/css/index.js @@ -2,7 +2,7 @@ import * as assert from 'assert'; import * as fs from 'fs'; import { env, normalizeHtml, svelte } from '../helpers.js'; -function tryRequire(file) { +function try_require(file) { try { const mod = require(file); return mod.default || mod; @@ -12,7 +12,7 @@ function tryRequire(file) { } } -function normalizeWarning(warning) { +function normalize_warning(warning) { warning.frame = warning.frame .replace(/^\n/, '') .replace(/^\t+/gm, '') @@ -49,49 +49,30 @@ describe('css', () => { } (solo ? it.only : skip ? it.skip : it)(dir, () => { - const config = tryRequire(`./samples/${dir}/_config.js`) || {}; + const config = try_require(`./samples/${dir}/_config.js`) || {}; const input = fs - .readFileSync(`test/css/samples/${dir}/input.html`, 'utf-8') + .readFileSync(`test/css/samples/${dir}/input.svelte`, 'utf-8') .replace(/\s+$/, ''); - const expectedWarnings = (config.warnings || []).map(normalizeWarning); - const domWarnings = []; - const ssrWarnings = []; + const expected_warnings = (config.warnings || []).map(normalize_warning); const dom = svelte.compile( input, - Object.assign(config, { - format: 'cjs', - name: 'SvelteComponent', - onwarn: warning => { - domWarnings.push(warning); - } - }) + Object.assign(config.compileOptions || {}, { format: 'cjs' }) ); - assert.deepEqual(dom.stats.warnings, domWarnings); - const ssr = svelte.compile( input, - Object.assign(config, { - format: 'cjs', - generate: 'ssr', - name: 'SvelteComponent', - onwarn: warning => { - ssrWarnings.push(warning); - } - }) + Object.assign(config.compileOptions || {}, { format: 'cjs', generate: 'ssr' }) ); - assert.deepEqual(dom.stats.warnings, domWarnings); - assert.equal(dom.css.code, ssr.css.code); - assert.deepEqual( - domWarnings.map(normalizeWarning), - ssrWarnings.map(normalizeWarning) - ); - assert.deepEqual(domWarnings.map(normalizeWarning), expectedWarnings); + const dom_warnings = dom.stats.warnings.map(normalize_warning); + const ssr_warnings = ssr.stats.warnings.map(normalize_warning); + + assert.deepEqual(dom_warnings, ssr_warnings); + assert.deepEqual(dom_warnings.map(normalize_warning), expected_warnings); fs.writeFileSync(`test/css/samples/${dir}/_actual.css`, dom.css.code); const expected = { diff --git a/test/css/samples/attribute-selector-only-name/input.html b/test/css/samples/attribute-selector-only-name/input.svelte similarity index 100% rename from test/css/samples/attribute-selector-only-name/input.html rename to test/css/samples/attribute-selector-only-name/input.svelte diff --git a/test/css/samples/attribute-selector-unquoted/input.html b/test/css/samples/attribute-selector-unquoted/input.svelte similarity index 100% rename from test/css/samples/attribute-selector-unquoted/input.html rename to test/css/samples/attribute-selector-unquoted/input.svelte diff --git a/test/css/samples/basic/input.html b/test/css/samples/basic/input.svelte similarity index 100% rename from test/css/samples/basic/input.html rename to test/css/samples/basic/input.svelte diff --git a/test/css/samples/combinator-child/input.html b/test/css/samples/combinator-child/input.svelte similarity index 100% rename from test/css/samples/combinator-child/input.html rename to test/css/samples/combinator-child/input.svelte diff --git a/test/css/samples/css-vars/input.html b/test/css/samples/css-vars/input.svelte similarity index 100% rename from test/css/samples/css-vars/input.html rename to test/css/samples/css-vars/input.svelte diff --git a/test/css/samples/descendant-selector-non-top-level-outer/input.html b/test/css/samples/descendant-selector-non-top-level-outer/input.svelte similarity index 100% rename from test/css/samples/descendant-selector-non-top-level-outer/input.html rename to test/css/samples/descendant-selector-non-top-level-outer/input.svelte diff --git a/test/css/samples/empty-class/_config.js b/test/css/samples/empty-class/_config.js index fb1565c7bc..cc766d9478 100644 --- a/test/css/samples/empty-class/_config.js +++ b/test/css/samples/empty-class/_config.js @@ -1,6 +1,6 @@ export default { warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/empty-class/input.html b/test/css/samples/empty-class/input.svelte similarity index 100% rename from test/css/samples/empty-class/input.html rename to test/css/samples/empty-class/input.svelte diff --git a/test/css/samples/empty-rule-dev/_config.js b/test/css/samples/empty-rule-dev/_config.js index e26996239d..bdadb774d1 100644 --- a/test/css/samples/empty-rule-dev/_config.js +++ b/test/css/samples/empty-rule-dev/_config.js @@ -1,3 +1,5 @@ export default { - dev: true + compileOptions: { + dev: true + } }; \ No newline at end of file diff --git a/test/css/samples/empty-rule-dev/input.html b/test/css/samples/empty-rule-dev/input.svelte similarity index 100% rename from test/css/samples/empty-rule-dev/input.html rename to test/css/samples/empty-rule-dev/input.svelte diff --git a/test/css/samples/empty-rule/input.html b/test/css/samples/empty-rule/input.svelte similarity index 100% rename from test/css/samples/empty-rule/input.html rename to test/css/samples/empty-rule/input.svelte diff --git a/test/css/samples/global-keyframes/input.html b/test/css/samples/global-keyframes/input.svelte similarity index 100% rename from test/css/samples/global-keyframes/input.html rename to test/css/samples/global-keyframes/input.svelte diff --git a/test/css/samples/global/input.html b/test/css/samples/global/input.svelte similarity index 100% rename from test/css/samples/global/input.html rename to test/css/samples/global/input.svelte diff --git a/test/css/samples/keyframes-autoprefixed/input.html b/test/css/samples/keyframes-autoprefixed/input.svelte similarity index 100% rename from test/css/samples/keyframes-autoprefixed/input.html rename to test/css/samples/keyframes-autoprefixed/input.svelte diff --git a/test/css/samples/keyframes-from-to/input.html b/test/css/samples/keyframes-from-to/input.svelte similarity index 100% rename from test/css/samples/keyframes-from-to/input.html rename to test/css/samples/keyframes-from-to/input.svelte diff --git a/test/css/samples/keyframes/input.html b/test/css/samples/keyframes/input.svelte similarity index 100% rename from test/css/samples/keyframes/input.html rename to test/css/samples/keyframes/input.svelte diff --git a/test/css/samples/local-inside-global/input.html b/test/css/samples/local-inside-global/input.svelte similarity index 100% rename from test/css/samples/local-inside-global/input.html rename to test/css/samples/local-inside-global/input.svelte diff --git a/test/css/samples/media-query-word/input.html b/test/css/samples/media-query-word/input.svelte similarity index 100% rename from test/css/samples/media-query-word/input.html rename to test/css/samples/media-query-word/input.svelte diff --git a/test/css/samples/media-query/input.html b/test/css/samples/media-query/input.svelte similarity index 100% rename from test/css/samples/media-query/input.html rename to test/css/samples/media-query/input.svelte diff --git a/test/css/samples/nested/input.html b/test/css/samples/nested/input.svelte similarity index 100% rename from test/css/samples/nested/input.html rename to test/css/samples/nested/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-contains/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-case-insensitive/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals-dynamic/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-equals/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-prefix/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-suffix/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector-word-equals/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-attribute-selector/input.html b/test/css/samples/omit-scoping-attribute-attribute-selector/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-attribute-selector/input.html rename to test/css/samples/omit-scoping-attribute-attribute-selector/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-class-dynamic/input.html b/test/css/samples/omit-scoping-attribute-class-dynamic/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-dynamic/input.html rename to test/css/samples/omit-scoping-attribute-class-dynamic/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-class-static/input.html b/test/css/samples/omit-scoping-attribute-class-static/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-class-static/input.html rename to test/css/samples/omit-scoping-attribute-class-static/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-class/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner-multiple/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-inner/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-inner/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-inner/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-inner/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-outer-multiple/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant-global-outer/input.html b/test/css/samples/omit-scoping-attribute-descendant-global-outer/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant-global-outer/input.html rename to test/css/samples/omit-scoping-attribute-descendant-global-outer/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-descendant/input.html b/test/css/samples/omit-scoping-attribute-descendant/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-descendant/input.html rename to test/css/samples/omit-scoping-attribute-descendant/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-global/input.html b/test/css/samples/omit-scoping-attribute-global/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-global/input.html rename to test/css/samples/omit-scoping-attribute-global/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-id/input.html b/test/css/samples/omit-scoping-attribute-id/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-id/input.html rename to test/css/samples/omit-scoping-attribute-id/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-whitespace-multiple/input.html b/test/css/samples/omit-scoping-attribute-whitespace-multiple/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace-multiple/input.html rename to test/css/samples/omit-scoping-attribute-whitespace-multiple/input.svelte diff --git a/test/css/samples/omit-scoping-attribute-whitespace/input.html b/test/css/samples/omit-scoping-attribute-whitespace/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute-whitespace/input.html rename to test/css/samples/omit-scoping-attribute-whitespace/input.svelte diff --git a/test/css/samples/omit-scoping-attribute/input.html b/test/css/samples/omit-scoping-attribute/input.svelte similarity index 100% rename from test/css/samples/omit-scoping-attribute/input.html rename to test/css/samples/omit-scoping-attribute/input.svelte diff --git a/test/css/samples/pseudo-element/input.html b/test/css/samples/pseudo-element/input.svelte similarity index 100% rename from test/css/samples/pseudo-element/input.html rename to test/css/samples/pseudo-element/input.svelte diff --git a/test/css/samples/spread/input.html b/test/css/samples/spread/input.svelte similarity index 100% rename from test/css/samples/spread/input.html rename to test/css/samples/spread/input.svelte diff --git a/test/css/samples/supports-query/input.html b/test/css/samples/supports-query/input.svelte similarity index 100% rename from test/css/samples/supports-query/input.html rename to test/css/samples/supports-query/input.svelte diff --git a/test/css/samples/universal-selector/input.html b/test/css/samples/universal-selector/input.svelte similarity index 100% rename from test/css/samples/universal-selector/input.html rename to test/css/samples/universal-selector/input.svelte diff --git a/test/css/samples/unknown-at-rule/input.html b/test/css/samples/unknown-at-rule/input.svelte similarity index 100% rename from test/css/samples/unknown-at-rule/input.html rename to test/css/samples/unknown-at-rule/input.svelte diff --git a/test/css/samples/unused-selector-leading/_config.js b/test/css/samples/unused-selector-leading/_config.js index c01e978405..20310a5847 100644 --- a/test/css/samples/unused-selector-leading/_config.js +++ b/test/css/samples/unused-selector-leading/_config.js @@ -1,7 +1,7 @@ export default { warnings: [ { - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { @@ -25,7 +25,7 @@ export default { }, { - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector-leading/input.html b/test/css/samples/unused-selector-leading/input.svelte similarity index 100% rename from test/css/samples/unused-selector-leading/input.html rename to test/css/samples/unused-selector-leading/input.svelte diff --git a/test/css/samples/unused-selector-ternary/_config.js b/test/css/samples/unused-selector-ternary/_config.js index 043a7addf9..68254477d9 100644 --- a/test/css/samples/unused-selector-ternary/_config.js +++ b/test/css/samples/unused-selector-ternary/_config.js @@ -4,7 +4,7 @@ export default { }, warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector-ternary/input.html b/test/css/samples/unused-selector-ternary/input.svelte similarity index 100% rename from test/css/samples/unused-selector-ternary/input.html rename to test/css/samples/unused-selector-ternary/input.svelte diff --git a/test/css/samples/unused-selector/_config.js b/test/css/samples/unused-selector/_config.js index 5f6abbc08b..49fb3a27e7 100644 --- a/test/css/samples/unused-selector/_config.js +++ b/test/css/samples/unused-selector/_config.js @@ -1,6 +1,6 @@ export default { warnings: [{ - filename: "SvelteComponent.html", + filename: "SvelteComponent.svelte", code: `css-unused-selector`, message: "Unused CSS selector", start: { diff --git a/test/css/samples/unused-selector/input.html b/test/css/samples/unused-selector/input.svelte similarity index 100% rename from test/css/samples/unused-selector/input.html rename to test/css/samples/unused-selector/input.svelte diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index ad9e6004dc..d2641cb5b0 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -72,7 +72,7 @@ describe('custom-elements', function() { }, transform(code, id) { - if (id.endsWith('.html')) { + if (id.endsWith('.svelte')) { const compiled = svelte.compile(code, { customElement: true, dev: config.dev @@ -89,8 +89,8 @@ describe('custom-elements', function() { ] }) .then(bundle => bundle.generate({ format: 'iife', name: 'test' })) - .then(generated => { - bundle = generated.code; + .then(result => { + bundle = result.output[0].code; const nightmare = new Nightmare({ show: false }); diff --git a/test/custom-elements/samples/custom-method/main.html b/test/custom-elements/samples/custom-method/main.svelte similarity index 64% rename from test/custom-elements/samples/custom-method/main.html rename to test/custom-elements/samples/custom-method/main.svelte index 8b85a52575..6a99cd7ed6 100644 --- a/test/custom-elements/samples/custom-method/main.html +++ b/test/custom-elements/samples/custom-method/main.svelte @@ -1,4 +1,4 @@ - + -

{foo}

\ No newline at end of file +

{foo}

diff --git a/test/custom-elements/samples/custom-method/test.js b/test/custom-elements/samples/custom-method/test.js index 2233f0b452..e274786079 100644 --- a/test/custom-elements/samples/custom-method/test.js +++ b/test/custom-elements/samples/custom-method/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default async function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/escaped-css/main.html b/test/custom-elements/samples/escaped-css/main.svelte similarity index 60% rename from test/custom-elements/samples/escaped-css/main.html rename to test/custom-elements/samples/escaped-css/main.svelte index 0a28900d85..c465165483 100644 --- a/test/custom-elements/samples/escaped-css/main.html +++ b/test/custom-elements/samples/escaped-css/main.svelte @@ -1,4 +1,4 @@ - + @@ -6,4 +6,4 @@ .icon::before { content: '\ff' } - \ No newline at end of file + diff --git a/test/custom-elements/samples/escaped-css/test.js b/test/custom-elements/samples/escaped-css/test.js index bd148ad5a7..3696ee8c1b 100644 --- a/test/custom-elements/samples/escaped-css/test.js +++ b/test/custom-elements/samples/escaped-css/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/custom-elements/samples/html-slots/main.html b/test/custom-elements/samples/html-slots/main.svelte similarity index 71% rename from test/custom-elements/samples/html-slots/main.html rename to test/custom-elements/samples/html-slots/main.svelte index fbc70b0aeb..91f1fb800e 100644 --- a/test/custom-elements/samples/html-slots/main.html +++ b/test/custom-elements/samples/html-slots/main.svelte @@ -1,4 +1,4 @@ - +
@@ -8,4 +8,4 @@

foo fallback content

-
\ No newline at end of file + diff --git a/test/custom-elements/samples/html-slots/test.js b/test/custom-elements/samples/html-slots/test.js index 87cfd2029d..bb38a83eab 100644 --- a/test/custom-elements/samples/html-slots/test.js +++ b/test/custom-elements/samples/html-slots/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ` diff --git a/test/custom-elements/samples/html/main.html b/test/custom-elements/samples/html/main.html deleted file mode 100644 index 4765b5a151..0000000000 --- a/test/custom-elements/samples/html/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - -

Hello {name}!

\ No newline at end of file diff --git a/test/custom-elements/samples/html/main.svelte b/test/custom-elements/samples/html/main.svelte new file mode 100644 index 0000000000..0931535a18 --- /dev/null +++ b/test/custom-elements/samples/html/main.svelte @@ -0,0 +1,7 @@ + + + + +

Hello {name}!

diff --git a/test/custom-elements/samples/html/test.js b/test/custom-elements/samples/html/test.js index 732d79f009..1638ead784 100644 --- a/test/custom-elements/samples/html/test.js +++ b/test/custom-elements/samples/html/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/nested.skip/Counter.html b/test/custom-elements/samples/nested.skip/Counter.html deleted file mode 100644 index d365ce7644..0000000000 --- a/test/custom-elements/samples/nested.skip/Counter.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/custom-elements/samples/nested.skip/Counter.svelte b/test/custom-elements/samples/nested.skip/Counter.svelte new file mode 100644 index 0000000000..87cde48466 --- /dev/null +++ b/test/custom-elements/samples/nested.skip/Counter.svelte @@ -0,0 +1,7 @@ + + + + + diff --git a/test/custom-elements/samples/nested.skip/main.html b/test/custom-elements/samples/nested.skip/main.html deleted file mode 100644 index 3e80f6015e..0000000000 --- a/test/custom-elements/samples/nested.skip/main.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - -

clicked {count} times

\ No newline at end of file diff --git a/test/custom-elements/samples/nested.skip/main.svelte b/test/custom-elements/samples/nested.skip/main.svelte new file mode 100644 index 0000000000..cb26008061 --- /dev/null +++ b/test/custom-elements/samples/nested.skip/main.svelte @@ -0,0 +1,10 @@ + + + + + +

clicked {count} times

diff --git a/test/custom-elements/samples/nested.skip/test.js b/test/custom-elements/samples/nested.skip/test.js index d6d52426af..85320297ea 100644 --- a/test/custom-elements/samples/nested.skip/test.js +++ b/test/custom-elements/samples/nested.skip/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default async function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/new-styled/main.html b/test/custom-elements/samples/new-styled/main.html deleted file mode 100644 index be1b397fa5..0000000000 --- a/test/custom-elements/samples/new-styled/main.html +++ /dev/null @@ -1,9 +0,0 @@ - - -

styled

- - \ No newline at end of file diff --git a/test/custom-elements/samples/new-styled/main.svelte b/test/custom-elements/samples/new-styled/main.svelte new file mode 100644 index 0000000000..e69c6e05b1 --- /dev/null +++ b/test/custom-elements/samples/new-styled/main.svelte @@ -0,0 +1,9 @@ + + +

styled

+ + diff --git a/test/custom-elements/samples/new-styled/test.js b/test/custom-elements/samples/new-styled/test.js index 6bb37d7a2a..f027121009 100644 --- a/test/custom-elements/samples/new-styled/test.js +++ b/test/custom-elements/samples/new-styled/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { target.innerHTML = '

unstyled

'; diff --git a/test/custom-elements/samples/new/main.html b/test/custom-elements/samples/new/main.html deleted file mode 100644 index 4765b5a151..0000000000 --- a/test/custom-elements/samples/new/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - -

Hello {name}!

\ No newline at end of file diff --git a/test/custom-elements/samples/new/main.svelte b/test/custom-elements/samples/new/main.svelte new file mode 100644 index 0000000000..0931535a18 --- /dev/null +++ b/test/custom-elements/samples/new/main.svelte @@ -0,0 +1,7 @@ + + + + +

Hello {name}!

diff --git a/test/custom-elements/samples/new/test.js b/test/custom-elements/samples/new/test.js index f37f4301fb..1137495e35 100644 --- a/test/custom-elements/samples/new/test.js +++ b/test/custom-elements/samples/new/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/custom-elements/samples/no-missing-prop-warnings/main.html b/test/custom-elements/samples/no-missing-prop-warnings/main.svelte similarity index 59% rename from test/custom-elements/samples/no-missing-prop-warnings/main.html rename to test/custom-elements/samples/no-missing-prop-warnings/main.svelte index a9baee2faf..3ea205e3f3 100644 --- a/test/custom-elements/samples/no-missing-prop-warnings/main.html +++ b/test/custom-elements/samples/no-missing-prop-warnings/main.svelte @@ -1,4 +1,4 @@ - +

foo: {foo}

-

bar: {bar}

\ No newline at end of file +

bar: {bar}

diff --git a/test/custom-elements/samples/no-missing-prop-warnings/test.js b/test/custom-elements/samples/no-missing-prop-warnings/test.js index 9430e97f3a..e7ced25e19 100644 --- a/test/custom-elements/samples/no-missing-prop-warnings/test.js +++ b/test/custom-elements/samples/no-missing-prop-warnings/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { const warnings = []; diff --git a/test/custom-elements/samples/oncreate/main.html b/test/custom-elements/samples/oncreate/main.svelte similarity index 80% rename from test/custom-elements/samples/oncreate/main.html rename to test/custom-elements/samples/oncreate/main.svelte index 1a521ed761..ed3980a28e 100644 --- a/test/custom-elements/samples/oncreate/main.html +++ b/test/custom-elements/samples/oncreate/main.svelte @@ -1,4 +1,4 @@ - + - diff --git a/test/custom-elements/samples/oncreate/test.js b/test/custom-elements/samples/oncreate/test.js index a64a8c9fec..11d76078f2 100644 --- a/test/custom-elements/samples/oncreate/test.js +++ b/test/custom-elements/samples/oncreate/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import './main.html'; +import './main.svelte'; export default function (target) { target.innerHTML = ''; diff --git a/test/custom-elements/samples/props/main.html b/test/custom-elements/samples/props/main.html deleted file mode 100644 index bee06784e4..0000000000 --- a/test/custom-elements/samples/props/main.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/custom-elements/samples/props/main.svelte b/test/custom-elements/samples/props/main.svelte new file mode 100644 index 0000000000..80b483bf6e --- /dev/null +++ b/test/custom-elements/samples/props/main.svelte @@ -0,0 +1,9 @@ + + + + + diff --git a/test/custom-elements/samples/props/my-widget.html b/test/custom-elements/samples/props/my-widget.svelte similarity index 54% rename from test/custom-elements/samples/props/my-widget.html rename to test/custom-elements/samples/props/my-widget.svelte index 6aabe5a73b..cf512e0ff8 100644 --- a/test/custom-elements/samples/props/my-widget.html +++ b/test/custom-elements/samples/props/my-widget.svelte @@ -1,8 +1,8 @@ - +

{items.length} items

-

{items.join(', ')}

\ No newline at end of file +

{items.join(', ')}

diff --git a/test/custom-elements/samples/props/test.js b/test/custom-elements/samples/props/test.js index 1e95fe3ad2..9c7e44c3a3 100644 --- a/test/custom-elements/samples/props/test.js +++ b/test/custom-elements/samples/props/test.js @@ -1,5 +1,5 @@ import * as assert from 'assert'; -import CustomElement from './main.html'; +import CustomElement from './main.svelte'; export default function (target) { new CustomElement({ diff --git a/test/helpers.js b/test/helpers.js index 53b62aca5a..b7064c99eb 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -2,7 +2,6 @@ import * as jsdom from 'jsdom'; import * as assert from 'assert'; import * as glob from 'tiny-glob/sync.js'; import * as fs from 'fs'; -import * as path from 'path'; import * as colors from 'kleur'; // for coverage purposes, we need to test source files, @@ -171,24 +170,14 @@ export function addLineNumbers(code) { .join('\n'); } -function capitalise(str) { - return str[0].toUpperCase() + str.slice(1); -} - export function showOutput(cwd, options = {}, compile = svelte.compile) { - glob('**/*.html', { cwd }).forEach(file => { + glob('**/*.svelte', { cwd }).forEach(file => { if (file[0] === '_') return; - const name = path.basename(file) - .slice(0, -path.extname(file).length) - .replace(/^\d/, '_$&') - .replace(/[^a-zA-Z0-9_$]/g, ''); - const { js } = compile( fs.readFileSync(`${cwd}/${file}`, 'utf-8'), Object.assign(options, { - filename: file, - name: capitalise(name) + filename: file }) ); diff --git a/test/hydration/index.js b/test/hydration/index.js index e73bee4956..30647cace1 100644 --- a/test/hydration/index.js +++ b/test/hydration/index.js @@ -12,22 +12,16 @@ import { let compileOptions = null; -function getName(filename) { - const base = path.basename(filename).replace('.html', ''); - return base[0].toUpperCase() + base.slice(1); -} - const sveltePath = process.cwd(); describe('hydration', () => { before(() => { const svelte = loadSvelte(); - require.extensions['.html'] = function(module, filename) { + require.extensions['.svelte'] = function(module, filename) { const options = Object.assign( { filename, - name: getName(filename), hydratable: true, format: 'cjs', sveltePath @@ -56,9 +50,6 @@ describe('hydration', () => { const cwd = path.resolve(`test/hydration/samples/${dir}`); compileOptions = config.compileOptions || {}; - compileOptions.shared = path.resolve('internal.js'); - compileOptions.dev = config.dev; - compileOptions.hydrate = true; const window = env(); @@ -68,7 +59,7 @@ describe('hydration', () => { let SvelteComponent; try { - SvelteComponent = require(`${cwd}/main.html`).default; + SvelteComponent = require(`${cwd}/main.svelte`).default; } catch (err) { throw err; } @@ -94,14 +85,12 @@ describe('hydration', () => { } } catch (err) { showOutput(cwd, { - shared: 'svelte/internal.js', hydratable: true }); throw err; } if (config.show) showOutput(cwd, { - shared: 'svelte/internal.js', hydratable: true }); }); diff --git a/test/hydration/samples/basic/main.html b/test/hydration/samples/basic/main.svelte similarity index 100% rename from test/hydration/samples/basic/main.html rename to test/hydration/samples/basic/main.svelte diff --git a/test/hydration/samples/binding-input/main.html b/test/hydration/samples/binding-input/main.svelte similarity index 100% rename from test/hydration/samples/binding-input/main.html rename to test/hydration/samples/binding-input/main.svelte diff --git a/test/hydration/samples/component-in-element/Nested.html b/test/hydration/samples/component-in-element/Nested.svelte similarity index 100% rename from test/hydration/samples/component-in-element/Nested.html rename to test/hydration/samples/component-in-element/Nested.svelte diff --git a/test/hydration/samples/component-in-element/main.html b/test/hydration/samples/component-in-element/main.html deleted file mode 100644 index 4367a831ea..0000000000 --- a/test/hydration/samples/component-in-element/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - -
- -
\ No newline at end of file diff --git a/test/hydration/samples/component-in-element/main.svelte b/test/hydration/samples/component-in-element/main.svelte new file mode 100644 index 0000000000..f1d903fcd6 --- /dev/null +++ b/test/hydration/samples/component-in-element/main.svelte @@ -0,0 +1,7 @@ + + +
+ +
\ No newline at end of file diff --git a/test/hydration/samples/component/Nested.html b/test/hydration/samples/component/Nested.svelte similarity index 100% rename from test/hydration/samples/component/Nested.html rename to test/hydration/samples/component/Nested.svelte diff --git a/test/hydration/samples/component/main.html b/test/hydration/samples/component/main.html deleted file mode 100644 index 583835f46a..0000000000 --- a/test/hydration/samples/component/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/hydration/samples/component/main.svelte b/test/hydration/samples/component/main.svelte new file mode 100644 index 0000000000..469c37f719 --- /dev/null +++ b/test/hydration/samples/component/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/hydration/samples/dynamic-text-changed/main.html b/test/hydration/samples/dynamic-text-changed/main.svelte similarity index 100% rename from test/hydration/samples/dynamic-text-changed/main.html rename to test/hydration/samples/dynamic-text-changed/main.svelte diff --git a/test/hydration/samples/dynamic-text/main.html b/test/hydration/samples/dynamic-text/main.svelte similarity index 100% rename from test/hydration/samples/dynamic-text/main.html rename to test/hydration/samples/dynamic-text/main.svelte diff --git a/test/hydration/samples/each-block-arg-clash/main.html b/test/hydration/samples/each-block-arg-clash/main.svelte similarity index 100% rename from test/hydration/samples/each-block-arg-clash/main.html rename to test/hydration/samples/each-block-arg-clash/main.svelte diff --git a/test/hydration/samples/each-block/main.html b/test/hydration/samples/each-block/main.svelte similarity index 100% rename from test/hydration/samples/each-block/main.html rename to test/hydration/samples/each-block/main.svelte diff --git a/test/hydration/samples/element-attribute-added/main.html b/test/hydration/samples/element-attribute-added/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-added/main.html rename to test/hydration/samples/element-attribute-added/main.svelte diff --git a/test/hydration/samples/element-attribute-changed/main.html b/test/hydration/samples/element-attribute-changed/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-changed/main.html rename to test/hydration/samples/element-attribute-changed/main.svelte diff --git a/test/hydration/samples/element-attribute-removed/main.html b/test/hydration/samples/element-attribute-removed/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-removed/main.html rename to test/hydration/samples/element-attribute-removed/main.svelte diff --git a/test/hydration/samples/element-attribute-unchanged/main.html b/test/hydration/samples/element-attribute-unchanged/main.svelte similarity index 100% rename from test/hydration/samples/element-attribute-unchanged/main.html rename to test/hydration/samples/element-attribute-unchanged/main.svelte diff --git a/test/hydration/samples/element-nested/main.html b/test/hydration/samples/element-nested/main.svelte similarity index 100% rename from test/hydration/samples/element-nested/main.html rename to test/hydration/samples/element-nested/main.svelte diff --git a/test/hydration/samples/element-ref/main.html b/test/hydration/samples/element-ref/main.svelte similarity index 100% rename from test/hydration/samples/element-ref/main.html rename to test/hydration/samples/element-ref/main.svelte diff --git a/test/hydration/samples/event-handler/main.html b/test/hydration/samples/event-handler/main.svelte similarity index 100% rename from test/hydration/samples/event-handler/main.html rename to test/hydration/samples/event-handler/main.svelte diff --git a/test/hydration/samples/if-block-anchor/main.html b/test/hydration/samples/if-block-anchor/main.svelte similarity index 100% rename from test/hydration/samples/if-block-anchor/main.html rename to test/hydration/samples/if-block-anchor/main.svelte diff --git a/test/hydration/samples/if-block-false/main.html b/test/hydration/samples/if-block-false/main.svelte similarity index 100% rename from test/hydration/samples/if-block-false/main.html rename to test/hydration/samples/if-block-false/main.svelte diff --git a/test/hydration/samples/if-block-update/main.html b/test/hydration/samples/if-block-update/main.svelte similarity index 100% rename from test/hydration/samples/if-block-update/main.html rename to test/hydration/samples/if-block-update/main.svelte diff --git a/test/hydration/samples/if-block/main.html b/test/hydration/samples/if-block/main.svelte similarity index 100% rename from test/hydration/samples/if-block/main.html rename to test/hydration/samples/if-block/main.svelte diff --git a/test/hydration/samples/raw/main.html b/test/hydration/samples/raw/main.svelte similarity index 100% rename from test/hydration/samples/raw/main.html rename to test/hydration/samples/raw/main.svelte diff --git a/test/hydration/samples/top-level-text/main.html b/test/hydration/samples/top-level-text/main.svelte similarity index 100% rename from test/hydration/samples/top-level-text/main.html rename to test/hydration/samples/top-level-text/main.svelte diff --git a/test/js/index.js b/test/js/index.js index 715a43a470..14d73d6c65 100644 --- a/test/js/index.js +++ b/test/js/index.js @@ -18,16 +18,14 @@ describe("js", () => { dir = path.resolve("test/js/samples", dir); const config = loadConfig(`${dir}/_config.js`); - const input = fs.readFileSync(`${dir}/input.html`, "utf-8").replace(/\s+$/, ""); + const input = fs.readFileSync(`${dir}/input.svelte`, "utf-8").replace(/\s+$/, ""); let actual; try { - const options = Object.assign(config.options || {}, { - shared: true - }); + const options = Object.assign(config.options || {}); - actual = svelte.compile(input, options).js.code.replace(/generated by Svelte v\d+\.\d+\.\d+(-\w+)?/, 'generated by Svelte vX.Y.Z'); + actual = svelte.compile(input, options).js.code.replace(/generated by Svelte v\d+\.\d+\.\d+(-\w+\.\d+)?/, 'generated by Svelte vX.Y.Z'); } catch (err) { console.log(err.frame); throw err; diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index e4a1329c60..d3fe89ca0e 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var button, foo_action, current; +function create_fragment(ctx) { + var button, foo_action; return { c() { @@ -13,17 +13,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, button, anchor); foo_action = foo.call(null, button, ctx.foo_function) || {}; - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/action-custom-event-handler/input.html b/test/js/samples/action-custom-event-handler/input.svelte similarity index 100% rename from test/js/samples/action-custom-event-handler/input.html rename to test/js/samples/action-custom-event-handler/input.svelte diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index f2f66baa2b..07a54681c6 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var a, link_action, current; +function create_fragment(ctx) { + var a, link_action; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, a, anchor); link_action = link.call(null, a) || {}; - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -54,7 +48,7 @@ function link(node) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/action/input.html b/test/js/samples/action/input.svelte similarity index 100% rename from test/js/samples/action/input.html rename to test/js/samples/action/input.svelte diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index 4ca71de2cf..f168db3e72 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var div, div_resize_listener, current; +function create_fragment(ctx) { + var div, div_resize_listener; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); div_resize_listener = addResizeListener(div, ctx.div_resize_handler.bind(div)); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/bind-width-height/input.html b/test/js/samples/bind-width-height/input.svelte similarity index 100% rename from test/js/samples/bind-width-height/input.html rename to test/js/samples/bind-width-height/input.svelte diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 26b8dac055..43982fb97a 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function add_css() { var style = createElement("style"); @@ -8,8 +8,8 @@ function add_css() { append(document.head, style); } -function create_fragment($$, ctx) { - var p, text, current; +function create_fragment(ctx) { + var p, text; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, p, anchor); append(p, text); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/collapses-text-around-comments/input.html b/test/js/samples/collapses-text-around-comments/input.svelte similarity index 100% rename from test/js/samples/collapses-text-around-comments/input.html rename to test/js/samples/collapses-text-around-comments/input.svelte diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index f39cb4c328..14d61da17a 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: [1, 2, 3] } }); @@ -18,15 +18,15 @@ function create_fragment($$, ctx) { p: noop, - i(target, anchor) { + i(local) { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(local); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/component-static-array/input.html b/test/js/samples/component-static-array/input.svelte similarity index 100% rename from test/js/samples/component-static-array/input.html rename to test/js/samples/component-static-array/input.svelte diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index a33a09a093..0f15a9ce57 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); @@ -18,15 +18,15 @@ function create_fragment($$, ctx) { p: noop, - i(target, anchor) { + i(local) { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(local); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/component-static-immutable/input.html b/test/js/samples/component-static-immutable/input.svelte similarity index 52% rename from test/js/samples/component-static-immutable/input.html rename to test/js/samples/component-static-immutable/input.svelte index d3c9d8066a..370c68e907 100644 --- a/test/js/samples/component-static-immutable/input.html +++ b/test/js/samples/component-static-immutable/input.svelte @@ -1,7 +1,7 @@ - + - \ No newline at end of file + diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index a33a09a093..0f15a9ce57 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); @@ -18,15 +18,15 @@ function create_fragment($$, ctx) { p: noop, - i(target, anchor) { + i(local) { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(local); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/component-static-immutable2/input.html b/test/js/samples/component-static-immutable2/input.svelte similarity index 100% rename from test/js/samples/component-static-immutable2/input.html rename to test/js/samples/component-static-immutable2/input.svelte diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index df8a0d3274..72270bb828 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); @@ -18,15 +18,15 @@ function create_fragment($$, ctx) { p: noop, - i(target, anchor) { + i(local) { if (current) return; - this.m(target, anchor); - }, + nested.$$.fragment.i(local); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (nested) nested.$$.fragment.o(outrocallback); + o(local) { + nested.$$.fragment.o(local); current = false; }, diff --git a/test/js/samples/component-static/input.html b/test/js/samples/component-static/input.svelte similarity index 100% rename from test/js/samples/component-static/input.html rename to test/js/samples/component-static/input.svelte diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index 39c7f85bc8..8a9acf7523 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -1,15 +1,13 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; - -function create_fragment($$, ctx) { - var current; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; +function create_fragment(ctx) { return { c: noop, m: noop, p: noop, i: noop, - o: run, + o: noop, d: noop }; } diff --git a/test/js/samples/computed-collapsed-if/input.html b/test/js/samples/computed-collapsed-if/input.svelte similarity index 100% rename from test/js/samples/computed-collapsed-if/input.html rename to test/js/samples/computed-collapsed-if/input.svelte diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index f130945c4b..89ae16d0fc 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; function add_css() { var style = createElement("style"); @@ -8,8 +8,8 @@ function add_css() { append(document.head, style); } -function create_fragment($$, ctx) { - var div, current; +function create_fragment(ctx) { + var div; return { c() { @@ -19,17 +19,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -43,7 +37,7 @@ class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); if (!document.getElementById("svelte-1slhpfn-style")) add_css(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/css-media-query/input.html b/test/js/samples/css-media-query/input.svelte similarity index 100% rename from test/js/samples/css-media-query/input.html rename to test/js/samples/css-media-query/input.svelte diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index bf56378e2d..b7785963b3 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteElement, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteElement, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var div, current; +function create_fragment(ctx) { + var div; return { c() { @@ -13,17 +13,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -39,7 +33,7 @@ class SvelteComponent extends SvelteElement { this.shadowRoot.innerHTML = ``; - init(this, { target: this.shadowRoot }, identity, create_fragment, safe_not_equal); + init(this, { target: this.shadowRoot }, null, create_fragment, safe_not_equal); if (options) { if (options.target) { diff --git a/test/js/samples/css-shadow-dom-keyframes/input.html b/test/js/samples/css-shadow-dom-keyframes/input.svelte similarity index 72% rename from test/js/samples/css-shadow-dom-keyframes/input.html rename to test/js/samples/css-shadow-dom-keyframes/input.svelte index cc1274d7f9..bf0aebaa9a 100644 --- a/test/js/samples/css-shadow-dom-keyframes/input.html +++ b/test/js/samples/css-shadow-dom-keyframes/input.svelte @@ -1,4 +1,4 @@ - +
fades in
@@ -11,4 +11,4 @@ 0% { opacity: 0; } 100% { opacity: 1; } } - \ No newline at end of file + diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 16313a1a50..4a6393388c 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -1,10 +1,10 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; -function create_fragment($$, ctx) { - var h1, text0, text1, text2, text3, current; +function create_fragment(ctx) { + var h1, text0, text1, text2, text3; return { c: function create() { @@ -27,7 +27,6 @@ function create_fragment($$, ctx) { append(h1, text1); append(h1, text2); insert(target, text3, anchor); - current = true; }, p: function update(changed, ctx) { @@ -38,12 +37,8 @@ function create_fragment($$, ctx) { debugger; }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { if (detach) { diff --git a/test/js/samples/debug-empty/input.html b/test/js/samples/debug-empty/input.svelte similarity index 100% rename from test/js/samples/debug-empty/input.html rename to test/js/samples/debug-empty/input.svelte diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js index 7183e59e83..b56d333238 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; @@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var span, text0_value = ctx.thing.name, text0, text1; return { @@ -54,15 +54,15 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { - var text0, p, text1, text2, current; +function create_fragment(ctx) { + var text0, p, text1, text2; var each_value = ctx.things; var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -91,7 +91,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text1); append(p, text2); - current = true; }, p: function update(changed, ctx) { @@ -104,7 +103,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } @@ -121,12 +120,8 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/debug-foo-bar-baz-things/input.html b/test/js/samples/debug-foo-bar-baz-things/input.svelte similarity index 100% rename from test/js/samples/debug-foo-bar-baz-things/input.html rename to test/js/samples/debug-foo-bar-baz-things/input.svelte diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 93fbdc2f21..35d0a1f18f 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; @@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var span, text0_value = ctx.thing.name, text0, text1; return { @@ -54,15 +54,15 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { - var text0, p, text1, text2, current; +function create_fragment(ctx) { + var text0, p, text1, text2; var each_value = ctx.things; var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -91,7 +91,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text1); append(p, text2); - current = true; }, p: function update(changed, ctx) { @@ -104,7 +103,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } @@ -121,12 +120,8 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/debug-foo/input.html b/test/js/samples/debug-foo/input.svelte similarity index 100% rename from test/js/samples/debug-foo/input.html rename to test/js/samples/debug-foo/input.svelte diff --git a/test/js/samples/debug-ssr-foo/input.html b/test/js/samples/debug-ssr-foo/input.svelte similarity index 100% rename from test/js/samples/debug-ssr-foo/input.html rename to test/js/samples/debug-ssr-foo/input.svelte diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 3f73d83574..7ad954e330 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createComment, createElement as createElement_1, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -8,12 +8,12 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each createElement as node} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var span, text_value = ctx.node, text; return { c() { - span = createElement("span"); + span = createElement_1("span"); text = createText(text_value); }, @@ -36,15 +36,15 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { - var each_anchor, current; +function create_fragment(ctx) { + var each_anchor; var each_value = ctx.createElement; var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -62,7 +62,6 @@ function create_fragment($$, ctx) { } insert(target, each_anchor, anchor); - current = true; }, p(changed, ctx) { @@ -75,7 +74,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(each_anchor.parentNode, each_anchor); } @@ -88,12 +87,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/deconflict-builtins/input.html b/test/js/samples/deconflict-builtins/input.svelte similarity index 100% rename from test/js/samples/deconflict-builtins/input.html rename to test/js/samples/deconflict-builtins/input.svelte diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index eae53e6ab6..f3e8c93ebe 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -1,16 +1,14 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; import { onMount } from "svelte"; -function create_fragment($$, ctx) { - var current; - +function create_fragment(ctx) { return { c: noop, m: noop, p: noop, i: noop, - o: run, + o: noop, d: noop }; } diff --git a/test/js/samples/deconflict-globals/input.html b/test/js/samples/deconflict-globals/input.svelte similarity index 100% rename from test/js/samples/deconflict-globals/input.html rename to test/js/samples/deconflict-globals/input.svelte diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index 7f52c96119..e3dff9649d 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -1,10 +1,10 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; const file = undefined; -function create_fragment($$, ctx) { - var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2, current; +function create_fragment(ctx) { + var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2; return { c: function create() { @@ -24,7 +24,6 @@ function create_fragment($$, ctx) { append(p, text0); append(p, text1); append(p, text2); - current = true; }, p: function update(changed, ctx) { @@ -37,12 +36,8 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d: function destroy(detach) { if (detach) { @@ -61,8 +56,8 @@ function instance($$self, $$props, $$invalidate) { if ('foo' in $$props) $$invalidate('foo', foo = $$props.foo); }; - $$self.$$.update = ($$dirty = { foo: 1 }) => { - if ($$dirty.foo) { + $$self.$$.update = ($$dirty = { bar: 1, foo: 1 }) => { + if ($$dirty.bar || $$dirty.foo) { bar = foo * 2; $$invalidate('bar', bar); } }; diff --git a/test/js/samples/dev-warning-missing-data-computed/input.html b/test/js/samples/dev-warning-missing-data-computed/input.svelte similarity index 100% rename from test/js/samples/dev-warning-missing-data-computed/input.html rename to test/js/samples/dev-warning-missing-data-computed/input.svelte diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index 1cdc176977..f340f71b01 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var div0, text, div1, current; +function create_fragment(ctx) { + var div0, text, div1; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/do-use-dataset/input.html b/test/js/samples/do-use-dataset/input.svelte similarity index 100% rename from test/js/samples/do-use-dataset/input.html rename to test/js/samples/do-use-dataset/input.svelte diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected.js b/test/js/samples/dont-use-dataset-in-legacy/expected.js index 26fd86b9b6..974ed23b28 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { - var div0, text, div1, current; +function create_fragment(ctx) { + var div0, text, div1; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/dont-use-dataset-in-legacy/input.html b/test/js/samples/dont-use-dataset-in-legacy/input.svelte similarity index 100% rename from test/js/samples/dont-use-dataset-in-legacy/input.html rename to test/js/samples/dont-use-dataset-in-legacy/input.svelte diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js index 2bb5a1d36b..cc29258326 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { - var svg, g0, g1, current; +function create_fragment(ctx) { + var svg, g0, g1; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, svg, anchor); append(svg, g0); append(svg, g1); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/dont-use-dataset-in-svg/input.html b/test/js/samples/dont-use-dataset-in-svg/input.svelte similarity index 100% rename from test/js/samples/dont-use-dataset-in-svg/input.html rename to test/js/samples/dont-use-dataset-in-svg/input.svelte diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index d0e36d4936..c7a82698c2 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, identity, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -import LazyLoad from "./LazyLoad.html"; +import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; +import LazyLoad from "./LazyLoad.svelte"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var current; var lazyload = new LazyLoad({ props: { load: func } }); @@ -19,15 +19,15 @@ function create_fragment($$, ctx) { p: noop, - i(target, anchor) { + i(local) { if (current) return; - this.m(target, anchor); - }, + lazyload.$$.fragment.i(local); - o(outrocallback) { - if (!current) return; + current = true; + }, - if (lazyload) lazyload.$$.fragment.o(outrocallback); + o(local) { + lazyload.$$.fragment.o(local); current = false; }, @@ -38,13 +38,13 @@ function create_fragment($$, ctx) { } function func() { - return import('./Foo.html'); + return import('./Foo.svelte'); } class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/dynamic-import/input.html b/test/js/samples/dynamic-import/input.html deleted file mode 100644 index 3640ef5161..0000000000 --- a/test/js/samples/dynamic-import/input.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/js/samples/dynamic-import/input.svelte b/test/js/samples/dynamic-import/input.svelte new file mode 100644 index 0000000000..7e423b5e46 --- /dev/null +++ b/test/js/samples/dynamic-import/input.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index cc59d354d6..0032b1c720 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -9,7 +9,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each comments as comment, i} -function create_each_block($$, ctx) { +function create_each_block(ctx) { var div, strong, text0, text1, span, text2_value = ctx.comment.author, text2, text3, text4_value = ctx.elapsed(ctx.comment.time, ctx.time), text4, text5, text6, raw_value = ctx.comment.html, raw_before; return { @@ -67,15 +67,15 @@ function create_each_block($$, ctx) { }; } -function create_fragment($$, ctx) { - var text0, p, text1, current; +function create_fragment(ctx) { + var text0, p, text1; var each_value = ctx.comments; var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { @@ -97,7 +97,6 @@ function create_fragment($$, ctx) { insert(target, text0, anchor); insert(target, p, anchor); append(p, text1); - current = true; }, p(changed, ctx) { @@ -110,7 +109,7 @@ function create_fragment($$, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block($$, child_ctx); + each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } @@ -127,12 +126,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { destroyEach(each_blocks, detach); diff --git a/test/js/samples/each-block-changed-check/input.html b/test/js/samples/each-block-changed-check/input.svelte similarity index 100% rename from test/js/samples/each-block-changed-check/input.html rename to test/js/samples/each-block-changed-check/input.svelte diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 874c79c637..e7e10208e4 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, animate, append, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fix_position, flush, init, insert, noop, run, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, animate, append, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fix_position, flush, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (19:0) {#each things as thing (thing.id)} -function create_each_block($$, key_1, ctx) { +function create_each_block(key_1, ctx) { var div, text_value = ctx.thing.name, text, rect, stop_animation = noop; return { @@ -55,8 +55,8 @@ function create_each_block($$, key_1, ctx) { }; } -function create_fragment($$, ctx) { - var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current; +function create_fragment(ctx) { + var each_blocks = [], each_lookup = blankObject(), each_anchor; var each_value = ctx.things; @@ -65,39 +65,34 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block(key, child_ctx); } return { c() { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].c(); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); each_anchor = createComment(); }, m(target, anchor) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(target, anchor); insert(target, each_anchor, anchor); - current = true; }, p(changed, ctx) { const each_value = ctx.things; - for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].r(); - each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, "m", each_anchor, get_each_context); - for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].a(); + for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].r(); + each_blocks = updateKeyedEach(each_blocks, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, each_anchor, get_each_context); + for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].d(detach); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].d(detach); if (detach) { detachNode(each_anchor); diff --git a/test/js/samples/each-block-keyed-animated/input.html b/test/js/samples/each-block-keyed-animated/input.svelte similarity index 100% rename from test/js/samples/each-block-keyed-animated/input.html rename to test/js/samples/each-block-keyed-animated/input.svelte diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index dc6f2c98e2..c2dd23fb96 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, flush, init, insert, run, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, flush, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing (thing.id)} -function create_each_block($$, key_1, ctx) { +function create_each_block(key_1, ctx) { var div, text_value = ctx.thing.name, text; return { @@ -41,8 +41,8 @@ function create_each_block($$, key_1, ctx) { }; } -function create_fragment($$, ctx) { - var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current; +function create_fragment(ctx) { + var each_blocks = [], each_lookup = blankObject(), each_anchor; var each_value = ctx.things; @@ -51,37 +51,32 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block(key, child_ctx); } return { c() { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].c(); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); each_anchor = createComment(); }, m(target, anchor) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(target, anchor); insert(target, each_anchor, anchor); - current = true; }, p(changed, ctx) { const each_value = ctx.things; - each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, "m", each_anchor, get_each_context); + each_blocks = updateKeyedEach(each_blocks, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, each_anchor, get_each_context); }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].d(detach); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].d(detach); if (detach) { detachNode(each_anchor); diff --git a/test/js/samples/each-block-keyed/input.html b/test/js/samples/each-block-keyed/input.svelte similarity index 100% rename from test/js/samples/each-block-keyed/input.html rename to test/js/samples/each-block-keyed/input.svelte diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index fea5cf99e2..19cfed3124 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var a, current, dispose; +function create_fragment(ctx) { + var a, dispose; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, a, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -43,7 +37,7 @@ function touchstart_handler(e) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/event-handler-no-passive/input.html b/test/js/samples/event-handler-no-passive/input.svelte similarity index 100% rename from test/js/samples/event-handler-no-passive/input.html rename to test/js/samples/event-handler-no-passive/input.svelte diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 8d334ec04a..b6c554a8b6 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, preventDefault, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; -function create_fragment($$, ctx) { - var div, button0, text1, button1, text3, button2, current, dispose; +function create_fragment(ctx) { + var div, button0, text1, button1, text3, button2, dispose; return { c() { @@ -30,17 +30,11 @@ function create_fragment($$, ctx) { append(div, button1); append(div, text3); append(div, button2); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -63,7 +57,7 @@ function handleClick() { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/event-modifiers/input.html b/test/js/samples/event-modifiers/input.svelte similarity index 100% rename from test/js/samples/event-modifiers/input.html rename to test/js/samples/event-modifiers/input.svelte diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index 58bfa6ee06..9e38fe41d3 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var meta0, meta1, current; +function create_fragment(ctx) { + var meta0, meta1; return { c() { @@ -17,17 +17,11 @@ function create_fragment($$, ctx) { m(target, anchor) { append(document.head, meta0); append(document.head, meta1); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { detachNode(meta0); @@ -39,7 +33,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/head-no-whitespace/input.html b/test/js/samples/head-no-whitespace/input.svelte similarity index 100% rename from test/js/samples/head-no-whitespace/input.html rename to test/js/samples/head-no-whitespace/input.svelte diff --git a/test/js/samples/hoisted-const/expected.js b/test/js/samples/hoisted-const/expected.js index aa81d991e8..884f765ba7 100644 --- a/test/js/samples/hoisted-const/expected.js +++ b/test/js/samples/hoisted-const/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var b, text_value = get_answer(), text, current; +function create_fragment(ctx) { + var b, text_value = get_answer(), text; return { c() { @@ -13,17 +13,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, b, anchor); append(b, text); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -40,7 +34,7 @@ function get_answer() { return ANSWER; } class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/hoisted-const/input.html b/test/js/samples/hoisted-const/input.svelte similarity index 100% rename from test/js/samples/hoisted-const/input.html rename to test/js/samples/hoisted-const/input.svelte diff --git a/test/js/samples/hoisted-let/expected.js b/test/js/samples/hoisted-let/expected.js new file mode 100644 index 0000000000..d94eb2a7b7 --- /dev/null +++ b/test/js/samples/hoisted-let/expected.js @@ -0,0 +1,41 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; + +function create_fragment(ctx) { + var b, text_value = get_answer(), text; + + return { + c() { + b = createElement("b"); + text = createText(text_value); + }, + + m(target, anchor) { + insert(target, b, anchor); + append(b, text); + }, + + p: noop, + i: noop, + o: noop, + + d(detach) { + if (detach) { + detachNode(b); + } + } + }; +} + +let ANSWER = 42; + +function get_answer() { return ANSWER; } + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, null, create_fragment, safe_not_equal); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/hoisted-let/input.svelte b/test/js/samples/hoisted-let/input.svelte new file mode 100644 index 0000000000..43168c3c10 --- /dev/null +++ b/test/js/samples/hoisted-let/input.svelte @@ -0,0 +1,6 @@ + + +{get_answer()} \ No newline at end of file diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index cc01e9791a..a4c9fbc163 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (3:0) {:else} -function create_else_block($$, ctx) { +function create_else_block(ctx) { var p; return { @@ -24,7 +24,7 @@ function create_else_block($$, ctx) { } // (1:0) {#if foo} -function create_if_block($$, ctx) { +function create_if_block(ctx) { var p; return { @@ -45,8 +45,8 @@ function create_if_block($$, ctx) { }; } -function create_fragment($$, ctx) { - var if_block_anchor, current; +function create_fragment(ctx) { + var if_block_anchor; function select_block_type(ctx) { if (ctx.foo) return create_if_block; @@ -54,7 +54,7 @@ function create_fragment($$, ctx) { } var current_block_type = select_block_type(ctx); - var if_block = current_block_type($$, ctx); + var if_block = current_block_type(ctx); return { c() { @@ -65,27 +65,25 @@ function create_fragment($$, ctx) { m(target, anchor) { if_block.m(target, anchor); insert(target, if_block_anchor, anchor); - current = true; }, p(changed, ctx) { if (current_block_type !== (current_block_type = select_block_type(ctx))) { if_block.d(1); - if_block = current_block_type($$, ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); + if_block = current_block_type(ctx); + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if_block.d(detach); + if (detach) { detachNode(if_block_anchor); } diff --git a/test/js/samples/if-block-no-update/input.html b/test/js/samples/if-block-no-update/input.svelte similarity index 100% rename from test/js/samples/if-block-no-update/input.html rename to test/js/samples/if-block-no-update/input.svelte diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index 054ee7219b..76c69b000f 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (1:0) {#if foo} -function create_if_block($$, ctx) { +function create_if_block(ctx) { var p; return { @@ -23,10 +23,10 @@ function create_if_block($$, ctx) { }; } -function create_fragment($$, ctx) { - var if_block_anchor, current; +function create_fragment(ctx) { + var if_block_anchor; - var if_block = (ctx.foo) && create_if_block($$, ctx); + var if_block = (ctx.foo) && create_if_block(ctx); return { c() { @@ -37,13 +37,12 @@ function create_fragment($$, ctx) { m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); - current = true; }, p(changed, ctx) { if (ctx.foo) { if (!if_block) { - if_block = create_if_block($$, ctx); + if_block = create_if_block(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } @@ -53,15 +52,12 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (if_block) if_block.d(detach); + if (detach) { detachNode(if_block_anchor); } diff --git a/test/js/samples/if-block-simple/input.html b/test/js/samples/if-block-simple/input.svelte similarity index 100% rename from test/js/samples/if-block-simple/input.html rename to test/js/samples/if-block-simple/input.svelte diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index f4ac24f484..5988850ede 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment($$, ctx) { - var div, current; +function create_fragment(ctx) { + var div; return { c() { @@ -13,7 +13,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p(changed, ctx) { @@ -26,12 +25,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/inline-style-optimized-multiple/input.html b/test/js/samples/inline-style-optimized-multiple/input.svelte similarity index 100% rename from test/js/samples/inline-style-optimized-multiple/input.html rename to test/js/samples/inline-style-optimized-multiple/input.svelte diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index da4f91c1d2..c1ed003c83 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment($$, ctx) { - var div, current; +function create_fragment(ctx) { + var div; return { c() { @@ -12,7 +12,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p(changed, ctx) { @@ -21,12 +20,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/inline-style-optimized-url/input.html b/test/js/samples/inline-style-optimized-url/input.svelte similarity index 100% rename from test/js/samples/inline-style-optimized-url/input.html rename to test/js/samples/inline-style-optimized-url/input.svelte diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index 84056cfd50..9d88cb7d35 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment($$, ctx) { - var div, current; +function create_fragment(ctx) { + var div; return { c() { @@ -12,7 +12,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = true; }, p(changed, ctx) { @@ -21,12 +20,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/inline-style-optimized/input.html b/test/js/samples/inline-style-optimized/input.svelte similarity index 100% rename from test/js/samples/inline-style-optimized/input.html rename to test/js/samples/inline-style-optimized/input.svelte diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 1f66ec8766..31bda3a217 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var div0, text, div1, div1_style_value, current; +function create_fragment(ctx) { + var div0, text, div1, div1_style_value; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/inline-style-unoptimized/input.html b/test/js/samples/inline-style-unoptimized/input.svelte similarity index 100% rename from test/js/samples/inline-style-unoptimized/input.html rename to test/js/samples/inline-style-unoptimized/input.svelte diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index baab165695..80a00a9701 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { - var input, current, dispose; +function create_fragment(ctx) { + var input, dispose; return { c() { @@ -14,17 +14,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, input, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/input-files/input.html b/test/js/samples/input-files/input.svelte similarity index 100% rename from test/js/samples/input-files/input.html rename to test/js/samples/input-files/input.svelte diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index 1d90cf146c..7a4cf6079a 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; -function create_fragment($$, ctx) { - var input, current, dispose; +function create_fragment(ctx) { + var input, dispose; return { c() { @@ -19,20 +19,14 @@ function create_fragment($$, ctx) { insert(target, input, anchor); input.value = ctx.value; - - current = true; }, p(changed, ctx) { if (changed.value) input.value = ctx.value; }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/input-range/input.html b/test/js/samples/input-range/input.svelte similarity index 100% rename from test/js/samples/input-range/input.html rename to test/js/samples/input-range/input.svelte diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 3c5f57391b..18c1535138 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment($$, ctx) { - var input, current, dispose; +function create_fragment(ctx) { + var input, dispose; return { c() { @@ -15,20 +15,14 @@ function create_fragment($$, ctx) { insert(target, input, anchor); input.checked = ctx.foo; - - current = true; }, p(changed, ctx) { if (changed.foo) input.checked = ctx.foo; }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/input-without-blowback-guard/input.html b/test/js/samples/input-without-blowback-guard/input.svelte similarity index 100% rename from test/js/samples/input-without-blowback-guard/input.html rename to test/js/samples/input-without-blowback-guard/input.svelte diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index b8c0cb22e1..f5100961fc 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { - var button, text1, p, text2, text3, current, dispose; +function create_fragment(ctx) { + var button, text1, p, text2, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-script-if-no-block/input.html b/test/js/samples/instrumentation-script-if-no-block/input.svelte similarity index 100% rename from test/js/samples/instrumentation-script-if-no-block/input.html rename to test/js/samples/instrumentation-script-if-no-block/input.svelte diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index 429bf51fae..45a968f94f 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { - var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; +function create_fragment(ctx) { + var button, text1, p, text2, text3_value = ctx.things.length, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-script-x-equals-x/input.html b/test/js/samples/instrumentation-script-x-equals-x/input.svelte similarity index 100% rename from test/js/samples/instrumentation-script-x-equals-x/input.html rename to test/js/samples/instrumentation-script-x-equals-x/input.svelte diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index 8aba31fc4d..e5248cf5dc 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { - var button, text1, p, text2, text3, current, dispose; +function create_fragment(ctx) { + var button, text1, p, text2, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-template-if-no-block/input.html b/test/js/samples/instrumentation-template-if-no-block/input.svelte similarity index 100% rename from test/js/samples/instrumentation-template-if-no-block/input.html rename to test/js/samples/instrumentation-template-if-no-block/input.svelte diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index 6136f16432..9f7ff64725 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { - var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; +function create_fragment(ctx) { + var button, text1, p, text2, text3_value = ctx.things.length, text3, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = true; }, p(changed, ctx) { @@ -30,12 +29,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/instrumentation-template-x-equals-x/input.html b/test/js/samples/instrumentation-template-x-equals-x/input.svelte similarity index 100% rename from test/js/samples/instrumentation-template-x-equals-x/input.html rename to test/js/samples/instrumentation-template-x-equals-x/input.svelte diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index de095d7c0a..f9e0807314 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal, setInputType } from "svelte/internal"; -function create_fragment($$, ctx) { - var input, current; +function create_fragment(ctx) { + var input; return { c() { @@ -12,17 +12,11 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, input, anchor); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -35,7 +29,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/legacy-input-type/input.html b/test/js/samples/legacy-input-type/input.svelte similarity index 100% rename from test/js/samples/legacy-input-type/input.html rename to test/js/samples/legacy-input-type/input.svelte diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index 645a7d9b0f..8163a8a947 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; -function create_fragment($$, ctx) { - var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, current, dispose; +function create_fragment(ctx) { + var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, dispose; function audio_timeupdate_handler() { cancelAnimationFrame(audio_animationframe); @@ -34,8 +34,6 @@ function create_fragment($$, ctx) { insert(target, audio, anchor); audio.volume = ctx.volume; - - current = true; }, p(changed, ctx) { @@ -45,12 +43,8 @@ function create_fragment($$, ctx) { audio_updating = false; }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/media-bindings/input.html b/test/js/samples/media-bindings/input.svelte similarity index 100% rename from test/js/samples/media-bindings/input.html rename to test/js/samples/media-bindings/input.svelte diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 32a772b3b5..ee31f589ea 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, identity, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; -import Imported from "Imported.html"; +import { SvelteComponent as SvelteComponent_1, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; +import Imported from "Imported.svelte"; -function create_fragment($$, ctx) { +function create_fragment(ctx) { var text, current; var imported = new Imported({}); @@ -25,18 +25,18 @@ function create_fragment($$, ctx) { p: noop, - i(target, anchor) { + i(local) { if (current) return; - this.m(target, anchor); - }, + imported.$$.fragment.i(local); - o(outrocallback) { - if (!current) return; + nonimported.$$.fragment.i(local); - outrocallback = callAfter(outrocallback, 2); + current = true; + }, - if (imported) imported.$$.fragment.o(outrocallback); - if (nonimported) nonimported.$$.fragment.o(outrocallback); + o(local) { + imported.$$.fragment.o(local); + nonimported.$$.fragment.o(local); current = false; }, @@ -55,7 +55,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/non-imported-component/input.html b/test/js/samples/non-imported-component/input.html deleted file mode 100644 index 60bb515a3c..0000000000 --- a/test/js/samples/non-imported-component/input.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/js/samples/non-imported-component/input.svelte b/test/js/samples/non-imported-component/input.svelte new file mode 100644 index 0000000000..fb2054bc7f --- /dev/null +++ b/test/js/samples/non-imported-component/input.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/js/samples/non-mutable-reference/expected.js b/test/js/samples/non-mutable-reference/expected.js new file mode 100644 index 0000000000..d82617fccd --- /dev/null +++ b/test/js/samples/non-mutable-reference/expected.js @@ -0,0 +1,43 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; + +function create_fragment(ctx) { + var h1, text0, text1, text2; + + return { + c() { + h1 = createElement("h1"); + text0 = createText("Hello "); + text1 = createText(name); + text2 = createText("!"); + }, + + m(target, anchor) { + insert(target, h1, anchor); + append(h1, text0); + append(h1, text1); + append(h1, text2); + }, + + p: noop, + i: noop, + o: noop, + + d(detach) { + if (detach) { + detachNode(h1); + } + } + }; +} + +let name = 'world'; + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, null, create_fragment, safe_not_equal); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/parser/samples/script/input.html b/test/js/samples/non-mutable-reference/input.svelte similarity index 100% rename from test/parser/samples/script/input.html rename to test/js/samples/non-mutable-reference/input.svelte diff --git a/test/js/samples/reactive-values-non-topologically-ordered/expected.js b/test/js/samples/reactive-values-non-topologically-ordered/expected.js new file mode 100644 index 0000000000..de1a4cdc8c --- /dev/null +++ b/test/js/samples/reactive-values-non-topologically-ordered/expected.js @@ -0,0 +1,53 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; + +function create_fragment(ctx) { + return { + c: noop, + m: noop, + p: noop, + i: noop, + o: noop, + d: noop + }; +} + +function instance($$self, $$props, $$invalidate) { + let { x } = $$props; + + let a; + let b; + + $$self.$set = $$props => { + if ('x' in $$props) $$invalidate('x', x = $$props.x); + }; + + $$self.$$.update = ($$dirty = { b: 1, x: 1, a: 1 }) => { + if ($$dirty.b || $$dirty.x) { + b = x; $$invalidate('b', b); + } + if ($$dirty.a || $$dirty.b) { + a = b; $$invalidate('a', a); + } + }; + + return { x }; +} + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal); + } + + get x() { + return this.$$.ctx.x; + } + + set x(x) { + this.$set({ x }); + flush(); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/reactive-values-non-topologically-ordered/input.svelte b/test/js/samples/reactive-values-non-topologically-ordered/input.svelte new file mode 100644 index 0000000000..a443372b05 --- /dev/null +++ b/test/js/samples/reactive-values-non-topologically-ordered/input.svelte @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js new file mode 100644 index 0000000000..fc2ca37d31 --- /dev/null +++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js @@ -0,0 +1,40 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal"; + +function create_fragment(ctx) { + return { + c: noop, + m: noop, + p: noop, + i: noop, + o: noop, + d: noop + }; +} + +let a = 1; + +let b = 2; + +function instance($$self, $$props, $$invalidate) { + + + let max; + + $$self.$$.update = ($$dirty = { max: 1, Math: 1, a: 1, b: 1 }) => { + if ($$dirty.max || $$dirty.a || $$dirty.b) { + max = Math.max(a, b); $$invalidate('max', max); + } + }; + + return {}; +} + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/reactive-values-non-writable-dependencies/input.svelte b/test/js/samples/reactive-values-non-writable-dependencies/input.svelte new file mode 100644 index 0000000000..8e3397e40d --- /dev/null +++ b/test/js/samples/reactive-values-non-writable-dependencies/input.svelte @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index 6788f18fd0..7f2bc3b55c 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var select, option0, option1, select_value_value, current; +function create_fragment(ctx) { + var select, option0, option1, select_value_value; return { c() { @@ -31,8 +31,6 @@ function create_fragment($$, ctx) { break; } } - - current = true; }, p(changed, ctx) { @@ -48,12 +46,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/select-dynamic-value/input.html b/test/js/samples/select-dynamic-value/input.svelte similarity index 100% rename from test/js/samples/select-dynamic-value/input.html rename to test/js/samples/select-dynamic-value/input.svelte diff --git a/test/js/samples/setup-method/expected.js b/test/js/samples/setup-method/expected.js index 257de1d245..bd7e2e34b2 100644 --- a/test/js/samples/setup-method/expected.js +++ b/test/js/samples/setup-method/expected.js @@ -1,15 +1,13 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, identity, init, noop, run, safe_not_equal } from "svelte/internal"; - -function create_fragment($$, ctx) { - var current; +import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal"; +function create_fragment(ctx) { return { c: noop, m: noop, p: noop, i: noop, - o: run, + o: noop, d: noop }; } @@ -23,7 +21,7 @@ function foo(bar) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } get foo() { diff --git a/test/js/samples/setup-method/input.html b/test/js/samples/setup-method/input.svelte similarity index 100% rename from test/js/samples/setup-method/input.html rename to test/js/samples/setup-method/input.svelte diff --git a/test/js/samples/ssr-no-oncreate-etc/input.html b/test/js/samples/ssr-no-oncreate-etc/input.svelte similarity index 100% rename from test/js/samples/ssr-no-oncreate-etc/input.html rename to test/js/samples/ssr-no-oncreate-etc/input.svelte diff --git a/test/js/samples/ssr-preserve-comments/input.html b/test/js/samples/ssr-preserve-comments/input.svelte similarity index 100% rename from test/js/samples/ssr-preserve-comments/input.html rename to test/js/samples/ssr-preserve-comments/input.svelte diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index ed67789799..c88c0d5a5a 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var svg, title, text, current; +function create_fragment(ctx) { + var svg, title, text; return { c() { @@ -15,17 +15,11 @@ function create_fragment($$, ctx) { insert(target, svg, anchor); append(svg, title); append(title, text); - current = true; }, p: noop, - - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -38,7 +32,7 @@ function create_fragment($$, ctx) { class SvelteComponent extends SvelteComponent_1 { constructor(options) { super(); - init(this, options, identity, create_fragment, safe_not_equal); + init(this, options, null, create_fragment, safe_not_equal); } } diff --git a/test/js/samples/svg-title/input.html b/test/js/samples/svg-title/input.svelte similarity index 100% rename from test/js/samples/svg-title/input.html rename to test/js/samples/svg-title/input.svelte diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index cfac2c0ad1..8bb0b59894 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; -function create_fragment($$, ctx) { - var title_value, current; +function create_fragment(ctx) { + var title_value; document.title = title_value = "a " + ctx.custom + " title"; @@ -17,7 +17,7 @@ function create_fragment($$, ctx) { }, i: noop, - o: run, + o: noop, d: noop }; } diff --git a/test/js/samples/title/input.html b/test/js/samples/title/input.svelte similarity index 100% rename from test/js/samples/title/input.html rename to test/js/samples/title/input.svelte diff --git a/test/js/samples/transition-local/expected.js b/test/js/samples/transition-local/expected.js new file mode 100644 index 0000000000..35dd0a137d --- /dev/null +++ b/test/js/samples/transition-local/expected.js @@ -0,0 +1,164 @@ +/* generated by Svelte vX.Y.Z */ +import { SvelteComponent as SvelteComponent_1, add_render_callback, createComment, createElement, create_in_transition, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; + +// (8:0) {#if x} +function create_if_block(ctx) { + var if_block_anchor; + + var if_block = (ctx.y) && create_if_block_1(ctx); + + return { + c() { + if (if_block) if_block.c(); + if_block_anchor = createComment(); + }, + + m(target, anchor) { + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + + p(changed, ctx) { + if (ctx.y) { + if (!if_block) { + if_block = create_if_block_1(ctx); + if_block.c(); + if_block.i(1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } else { + if_block.i(1); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + + d(detach) { + if (if_block) if_block.d(detach); + + if (detach) { + detachNode(if_block_anchor); + } + } + }; +} + +// (9:1) {#if y} +function create_if_block_1(ctx) { + var div, div_intro; + + return { + c() { + div = createElement("div"); + div.textContent = "..."; + }, + + m(target, anchor) { + insert(target, div, anchor); + }, + + i(local) { + if (local) { + if (!div_intro) { + add_render_callback(() => { + div_intro = create_in_transition(div, foo, {}); + div_intro.start(); + }); + } + } + }, + + o: noop, + + d(detach) { + if (detach) { + detachNode(div); + } + } + }; +} + +function create_fragment(ctx) { + var if_block_anchor; + + var if_block = (ctx.x) && create_if_block(ctx); + + return { + c() { + if (if_block) if_block.c(); + if_block_anchor = createComment(); + }, + + m(target, anchor) { + if (if_block) if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + + p(changed, ctx) { + if (ctx.x) { + if (if_block) { + if_block.p(changed, ctx); + } else { + if_block = create_if_block(ctx); + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + + i: noop, + o: noop, + + d(detach) { + if (if_block) if_block.d(detach); + + if (detach) { + detachNode(if_block_anchor); + } + } + }; +} + +function foo() {} + +function instance($$self, $$props, $$invalidate) { + let { x, y } = $$props; + + $$self.$set = $$props => { + if ('x' in $$props) $$invalidate('x', x = $$props.x); + if ('y' in $$props) $$invalidate('y', y = $$props.y); + }; + + return { x, y }; +} + +class SvelteComponent extends SvelteComponent_1 { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal); + } + + get x() { + return this.$$.ctx.x; + } + + set x(x) { + this.$set({ x }); + flush(); + } + + get y() { + return this.$$.ctx.y; + } + + set y(y) { + this.$set({ y }); + flush(); + } +} + +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/transition-local/input.svelte b/test/js/samples/transition-local/input.svelte new file mode 100644 index 0000000000..3f87627c62 --- /dev/null +++ b/test/js/samples/transition-local/input.svelte @@ -0,0 +1,12 @@ + + +{#if x} + {#if y} +
...
+ {/if} +{/if} \ No newline at end of file diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index e6610407e4..3cc4d4a09a 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; // (2:1) {#if a} -function create_if_block_4($$, ctx) { +function create_if_block_4(ctx) { var p; return { @@ -24,7 +24,7 @@ function create_if_block_4($$, ctx) { } // (8:1) {#if b} -function create_if_block_3($$, ctx) { +function create_if_block_3(ctx) { var p; return { @@ -46,7 +46,7 @@ function create_if_block_3($$, ctx) { } // (12:1) {#if c} -function create_if_block_2($$, ctx) { +function create_if_block_2(ctx) { var p; return { @@ -68,7 +68,7 @@ function create_if_block_2($$, ctx) { } // (18:1) {#if d} -function create_if_block_1($$, ctx) { +function create_if_block_1(ctx) { var p; return { @@ -90,7 +90,7 @@ function create_if_block_1($$, ctx) { } // (25:0) {#if e} -function create_if_block($$, ctx) { +function create_if_block(ctx) { var p; return { @@ -111,18 +111,18 @@ function create_if_block($$, ctx) { }; } -function create_fragment($$, ctx) { - var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor, current; +function create_fragment(ctx) { + var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor; - var if_block0 = (ctx.a) && create_if_block_4($$, ctx); + var if_block0 = (ctx.a) && create_if_block_4(ctx); - var if_block1 = (ctx.b) && create_if_block_3($$, ctx); + var if_block1 = (ctx.b) && create_if_block_3(ctx); - var if_block2 = (ctx.c) && create_if_block_2($$, ctx); + var if_block2 = (ctx.c) && create_if_block_2(ctx); - var if_block3 = (ctx.d) && create_if_block_1($$, ctx); + var if_block3 = (ctx.d) && create_if_block_1(ctx); - var if_block4 = (ctx.e) && create_if_block($$, ctx); + var if_block4 = (ctx.e) && create_if_block(ctx); return { c() { @@ -161,13 +161,12 @@ function create_fragment($$, ctx) { insert(target, text7, anchor); if (if_block4) if_block4.m(target, anchor); insert(target, if_block4_anchor, anchor); - current = true; }, p(changed, ctx) { if (ctx.a) { if (!if_block0) { - if_block0 = create_if_block_4($$, ctx); + if_block0 = create_if_block_4(ctx); if_block0.c(); if_block0.m(div, text0); } @@ -178,7 +177,7 @@ function create_fragment($$, ctx) { if (ctx.b) { if (!if_block1) { - if_block1 = create_if_block_3($$, ctx); + if_block1 = create_if_block_3(ctx); if_block1.c(); if_block1.m(div, text3); } @@ -189,7 +188,7 @@ function create_fragment($$, ctx) { if (ctx.c) { if (!if_block2) { - if_block2 = create_if_block_2($$, ctx); + if_block2 = create_if_block_2(ctx); if_block2.c(); if_block2.m(div, text4); } @@ -200,7 +199,7 @@ function create_fragment($$, ctx) { if (ctx.d) { if (!if_block3) { - if_block3 = create_if_block_1($$, ctx); + if_block3 = create_if_block_1(ctx); if_block3.c(); if_block3.m(div, null); } @@ -211,7 +210,7 @@ function create_fragment($$, ctx) { if (ctx.e) { if (!if_block4) { - if_block4 = create_if_block($$, ctx); + if_block4 = create_if_block(ctx); if_block4.c(); if_block4.m(if_block4_anchor.parentNode, if_block4_anchor); } @@ -221,12 +220,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { @@ -237,11 +232,13 @@ function create_fragment($$, ctx) { if (if_block1) if_block1.d(); if (if_block2) if_block2.d(); if (if_block3) if_block3.d(); + if (detach) { detachNode(text7); } if (if_block4) if_block4.d(detach); + if (detach) { detachNode(if_block4_anchor); } diff --git a/test/js/samples/use-elements-as-anchors/input.html b/test/js/samples/use-elements-as-anchors/input.svelte similarity index 100% rename from test/js/samples/use-elements-as-anchors/input.html rename to test/js/samples/use-elements-as-anchors/input.svelte diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 0fded5c925..2696297623 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -1,8 +1,8 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; +import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; -function create_fragment($$, ctx) { - var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, current, dispose; +function create_fragment(ctx) { + var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, dispose; add_render_callback(ctx.onwindowscroll); @@ -23,14 +23,13 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text0); append(p, text1); - current = true; }, p(changed, ctx) { if (changed.y && !scrolling) { scrolling = true; clearTimeout(scrolling_timeout); - window.scrollTo(window.pageXOffset, current["y"]); + window.scrollTo(window.pageXOffset, ctx.y); scrolling_timeout = setTimeout(clear_scrolling, 100); } @@ -39,12 +38,8 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (current) return; - this.m(target, anchor); - }, - - o: run, + i: noop, + o: noop, d(detach) { if (detach) { diff --git a/test/js/samples/window-binding-scroll/input.html b/test/js/samples/window-binding-scroll/input.svelte similarity index 100% rename from test/js/samples/window-binding-scroll/input.html rename to test/js/samples/window-binding-scroll/input.svelte diff --git a/test/parser/index.js b/test/parser/index.js index 8f20c77abd..990a8751ef 100644 --- a/test/parser/index.js +++ b/test/parser/index.js @@ -18,7 +18,7 @@ describe('parse', () => { (solo ? it.only : it)(dir, () => { const options = tryToLoadJson(`test/parser/samples/${dir}/options.json`) || {}; - const input = fs.readFileSync(`test/parser/samples/${dir}/input.html`, 'utf-8').replace(/\s+$/, ''); + const input = fs.readFileSync(`test/parser/samples/${dir}/input.svelte`, 'utf-8').replace(/\s+$/, ''); const expectedOutput = tryToLoadJson(`test/parser/samples/${dir}/output.json`); const expectedError = tryToLoadJson(`test/parser/samples/${dir}/error.json`); @@ -31,7 +31,8 @@ describe('parse', () => { assert.deepEqual(ast.html, expectedOutput.html); assert.deepEqual(ast.css, expectedOutput.css); - assert.deepEqual(ast.js, expectedOutput.js); + assert.deepEqual(ast.instance, expectedOutput.instance); + assert.deepEqual(ast.module, expectedOutput.module); } catch (err) { if (err.name !== 'ParseError') throw err; if (!expectedError) throw err; diff --git a/test/parser/samples/action-with-call/input.html b/test/parser/samples/action-with-call/input.svelte similarity index 100% rename from test/parser/samples/action-with-call/input.html rename to test/parser/samples/action-with-call/input.svelte diff --git a/test/parser/samples/action-with-call/output.json b/test/parser/samples/action-with-call/output.json index 521599544b..d6aaa72892 100644 --- a/test/parser/samples/action-with-call/output.json +++ b/test/parser/samples/action-with-call/output.json @@ -42,6 +42,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/action-with-identifier/input.html b/test/parser/samples/action-with-identifier/input.svelte similarity index 100% rename from test/parser/samples/action-with-identifier/input.html rename to test/parser/samples/action-with-identifier/input.svelte diff --git a/test/parser/samples/action-with-identifier/output.json b/test/parser/samples/action-with-identifier/output.json index 800ab800be..d58b9097b7 100644 --- a/test/parser/samples/action-with-identifier/output.json +++ b/test/parser/samples/action-with-identifier/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/action-with-literal/input.html b/test/parser/samples/action-with-literal/input.svelte similarity index 100% rename from test/parser/samples/action-with-literal/input.html rename to test/parser/samples/action-with-literal/input.svelte diff --git a/test/parser/samples/action-with-literal/output.json b/test/parser/samples/action-with-literal/output.json index 0705cd9e39..4a6f596d10 100644 --- a/test/parser/samples/action-with-literal/output.json +++ b/test/parser/samples/action-with-literal/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/action/input.html b/test/parser/samples/action/input.svelte similarity index 100% rename from test/parser/samples/action/input.html rename to test/parser/samples/action/input.svelte diff --git a/test/parser/samples/action/output.json b/test/parser/samples/action/output.json index 68afd79d23..2f553b5efa 100644 --- a/test/parser/samples/action/output.json +++ b/test/parser/samples/action/output.json @@ -23,6 +23,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/animation/input.html b/test/parser/samples/animation/input.svelte similarity index 100% rename from test/parser/samples/animation/input.html rename to test/parser/samples/animation/input.svelte diff --git a/test/parser/samples/animation/output.json b/test/parser/samples/animation/output.json index 585ab3ff1c..8332b3ad04 100644 --- a/test/parser/samples/animation/output.json +++ b/test/parser/samples/animation/output.json @@ -55,6 +55,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-containing-solidus/input.html b/test/parser/samples/attribute-containing-solidus/input.svelte similarity index 100% rename from test/parser/samples/attribute-containing-solidus/input.html rename to test/parser/samples/attribute-containing-solidus/input.svelte diff --git a/test/parser/samples/attribute-containing-solidus/output.json b/test/parser/samples/attribute-containing-solidus/output.json index 920a9420c8..95372bd77d 100644 --- a/test/parser/samples/attribute-containing-solidus/output.json +++ b/test/parser/samples/attribute-containing-solidus/output.json @@ -36,6 +36,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-dynamic-boolean/input.html b/test/parser/samples/attribute-dynamic-boolean/input.svelte similarity index 100% rename from test/parser/samples/attribute-dynamic-boolean/input.html rename to test/parser/samples/attribute-dynamic-boolean/input.svelte diff --git a/test/parser/samples/attribute-dynamic-boolean/output.json b/test/parser/samples/attribute-dynamic-boolean/output.json index e50640f279..81a19f49b9 100644 --- a/test/parser/samples/attribute-dynamic-boolean/output.json +++ b/test/parser/samples/attribute-dynamic-boolean/output.json @@ -34,6 +34,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-dynamic-reserved/input.html b/test/parser/samples/attribute-dynamic-reserved/input.svelte similarity index 100% rename from test/parser/samples/attribute-dynamic-reserved/input.html rename to test/parser/samples/attribute-dynamic-reserved/input.svelte diff --git a/test/parser/samples/attribute-dynamic-reserved/output.json b/test/parser/samples/attribute-dynamic-reserved/output.json index 042712b872..3a830d448f 100644 --- a/test/parser/samples/attribute-dynamic-reserved/output.json +++ b/test/parser/samples/attribute-dynamic-reserved/output.json @@ -34,6 +34,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-dynamic/input.html b/test/parser/samples/attribute-dynamic/input.svelte similarity index 100% rename from test/parser/samples/attribute-dynamic/input.html rename to test/parser/samples/attribute-dynamic/input.svelte diff --git a/test/parser/samples/attribute-dynamic/output.json b/test/parser/samples/attribute-dynamic/output.json index f3099f6e62..50d8ec60a5 100644 --- a/test/parser/samples/attribute-dynamic/output.json +++ b/test/parser/samples/attribute-dynamic/output.json @@ -58,6 +58,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-escaped/input.html b/test/parser/samples/attribute-escaped/input.svelte similarity index 100% rename from test/parser/samples/attribute-escaped/input.html rename to test/parser/samples/attribute-escaped/input.svelte diff --git a/test/parser/samples/attribute-escaped/output.json b/test/parser/samples/attribute-escaped/output.json index 979b54d713..6a4143e674 100644 --- a/test/parser/samples/attribute-escaped/output.json +++ b/test/parser/samples/attribute-escaped/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-multiple/input.html b/test/parser/samples/attribute-multiple/input.svelte similarity index 100% rename from test/parser/samples/attribute-multiple/input.html rename to test/parser/samples/attribute-multiple/input.svelte diff --git a/test/parser/samples/attribute-multiple/output.json b/test/parser/samples/attribute-multiple/output.json index 5864363cdf..668409c0ef 100644 --- a/test/parser/samples/attribute-multiple/output.json +++ b/test/parser/samples/attribute-multiple/output.json @@ -43,6 +43,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-shorthand/input.html b/test/parser/samples/attribute-shorthand/input.svelte similarity index 100% rename from test/parser/samples/attribute-shorthand/input.html rename to test/parser/samples/attribute-shorthand/input.svelte diff --git a/test/parser/samples/attribute-shorthand/output.json b/test/parser/samples/attribute-shorthand/output.json index 69f9329ed1..08ddf5eda9 100644 --- a/test/parser/samples/attribute-shorthand/output.json +++ b/test/parser/samples/attribute-shorthand/output.json @@ -34,6 +34,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-static-boolean/input.html b/test/parser/samples/attribute-static-boolean/input.svelte similarity index 100% rename from test/parser/samples/attribute-static-boolean/input.html rename to test/parser/samples/attribute-static-boolean/input.svelte diff --git a/test/parser/samples/attribute-static-boolean/output.json b/test/parser/samples/attribute-static-boolean/output.json index 79ea9e9d11..f63b5734e0 100644 --- a/test/parser/samples/attribute-static-boolean/output.json +++ b/test/parser/samples/attribute-static-boolean/output.json @@ -22,6 +22,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-static/input.html b/test/parser/samples/attribute-static/input.svelte similarity index 100% rename from test/parser/samples/attribute-static/input.html rename to test/parser/samples/attribute-static/input.svelte diff --git a/test/parser/samples/attribute-static/output.json b/test/parser/samples/attribute-static/output.json index cb0d7684da..3185e48736 100644 --- a/test/parser/samples/attribute-static/output.json +++ b/test/parser/samples/attribute-static/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/attribute-unique-error/input.html b/test/parser/samples/attribute-unique-error/input.svelte similarity index 100% rename from test/parser/samples/attribute-unique-error/input.html rename to test/parser/samples/attribute-unique-error/input.svelte diff --git a/test/parser/samples/attribute-unquoted/input.html b/test/parser/samples/attribute-unquoted/input.svelte similarity index 100% rename from test/parser/samples/attribute-unquoted/input.html rename to test/parser/samples/attribute-unquoted/input.svelte diff --git a/test/parser/samples/attribute-unquoted/output.json b/test/parser/samples/attribute-unquoted/output.json index 940ac5b01d..c7556f2eba 100644 --- a/test/parser/samples/attribute-unquoted/output.json +++ b/test/parser/samples/attribute-unquoted/output.json @@ -29,6 +29,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/await-then-catch/input.html b/test/parser/samples/await-then-catch/input.svelte similarity index 100% rename from test/parser/samples/await-then-catch/input.html rename to test/parser/samples/await-then-catch/input.svelte diff --git a/test/parser/samples/await-then-catch/output.json b/test/parser/samples/await-then-catch/output.json index 1ab557f99d..21fc13eff9 100644 --- a/test/parser/samples/await-then-catch/output.json +++ b/test/parser/samples/await-then-catch/output.json @@ -155,6 +155,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/binding-shorthand/input.html b/test/parser/samples/binding-shorthand/input.svelte similarity index 100% rename from test/parser/samples/binding-shorthand/input.html rename to test/parser/samples/binding-shorthand/input.svelte diff --git a/test/parser/samples/binding-shorthand/output.json b/test/parser/samples/binding-shorthand/output.json index c80fc5f7f2..3be1db50b4 100644 --- a/test/parser/samples/binding-shorthand/output.json +++ b/test/parser/samples/binding-shorthand/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/binding/input.html b/test/parser/samples/binding/input.svelte similarity index 100% rename from test/parser/samples/binding/input.html rename to test/parser/samples/binding/input.svelte diff --git a/test/parser/samples/binding/output.json b/test/parser/samples/binding/output.json index 031d291fa7..5dc173c2a2 100644 --- a/test/parser/samples/binding/output.json +++ b/test/parser/samples/binding/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/comment/input.html b/test/parser/samples/comment/input.svelte similarity index 100% rename from test/parser/samples/comment/input.html rename to test/parser/samples/comment/input.svelte diff --git a/test/parser/samples/comment/output.json b/test/parser/samples/comment/output.json index 10d85bf422..89295c188a 100644 --- a/test/parser/samples/comment/output.json +++ b/test/parser/samples/comment/output.json @@ -12,6 +12,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/component-dynamic/input.html b/test/parser/samples/component-dynamic/input.svelte similarity index 100% rename from test/parser/samples/component-dynamic/input.html rename to test/parser/samples/component-dynamic/input.svelte diff --git a/test/parser/samples/component-dynamic/output.json b/test/parser/samples/component-dynamic/output.json index 9b08732c38..c2e4e3ee79 100644 --- a/test/parser/samples/component-dynamic/output.json +++ b/test/parser/samples/component-dynamic/output.json @@ -37,6 +37,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/convert-entities-in-element/input.html b/test/parser/samples/convert-entities-in-element/input.svelte similarity index 100% rename from test/parser/samples/convert-entities-in-element/input.html rename to test/parser/samples/convert-entities-in-element/input.svelte diff --git a/test/parser/samples/convert-entities-in-element/output.json b/test/parser/samples/convert-entities-in-element/output.json index f481345a02..fb0f5b288e 100644 --- a/test/parser/samples/convert-entities-in-element/output.json +++ b/test/parser/samples/convert-entities-in-element/output.json @@ -21,6 +21,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/convert-entities/input.html b/test/parser/samples/convert-entities/input.svelte similarity index 100% rename from test/parser/samples/convert-entities/input.html rename to test/parser/samples/convert-entities/input.svelte diff --git a/test/parser/samples/convert-entities/output.json b/test/parser/samples/convert-entities/output.json index b3e66a9007..ca1c1356f8 100644 --- a/test/parser/samples/convert-entities/output.json +++ b/test/parser/samples/convert-entities/output.json @@ -12,6 +12,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/css/input.html b/test/parser/samples/css/input.svelte similarity index 100% rename from test/parser/samples/css/input.html rename to test/parser/samples/css/input.svelte diff --git a/test/parser/samples/css/output.json b/test/parser/samples/css/output.json index e91c31a71a..3127e01c71 100644 --- a/test/parser/samples/css/output.json +++ b/test/parser/samples/css/output.json @@ -27,71 +27,70 @@ } ] }, - "css": [ - { - "start": 16, - "end": 56, - "attributes": [], - "children": [ - { - "type": "Rule", - "selector": { - "type": "SelectorList", - "children": [ - { - "type": "Selector", + "css": { + "start": 16, + "end": 56, + "attributes": [], + "children": [ + { + "type": "Rule", + "selector": { + "type": "SelectorList", + "children": [ + { + "type": "Selector", + "children": [ + { + "type": "TypeSelector", + "name": "div", + "start": 25, + "end": 28 + } + ], + "start": 25, + "end": 28 + } + ], + "start": 25, + "end": 28 + }, + "block": { + "type": "Block", + "children": [ + { + "type": "Declaration", + "important": false, + "property": "color", + "value": { + "type": "Value", "children": [ { - "type": "TypeSelector", - "name": "div", - "start": 25, - "end": 28 + "type": "Identifier", + "name": "red", + "start": 40, + "end": 43 } ], - "start": 25, - "end": 28 - } - ], - "start": 25, - "end": 28 - }, - "block": { - "type": "Block", - "children": [ - { - "type": "Declaration", - "important": false, - "property": "color", - "value": { - "type": "Value", - "children": [ - { - "type": "Identifier", - "name": "red", - "start": 40, - "end": 43 - } - ], - "start": 39, - "end": 43 - }, - "start": 33, + "start": 39, "end": 43 - } - ], - "start": 29, - "end": 47 - }, - "start": 25, + }, + "start": 33, + "end": 43 + } + ], + "start": 29, "end": 47 - } - ], - "content": { - "start": 23, - "end": 48, - "styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n" + }, + "start": 25, + "end": 47 } + ], + "content": { + "start": 23, + "end": 48, + "styles": "\n\tdiv {\n\t\tcolor: red;\n\t}\n" } - ], - "js": [] + }, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/dynamic-import/input.html b/test/parser/samples/dynamic-import/input.svelte similarity index 100% rename from test/parser/samples/dynamic-import/input.html rename to test/parser/samples/dynamic-import/input.svelte diff --git a/test/parser/samples/dynamic-import/output.json b/test/parser/samples/dynamic-import/output.json index 55c1bdf756..c0d4a45e0d 100644 --- a/test/parser/samples/dynamic-import/output.json +++ b/test/parser/samples/dynamic-import/output.json @@ -5,201 +5,199 @@ "type": "Fragment", "children": [] }, - "css": [], - "js": [ - { - "start": 0, - "end": 146, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 137, - "body": [ - { - "type": "ImportDeclaration", - "start": 10, - "end": 43, - "specifiers": [ - { - "type": "ImportSpecifier", + "css": null, + "instance": { + "start": 0, + "end": 146, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 137, + "body": [ + { + "type": "ImportDeclaration", + "start": 10, + "end": 43, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 19, + "end": 26, + "imported": { + "type": "Identifier", "start": 19, "end": 26, - "imported": { - "type": "Identifier", - "start": 19, - "end": 26, - "name": "onMount" - }, - "local": { - "type": "Identifier", - "start": 19, - "end": 26, - "name": "onMount" - } + "name": "onMount" + }, + "local": { + "type": "Identifier", + "start": 19, + "end": 26, + "name": "onMount" } - ], - "source": { - "type": "Literal", - "start": 34, - "end": 42, - "value": "svelte", - "raw": "'svelte'" } - }, - { - "type": "ExpressionStatement", + ], + "source": { + "type": "Literal", + "start": 34, + "end": 42, + "value": "svelte", + "raw": "'svelte'" + } + }, + { + "type": "ExpressionStatement", + "start": 46, + "end": 136, + "expression": { + "type": "CallExpression", "start": 46, - "end": 136, - "expression": { - "type": "CallExpression", + "end": 135, + "callee": { + "type": "Identifier", "start": 46, - "end": 135, - "callee": { - "type": "Identifier", - "start": 46, - "end": 53, - "name": "onMount" - }, - "arguments": [ - { - "type": "ArrowFunctionExpression", - "start": 54, + "end": 53, + "name": "onMount" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 54, + "end": 134, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 60, "end": 134, - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 60, - "end": 134, - "body": [ - { - "type": "ExpressionStatement", + "body": [ + { + "type": "ExpressionStatement", + "start": 64, + "end": 131, + "expression": { + "type": "CallExpression", "start": 64, - "end": 131, - "expression": { - "type": "CallExpression", + "end": 130, + "callee": { + "type": "MemberExpression", "start": 64, - "end": 130, - "callee": { - "type": "MemberExpression", + "end": 87, + "object": { + "type": "CallExpression", "start": 64, - "end": 87, - "object": { - "type": "CallExpression", + "end": 82, + "callee": { + "type": "Import", "start": 64, - "end": 82, - "callee": { - "type": "Import", - "start": 64, - "end": 70 - }, - "arguments": [ - { - "type": "Literal", - "start": 71, - "end": 81, - "value": "./foo.js", - "raw": "'./foo.js'" - } - ] - }, - "property": { - "type": "Identifier", - "start": 83, - "end": 87, - "name": "then" + "end": 70 }, - "computed": false + "arguments": [ + { + "type": "Literal", + "start": 71, + "end": 81, + "value": "./foo.js", + "raw": "'./foo.js'" + } + ] + }, + "property": { + "type": "Identifier", + "start": 83, + "end": 87, + "name": "then" }, - "arguments": [ - { - "type": "ArrowFunctionExpression", - "start": 88, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 88, + "end": 129, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 88, + "end": 91, + "name": "foo" + } + ], + "body": { + "type": "BlockStatement", + "start": 95, "end": 129, - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [ + "body": [ { - "type": "Identifier", - "start": 88, - "end": 91, - "name": "foo" - } - ], - "body": { - "type": "BlockStatement", - "start": 95, - "end": 129, - "body": [ - { - "type": "ExpressionStatement", + "type": "ExpressionStatement", + "start": 100, + "end": 125, + "expression": { + "type": "CallExpression", "start": 100, - "end": 125, - "expression": { - "type": "CallExpression", + "end": 124, + "callee": { + "type": "MemberExpression", "start": 100, - "end": 124, - "callee": { - "type": "MemberExpression", + "end": 111, + "object": { + "type": "Identifier", "start": 100, + "end": 107, + "name": "console" + }, + "property": { + "type": "Identifier", + "start": 108, "end": 111, + "name": "log" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 112, + "end": 123, "object": { "type": "Identifier", - "start": 100, - "end": 107, - "name": "console" + "start": 112, + "end": 115, + "name": "foo" }, "property": { "type": "Identifier", - "start": 108, - "end": 111, - "name": "log" + "start": 116, + "end": 123, + "name": "default" }, "computed": false - }, - "arguments": [ - { - "type": "MemberExpression", - "start": 112, - "end": 123, - "object": { - "type": "Identifier", - "start": 112, - "end": 115, - "name": "foo" - }, - "property": { - "type": "Identifier", - "start": 116, - "end": 123, - "name": "default" - }, - "computed": false - } - ] - } + } + ] } - ] - } + } + ] } - ] - } + } + ] } - ] - } + } + ] } - ] - } + } + ] } - ], - "sourceType": "module" - } + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/each-block-destructured/input.html b/test/parser/samples/each-block-destructured/input.svelte similarity index 100% rename from test/parser/samples/each-block-destructured/input.html rename to test/parser/samples/each-block-destructured/input.svelte diff --git a/test/parser/samples/each-block-destructured/output.json b/test/parser/samples/each-block-destructured/output.json index fdca5f82a2..b9efc18906 100644 --- a/test/parser/samples/each-block-destructured/output.json +++ b/test/parser/samples/each-block-destructured/output.json @@ -75,6 +75,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block-else/input.html b/test/parser/samples/each-block-else/input.svelte similarity index 100% rename from test/parser/samples/each-block-else/input.html rename to test/parser/samples/each-block-else/input.svelte diff --git a/test/parser/samples/each-block-else/output.json b/test/parser/samples/each-block-else/output.json index be0ac6d550..aefc8c2f39 100644 --- a/test/parser/samples/each-block-else/output.json +++ b/test/parser/samples/each-block-else/output.json @@ -67,6 +67,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block-indexed/input.html b/test/parser/samples/each-block-indexed/input.svelte similarity index 100% rename from test/parser/samples/each-block-indexed/input.html rename to test/parser/samples/each-block-indexed/input.svelte diff --git a/test/parser/samples/each-block-indexed/output.json b/test/parser/samples/each-block-indexed/output.json index bda5f86a89..7518652468 100644 --- a/test/parser/samples/each-block-indexed/output.json +++ b/test/parser/samples/each-block-indexed/output.json @@ -63,6 +63,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block-keyed/input.html b/test/parser/samples/each-block-keyed/input.svelte similarity index 100% rename from test/parser/samples/each-block-keyed/input.html rename to test/parser/samples/each-block-keyed/input.svelte diff --git a/test/parser/samples/each-block-keyed/output.json b/test/parser/samples/each-block-keyed/output.json index a00694fc4e..fe893bcdb9 100644 --- a/test/parser/samples/each-block-keyed/output.json +++ b/test/parser/samples/each-block-keyed/output.json @@ -63,6 +63,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/each-block/input.html b/test/parser/samples/each-block/input.svelte similarity index 100% rename from test/parser/samples/each-block/input.html rename to test/parser/samples/each-block/input.svelte diff --git a/test/parser/samples/each-block/output.json b/test/parser/samples/each-block/output.json index a24c32e9ad..c16a71ad5d 100644 --- a/test/parser/samples/each-block/output.json +++ b/test/parser/samples/each-block/output.json @@ -45,6 +45,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/element-with-mustache/input.html b/test/parser/samples/element-with-mustache/input.svelte similarity index 100% rename from test/parser/samples/element-with-mustache/input.html rename to test/parser/samples/element-with-mustache/input.svelte diff --git a/test/parser/samples/element-with-mustache/output.json b/test/parser/samples/element-with-mustache/output.json index a56cd27967..c8a386d681 100644 --- a/test/parser/samples/element-with-mustache/output.json +++ b/test/parser/samples/element-with-mustache/output.json @@ -38,6 +38,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/element-with-text/input.html b/test/parser/samples/element-with-text/input.svelte similarity index 100% rename from test/parser/samples/element-with-text/input.html rename to test/parser/samples/element-with-text/input.svelte diff --git a/test/parser/samples/element-with-text/output.json b/test/parser/samples/element-with-text/output.json index 1ae33df94f..70f6163c93 100644 --- a/test/parser/samples/element-with-text/output.json +++ b/test/parser/samples/element-with-text/output.json @@ -21,6 +21,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/elements/input.html b/test/parser/samples/elements/input.svelte similarity index 100% rename from test/parser/samples/elements/input.html rename to test/parser/samples/elements/input.svelte diff --git a/test/parser/samples/elements/output.json b/test/parser/samples/elements/output.json index 219799df3e..d216f7f5d8 100644 --- a/test/parser/samples/elements/output.json +++ b/test/parser/samples/elements/output.json @@ -22,6 +22,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/error-binding-disabled/error.json b/test/parser/samples/error-binding-disabled/error.json deleted file mode 100644 index 63f01e7056..0000000000 --- a/test/parser/samples/error-binding-disabled/error.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "code": "binding-disabled", - "message": "Two-way binding is disabled", - "start": { - "line": 1, - "column": 7, - "character": 7 - }, - "pos": 7 -} \ No newline at end of file diff --git a/test/parser/samples/error-binding-disabled/input.html b/test/parser/samples/error-binding-disabled/input.html deleted file mode 100644 index d0a0feab8d..0000000000 --- a/test/parser/samples/error-binding-disabled/input.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/test/parser/samples/error-binding-disabled/options.json b/test/parser/samples/error-binding-disabled/options.json deleted file mode 100644 index 02fc50c2f2..0000000000 --- a/test/parser/samples/error-binding-disabled/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "bind": false -} \ No newline at end of file diff --git a/test/parser/samples/error-comment-unclosed/input.html b/test/parser/samples/error-comment-unclosed/input.svelte similarity index 100% rename from test/parser/samples/error-comment-unclosed/input.html rename to test/parser/samples/error-comment-unclosed/input.svelte diff --git a/test/parser/samples/error-css/input.html b/test/parser/samples/error-css/input.svelte similarity index 100% rename from test/parser/samples/error-css/input.html rename to test/parser/samples/error-css/input.svelte diff --git a/test/parser/samples/error-illegal-expression/input.html b/test/parser/samples/error-illegal-expression/input.svelte similarity index 100% rename from test/parser/samples/error-illegal-expression/input.html rename to test/parser/samples/error-illegal-expression/input.svelte diff --git a/test/parser/samples/error-multiple-styles/input.html b/test/parser/samples/error-multiple-styles/input.svelte similarity index 100% rename from test/parser/samples/error-multiple-styles/input.html rename to test/parser/samples/error-multiple-styles/input.svelte diff --git a/test/parser/samples/error-script-unclosed/input.html b/test/parser/samples/error-script-unclosed/input.svelte similarity index 100% rename from test/parser/samples/error-script-unclosed/input.html rename to test/parser/samples/error-script-unclosed/input.svelte diff --git a/test/parser/samples/error-self-reference/input.html b/test/parser/samples/error-self-reference/input.svelte similarity index 100% rename from test/parser/samples/error-self-reference/input.html rename to test/parser/samples/error-self-reference/input.svelte diff --git a/test/parser/samples/error-svelte-selfdestructive/error.json b/test/parser/samples/error-svelte-selfdestructive/error.json new file mode 100644 index 0000000000..2443bb9822 --- /dev/null +++ b/test/parser/samples/error-svelte-selfdestructive/error.json @@ -0,0 +1,10 @@ +{ + "code": "invalid-tag-name", + "message": "Valid tag names are svelte:head, svelte:options, svelte:window, svelte:body, svelte:self or svelte:component", + "pos": 10, + "start": { + "character": 10, + "line": 2, + "column": 2 + } +} diff --git a/test/parser/samples/error-svelte-selfdestructive/input.svelte b/test/parser/samples/error-svelte-selfdestructive/input.svelte new file mode 100644 index 0000000000..6bf1e83aa4 --- /dev/null +++ b/test/parser/samples/error-svelte-selfdestructive/input.svelte @@ -0,0 +1,3 @@ +{#if x} + +{/if} \ No newline at end of file diff --git a/test/parser/samples/error-unexpected-end-of-input-b/input.html b/test/parser/samples/error-unexpected-end-of-input-b/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input-b/input.html rename to test/parser/samples/error-unexpected-end-of-input-b/input.svelte diff --git a/test/parser/samples/error-unexpected-end-of-input-c/input.html b/test/parser/samples/error-unexpected-end-of-input-c/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input-c/input.html rename to test/parser/samples/error-unexpected-end-of-input-c/input.svelte diff --git a/test/parser/samples/error-unexpected-end-of-input-d/input.html b/test/parser/samples/error-unexpected-end-of-input-d/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input-d/input.html rename to test/parser/samples/error-unexpected-end-of-input-d/input.svelte diff --git a/test/parser/samples/error-unexpected-end-of-input/input.html b/test/parser/samples/error-unexpected-end-of-input/input.svelte similarity index 100% rename from test/parser/samples/error-unexpected-end-of-input/input.html rename to test/parser/samples/error-unexpected-end-of-input/input.svelte diff --git a/test/parser/samples/error-unmatched-closing-tag/input.html b/test/parser/samples/error-unmatched-closing-tag/input.svelte similarity index 100% rename from test/parser/samples/error-unmatched-closing-tag/input.html rename to test/parser/samples/error-unmatched-closing-tag/input.svelte diff --git a/test/parser/samples/error-void-closing/input.html b/test/parser/samples/error-void-closing/input.svelte similarity index 100% rename from test/parser/samples/error-void-closing/input.html rename to test/parser/samples/error-void-closing/input.svelte diff --git a/test/parser/samples/error-window-children/input.html b/test/parser/samples/error-window-children/input.svelte similarity index 100% rename from test/parser/samples/error-window-children/input.html rename to test/parser/samples/error-window-children/input.svelte diff --git a/test/parser/samples/error-window-duplicate/input.html b/test/parser/samples/error-window-duplicate/input.svelte similarity index 100% rename from test/parser/samples/error-window-duplicate/input.html rename to test/parser/samples/error-window-duplicate/input.svelte diff --git a/test/parser/samples/error-window-inside-block/input.html b/test/parser/samples/error-window-inside-block/input.svelte similarity index 100% rename from test/parser/samples/error-window-inside-block/input.html rename to test/parser/samples/error-window-inside-block/input.svelte diff --git a/test/parser/samples/error-window-inside-element/input.html b/test/parser/samples/error-window-inside-element/input.svelte similarity index 100% rename from test/parser/samples/error-window-inside-element/input.html rename to test/parser/samples/error-window-inside-element/input.svelte diff --git a/test/parser/samples/event-handler/input.html b/test/parser/samples/event-handler/input.svelte similarity index 100% rename from test/parser/samples/event-handler/input.html rename to test/parser/samples/event-handler/input.svelte diff --git a/test/parser/samples/event-handler/output.json b/test/parser/samples/event-handler/output.json index 740e43e48d..b1fe89fc2a 100644 --- a/test/parser/samples/event-handler/output.json +++ b/test/parser/samples/event-handler/output.json @@ -98,6 +98,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/if-block-else/input.html b/test/parser/samples/if-block-else/input.svelte similarity index 100% rename from test/parser/samples/if-block-else/input.html rename to test/parser/samples/if-block-else/input.svelte diff --git a/test/parser/samples/if-block-else/output.json b/test/parser/samples/if-block-else/output.json index 8e96c34efc..dedf2797c4 100644 --- a/test/parser/samples/if-block-else/output.json +++ b/test/parser/samples/if-block-else/output.json @@ -56,6 +56,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/if-block-elseif/input.html b/test/parser/samples/if-block-elseif/input.svelte similarity index 100% rename from test/parser/samples/if-block-elseif/input.html rename to test/parser/samples/if-block-elseif/input.svelte diff --git a/test/parser/samples/if-block-elseif/output.json b/test/parser/samples/if-block-elseif/output.json index 257eb1e7d2..426e1f7fbc 100644 --- a/test/parser/samples/if-block-elseif/output.json +++ b/test/parser/samples/if-block-elseif/output.json @@ -96,6 +96,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/if-block/input.html b/test/parser/samples/if-block/input.svelte similarity index 100% rename from test/parser/samples/if-block/input.html rename to test/parser/samples/if-block/input.svelte diff --git a/test/parser/samples/if-block/output.json b/test/parser/samples/if-block/output.json index ba734c0e56..d560824766 100644 --- a/test/parser/samples/if-block/output.json +++ b/test/parser/samples/if-block/output.json @@ -25,6 +25,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/implicitly-closed-li/input.html b/test/parser/samples/implicitly-closed-li/input.svelte similarity index 100% rename from test/parser/samples/implicitly-closed-li/input.html rename to test/parser/samples/implicitly-closed-li/input.svelte diff --git a/test/parser/samples/implicitly-closed-li/output.json b/test/parser/samples/implicitly-closed-li/output.json index 69def7a9a2..caf69d7109 100644 --- a/test/parser/samples/implicitly-closed-li/output.json +++ b/test/parser/samples/implicitly-closed-li/output.json @@ -66,6 +66,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/nbsp/input.html b/test/parser/samples/nbsp/input.svelte similarity index 100% rename from test/parser/samples/nbsp/input.html rename to test/parser/samples/nbsp/input.svelte diff --git a/test/parser/samples/nbsp/output.json b/test/parser/samples/nbsp/output.json index 7373bc9673..4fa318ce48 100644 --- a/test/parser/samples/nbsp/output.json +++ b/test/parser/samples/nbsp/output.json @@ -21,6 +21,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/raw-mustaches/input.html b/test/parser/samples/raw-mustaches/input.svelte similarity index 100% rename from test/parser/samples/raw-mustaches/input.html rename to test/parser/samples/raw-mustaches/input.svelte diff --git a/test/parser/samples/raw-mustaches/output.json b/test/parser/samples/raw-mustaches/output.json index 41dab885e0..1d92b21c85 100644 --- a/test/parser/samples/raw-mustaches/output.json +++ b/test/parser/samples/raw-mustaches/output.json @@ -55,6 +55,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/refs/input.html b/test/parser/samples/refs/input.svelte similarity index 100% rename from test/parser/samples/refs/input.html rename to test/parser/samples/refs/input.svelte diff --git a/test/parser/samples/refs/output.json b/test/parser/samples/refs/output.json index 3cd6c4d9fa..2cf5054304 100644 --- a/test/parser/samples/refs/output.json +++ b/test/parser/samples/refs/output.json @@ -28,6 +28,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/script-comment-only/input.html b/test/parser/samples/script-comment-only/input.svelte similarity index 100% rename from test/parser/samples/script-comment-only/input.html rename to test/parser/samples/script-comment-only/input.svelte diff --git a/test/parser/samples/script-comment-only/output.json b/test/parser/samples/script-comment-only/output.json index b04d38633d..95ca769b20 100644 --- a/test/parser/samples/script-comment-only/output.json +++ b/test/parser/samples/script-comment-only/output.json @@ -20,19 +20,16 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 43, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 34, - "body": [], - "sourceType": "module" - } + "instance": { + "start": 0, + "end": 43, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 34, + "body": [], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/script-comment-trailing-multiline/input.html b/test/parser/samples/script-comment-trailing-multiline/input.svelte similarity index 100% rename from test/parser/samples/script-comment-trailing-multiline/input.html rename to test/parser/samples/script-comment-trailing-multiline/input.svelte diff --git a/test/parser/samples/script-comment-trailing-multiline/output.json b/test/parser/samples/script-comment-trailing-multiline/output.json index a32ff799f7..d4a45911a1 100644 --- a/test/parser/samples/script-comment-trailing-multiline/output.json +++ b/test/parser/samples/script-comment-trailing-multiline/output.json @@ -44,46 +44,43 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 77, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 68, - "body": [ - { - "type": "VariableDeclaration", - "start": 10, - "end": 29, - "declarations": [ - { - "type": "VariableDeclarator", + "instance": { + "start": 0, + "end": 77, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 68, + "body": [ + { + "type": "VariableDeclaration", + "start": 10, + "end": 29, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 28, + "id": { + "type": "Identifier", "start": 14, + "end": 18, + "name": "name" + }, + "init": { + "type": "Literal", + "start": 21, "end": 28, - "id": { - "type": "Identifier", - "start": 14, - "end": 18, - "name": "name" - }, - "init": { - "type": "Literal", - "start": 21, - "end": 28, - "value": "world", - "raw": "'world'" - } + "value": "world", + "raw": "'world'" } - ], - "kind": "let" - } - ], - "sourceType": "module" - } + } + ], + "kind": "let" + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/script-comment-trailing/input.html b/test/parser/samples/script-comment-trailing/input.svelte similarity index 100% rename from test/parser/samples/script-comment-trailing/input.html rename to test/parser/samples/script-comment-trailing/input.svelte diff --git a/test/parser/samples/script-comment-trailing/output.json b/test/parser/samples/script-comment-trailing/output.json index 78012d4438..92d431b558 100644 --- a/test/parser/samples/script-comment-trailing/output.json +++ b/test/parser/samples/script-comment-trailing/output.json @@ -44,46 +44,43 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 66, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 57, - "body": [ - { - "type": "VariableDeclaration", - "start": 10, - "end": 29, - "declarations": [ - { - "type": "VariableDeclarator", + "instance": { + "start": 0, + "end": 66, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 57, + "body": [ + { + "type": "VariableDeclaration", + "start": 10, + "end": 29, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 28, + "id": { + "type": "Identifier", "start": 14, + "end": 18, + "name": "name" + }, + "init": { + "type": "Literal", + "start": 21, "end": 28, - "id": { - "type": "Identifier", - "start": 14, - "end": 18, - "name": "name" - }, - "init": { - "type": "Literal", - "start": 21, - "end": 28, - "value": "world", - "raw": "'world'" - } + "value": "world", + "raw": "'world'" } - ], - "kind": "let" - } - ], - "sourceType": "module" - } + } + ], + "kind": "let" + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/script/input.svelte b/test/parser/samples/script/input.svelte new file mode 100644 index 0000000000..22b3c84db0 --- /dev/null +++ b/test/parser/samples/script/input.svelte @@ -0,0 +1,5 @@ + + +

Hello {name}!

\ No newline at end of file diff --git a/test/parser/samples/script/output.json b/test/parser/samples/script/output.json index bf89a0ff02..95966f5dc6 100644 --- a/test/parser/samples/script/output.json +++ b/test/parser/samples/script/output.json @@ -44,46 +44,43 @@ } ] }, - "css": [], - "js": [ - { - "start": 0, - "end": 39, - "attributes": [], - "content": { - "type": "Program", - "start": 8, - "end": 30, - "body": [ - { - "type": "VariableDeclaration", - "start": 10, - "end": 29, - "declarations": [ - { - "type": "VariableDeclarator", + "instance": { + "start": 0, + "end": 39, + "context": "default", + "content": { + "type": "Program", + "start": 8, + "end": 30, + "body": [ + { + "type": "VariableDeclaration", + "start": 10, + "end": 29, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 28, + "id": { + "type": "Identifier", "start": 14, + "end": 18, + "name": "name" + }, + "init": { + "type": "Literal", + "start": 21, "end": 28, - "id": { - "type": "Identifier", - "start": 14, - "end": 18, - "name": "name" - }, - "init": { - "type": "Literal", - "start": 21, - "end": 28, - "value": "world", - "raw": "'world'" - } + "value": "world", + "raw": "'world'" } - ], - "kind": "let" - } - ], - "sourceType": "module" - } + } + ], + "kind": "let" + } + ], + "sourceType": "module" } - ] + } } \ No newline at end of file diff --git a/test/parser/samples/self-closing-element/input.html b/test/parser/samples/self-closing-element/input.svelte similarity index 100% rename from test/parser/samples/self-closing-element/input.html rename to test/parser/samples/self-closing-element/input.svelte diff --git a/test/parser/samples/self-closing-element/output.json b/test/parser/samples/self-closing-element/output.json index f7475b41d7..47eea2f333 100644 --- a/test/parser/samples/self-closing-element/output.json +++ b/test/parser/samples/self-closing-element/output.json @@ -14,6 +14,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/self-reference/input.html b/test/parser/samples/self-reference/input.svelte similarity index 100% rename from test/parser/samples/self-reference/input.html rename to test/parser/samples/self-reference/input.svelte diff --git a/test/parser/samples/self-reference/output.json b/test/parser/samples/self-reference/output.json index ff111e17ba..de5112a087 100644 --- a/test/parser/samples/self-reference/output.json +++ b/test/parser/samples/self-reference/output.json @@ -73,6 +73,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/space-between-mustaches/input.html b/test/parser/samples/space-between-mustaches/input.svelte similarity index 100% rename from test/parser/samples/space-between-mustaches/input.html rename to test/parser/samples/space-between-mustaches/input.svelte diff --git a/test/parser/samples/space-between-mustaches/output.json b/test/parser/samples/space-between-mustaches/output.json index d66735213d..c89409daeb 100644 --- a/test/parser/samples/space-between-mustaches/output.json +++ b/test/parser/samples/space-between-mustaches/output.json @@ -72,6 +72,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/spread/input.html b/test/parser/samples/spread/input.svelte similarity index 100% rename from test/parser/samples/spread/input.html rename to test/parser/samples/spread/input.svelte diff --git a/test/parser/samples/spread/output.json b/test/parser/samples/spread/output.json index a632dc89ab..3986da3578 100644 --- a/test/parser/samples/spread/output.json +++ b/test/parser/samples/spread/output.json @@ -26,6 +26,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/textarea-children/input.html b/test/parser/samples/textarea-children/input.svelte similarity index 100% rename from test/parser/samples/textarea-children/input.html rename to test/parser/samples/textarea-children/input.svelte diff --git a/test/parser/samples/textarea-children/output.json b/test/parser/samples/textarea-children/output.json index 08f42919ed..3b403458fc 100644 --- a/test/parser/samples/textarea-children/output.json +++ b/test/parser/samples/textarea-children/output.json @@ -44,6 +44,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/transition-intro-no-params/input.html b/test/parser/samples/transition-intro-no-params/input.svelte similarity index 100% rename from test/parser/samples/transition-intro-no-params/input.html rename to test/parser/samples/transition-intro-no-params/input.svelte diff --git a/test/parser/samples/transition-intro-no-params/output.json b/test/parser/samples/transition-intro-no-params/output.json index d53b4d9d88..edb15457e6 100644 --- a/test/parser/samples/transition-intro-no-params/output.json +++ b/test/parser/samples/transition-intro-no-params/output.json @@ -32,6 +32,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/transition-intro/input.html b/test/parser/samples/transition-intro/input.svelte similarity index 100% rename from test/parser/samples/transition-intro/input.html rename to test/parser/samples/transition-intro/input.svelte diff --git a/test/parser/samples/transition-intro/output.json b/test/parser/samples/transition-intro/output.json index 6405d0bad5..5583dd89bc 100644 --- a/test/parser/samples/transition-intro/output.json +++ b/test/parser/samples/transition-intro/output.json @@ -60,6 +60,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/unusual-identifier/input.html b/test/parser/samples/unusual-identifier/input.svelte similarity index 100% rename from test/parser/samples/unusual-identifier/input.html rename to test/parser/samples/unusual-identifier/input.svelte diff --git a/test/parser/samples/unusual-identifier/output.json b/test/parser/samples/unusual-identifier/output.json index fe9b175128..c0d4ecc3ff 100644 --- a/test/parser/samples/unusual-identifier/output.json +++ b/test/parser/samples/unusual-identifier/output.json @@ -45,6 +45,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/whitespace-leading-trailing/input.html b/test/parser/samples/whitespace-leading-trailing/input.svelte similarity index 100% rename from test/parser/samples/whitespace-leading-trailing/input.html rename to test/parser/samples/whitespace-leading-trailing/input.svelte diff --git a/test/parser/samples/whitespace-leading-trailing/output.json b/test/parser/samples/whitespace-leading-trailing/output.json index 7dbf259721..f164af01ba 100644 --- a/test/parser/samples/whitespace-leading-trailing/output.json +++ b/test/parser/samples/whitespace-leading-trailing/output.json @@ -27,6 +27,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/whitespace-normal/input.html b/test/parser/samples/whitespace-normal/input.svelte similarity index 100% rename from test/parser/samples/whitespace-normal/input.html rename to test/parser/samples/whitespace-normal/input.svelte diff --git a/test/parser/samples/whitespace-normal/output.json b/test/parser/samples/whitespace-normal/output.json index c150b53f04..e4ce956331 100644 --- a/test/parser/samples/whitespace-normal/output.json +++ b/test/parser/samples/whitespace-normal/output.json @@ -62,6 +62,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/parser/samples/yield/input.html b/test/parser/samples/yield/input.svelte similarity index 100% rename from test/parser/samples/yield/input.html rename to test/parser/samples/yield/input.svelte diff --git a/test/parser/samples/yield/output.json b/test/parser/samples/yield/output.json index b16ab436f6..16ea79d8e8 100644 --- a/test/parser/samples/yield/output.json +++ b/test/parser/samples/yield/output.json @@ -17,6 +17,7 @@ } ] }, - "css": [], - "js": [] + "css": null, + "instance": null, + "module": null } \ No newline at end of file diff --git a/test/preprocess/index.js b/test/preprocess/index.js index 14b483ce51..8d114ab7b3 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -1,219 +1,27 @@ +import * as fs from 'fs'; import * as assert from 'assert'; -import { svelte } from '../helpers.js'; +import { loadConfig, svelte } from '../helpers.js'; describe('preprocess', () => { - it('preprocesses entire component', () => { - const source = ` -

Hello __NAME__!

- `; + fs.readdirSync('test/preprocess/samples').forEach(dir => { + if (dir[0] === '.') return; - const expected = ` -

Hello world!

- `; + const config = loadConfig(`./preprocess/samples/${dir}/_config.js`); - return svelte.preprocess(source, { - markup: ({ content }) => { - return { - code: content.replace('__NAME__', 'world') - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses style', () => { - const source = ` -
$brand
- - - `; - - const expected = ` -
$brand
- - - `; - - return svelte.preprocess(source, { - style: ({ content }) => { - return { - code: content.replace('$brand', 'purple') - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses style asynchronously', () => { - const source = ` -
$brand
- - - `; - - const expected = ` -
$brand
- - - `; - - return svelte.preprocess(source, { - style: ({ content }) => { - return Promise.resolve({ - code: content.replace('$brand', 'purple') - }); - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses script', () => { - const source = ` - - `; + if (config.solo && process.env.CI) { + throw new Error('Forgot to remove `solo: true` from test'); + } - const expected = ` - - `; - - return svelte.preprocess(source, { - script: ({ content }) => { - return { - code: content.replace('__THE_ANSWER__', '42') - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('preprocesses multiple matching tags', () => { - const source = ` - - - - `; - - const expected = ` - - - - `; - - return svelte.preprocess(source, { - script: ({ content }) => { - return { - code: content.toLowerCase() - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); - - it('parses attributes', () => { - const source = ` - - `; - - return svelte.preprocess(source, { - style: ({ attributes }) => { - assert.deepEqual(attributes, { - type: 'text/scss', - 'data-foo': 'bar', - bool: true - }); - } - }); - }); - - it('provides filename to processing hooks', () => { - const source = ` -

Hello __MARKUP_FILENAME__!

- - - `; - - const expected = ` -

Hello file.html!

- - - `; - - return svelte.preprocess(source, { - filename: 'file.html', - markup: ({ content, filename }) => { - return { - code: content.replace('__MARKUP_FILENAME__', filename) - }; - }, - style: ({ content, filename }) => { - return { - code: content.replace('__STYLE_FILENAME__', filename) - }; - }, - script: ({ content, filename }) => { - return { - code: content.replace('__SCRIPT_FILENAME__', filename) - }; - } - }).then(processed => { - assert.equal(processed.toString(), expected); - }); - }); + (config.skip ? it.skip : config.solo ? it.only : it)(dir, async () => { + const input = fs.readFileSync(`test/preprocess/samples/${dir}/input.svelte`, 'utf-8'); + const expected = fs.readFileSync(`test/preprocess/samples/${dir}/output.svelte`, 'utf-8'); - it('ignores null/undefined returned from preprocessor', () => { - const source = ` - - `; + const result = await svelte.preprocess(input, config.preprocess); + fs.writeFileSync(`test/preprocess/samples/${dir}/_actual.html`, result.code); - const expected = ` - - `; + assert.equal(result.code, expected); - return svelte.preprocess(source, { - script: () => null - }).then(processed => { - assert.equal(processed.toString(), expected); + assert.deepEqual(result.dependencies, config.dependencies || []); }); }); }); diff --git a/test/preprocess/samples/dependencies/_config.js b/test/preprocess/samples/dependencies/_config.js new file mode 100644 index 0000000000..fa2d8b40c9 --- /dev/null +++ b/test/preprocess/samples/dependencies/_config.js @@ -0,0 +1,15 @@ +export default { + preprocess: { + style: ({ content }) => { + const dependencies = []; + const code = content.replace(/@import '(.+)';/g, (match, $1) => { + dependencies.push($1); + return '/* removed */'; + }); + + return { code, dependencies }; + } + }, + + dependencies: ['./foo.css'] +}; \ No newline at end of file diff --git a/test/preprocess/samples/dependencies/input.svelte b/test/preprocess/samples/dependencies/input.svelte new file mode 100644 index 0000000000..34a12faff6 --- /dev/null +++ b/test/preprocess/samples/dependencies/input.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/dependencies/output.svelte b/test/preprocess/samples/dependencies/output.svelte new file mode 100644 index 0000000000..d80d51a6fc --- /dev/null +++ b/test/preprocess/samples/dependencies/output.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/filename/_config.js b/test/preprocess/samples/filename/_config.js new file mode 100644 index 0000000000..c71cdafcac --- /dev/null +++ b/test/preprocess/samples/filename/_config.js @@ -0,0 +1,20 @@ +export default { + preprocess: { + filename: 'file.svelte', + markup: ({ content, filename }) => { + return { + code: content.replace('__MARKUP_FILENAME__', filename) + }; + }, + style: ({ content, filename }) => { + return { + code: content.replace('__STYLE_FILENAME__', filename) + }; + }, + script: ({ content, filename }) => { + return { + code: content.replace('__SCRIPT_FILENAME__', filename) + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/filename/input.svelte b/test/preprocess/samples/filename/input.svelte new file mode 100644 index 0000000000..f03a890f6e --- /dev/null +++ b/test/preprocess/samples/filename/input.svelte @@ -0,0 +1,3 @@ +

Hello __MARKUP_FILENAME__!

+ + \ No newline at end of file diff --git a/test/preprocess/samples/filename/output.svelte b/test/preprocess/samples/filename/output.svelte new file mode 100644 index 0000000000..9eece2e222 --- /dev/null +++ b/test/preprocess/samples/filename/output.svelte @@ -0,0 +1,3 @@ +

Hello file.svelte!

+ + \ No newline at end of file diff --git a/test/preprocess/samples/ignores-null/_config.js b/test/preprocess/samples/ignores-null/_config.js new file mode 100644 index 0000000000..042ee89aed --- /dev/null +++ b/test/preprocess/samples/ignores-null/_config.js @@ -0,0 +1,5 @@ +export default { + preprocess: { + script: () => null + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/ignores-null/input.svelte b/test/preprocess/samples/ignores-null/input.svelte new file mode 100644 index 0000000000..b3fc25b643 --- /dev/null +++ b/test/preprocess/samples/ignores-null/input.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/ignores-null/output.svelte b/test/preprocess/samples/ignores-null/output.svelte new file mode 100644 index 0000000000..b3fc25b643 --- /dev/null +++ b/test/preprocess/samples/ignores-null/output.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/markup/_config.js b/test/preprocess/samples/markup/_config.js new file mode 100644 index 0000000000..857da608af --- /dev/null +++ b/test/preprocess/samples/markup/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + markup: ({ content }) => { + return { + code: content.replace('__NAME__', 'world') + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/markup/input.svelte b/test/preprocess/samples/markup/input.svelte new file mode 100644 index 0000000000..d65a1a50a6 --- /dev/null +++ b/test/preprocess/samples/markup/input.svelte @@ -0,0 +1 @@ +

Hello __NAME__!

\ No newline at end of file diff --git a/test/preprocess/samples/markup/output.svelte b/test/preprocess/samples/markup/output.svelte new file mode 100644 index 0000000000..efe5048cbc --- /dev/null +++ b/test/preprocess/samples/markup/output.svelte @@ -0,0 +1 @@ +

Hello world!

\ No newline at end of file diff --git a/test/preprocess/samples/multiple-preprocessors/_config.js b/test/preprocess/samples/multiple-preprocessors/_config.js new file mode 100644 index 0000000000..8a57567f6b --- /dev/null +++ b/test/preprocess/samples/multiple-preprocessors/_config.js @@ -0,0 +1,14 @@ +export default { + preprocess: [ + { + markup: ({ content }) => ({ code: content.replace(/one/g, 'two') }), + script: ({ content }) => ({ code: content.replace(/three/g, 'four') }), + style: ({ content }) => ({ code: content.replace(/four/g, 'five') }) + }, + { + markup: ({ content }) => ({ code: content.replace(/two/g, 'three') }), + script: ({ content }) => ({ code: content.replace(/four/g, 'five') }), + style: ({ content }) => ({ code: content.replace(/three/g, 'four') }) + } + ] +}; \ No newline at end of file diff --git a/test/preprocess/samples/multiple-preprocessors/input.svelte b/test/preprocess/samples/multiple-preprocessors/input.svelte new file mode 100644 index 0000000000..6dbbfb47a9 --- /dev/null +++ b/test/preprocess/samples/multiple-preprocessors/input.svelte @@ -0,0 +1,11 @@ +

one

+ + + + \ No newline at end of file diff --git a/test/preprocess/samples/multiple-preprocessors/output.svelte b/test/preprocess/samples/multiple-preprocessors/output.svelte new file mode 100644 index 0000000000..dd6f3e9de8 --- /dev/null +++ b/test/preprocess/samples/multiple-preprocessors/output.svelte @@ -0,0 +1,11 @@ +

three

+ + + + \ No newline at end of file diff --git a/test/preprocess/samples/script-multiple/_config.js b/test/preprocess/samples/script-multiple/_config.js new file mode 100644 index 0000000000..d6656ff48e --- /dev/null +++ b/test/preprocess/samples/script-multiple/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + script: ({ content }) => { + return { + code: content.toLowerCase() + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/script-multiple/input.svelte b/test/preprocess/samples/script-multiple/input.svelte new file mode 100644 index 0000000000..5a5221dc84 --- /dev/null +++ b/test/preprocess/samples/script-multiple/input.svelte @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/test/preprocess/samples/script-multiple/output.svelte b/test/preprocess/samples/script-multiple/output.svelte new file mode 100644 index 0000000000..64fe4c1f25 --- /dev/null +++ b/test/preprocess/samples/script-multiple/output.svelte @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/test/preprocess/samples/script/_config.js b/test/preprocess/samples/script/_config.js new file mode 100644 index 0000000000..8e8ac1d2f9 --- /dev/null +++ b/test/preprocess/samples/script/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + script: ({ content }) => { + return { + code: content.replace('__THE_ANSWER__', '42') + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/script/input.svelte b/test/preprocess/samples/script/input.svelte new file mode 100644 index 0000000000..8236f6d9d2 --- /dev/null +++ b/test/preprocess/samples/script/input.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/script/output.svelte b/test/preprocess/samples/script/output.svelte new file mode 100644 index 0000000000..5bef15aab0 --- /dev/null +++ b/test/preprocess/samples/script/output.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/style-async/_config.js b/test/preprocess/samples/style-async/_config.js new file mode 100644 index 0000000000..a91f8f4307 --- /dev/null +++ b/test/preprocess/samples/style-async/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + style: ({ content }) => { + return Promise.resolve({ + code: content.replace('$brand', 'purple') + }); + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/style-async/input.svelte b/test/preprocess/samples/style-async/input.svelte new file mode 100644 index 0000000000..303ac6366a --- /dev/null +++ b/test/preprocess/samples/style-async/input.svelte @@ -0,0 +1,7 @@ +
$brand
+ + \ No newline at end of file diff --git a/test/preprocess/samples/style-async/output.svelte b/test/preprocess/samples/style-async/output.svelte new file mode 100644 index 0000000000..2847cc525a --- /dev/null +++ b/test/preprocess/samples/style-async/output.svelte @@ -0,0 +1,7 @@ +
$brand
+ + \ No newline at end of file diff --git a/test/preprocess/samples/style-attributes/_config.js b/test/preprocess/samples/style-attributes/_config.js new file mode 100644 index 0000000000..7a619054bd --- /dev/null +++ b/test/preprocess/samples/style-attributes/_config.js @@ -0,0 +1,14 @@ +import * as assert from 'assert'; + +export default { + preprocess: { + style: ({ attributes }) => { + assert.deepEqual(attributes, { + type: 'text/scss', + 'data-foo': 'bar', + bool: true + }); + return { code: 'PROCESSED' }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/style-attributes/input.svelte b/test/preprocess/samples/style-attributes/input.svelte new file mode 100644 index 0000000000..3a55a5a3f6 --- /dev/null +++ b/test/preprocess/samples/style-attributes/input.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/style-attributes/output.svelte b/test/preprocess/samples/style-attributes/output.svelte new file mode 100644 index 0000000000..c83defeebb --- /dev/null +++ b/test/preprocess/samples/style-attributes/output.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/preprocess/samples/style/_config.js b/test/preprocess/samples/style/_config.js new file mode 100644 index 0000000000..59040eccdd --- /dev/null +++ b/test/preprocess/samples/style/_config.js @@ -0,0 +1,9 @@ +export default { + preprocess: { + style: ({ content }) => { + return { + code: content.replace('$brand', 'purple') + }; + } + } +}; \ No newline at end of file diff --git a/test/preprocess/samples/style/input.svelte b/test/preprocess/samples/style/input.svelte new file mode 100644 index 0000000000..303ac6366a --- /dev/null +++ b/test/preprocess/samples/style/input.svelte @@ -0,0 +1,7 @@ +
$brand
+ + \ No newline at end of file diff --git a/test/preprocess/samples/style/output.svelte b/test/preprocess/samples/style/output.svelte new file mode 100644 index 0000000000..2847cc525a --- /dev/null +++ b/test/preprocess/samples/style/output.svelte @@ -0,0 +1,7 @@ +
$brand
+ + \ No newline at end of file diff --git a/test/runtime/index.js b/test/runtime/index.js index 334426c424..002ca2605f 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -13,18 +13,12 @@ import { setupHtmlEqual } from "../helpers.js"; -const main = path.resolve('index.js'); let svelte$; let svelte; let compileOptions = null; let compile = null; -function getName(filename) { - const base = path.basename(filename).replace(".html", ""); - return base[0].toUpperCase() + base.slice(1); -} - const sveltePath = process.cwd().split('\\').join('/'); const internal = `${sveltePath}/internal.js`; @@ -33,11 +27,12 @@ describe("runtime", () => { svelte = loadSvelte(false); svelte$ = loadSvelte(true); - require.extensions[".html"] = function(module, filename) { - const options = Object.assign( - { filename, name: getName(filename), format: 'cjs', sveltePath }, - compileOptions - ); + require.extensions[".svelte"] = function(module, filename) { + const options = Object.assign({ + filename, + format: 'cjs', + sveltePath + }, compileOptions); const { js: { code } } = compile(fs.readFileSync(filename, "utf-8"), options); @@ -79,7 +74,7 @@ describe("runtime", () => { compileOptions.immutable = config.immutable; Object.keys(require.cache) - .filter(x => x.endsWith(".html")) + .filter(x => x.endsWith(".svelte")) .forEach(file => { delete require.cache[file]; }); @@ -116,10 +111,10 @@ describe("runtime", () => { }; try { - mod = require(`./samples/${dir}/main.html`); + mod = require(`./samples/${dir}/main.svelte`); SvelteComponent = mod.default; } catch (err) { - showOutput(cwd, { internal, hydratable: hydrate, format: 'cjs' }, svelte.compile); // eslint-disable-line no-console + showOutput(cwd, compileOptions, svelte.compile); // eslint-disable-line no-console throw err; } @@ -190,22 +185,13 @@ describe("runtime", () => { } } else { failed.add(dir); - showOutput(cwd, { - internal, - hydratable: hydrate, - dev: compileOptions.dev, - format: 'cjs' - }, svelte.compile); // eslint-disable-line no-console + showOutput(cwd, compileOptions, svelte.compile); // eslint-disable-line no-console throw err; } }) .then(() => { if (config.show) { - showOutput(cwd, { - internal, - hydratable: hydrate, - format: 'cjs' - }, svelte.compile); + showOutput(cwd, compileOptions, svelte.compile); } flush(); @@ -249,7 +235,7 @@ describe("runtime", () => { }); return eval( - `(function () { ${result.code}; return App; }())` + `(function () { ${result.output[0].code}; return App; }())` ); } diff --git a/test/runtime/samples/action-custom-event-handler-in-each-destructured/main.html b/test/runtime/samples/action-custom-event-handler-in-each-destructured/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-in-each-destructured/main.html rename to test/runtime/samples/action-custom-event-handler-in-each-destructured/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-in-each/main.html b/test/runtime/samples/action-custom-event-handler-in-each/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-in-each/main.html rename to test/runtime/samples/action-custom-event-handler-in-each/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-node-context/main.html b/test/runtime/samples/action-custom-event-handler-node-context/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-node-context/main.html rename to test/runtime/samples/action-custom-event-handler-node-context/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-this/main.html b/test/runtime/samples/action-custom-event-handler-this/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-this/main.html rename to test/runtime/samples/action-custom-event-handler-this/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler-with-context/main.html b/test/runtime/samples/action-custom-event-handler-with-context/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler-with-context/main.html rename to test/runtime/samples/action-custom-event-handler-with-context/main.svelte diff --git a/test/runtime/samples/action-custom-event-handler/main.html b/test/runtime/samples/action-custom-event-handler/main.svelte similarity index 100% rename from test/runtime/samples/action-custom-event-handler/main.html rename to test/runtime/samples/action-custom-event-handler/main.svelte diff --git a/test/runtime/samples/action-function/main.html b/test/runtime/samples/action-function/main.svelte similarity index 100% rename from test/runtime/samples/action-function/main.html rename to test/runtime/samples/action-function/main.svelte diff --git a/test/runtime/samples/action-ternary-template/main.html b/test/runtime/samples/action-ternary-template/main.svelte similarity index 100% rename from test/runtime/samples/action-ternary-template/main.html rename to test/runtime/samples/action-ternary-template/main.svelte diff --git a/test/runtime/samples/action-this/main.html b/test/runtime/samples/action-this/main.svelte similarity index 100% rename from test/runtime/samples/action-this/main.html rename to test/runtime/samples/action-this/main.svelte diff --git a/test/runtime/samples/action-update/main.html b/test/runtime/samples/action-update/main.svelte similarity index 100% rename from test/runtime/samples/action-update/main.html rename to test/runtime/samples/action-update/main.svelte diff --git a/test/runtime/samples/action/main.html b/test/runtime/samples/action/main.svelte similarity index 100% rename from test/runtime/samples/action/main.html rename to test/runtime/samples/action/main.svelte diff --git a/test/runtime/samples/after-render-prevents-loop/main.html b/test/runtime/samples/after-render-prevents-loop/main.svelte similarity index 100% rename from test/runtime/samples/after-render-prevents-loop/main.html rename to test/runtime/samples/after-render-prevents-loop/main.svelte diff --git a/test/runtime/samples/after-render-triggers-update/main.html b/test/runtime/samples/after-render-triggers-update/main.svelte similarity index 100% rename from test/runtime/samples/after-render-triggers-update/main.html rename to test/runtime/samples/after-render-triggers-update/main.svelte diff --git a/test/runtime/samples/animation-css/main.html b/test/runtime/samples/animation-css/main.svelte similarity index 100% rename from test/runtime/samples/animation-css/main.html rename to test/runtime/samples/animation-css/main.svelte diff --git a/test/runtime/samples/animation-js-delay/main.html b/test/runtime/samples/animation-js-delay/main.svelte similarity index 100% rename from test/runtime/samples/animation-js-delay/main.html rename to test/runtime/samples/animation-js-delay/main.svelte diff --git a/test/runtime/samples/animation-js-easing/main.html b/test/runtime/samples/animation-js-easing/main.svelte similarity index 100% rename from test/runtime/samples/animation-js-easing/main.html rename to test/runtime/samples/animation-js-easing/main.svelte diff --git a/test/runtime/samples/animation-js/main.html b/test/runtime/samples/animation-js/main.svelte similarity index 100% rename from test/runtime/samples/animation-js/main.html rename to test/runtime/samples/animation-js/main.svelte diff --git a/test/runtime/samples/assignment-in-init/main.html b/test/runtime/samples/assignment-in-init/main.svelte similarity index 100% rename from test/runtime/samples/assignment-in-init/main.html rename to test/runtime/samples/assignment-in-init/main.svelte diff --git a/test/runtime/samples/assignment-to-computed-property/main.html b/test/runtime/samples/assignment-to-computed-property/main.svelte similarity index 100% rename from test/runtime/samples/assignment-to-computed-property/main.html rename to test/runtime/samples/assignment-to-computed-property/main.svelte diff --git a/test/runtime/samples/attribute-boolean-false/main.html b/test/runtime/samples/attribute-boolean-false/main.svelte similarity index 100% rename from test/runtime/samples/attribute-boolean-false/main.html rename to test/runtime/samples/attribute-boolean-false/main.svelte diff --git a/test/runtime/samples/attribute-boolean-indeterminate/main.html b/test/runtime/samples/attribute-boolean-indeterminate/main.svelte similarity index 100% rename from test/runtime/samples/attribute-boolean-indeterminate/main.html rename to test/runtime/samples/attribute-boolean-indeterminate/main.svelte diff --git a/test/runtime/samples/attribute-boolean-true/main.html b/test/runtime/samples/attribute-boolean-true/main.svelte similarity index 100% rename from test/runtime/samples/attribute-boolean-true/main.html rename to test/runtime/samples/attribute-boolean-true/main.svelte diff --git a/test/runtime/samples/attribute-casing/main.html b/test/runtime/samples/attribute-casing/main.svelte similarity index 100% rename from test/runtime/samples/attribute-casing/main.html rename to test/runtime/samples/attribute-casing/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-multiple/main.html b/test/runtime/samples/attribute-dynamic-multiple/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-multiple/main.html rename to test/runtime/samples/attribute-dynamic-multiple/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-no-dependencies/main.html b/test/runtime/samples/attribute-dynamic-no-dependencies/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-no-dependencies/main.html rename to test/runtime/samples/attribute-dynamic-no-dependencies/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-quotemarks/main.html b/test/runtime/samples/attribute-dynamic-quotemarks/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-quotemarks/main.html rename to test/runtime/samples/attribute-dynamic-quotemarks/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-shorthand/main.html b/test/runtime/samples/attribute-dynamic-shorthand/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-shorthand/main.html rename to test/runtime/samples/attribute-dynamic-shorthand/main.svelte diff --git a/test/runtime/samples/attribute-dynamic-type/main.html b/test/runtime/samples/attribute-dynamic-type/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic-type/main.html rename to test/runtime/samples/attribute-dynamic-type/main.svelte diff --git a/test/runtime/samples/attribute-dynamic/main.html b/test/runtime/samples/attribute-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/attribute-dynamic/main.html rename to test/runtime/samples/attribute-dynamic/main.svelte diff --git a/test/runtime/samples/attribute-empty-svg/main.html b/test/runtime/samples/attribute-empty-svg/main.svelte similarity index 100% rename from test/runtime/samples/attribute-empty-svg/main.html rename to test/runtime/samples/attribute-empty-svg/main.svelte diff --git a/test/runtime/samples/attribute-empty/main.html b/test/runtime/samples/attribute-empty/main.svelte similarity index 100% rename from test/runtime/samples/attribute-empty/main.html rename to test/runtime/samples/attribute-empty/main.svelte diff --git a/test/runtime/samples/attribute-namespaced/main.html b/test/runtime/samples/attribute-namespaced/main.svelte similarity index 100% rename from test/runtime/samples/attribute-namespaced/main.html rename to test/runtime/samples/attribute-namespaced/main.svelte diff --git a/test/runtime/samples/attribute-partial-number/Component.html b/test/runtime/samples/attribute-partial-number/Component.svelte similarity index 100% rename from test/runtime/samples/attribute-partial-number/Component.html rename to test/runtime/samples/attribute-partial-number/Component.svelte diff --git a/test/runtime/samples/attribute-partial-number/main.html b/test/runtime/samples/attribute-partial-number/main.html deleted file mode 100644 index c720ea4eed..0000000000 --- a/test/runtime/samples/attribute-partial-number/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/attribute-partial-number/main.svelte b/test/runtime/samples/attribute-partial-number/main.svelte new file mode 100644 index 0000000000..163116e4fa --- /dev/null +++ b/test/runtime/samples/attribute-partial-number/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/attribute-prefer-expression/main.html b/test/runtime/samples/attribute-prefer-expression/main.svelte similarity index 100% rename from test/runtime/samples/attribute-prefer-expression/main.html rename to test/runtime/samples/attribute-prefer-expression/main.svelte diff --git a/test/runtime/samples/attribute-static-at-symbol/main.html b/test/runtime/samples/attribute-static-at-symbol/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static-at-symbol/main.html rename to test/runtime/samples/attribute-static-at-symbol/main.svelte diff --git a/test/runtime/samples/attribute-static-boolean/main.html b/test/runtime/samples/attribute-static-boolean/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static-boolean/main.html rename to test/runtime/samples/attribute-static-boolean/main.svelte diff --git a/test/runtime/samples/attribute-static-quotemarks/main.html b/test/runtime/samples/attribute-static-quotemarks/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static-quotemarks/main.html rename to test/runtime/samples/attribute-static-quotemarks/main.svelte diff --git a/test/runtime/samples/attribute-static/main.html b/test/runtime/samples/attribute-static/main.svelte similarity index 100% rename from test/runtime/samples/attribute-static/main.html rename to test/runtime/samples/attribute-static/main.svelte diff --git a/test/runtime/samples/attribute-unknown-without-value/_config.js b/test/runtime/samples/attribute-unknown-without-value/_config.js new file mode 100644 index 0000000000..4f7cf1cbbf --- /dev/null +++ b/test/runtime/samples/attribute-unknown-without-value/_config.js @@ -0,0 +1,3 @@ +export default { + html: '
' +}; \ No newline at end of file diff --git a/test/runtime/samples/attribute-unknown-without-value/main.svelte b/test/runtime/samples/attribute-unknown-without-value/main.svelte new file mode 100644 index 0000000000..0952586580 --- /dev/null +++ b/test/runtime/samples/attribute-unknown-without-value/main.svelte @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/test/runtime/samples/autofocus/main.html b/test/runtime/samples/autofocus/main.svelte similarity index 100% rename from test/runtime/samples/autofocus/main.html rename to test/runtime/samples/autofocus/main.svelte diff --git a/test/runtime/samples/await-component-oncreate/Foo.html b/test/runtime/samples/await-component-oncreate/Foo.svelte similarity index 100% rename from test/runtime/samples/await-component-oncreate/Foo.html rename to test/runtime/samples/await-component-oncreate/Foo.svelte diff --git a/test/runtime/samples/await-component-oncreate/main.html b/test/runtime/samples/await-component-oncreate/main.svelte similarity index 67% rename from test/runtime/samples/await-component-oncreate/main.html rename to test/runtime/samples/await-component-oncreate/main.svelte index 80a686962e..d1ddc16fd2 100644 --- a/test/runtime/samples/await-component-oncreate/main.html +++ b/test/runtime/samples/await-component-oncreate/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/await-containing-if/_config.js b/test/runtime/samples/await-containing-if/_config.js new file mode 100644 index 0000000000..9e24e4f614 --- /dev/null +++ b/test/runtime/samples/await-containing-if/_config.js @@ -0,0 +1,35 @@ +let fulfil; + +let thePromise = new Promise(f => { + fulfil = f; +}); + +export default { + props: { + thePromise, + show: true + }, + + html: ` +

loading...

+ `, + + test({ assert, component, target }) { + fulfil(42); + + return thePromise + .then(() => { + assert.htmlEqual(target.innerHTML, ` +

the value is 42

+ `); + + component.show = false; + assert.htmlEqual(target.innerHTML, `
`); + + component.show = true; + assert.htmlEqual(target.innerHTML, ` +

the value is 42

+ `); + }); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/await-containing-if/main.svelte b/test/runtime/samples/await-containing-if/main.svelte new file mode 100644 index 0000000000..cab07e6499 --- /dev/null +++ b/test/runtime/samples/await-containing-if/main.svelte @@ -0,0 +1,11 @@ +
+ {#await thePromise} +

loading...

+ {:then theValue} + {#if show} +

the value is {theValue}

+ {/if} + {:catch theError} +

oh no! {theError.message}

+ {/await} +
\ No newline at end of file diff --git a/test/runtime/samples/await-in-each/main.html b/test/runtime/samples/await-in-each/main.svelte similarity index 100% rename from test/runtime/samples/await-in-each/main.html rename to test/runtime/samples/await-in-each/main.svelte diff --git a/test/runtime/samples/await-set-simultaneous/main.html b/test/runtime/samples/await-set-simultaneous/main.svelte similarity index 100% rename from test/runtime/samples/await-set-simultaneous/main.html rename to test/runtime/samples/await-set-simultaneous/main.svelte diff --git a/test/runtime/samples/await-then-catch-anchor/main.html b/test/runtime/samples/await-then-catch-anchor/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-anchor/main.html rename to test/runtime/samples/await-then-catch-anchor/main.svelte diff --git a/test/runtime/samples/await-then-catch-event/main.html b/test/runtime/samples/await-then-catch-event/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-event/main.html rename to test/runtime/samples/await-then-catch-event/main.svelte diff --git a/test/runtime/samples/await-then-catch-if/main.html b/test/runtime/samples/await-then-catch-if/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-if/main.html rename to test/runtime/samples/await-then-catch-if/main.svelte diff --git a/test/runtime/samples/await-then-catch-in-slot/Foo.html b/test/runtime/samples/await-then-catch-in-slot/Foo.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-in-slot/Foo.html rename to test/runtime/samples/await-then-catch-in-slot/Foo.svelte diff --git a/test/runtime/samples/await-then-catch-in-slot/main.html b/test/runtime/samples/await-then-catch-in-slot/main.svelte similarity index 84% rename from test/runtime/samples/await-then-catch-in-slot/main.html rename to test/runtime/samples/await-then-catch-in-slot/main.svelte index ded116356c..3aa75374ea 100644 --- a/test/runtime/samples/await-then-catch-in-slot/main.html +++ b/test/runtime/samples/await-then-catch-in-slot/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/await-then-catch-multiple/main.html b/test/runtime/samples/await-then-catch-multiple/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-multiple/main.html rename to test/runtime/samples/await-then-catch-multiple/main.svelte diff --git a/test/runtime/samples/await-then-catch-no-values/main.html b/test/runtime/samples/await-then-catch-no-values/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-no-values/main.html rename to test/runtime/samples/await-then-catch-no-values/main.svelte diff --git a/test/runtime/samples/await-then-catch-non-promise/main.html b/test/runtime/samples/await-then-catch-non-promise/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-non-promise/main.html rename to test/runtime/samples/await-then-catch-non-promise/main.svelte diff --git a/test/runtime/samples/await-then-catch-order/main.html b/test/runtime/samples/await-then-catch-order/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-order/main.html rename to test/runtime/samples/await-then-catch-order/main.svelte diff --git a/test/runtime/samples/await-then-catch-static/main.html b/test/runtime/samples/await-then-catch-static/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch-static/main.html rename to test/runtime/samples/await-then-catch-static/main.svelte diff --git a/test/runtime/samples/await-then-catch/main.html b/test/runtime/samples/await-then-catch/main.svelte similarity index 100% rename from test/runtime/samples/await-then-catch/main.html rename to test/runtime/samples/await-then-catch/main.svelte diff --git a/test/runtime/samples/await-then-shorthand/main.html b/test/runtime/samples/await-then-shorthand/main.svelte similarity index 100% rename from test/runtime/samples/await-then-shorthand/main.html rename to test/runtime/samples/await-then-shorthand/main.svelte diff --git a/test/runtime/samples/await-with-components/Widget.svelte b/test/runtime/samples/await-with-components/Widget.svelte new file mode 100644 index 0000000000..ec9e3471fe --- /dev/null +++ b/test/runtime/samples/await-with-components/Widget.svelte @@ -0,0 +1,5 @@ +{value} + + \ No newline at end of file diff --git a/test/runtime/samples/await-with-components/_config.js b/test/runtime/samples/await-with-components/_config.js new file mode 100644 index 0000000000..ffef7441ff --- /dev/null +++ b/test/runtime/samples/await-with-components/_config.js @@ -0,0 +1,29 @@ +export default { + async test({ assert, component, target }) { + let resolve, reject; + let promise = new Promise(ok => resolve = ok); + + component.promise = promise; + assert.htmlEqual(target.innerHTML, 'Loading...'); + + resolve(42); + await promise; + assert.htmlEqual(target.innerHTML, '42'); + + promise = new Promise((ok, fail) => reject = fail); + component.promise = promise; + assert.htmlEqual(target.innerHTML, 'Loading...'); + + reject(99); + await promise.then(null, () => {}); + assert.htmlEqual(target.innerHTML, '99'); + + promise = new Promise(ok => resolve = ok); + component.promise = promise; + assert.htmlEqual(target.innerHTML, 'Loading...'); + + resolve(1); + await promise; + assert.htmlEqual(target.innerHTML, '1'); + } +}; diff --git a/test/runtime/samples/await-with-components/main.svelte b/test/runtime/samples/await-with-components/main.svelte new file mode 100644 index 0000000000..02b32bb496 --- /dev/null +++ b/test/runtime/samples/await-with-components/main.svelte @@ -0,0 +1,12 @@ +{#await promise} + +{:then result} + +{:catch err} + +{/await} + + \ No newline at end of file diff --git a/test/runtime/samples/before-render-chain/Item.html b/test/runtime/samples/before-render-chain/Item.svelte similarity index 100% rename from test/runtime/samples/before-render-chain/Item.html rename to test/runtime/samples/before-render-chain/Item.svelte diff --git a/test/runtime/samples/before-render-chain/List.html b/test/runtime/samples/before-render-chain/List.svelte similarity index 82% rename from test/runtime/samples/before-render-chain/List.html rename to test/runtime/samples/before-render-chain/List.svelte index 645356bd92..5b12d8a104 100644 --- a/test/runtime/samples/before-render-chain/List.html +++ b/test/runtime/samples/before-render-chain/List.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/before-render-prevents-loop/main.html b/test/runtime/samples/before-render-prevents-loop/main.svelte similarity index 100% rename from test/runtime/samples/before-render-prevents-loop/main.html rename to test/runtime/samples/before-render-prevents-loop/main.svelte diff --git a/test/runtime/samples/binding-audio-currenttime-duration-volume/main.html b/test/runtime/samples/binding-audio-currenttime-duration-volume/main.svelte similarity index 100% rename from test/runtime/samples/binding-audio-currenttime-duration-volume/main.html rename to test/runtime/samples/binding-audio-currenttime-duration-volume/main.svelte diff --git a/test/runtime/samples/binding-indirect-computed/main.html b/test/runtime/samples/binding-indirect-computed/main.svelte similarity index 100% rename from test/runtime/samples/binding-indirect-computed/main.html rename to test/runtime/samples/binding-indirect-computed/main.svelte diff --git a/test/runtime/samples/binding-indirect/main.html b/test/runtime/samples/binding-indirect/main.svelte similarity index 100% rename from test/runtime/samples/binding-indirect/main.html rename to test/runtime/samples/binding-indirect/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-deep-contextual/main.html b/test/runtime/samples/binding-input-checkbox-deep-contextual/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-deep-contextual/main.html rename to test/runtime/samples/binding-input-checkbox-deep-contextual/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-group-outside-each/main.html b/test/runtime/samples/binding-input-checkbox-group-outside-each/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-group-outside-each/main.html rename to test/runtime/samples/binding-input-checkbox-group-outside-each/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-group/main.html b/test/runtime/samples/binding-input-checkbox-group/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-group/main.html rename to test/runtime/samples/binding-input-checkbox-group/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-indeterminate/main.html b/test/runtime/samples/binding-input-checkbox-indeterminate/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-indeterminate/main.html rename to test/runtime/samples/binding-input-checkbox-indeterminate/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox-with-event-in-each/main.html b/test/runtime/samples/binding-input-checkbox-with-event-in-each/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox-with-event-in-each/main.html rename to test/runtime/samples/binding-input-checkbox-with-event-in-each/main.svelte diff --git a/test/runtime/samples/binding-input-checkbox/main.html b/test/runtime/samples/binding-input-checkbox/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-checkbox/main.html rename to test/runtime/samples/binding-input-checkbox/main.svelte diff --git a/test/runtime/samples/binding-input-number/main.html b/test/runtime/samples/binding-input-number/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-number/main.html rename to test/runtime/samples/binding-input-number/main.svelte diff --git a/test/runtime/samples/binding-input-radio-group/main.html b/test/runtime/samples/binding-input-radio-group/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-radio-group/main.html rename to test/runtime/samples/binding-input-radio-group/main.svelte diff --git a/test/runtime/samples/binding-input-range-change/main.html b/test/runtime/samples/binding-input-range-change/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-range-change/main.html rename to test/runtime/samples/binding-input-range-change/main.svelte diff --git a/test/runtime/samples/binding-input-range/main.html b/test/runtime/samples/binding-input-range/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-range/main.html rename to test/runtime/samples/binding-input-range/main.svelte diff --git a/test/runtime/samples/binding-input-text-contextual-deconflicted/main.html b/test/runtime/samples/binding-input-text-contextual-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-contextual-deconflicted/main.html rename to test/runtime/samples/binding-input-text-contextual-deconflicted/main.svelte diff --git a/test/runtime/samples/binding-input-text-contextual/main.html b/test/runtime/samples/binding-input-text-contextual/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-contextual/main.html rename to test/runtime/samples/binding-input-text-contextual/main.svelte diff --git a/test/runtime/samples/binding-input-text-deconflicted/main.html b/test/runtime/samples/binding-input-text-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deconflicted/main.html rename to test/runtime/samples/binding-input-text-deconflicted/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-computed-dynamic/main.html b/test/runtime/samples/binding-input-text-deep-computed-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-computed-dynamic/main.html rename to test/runtime/samples/binding-input-text-deep-computed-dynamic/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-computed/main.html b/test/runtime/samples/binding-input-text-deep-computed/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-computed/main.html rename to test/runtime/samples/binding-input-text-deep-computed/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.html b/test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.html rename to test/runtime/samples/binding-input-text-deep-contextual-computed-dynamic/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep-contextual/main.html b/test/runtime/samples/binding-input-text-deep-contextual/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep-contextual/main.html rename to test/runtime/samples/binding-input-text-deep-contextual/main.svelte diff --git a/test/runtime/samples/binding-input-text-deep/main.html b/test/runtime/samples/binding-input-text-deep/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text-deep/main.html rename to test/runtime/samples/binding-input-text-deep/main.svelte diff --git a/test/runtime/samples/binding-input-text/main.html b/test/runtime/samples/binding-input-text/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-text/main.html rename to test/runtime/samples/binding-input-text/main.svelte diff --git a/test/runtime/samples/binding-input-with-event/main.html b/test/runtime/samples/binding-input-with-event/main.svelte similarity index 100% rename from test/runtime/samples/binding-input-with-event/main.html rename to test/runtime/samples/binding-input-with-event/main.svelte diff --git a/test/runtime/samples/binding-select-implicit-option-value/main.html b/test/runtime/samples/binding-select-implicit-option-value/main.svelte similarity index 100% rename from test/runtime/samples/binding-select-implicit-option-value/main.html rename to test/runtime/samples/binding-select-implicit-option-value/main.svelte diff --git a/test/runtime/samples/binding-select-in-each-block/main.html b/test/runtime/samples/binding-select-in-each-block/main.svelte similarity index 100% rename from test/runtime/samples/binding-select-in-each-block/main.html rename to test/runtime/samples/binding-select-in-each-block/main.svelte diff --git a/test/runtime/samples/binding-select-in-yield/Modal.html b/test/runtime/samples/binding-select-in-yield/Modal.svelte similarity index 100% rename from test/runtime/samples/binding-select-in-yield/Modal.html rename to test/runtime/samples/binding-select-in-yield/Modal.svelte diff --git a/test/runtime/samples/binding-select-in-yield/_config.js b/test/runtime/samples/binding-select-in-yield/_config.js index 6c206837e1..11dcb3d58c 100644 --- a/test/runtime/samples/binding-select-in-yield/_config.js +++ b/test/runtime/samples/binding-select-in-yield/_config.js @@ -18,7 +18,7 @@ export default { `); - const select = target.querySelector('select'); + let select = target.querySelector('select'); const change = new window.MouseEvent('change'); select.options[2].selected = true; @@ -44,6 +44,8 @@ export default { await component.modal.toggle(); await component.modal.toggle(); + select = target.querySelector('select'); + assert.deepEqual(Array.from(select.options).map(o => o.selected), [ false, false, diff --git a/test/runtime/samples/binding-select-in-yield/main.html b/test/runtime/samples/binding-select-in-yield/main.svelte similarity index 85% rename from test/runtime/samples/binding-select-in-yield/main.html rename to test/runtime/samples/binding-select-in-yield/main.svelte index cb1499e1c7..2d3ef28f28 100644 --- a/test/runtime/samples/binding-select-in-yield/main.html +++ b/test/runtime/samples/binding-select-in-yield/main.svelte @@ -1,5 +1,5 @@ + + +

hello {$user.name}

\ No newline at end of file diff --git a/test/runtime/samples/binding-store/_config.js b/test/runtime/samples/binding-store/_config.js new file mode 100644 index 0000000000..eb22d3e96c --- /dev/null +++ b/test/runtime/samples/binding-store/_config.js @@ -0,0 +1,41 @@ +export default { + html: ` + +

hello world

+ `, + + ssrHtml: ` + +

hello world

+ `, + + async test({ assert, component, target, window }) { + const input = target.querySelector('input'); + assert.equal(input.value, 'world'); + + const event = new window.Event('input'); + + const names = []; + const unsubscribe = component.name.subscribe(name => { + names.push(name); + }); + + input.value = 'everybody'; + await input.dispatchEvent(event); + + assert.htmlEqual(target.innerHTML, ` + +

hello everybody

+ `); + + await component.name.set('goodbye'); + assert.equal(input.value, 'goodbye'); + assert.htmlEqual(target.innerHTML, ` + +

hello goodbye

+ `); + + assert.deepEqual(names, ['world', 'everybody', 'goodbye']); + unsubscribe(); + }, +}; diff --git a/test/runtime/samples/binding-store/main.svelte b/test/runtime/samples/binding-store/main.svelte new file mode 100644 index 0000000000..cfcdb0cf20 --- /dev/null +++ b/test/runtime/samples/binding-store/main.svelte @@ -0,0 +1,8 @@ + + + +

hello {$name}

\ No newline at end of file diff --git a/test/runtime/samples/binding-textarea/main.html b/test/runtime/samples/binding-textarea/main.svelte similarity index 100% rename from test/runtime/samples/binding-textarea/main.html rename to test/runtime/samples/binding-textarea/main.svelte diff --git a/test/runtime/samples/binding-this-and-value/main.html b/test/runtime/samples/binding-this-and-value/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-and-value/main.html rename to test/runtime/samples/binding-this-and-value/main.svelte diff --git a/test/runtime/samples/binding-this-component-reactive/Foo.html b/test/runtime/samples/binding-this-component-reactive/Foo.svelte similarity index 100% rename from test/runtime/samples/binding-this-component-reactive/Foo.html rename to test/runtime/samples/binding-this-component-reactive/Foo.svelte diff --git a/test/runtime/samples/binding-this-component-reactive/main.html b/test/runtime/samples/binding-this-component-reactive/main.svelte similarity index 73% rename from test/runtime/samples/binding-this-component-reactive/main.html rename to test/runtime/samples/binding-this-component-reactive/main.svelte index b9a4709bd7..25b134105b 100644 --- a/test/runtime/samples/binding-this-component-reactive/main.html +++ b/test/runtime/samples/binding-this-component-reactive/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/binding-this-element-reactive/main.html b/test/runtime/samples/binding-this-element-reactive/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-element-reactive/main.html rename to test/runtime/samples/binding-this-element-reactive/main.svelte diff --git a/test/runtime/samples/binding-this-no-innerhtml/main.html b/test/runtime/samples/binding-this-no-innerhtml/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-no-innerhtml/main.html rename to test/runtime/samples/binding-this-no-innerhtml/main.svelte diff --git a/test/runtime/samples/binding-this-unset/main.html b/test/runtime/samples/binding-this-unset/main.svelte similarity index 100% rename from test/runtime/samples/binding-this-unset/main.html rename to test/runtime/samples/binding-this-unset/main.svelte diff --git a/test/runtime/samples/binding-this-with-context/_config.js b/test/runtime/samples/binding-this-with-context/_config.js new file mode 100644 index 0000000000..33ef091b33 --- /dev/null +++ b/test/runtime/samples/binding-this-with-context/_config.js @@ -0,0 +1,59 @@ +export default { + html: `
foo
bar
baz
+ foobarbaz +
  • foo

  • bar

  • baz

+



`, + + test({ assert, component, target }) { + let elems = target.querySelectorAll('div'); + assert.equal(component.divs.length, 3, 'three divs are registered (unkeyed array)'); + component.divs.forEach((e, i) => { + assert.equal(e, elems[i], `div ${i} is correct (unkeyed array)`); + }); + + elems = target.querySelectorAll('span'); + assert.equal(Object.keys(component.spans).length, 3, 'three spans are registered (unkeyed object)'); + component.items.forEach((e, i) => { + assert.equal(component.spans[`-${e}${i}`], elems[i], `span -${e}${i} is correct (unkeyed object)`); + }); + + elems = target.querySelectorAll('p'); + assert.equal(component.ps.length, 3, 'three ps are registered (keyed array)'); + component.ps.forEach((e, i) => { + assert.equal(e, elems[i], `p ${i} is correct (keyed array)`); + }); + + elems = target.querySelectorAll('hr'); + assert.equal(Object.keys(component.hrs).length, 3, 'three hrs are registered (keyed object)'); + component.items.forEach((e, i) => { + assert.equal(component.hrs[e], elems[i], `hr ${e} is correct (keyed object)`); + }); + + component.items = ['foo', 'baz']; + assert.equal(component.divs.length, 3, 'the divs array is still 3 long'); + assert.equal(component.divs[2], null, 'the last div is unregistered'); + assert.equal(component.ps[2], null, 'the last p is unregistered'); + assert.equal(component.spans['-bar1'], null, 'the bar span is unregisterd'); + assert.equal(component.hrs.bar, null, 'the bar hr is unregisterd'); + + elems = target.querySelectorAll('div'); + component.divs.forEach((e, i) => { + assert.equal(e, elems[i], `div ${i} is still correct`); + }); + + elems = target.querySelectorAll('span'); + component.items.forEach((e, i) => { + assert.equal(component.spans[`-${e}${i}`], elems[i], `span -${e}${i} is still correct`); + }); + + elems = target.querySelectorAll('p'); + component.ps.forEach((e, i) => { + assert.equal(e, elems[i], `p ${i} is still correct`); + }); + + elems = target.querySelectorAll('hr'); + component.items.forEach((e, i) => { + assert.equal(component.hrs[e], elems[i], `hr ${e} is still correct`); + }); + } +}; diff --git a/test/runtime/samples/binding-this-with-context/main.svelte b/test/runtime/samples/binding-this-with-context/main.svelte new file mode 100644 index 0000000000..673800188c --- /dev/null +++ b/test/runtime/samples/binding-this-with-context/main.svelte @@ -0,0 +1,28 @@ + + +{#each items as item, j} +
{item}
+{/each} + +{#each Object.entries(items) as [ key, val ] } + {val} +{/each} + +
    + {#each items as thing, j (thing)} +
  • {thing}

  • + {/each} +
+ +
    + {#each items as sure, j (sure)} +

  • + {/each} +
\ No newline at end of file diff --git a/test/runtime/samples/binding-this/main.html b/test/runtime/samples/binding-this/main.svelte similarity index 100% rename from test/runtime/samples/binding-this/main.html rename to test/runtime/samples/binding-this/main.svelte diff --git a/test/runtime/samples/bindings-before-onmount/One.html b/test/runtime/samples/bindings-before-onmount/One.svelte similarity index 74% rename from test/runtime/samples/bindings-before-onmount/One.html rename to test/runtime/samples/bindings-before-onmount/One.svelte index b2ba905ec9..5dd38a6f08 100644 --- a/test/runtime/samples/bindings-before-onmount/One.html +++ b/test/runtime/samples/bindings-before-onmount/One.svelte @@ -1,6 +1,6 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/bindings-before-onmount/main.svelte b/test/runtime/samples/bindings-before-onmount/main.svelte new file mode 100644 index 0000000000..65c1221b26 --- /dev/null +++ b/test/runtime/samples/bindings-before-onmount/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/bindings-coalesced/Foo.html b/test/runtime/samples/bindings-coalesced/Foo.svelte similarity index 100% rename from test/runtime/samples/bindings-coalesced/Foo.html rename to test/runtime/samples/bindings-coalesced/Foo.svelte diff --git a/test/runtime/samples/bindings-coalesced/main.html b/test/runtime/samples/bindings-coalesced/main.svelte similarity index 66% rename from test/runtime/samples/bindings-coalesced/main.html rename to test/runtime/samples/bindings-coalesced/main.svelte index cf0b85491a..003f89c6d9 100644 --- a/test/runtime/samples/bindings-coalesced/main.html +++ b/test/runtime/samples/bindings-coalesced/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-each/Widget.html b/test/runtime/samples/component-binding-each/Widget.svelte similarity index 100% rename from test/runtime/samples/component-binding-each/Widget.html rename to test/runtime/samples/component-binding-each/Widget.svelte diff --git a/test/runtime/samples/component-binding-each/main.html b/test/runtime/samples/component-binding-each/main.svelte similarity index 64% rename from test/runtime/samples/component-binding-each/main.html rename to test/runtime/samples/component-binding-each/main.svelte index 49ab04e68f..36a7c46225 100644 --- a/test/runtime/samples/component-binding-each/main.html +++ b/test/runtime/samples/component-binding-each/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-infinite-loop/A.html b/test/runtime/samples/component-binding-infinite-loop/A.svelte similarity index 58% rename from test/runtime/samples/component-binding-infinite-loop/A.html rename to test/runtime/samples/component-binding-infinite-loop/A.svelte index d4a9bf8eac..8ba3ec20f3 100644 --- a/test/runtime/samples/component-binding-infinite-loop/A.html +++ b/test/runtime/samples/component-binding-infinite-loop/A.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-infinite-loop/B.html b/test/runtime/samples/component-binding-infinite-loop/B.svelte similarity index 83% rename from test/runtime/samples/component-binding-infinite-loop/B.html rename to test/runtime/samples/component-binding-infinite-loop/B.svelte index 72bbbe4110..cbc8160679 100644 --- a/test/runtime/samples/component-binding-infinite-loop/B.html +++ b/test/runtime/samples/component-binding-infinite-loop/B.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-nested/Bar.html b/test/runtime/samples/component-binding-nested/Bar.svelte similarity index 71% rename from test/runtime/samples/component-binding-nested/Bar.html rename to test/runtime/samples/component-binding-nested/Bar.svelte index 9ed5c6f42c..19159f168d 100644 --- a/test/runtime/samples/component-binding-nested/Bar.html +++ b/test/runtime/samples/component-binding-nested/Bar.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-nested/Baz.html b/test/runtime/samples/component-binding-nested/Baz.svelte similarity index 100% rename from test/runtime/samples/component-binding-nested/Baz.html rename to test/runtime/samples/component-binding-nested/Baz.svelte diff --git a/test/runtime/samples/component-binding-nested/Foo.html b/test/runtime/samples/component-binding-nested/Foo.svelte similarity index 71% rename from test/runtime/samples/component-binding-nested/Foo.html rename to test/runtime/samples/component-binding-nested/Foo.svelte index 500480eae6..4a3e59afe7 100644 --- a/test/runtime/samples/component-binding-nested/Foo.html +++ b/test/runtime/samples/component-binding-nested/Foo.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-nested/main.html b/test/runtime/samples/component-binding-nested/main.svelte similarity index 52% rename from test/runtime/samples/component-binding-nested/main.html rename to test/runtime/samples/component-binding-nested/main.svelte index cae8f4dc52..18f96b310c 100644 --- a/test/runtime/samples/component-binding-nested/main.html +++ b/test/runtime/samples/component-binding-nested/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.svelte b/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.svelte new file mode 100644 index 0000000000..d5ce18c8c8 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/Bar.svelte @@ -0,0 +1,5 @@ + + +

Bar: {x}

\ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.svelte b/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.svelte new file mode 100644 index 0000000000..9c7ae240b7 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/Foo.svelte @@ -0,0 +1,5 @@ + + +

Foo: {x}

\ No newline at end of file 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 new file mode 100644 index 0000000000..bf6312f5ad --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` +

Foo: yes

+

x in parent: yes

+ `, + + async test({ assert, component, target, window }) { + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

Bar: yes

+

x in parent: yes

+ `); + + component.a = true; + assert.equal(component.x, 'yes'); + component.x = undefined; + + assert.htmlEqual(target.innerHTML, ` +

Foo: undefined

+

x in parent: undefined

+ `); + + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

Bar: no

+

x in parent: no

+ `); + } +}; diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-b/main.svelte b/test/runtime/samples/component-binding-parent-supercedes-child-b/main.svelte new file mode 100644 index 0000000000..e6edf3b1f7 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-b/main.svelte @@ -0,0 +1,15 @@ + + +{#if a} + +{:else} + +{/if} + +

x in parent: {x}

\ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/Bar.svelte b/test/runtime/samples/component-binding-parent-supercedes-child-c/Bar.svelte new file mode 100644 index 0000000000..d5ce18c8c8 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/Bar.svelte @@ -0,0 +1,5 @@ + + +

Bar: {x}

\ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/Foo.svelte b/test/runtime/samples/component-binding-parent-supercedes-child-c/Foo.svelte new file mode 100644 index 0000000000..9c7ae240b7 --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/Foo.svelte @@ -0,0 +1,5 @@ + + +

Foo: {x}

\ No newline at end of file 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 new file mode 100644 index 0000000000..bf6312f5ad --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` +

Foo: yes

+

x in parent: yes

+ `, + + async test({ assert, component, target, window }) { + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

Bar: yes

+

x in parent: yes

+ `); + + component.a = true; + assert.equal(component.x, 'yes'); + component.x = undefined; + + assert.htmlEqual(target.innerHTML, ` +

Foo: undefined

+

x in parent: undefined

+ `); + + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

Bar: no

+

x in parent: no

+ `); + } +}; diff --git a/test/runtime/samples/component-binding-parent-supercedes-child-c/main.svelte b/test/runtime/samples/component-binding-parent-supercedes-child-c/main.svelte new file mode 100644 index 0000000000..426ef04bad --- /dev/null +++ b/test/runtime/samples/component-binding-parent-supercedes-child-c/main.svelte @@ -0,0 +1,11 @@ + + + + +

x in parent: {x}

\ No newline at end of file diff --git a/test/runtime/samples/component-binding-parent-supercedes-child/Counter.html b/test/runtime/samples/component-binding-parent-supercedes-child/Counter.svelte similarity index 100% rename from test/runtime/samples/component-binding-parent-supercedes-child/Counter.html rename to test/runtime/samples/component-binding-parent-supercedes-child/Counter.svelte diff --git a/test/runtime/samples/component-binding-parent-supercedes-child/main.html b/test/runtime/samples/component-binding-parent-supercedes-child/main.svelte similarity index 53% rename from test/runtime/samples/component-binding-parent-supercedes-child/main.html rename to test/runtime/samples/component-binding-parent-supercedes-child/main.svelte index c874b270d0..e38b72daae 100644 --- a/test/runtime/samples/component-binding-parent-supercedes-child/main.html +++ b/test/runtime/samples/component-binding-parent-supercedes-child/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding-private-state/Bar.svelte b/test/runtime/samples/component-binding-private-state/Bar.svelte new file mode 100644 index 0000000000..3b5619a62d --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/Bar.svelte @@ -0,0 +1,5 @@ + + +

Bar: {x}

\ No newline at end of file diff --git a/test/runtime/samples/component-binding-private-state/Foo.svelte b/test/runtime/samples/component-binding-private-state/Foo.svelte new file mode 100644 index 0000000000..1d899739d5 --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/Foo.svelte @@ -0,0 +1,5 @@ + + +

Foo: {x}

\ No newline at end of file diff --git a/test/runtime/samples/component-binding-private-state/_config.js b/test/runtime/samples/component-binding-private-state/_config.js new file mode 100644 index 0000000000..bd8a25d490 --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/_config.js @@ -0,0 +1,31 @@ +export default { + html: ` +

Foo: yes

+

x in parent: undefined

+ `, + + async test({ assert, component, target, window }) { + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

Bar: no

+

x in parent: undefined

+ `); + + component.a = true; + assert.equal(component.x, undefined); + component.x = 'maybe'; + + assert.htmlEqual(target.innerHTML, ` +

Foo: yes

+

x in parent: maybe

+ `); + + component.a = false; + + assert.htmlEqual(target.innerHTML, ` +

Bar: no

+

x in parent: maybe

+ `); + } +}; diff --git a/test/runtime/samples/component-binding-private-state/main.svelte b/test/runtime/samples/component-binding-private-state/main.svelte new file mode 100644 index 0000000000..426ef04bad --- /dev/null +++ b/test/runtime/samples/component-binding-private-state/main.svelte @@ -0,0 +1,11 @@ + + + + +

x in parent: {x}

\ No newline at end of file diff --git a/test/runtime/samples/component-binding-self-destroying/Nested.html b/test/runtime/samples/component-binding-self-destroying/Nested.svelte similarity index 100% rename from test/runtime/samples/component-binding-self-destroying/Nested.html rename to test/runtime/samples/component-binding-self-destroying/Nested.svelte diff --git a/test/runtime/samples/component-binding-self-destroying/main.html b/test/runtime/samples/component-binding-self-destroying/main.svelte similarity index 75% rename from test/runtime/samples/component-binding-self-destroying/main.html rename to test/runtime/samples/component-binding-self-destroying/main.svelte index 66b578f9bc..7043a52ad4 100644 --- a/test/runtime/samples/component-binding-self-destroying/main.html +++ b/test/runtime/samples/component-binding-self-destroying/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-binding/Counter.html b/test/runtime/samples/component-binding/Counter.svelte similarity index 100% rename from test/runtime/samples/component-binding/Counter.html rename to test/runtime/samples/component-binding/Counter.svelte diff --git a/test/runtime/samples/component-binding/main.html b/test/runtime/samples/component-binding/main.svelte similarity index 51% rename from test/runtime/samples/component-binding/main.html rename to test/runtime/samples/component-binding/main.svelte index 5639d47eb1..3a582fe7bd 100644 --- a/test/runtime/samples/component-binding/main.html +++ b/test/runtime/samples/component-binding/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-data-dynamic-late/Widget.html b/test/runtime/samples/component-data-dynamic-late/Widget.svelte similarity index 100% rename from test/runtime/samples/component-data-dynamic-late/Widget.html rename to test/runtime/samples/component-data-dynamic-late/Widget.svelte diff --git a/test/runtime/samples/component-data-dynamic-late/main.html b/test/runtime/samples/component-data-dynamic-late/main.svelte similarity index 67% rename from test/runtime/samples/component-data-dynamic-late/main.html rename to test/runtime/samples/component-data-dynamic-late/main.svelte index 4c07837598..4e11d151cf 100644 --- a/test/runtime/samples/component-data-dynamic-late/main.html +++ b/test/runtime/samples/component-data-dynamic-late/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-data-dynamic/Widget.html b/test/runtime/samples/component-data-dynamic/Widget.svelte similarity index 100% rename from test/runtime/samples/component-data-dynamic/Widget.html rename to test/runtime/samples/component-data-dynamic/Widget.svelte diff --git a/test/runtime/samples/component-data-dynamic/main.html b/test/runtime/samples/component-data-dynamic/main.svelte similarity index 80% rename from test/runtime/samples/component-data-dynamic/main.html rename to test/runtime/samples/component-data-dynamic/main.svelte index 7c796ca9b6..42ef74a185 100644 --- a/test/runtime/samples/component-data-dynamic/main.html +++ b/test/runtime/samples/component-data-dynamic/main.svelte @@ -1,5 +1,5 @@ - -
- -
\ No newline at end of file diff --git a/test/runtime/samples/component-data-empty/main.svelte b/test/runtime/samples/component-data-empty/main.svelte new file mode 100644 index 0000000000..be6a137e8a --- /dev/null +++ b/test/runtime/samples/component-data-empty/main.svelte @@ -0,0 +1,7 @@ + + +
+ +
\ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean-regression/Link.html b/test/runtime/samples/component-data-static-boolean-regression/Link.svelte similarity index 100% rename from test/runtime/samples/component-data-static-boolean-regression/Link.html rename to test/runtime/samples/component-data-static-boolean-regression/Link.svelte diff --git a/test/runtime/samples/component-data-static-boolean-regression/main.html b/test/runtime/samples/component-data-static-boolean-regression/main.html deleted file mode 100644 index 8207fef20e..0000000000 --- a/test/runtime/samples/component-data-static-boolean-regression/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean-regression/main.svelte b/test/runtime/samples/component-data-static-boolean-regression/main.svelte new file mode 100644 index 0000000000..492d1dc78a --- /dev/null +++ b/test/runtime/samples/component-data-static-boolean-regression/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean/Foo.html b/test/runtime/samples/component-data-static-boolean/Foo.svelte similarity index 100% rename from test/runtime/samples/component-data-static-boolean/Foo.html rename to test/runtime/samples/component-data-static-boolean/Foo.svelte diff --git a/test/runtime/samples/component-data-static-boolean/main.html b/test/runtime/samples/component-data-static-boolean/main.html deleted file mode 100644 index cfaef9dea3..0000000000 --- a/test/runtime/samples/component-data-static-boolean/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-data-static-boolean/main.svelte b/test/runtime/samples/component-data-static-boolean/main.svelte new file mode 100644 index 0000000000..edb8e749af --- /dev/null +++ b/test/runtime/samples/component-data-static-boolean/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-data-static/Widget.html b/test/runtime/samples/component-data-static/Widget.svelte similarity index 100% rename from test/runtime/samples/component-data-static/Widget.html rename to test/runtime/samples/component-data-static/Widget.svelte diff --git a/test/runtime/samples/component-data-static/main.html b/test/runtime/samples/component-data-static/main.svelte similarity index 55% rename from test/runtime/samples/component-data-static/main.html rename to test/runtime/samples/component-data-static/main.svelte index ec8e37c45e..b116b262a0 100644 --- a/test/runtime/samples/component-data-static/main.html +++ b/test/runtime/samples/component-data-static/main.svelte @@ -1,5 +1,5 @@
diff --git a/test/runtime/samples/component-event-not-stale/Button.html b/test/runtime/samples/component-event-not-stale/Button.svelte similarity index 100% rename from test/runtime/samples/component-event-not-stale/Button.html rename to test/runtime/samples/component-event-not-stale/Button.svelte diff --git a/test/runtime/samples/component-event-not-stale/main.html b/test/runtime/samples/component-event-not-stale/main.svelte similarity index 88% rename from test/runtime/samples/component-event-not-stale/main.html rename to test/runtime/samples/component-event-not-stale/main.svelte index 1beacd0e2d..0b2ab2c1ee 100644 --- a/test/runtime/samples/component-event-not-stale/main.html +++ b/test/runtime/samples/component-event-not-stale/main.svelte @@ -1,6 +1,6 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/component-events-console/main.svelte b/test/runtime/samples/component-events-console/main.svelte new file mode 100644 index 0000000000..fba004b4eb --- /dev/null +++ b/test/runtime/samples/component-events-console/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-events-data/Widget.html b/test/runtime/samples/component-events-data/Widget.svelte similarity index 100% rename from test/runtime/samples/component-events-data/Widget.html rename to test/runtime/samples/component-events-data/Widget.svelte diff --git a/test/runtime/samples/component-events-data/main.html b/test/runtime/samples/component-events-data/main.svelte similarity index 81% rename from test/runtime/samples/component-events-data/main.html rename to test/runtime/samples/component-events-data/main.svelte index 5661404a46..ea44594ccd 100644 --- a/test/runtime/samples/component-events-data/main.html +++ b/test/runtime/samples/component-events-data/main.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/component-events-each/Widget.html b/test/runtime/samples/component-events-each/Widget.svelte similarity index 100% rename from test/runtime/samples/component-events-each/Widget.html rename to test/runtime/samples/component-events-each/Widget.svelte diff --git a/test/runtime/samples/component-events-each/main.html b/test/runtime/samples/component-events-each/main.svelte similarity index 85% rename from test/runtime/samples/component-events-each/main.html rename to test/runtime/samples/component-events-each/main.svelte index 4a5a694172..f229873431 100644 --- a/test/runtime/samples/component-events-each/main.html +++ b/test/runtime/samples/component-events-each/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-name-deconflicted/Nested.html b/test/runtime/samples/component-name-deconflicted/Nested.svelte similarity index 100% rename from test/runtime/samples/component-name-deconflicted/Nested.html rename to test/runtime/samples/component-name-deconflicted/Nested.svelte diff --git a/test/runtime/samples/component-name-deconflicted/main.html b/test/runtime/samples/component-name-deconflicted/main.svelte similarity index 70% rename from test/runtime/samples/component-name-deconflicted/main.html rename to test/runtime/samples/component-name-deconflicted/main.svelte index 03d43c357b..1649ad0a7d 100644 --- a/test/runtime/samples/component-name-deconflicted/main.html +++ b/test/runtime/samples/component-name-deconflicted/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-nested-deep/Level1.html b/test/runtime/samples/component-nested-deep/Level1.html deleted file mode 100644 index 246bc4dfb7..0000000000 --- a/test/runtime/samples/component-nested-deep/Level1.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level1.svelte b/test/runtime/samples/component-nested-deep/Level1.svelte new file mode 100644 index 0000000000..1889fa2bd0 --- /dev/null +++ b/test/runtime/samples/component-nested-deep/Level1.svelte @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level2.html b/test/runtime/samples/component-nested-deep/Level2.html deleted file mode 100644 index 4b992b5cb3..0000000000 --- a/test/runtime/samples/component-nested-deep/Level2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -level 2 - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level2.svelte b/test/runtime/samples/component-nested-deep/Level2.svelte new file mode 100644 index 0000000000..500c4c9887 --- /dev/null +++ b/test/runtime/samples/component-nested-deep/Level2.svelte @@ -0,0 +1,6 @@ + + +level 2 + \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/Level3.html b/test/runtime/samples/component-nested-deep/Level3.svelte similarity index 100% rename from test/runtime/samples/component-nested-deep/Level3.html rename to test/runtime/samples/component-nested-deep/Level3.svelte diff --git a/test/runtime/samples/component-nested-deep/main.html b/test/runtime/samples/component-nested-deep/main.html deleted file mode 100644 index 57e4fc02b1..0000000000 --- a/test/runtime/samples/component-nested-deep/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deep/main.svelte b/test/runtime/samples/component-nested-deep/main.svelte new file mode 100644 index 0000000000..a7007e27ea --- /dev/null +++ b/test/runtime/samples/component-nested-deep/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deeper/Level1.html b/test/runtime/samples/component-nested-deeper/Level1.svelte similarity index 74% rename from test/runtime/samples/component-nested-deeper/Level1.html rename to test/runtime/samples/component-nested-deeper/Level1.svelte index 273e1b61c8..887782f121 100644 --- a/test/runtime/samples/component-nested-deeper/Level1.html +++ b/test/runtime/samples/component-nested-deeper/Level1.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/component-nested-deeper/Level2.html b/test/runtime/samples/component-nested-deeper/Level2.svelte similarity index 100% rename from test/runtime/samples/component-nested-deeper/Level2.html rename to test/runtime/samples/component-nested-deeper/Level2.svelte diff --git a/test/runtime/samples/component-nested-deeper/Level3.html b/test/runtime/samples/component-nested-deeper/Level3.svelte similarity index 100% rename from test/runtime/samples/component-nested-deeper/Level3.html rename to test/runtime/samples/component-nested-deeper/Level3.svelte diff --git a/test/runtime/samples/component-nested-deeper/main.html b/test/runtime/samples/component-nested-deeper/main.html deleted file mode 100644 index 4c72ae6743..0000000000 --- a/test/runtime/samples/component-nested-deeper/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-nested-deeper/main.svelte b/test/runtime/samples/component-nested-deeper/main.svelte new file mode 100644 index 0000000000..a1a6ff0de5 --- /dev/null +++ b/test/runtime/samples/component-nested-deeper/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-not-void/Link.html b/test/runtime/samples/component-not-void/Link.svelte similarity index 100% rename from test/runtime/samples/component-not-void/Link.html rename to test/runtime/samples/component-not-void/Link.svelte diff --git a/test/runtime/samples/component-not-void/main.html b/test/runtime/samples/component-not-void/main.html deleted file mode 100644 index 0769c81092..0000000000 --- a/test/runtime/samples/component-not-void/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Hello \ No newline at end of file diff --git a/test/runtime/samples/component-not-void/main.svelte b/test/runtime/samples/component-not-void/main.svelte new file mode 100644 index 0000000000..836777832b --- /dev/null +++ b/test/runtime/samples/component-not-void/main.svelte @@ -0,0 +1,5 @@ + + +Hello \ No newline at end of file diff --git a/test/runtime/samples/component-ref/Widget.html b/test/runtime/samples/component-ref/Widget.svelte similarity index 100% rename from test/runtime/samples/component-ref/Widget.html rename to test/runtime/samples/component-ref/Widget.svelte diff --git a/test/runtime/samples/component-ref/main.html b/test/runtime/samples/component-ref/main.svelte similarity index 62% rename from test/runtime/samples/component-ref/main.html rename to test/runtime/samples/component-ref/main.svelte index a91173c5af..1f51727c76 100644 --- a/test/runtime/samples/component-ref/main.html +++ b/test/runtime/samples/component-ref/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-shorthand-import/Widget.html b/test/runtime/samples/component-shorthand-import/Widget.svelte similarity index 100% rename from test/runtime/samples/component-shorthand-import/Widget.html rename to test/runtime/samples/component-shorthand-import/Widget.svelte diff --git a/test/runtime/samples/component-shorthand-import/main.html b/test/runtime/samples/component-shorthand-import/main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/runtime/samples/component-shorthand-import/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-shorthand-import/main.svelte b/test/runtime/samples/component-shorthand-import/main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/runtime/samples/component-shorthand-import/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-default/Nested.html b/test/runtime/samples/component-slot-default/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-default/Nested.html rename to test/runtime/samples/component-slot-default/Nested.svelte diff --git a/test/runtime/samples/component-slot-default/main.html b/test/runtime/samples/component-slot-default/main.html deleted file mode 100644 index 06a1f64cae..0000000000 --- a/test/runtime/samples/component-slot-default/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - Hello - \ No newline at end of file diff --git a/test/runtime/samples/component-slot-default/main.svelte b/test/runtime/samples/component-slot-default/main.svelte new file mode 100644 index 0000000000..1e1ea8daa8 --- /dev/null +++ b/test/runtime/samples/component-slot-default/main.svelte @@ -0,0 +1,7 @@ + + + + Hello + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-dynamic/Nested.html b/test/runtime/samples/component-slot-dynamic/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-dynamic/Nested.html rename to test/runtime/samples/component-slot-dynamic/Nested.svelte diff --git a/test/runtime/samples/component-slot-dynamic/main.html b/test/runtime/samples/component-slot-dynamic/main.svelte similarity index 67% rename from test/runtime/samples/component-slot-dynamic/main.html rename to test/runtime/samples/component-slot-dynamic/main.svelte index ad952b38bb..8eb876444a 100644 --- a/test/runtime/samples/component-slot-dynamic/main.html +++ b/test/runtime/samples/component-slot-dynamic/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-each-block/Nested.html b/test/runtime/samples/component-slot-each-block/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-each-block/Nested.html rename to test/runtime/samples/component-slot-each-block/Nested.svelte diff --git a/test/runtime/samples/component-slot-each-block/main.html b/test/runtime/samples/component-slot-each-block/main.svelte similarity index 69% rename from test/runtime/samples/component-slot-each-block/main.html rename to test/runtime/samples/component-slot-each-block/main.svelte index 911eb5c1ae..986c5c40e1 100644 --- a/test/runtime/samples/component-slot-each-block/main.html +++ b/test/runtime/samples/component-slot-each-block/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-empty/Nested.html b/test/runtime/samples/component-slot-empty/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-empty/Nested.html rename to test/runtime/samples/component-slot-empty/Nested.svelte diff --git a/test/runtime/samples/component-slot-empty/main.html b/test/runtime/samples/component-slot-empty/main.html deleted file mode 100644 index 3d76b0a696..0000000000 --- a/test/runtime/samples/component-slot-empty/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/runtime/samples/component-slot-empty/main.svelte b/test/runtime/samples/component-slot-empty/main.svelte new file mode 100644 index 0000000000..619060e4cb --- /dev/null +++ b/test/runtime/samples/component-slot-empty/main.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-fallback/Nested.html b/test/runtime/samples/component-slot-fallback/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-fallback/Nested.html rename to test/runtime/samples/component-slot-fallback/Nested.svelte diff --git a/test/runtime/samples/component-slot-fallback/main.html b/test/runtime/samples/component-slot-fallback/main.svelte similarity index 51% rename from test/runtime/samples/component-slot-fallback/main.html rename to test/runtime/samples/component-slot-fallback/main.svelte index f4d609216c..0bdb6f8b1d 100644 --- a/test/runtime/samples/component-slot-fallback/main.html +++ b/test/runtime/samples/component-slot-fallback/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-if-block-before-node/Nested.html b/test/runtime/samples/component-slot-if-block-before-node/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-if-block-before-node/Nested.html rename to test/runtime/samples/component-slot-if-block-before-node/Nested.svelte diff --git a/test/runtime/samples/component-slot-if-block-before-node/main.html b/test/runtime/samples/component-slot-if-block-before-node/main.svelte similarity index 69% rename from test/runtime/samples/component-slot-if-block-before-node/main.html rename to test/runtime/samples/component-slot-if-block-before-node/main.svelte index 01ea1e8455..6e51f27649 100644 --- a/test/runtime/samples/component-slot-if-block-before-node/main.html +++ b/test/runtime/samples/component-slot-if-block-before-node/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-if-block/Nested.html b/test/runtime/samples/component-slot-if-block/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-if-block/Nested.html rename to test/runtime/samples/component-slot-if-block/Nested.svelte diff --git a/test/runtime/samples/component-slot-if-block/main.html b/test/runtime/samples/component-slot-if-block/main.svelte similarity index 69% rename from test/runtime/samples/component-slot-if-block/main.html rename to test/runtime/samples/component-slot-if-block/main.svelte index 2b0405a471..465da320a9 100644 --- a/test/runtime/samples/component-slot-if-block/main.html +++ b/test/runtime/samples/component-slot-if-block/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-if-else-block-before-node/Nested.html b/test/runtime/samples/component-slot-if-else-block-before-node/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-if-else-block-before-node/Nested.html rename to test/runtime/samples/component-slot-if-else-block-before-node/Nested.svelte diff --git a/test/runtime/samples/component-slot-if-else-block-before-node/main.html b/test/runtime/samples/component-slot-if-else-block-before-node/main.svelte similarity index 74% rename from test/runtime/samples/component-slot-if-else-block-before-node/main.html rename to test/runtime/samples/component-slot-if-else-block-before-node/main.svelte index 684497b98a..0b24f77b16 100644 --- a/test/runtime/samples/component-slot-if-else-block-before-node/main.html +++ b/test/runtime/samples/component-slot-if-else-block-before-node/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-let-aliased/Nested.svelte b/test/runtime/samples/component-slot-let-aliased/Nested.svelte new file mode 100644 index 0000000000..38c6ed6cbe --- /dev/null +++ b/test/runtime/samples/component-slot-let-aliased/Nested.svelte @@ -0,0 +1,5 @@ +
+ {#each things as thing} + + {/each} +
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-aliased/_config.js b/test/runtime/samples/component-slot-let-aliased/_config.js new file mode 100644 index 0000000000..d66f613bb4 --- /dev/null +++ b/test/runtime/samples/component-slot-let-aliased/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + things: [1, 2, 3] + }, + + html: ` +
+ 1 + 2 + 3 +
`, + + test({ assert, component, target }) { + component.things = [1, 2, 3, 4]; + assert.htmlEqual(target.innerHTML, ` +
+ 1 + 2 + 3 + 4 +
+ `); + } +}; diff --git a/test/runtime/samples/component-slot-let-aliased/main.svelte b/test/runtime/samples/component-slot-let-aliased/main.svelte new file mode 100644 index 0000000000..468a58face --- /dev/null +++ b/test/runtime/samples/component-slot-let-aliased/main.svelte @@ -0,0 +1,9 @@ + + + + {x} + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-b/Nested.svelte b/test/runtime/samples/component-slot-let-b/Nested.svelte new file mode 100644 index 0000000000..42963f6d1d --- /dev/null +++ b/test/runtime/samples/component-slot-let-b/Nested.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-b/_config.js b/test/runtime/samples/component-slot-let-b/_config.js new file mode 100644 index 0000000000..f13a3b2bb6 --- /dev/null +++ b/test/runtime/samples/component-slot-let-b/_config.js @@ -0,0 +1,18 @@ +export default { + html: ` + + 0 + `, + + async test({ assert, target, window }) { + const button = target.querySelector('button'); + const click = new window.MouseEvent('click'); + + await button.dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` + + 1 + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-b/main.svelte b/test/runtime/samples/component-slot-let-b/main.svelte new file mode 100644 index 0000000000..4acec62b21 --- /dev/null +++ b/test/runtime/samples/component-slot-let-b/main.svelte @@ -0,0 +1,7 @@ + + + + {count} + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-c/Nested.svelte b/test/runtime/samples/component-slot-let-c/Nested.svelte new file mode 100644 index 0000000000..d38a1403fb --- /dev/null +++ b/test/runtime/samples/component-slot-let-c/Nested.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-c/_config.js b/test/runtime/samples/component-slot-let-c/_config.js new file mode 100644 index 0000000000..fe8e68b1ac --- /dev/null +++ b/test/runtime/samples/component-slot-let-c/_config.js @@ -0,0 +1,18 @@ +export default { + html: ` + + 0 (undefined) + `, + + async test({ assert, target, window }) { + const button = target.querySelector('button'); + const click = new window.MouseEvent('click'); + + await button.dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` + + 1 (undefined) + `); + } +}; diff --git a/test/runtime/samples/component-slot-let-c/main.svelte b/test/runtime/samples/component-slot-let-c/main.svelte new file mode 100644 index 0000000000..b594964303 --- /dev/null +++ b/test/runtime/samples/component-slot-let-c/main.svelte @@ -0,0 +1,7 @@ + + + + {c} ({count}) + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-destructured/Nested.svelte b/test/runtime/samples/component-slot-let-destructured/Nested.svelte new file mode 100644 index 0000000000..38c6ed6cbe --- /dev/null +++ b/test/runtime/samples/component-slot-let-destructured/Nested.svelte @@ -0,0 +1,5 @@ +
+ {#each things as thing} + + {/each} +
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-destructured/_config.js b/test/runtime/samples/component-slot-let-destructured/_config.js new file mode 100644 index 0000000000..d7aaae2d77 --- /dev/null +++ b/test/runtime/samples/component-slot-let-destructured/_config.js @@ -0,0 +1,34 @@ +export default { + props: { + things: [ + { num: 1 }, + { num: 2 }, + { num: 3 } + ] + }, + + html: ` +
+ 1 + 2 + 3 +
`, + + test({ assert, component, target }) { + component.things = [ + { num: 1 }, + { num: 2 }, + { num: 3 }, + { num: 4 } + ]; + + assert.htmlEqual(target.innerHTML, ` +
+ 1 + 2 + 3 + 4 +
+ `); + } +}; diff --git a/test/runtime/samples/component-slot-let-destructured/main.svelte b/test/runtime/samples/component-slot-let-destructured/main.svelte new file mode 100644 index 0000000000..1ee93bf105 --- /dev/null +++ b/test/runtime/samples/component-slot-let-destructured/main.svelte @@ -0,0 +1,9 @@ + + + + {num} + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-named/Nested.svelte b/test/runtime/samples/component-slot-let-named/Nested.svelte new file mode 100644 index 0000000000..d95593fc18 --- /dev/null +++ b/test/runtime/samples/component-slot-let-named/Nested.svelte @@ -0,0 +1,5 @@ +
+ {#each things as thing} + + {/each} +
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-named/_config.js b/test/runtime/samples/component-slot-let-named/_config.js new file mode 100644 index 0000000000..f65448af93 --- /dev/null +++ b/test/runtime/samples/component-slot-let-named/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + things: [1, 2, 3] + }, + + html: ` +
+
1
+
2
+
3
+
`, + + test({ assert, component, target }) { + component.things = [1, 2, 3, 4]; + assert.htmlEqual(target.innerHTML, ` +
+
1
+
2
+
3
+
4
+
+ `); + } +}; diff --git a/test/runtime/samples/component-slot-let-named/main.svelte b/test/runtime/samples/component-slot-let-named/main.svelte new file mode 100644 index 0000000000..f9e9e3a10f --- /dev/null +++ b/test/runtime/samples/component-slot-let-named/main.svelte @@ -0,0 +1,11 @@ + + + +
+ {thing} +
+
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-static/Nested.svelte b/test/runtime/samples/component-slot-let-static/Nested.svelte new file mode 100644 index 0000000000..32eee1534a --- /dev/null +++ b/test/runtime/samples/component-slot-let-static/Nested.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-let-static/_config.js b/test/runtime/samples/component-slot-let-static/_config.js new file mode 100644 index 0000000000..3067939b88 --- /dev/null +++ b/test/runtime/samples/component-slot-let-static/_config.js @@ -0,0 +1,3 @@ +export default { + html: `

Hi

` +}; diff --git a/test/runtime/samples/component-slot-let-static/main.svelte b/test/runtime/samples/component-slot-let-static/main.svelte new file mode 100644 index 0000000000..3eeaba976e --- /dev/null +++ b/test/runtime/samples/component-slot-let-static/main.svelte @@ -0,0 +1,7 @@ + + + +

{value}

+
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-let/Nested.svelte b/test/runtime/samples/component-slot-let/Nested.svelte new file mode 100644 index 0000000000..38c6ed6cbe --- /dev/null +++ b/test/runtime/samples/component-slot-let/Nested.svelte @@ -0,0 +1,5 @@ +
+ {#each things as thing} + + {/each} +
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-let/_config.js b/test/runtime/samples/component-slot-let/_config.js new file mode 100644 index 0000000000..d66f613bb4 --- /dev/null +++ b/test/runtime/samples/component-slot-let/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + things: [1, 2, 3] + }, + + html: ` +
+ 1 + 2 + 3 +
`, + + test({ assert, component, target }) { + component.things = [1, 2, 3, 4]; + assert.htmlEqual(target.innerHTML, ` +
+ 1 + 2 + 3 + 4 +
+ `); + } +}; diff --git a/test/runtime/samples/component-slot-let/main.svelte b/test/runtime/samples/component-slot-let/main.svelte new file mode 100644 index 0000000000..d00bb8e41e --- /dev/null +++ b/test/runtime/samples/component-slot-let/main.svelte @@ -0,0 +1,9 @@ + + + + {thing} + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-name-with-hyphen/Nested.html b/test/runtime/samples/component-slot-name-with-hyphen/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-name-with-hyphen/Nested.html rename to test/runtime/samples/component-slot-name-with-hyphen/Nested.svelte diff --git a/test/runtime/samples/component-slot-name-with-hyphen/main.html b/test/runtime/samples/component-slot-name-with-hyphen/main.svelte similarity index 54% rename from test/runtime/samples/component-slot-name-with-hyphen/main.html rename to test/runtime/samples/component-slot-name-with-hyphen/main.svelte index a77e524f89..13a65b2196 100644 --- a/test/runtime/samples/component-slot-name-with-hyphen/main.html +++ b/test/runtime/samples/component-slot-name-with-hyphen/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-named/Nested.html b/test/runtime/samples/component-slot-named/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-named/Nested.html rename to test/runtime/samples/component-slot-named/Nested.svelte diff --git a/test/runtime/samples/component-slot-named/main.html b/test/runtime/samples/component-slot-named/main.svelte similarity index 63% rename from test/runtime/samples/component-slot-named/main.html rename to test/runtime/samples/component-slot-named/main.svelte index 627c3ab7e0..e25587c1e5 100644 --- a/test/runtime/samples/component-slot-named/main.html +++ b/test/runtime/samples/component-slot-named/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-nested-component/Inner.html b/test/runtime/samples/component-slot-nested-component/Inner.svelte similarity index 100% rename from test/runtime/samples/component-slot-nested-component/Inner.html rename to test/runtime/samples/component-slot-nested-component/Inner.svelte diff --git a/test/runtime/samples/component-slot-nested-component/Outer.html b/test/runtime/samples/component-slot-nested-component/Outer.svelte similarity index 100% rename from test/runtime/samples/component-slot-nested-component/Outer.html rename to test/runtime/samples/component-slot-nested-component/Outer.svelte diff --git a/test/runtime/samples/component-slot-nested-component/main.html b/test/runtime/samples/component-slot-nested-component/main.html deleted file mode 100644 index d86e58bb70..0000000000 --- a/test/runtime/samples/component-slot-nested-component/main.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - foo - \ No newline at end of file diff --git a/test/runtime/samples/component-slot-nested-component/main.svelte b/test/runtime/samples/component-slot-nested-component/main.svelte new file mode 100644 index 0000000000..45c6d437b6 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-component/main.svelte @@ -0,0 +1,8 @@ + + + + foo + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-nested-in-element/One.svelte b/test/runtime/samples/component-slot-nested-in-element/One.svelte new file mode 100644 index 0000000000..ec1e06a598 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-in-element/One.svelte @@ -0,0 +1,11 @@ + + + +
+
+ +
+
+
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-nested-in-element/Two.svelte b/test/runtime/samples/component-slot-nested-in-element/Two.svelte new file mode 100644 index 0000000000..e3842479c5 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-in-element/Two.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/runtime/samples/component-slot-nested-in-element/_config.js b/test/runtime/samples/component-slot-nested-in-element/_config.js new file mode 100644 index 0000000000..bbdd8793c7 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-in-element/_config.js @@ -0,0 +1,9 @@ +export default { + html: ` +
+
+
a
+
+
+ ` +}; diff --git a/test/runtime/samples/component-slot-nested-in-element/main.svelte b/test/runtime/samples/component-slot-nested-in-element/main.svelte new file mode 100644 index 0000000000..32f5ddc312 --- /dev/null +++ b/test/runtime/samples/component-slot-nested-in-element/main.svelte @@ -0,0 +1,7 @@ + + + +
a
+
\ No newline at end of file diff --git a/test/runtime/samples/component-slot-nested/Nested.html b/test/runtime/samples/component-slot-nested/Nested.svelte similarity index 100% rename from test/runtime/samples/component-slot-nested/Nested.html rename to test/runtime/samples/component-slot-nested/Nested.svelte diff --git a/test/runtime/samples/component-slot-nested/main.html b/test/runtime/samples/component-slot-nested/main.svelte similarity index 52% rename from test/runtime/samples/component-slot-nested/main.html rename to test/runtime/samples/component-slot-nested/main.svelte index a109ec9c06..982a918709 100644 --- a/test/runtime/samples/component-slot-nested/main.html +++ b/test/runtime/samples/component-slot-nested/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-slot-used-with-default-event/Nested.svelte b/test/runtime/samples/component-slot-used-with-default-event/Nested.svelte new file mode 100644 index 0000000000..2682f7168b --- /dev/null +++ b/test/runtime/samples/component-slot-used-with-default-event/Nested.svelte @@ -0,0 +1,7 @@ + + +

+ +

\ No newline at end of file diff --git a/test/runtime/samples/component-slot-used-with-default-event/_config.js b/test/runtime/samples/component-slot-used-with-default-event/_config.js new file mode 100644 index 0000000000..174d01f1a5 --- /dev/null +++ b/test/runtime/samples/component-slot-used-with-default-event/_config.js @@ -0,0 +1,3 @@ +export default { + html: '

Hello

' +}; diff --git a/test/runtime/samples/component-slot-used-with-default-event/main.svelte b/test/runtime/samples/component-slot-used-with-default-event/main.svelte new file mode 100644 index 0000000000..1e1ea8daa8 --- /dev/null +++ b/test/runtime/samples/component-slot-used-with-default-event/main.svelte @@ -0,0 +1,7 @@ + + + + Hello + \ No newline at end of file diff --git a/test/runtime/samples/component-static-at-symbol/Email.html b/test/runtime/samples/component-static-at-symbol/Email.svelte similarity index 100% rename from test/runtime/samples/component-static-at-symbol/Email.html rename to test/runtime/samples/component-static-at-symbol/Email.svelte diff --git a/test/runtime/samples/component-static-at-symbol/main.html b/test/runtime/samples/component-static-at-symbol/main.html deleted file mode 100644 index 275b922f6a..0000000000 --- a/test/runtime/samples/component-static-at-symbol/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/component-static-at-symbol/main.svelte b/test/runtime/samples/component-static-at-symbol/main.svelte new file mode 100644 index 0000000000..39f82ffd25 --- /dev/null +++ b/test/runtime/samples/component-static-at-symbol/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-template-inline-mutation/Widget.svelte b/test/runtime/samples/component-template-inline-mutation/Widget.svelte new file mode 100644 index 0000000000..f20c4bea50 --- /dev/null +++ b/test/runtime/samples/component-template-inline-mutation/Widget.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/component-template-inline-mutation/_config.js b/test/runtime/samples/component-template-inline-mutation/_config.js new file mode 100644 index 0000000000..9007d80ff5 --- /dev/null +++ b/test/runtime/samples/component-template-inline-mutation/_config.js @@ -0,0 +1,14 @@ +export default { + async test({ assert, target }) { + const btns = target.querySelectorAll('button'); + const event = new window.MouseEvent('click'); + + await btns[0].dispatchEvent(event); + await btns[0].dispatchEvent(event); + await btns[1].dispatchEvent(event); + await btns[1].dispatchEvent(event); + await btns[1].dispatchEvent(event); + + assert.equal(btns[1].innerHTML, '3'); + } +}; diff --git a/test/runtime/samples/component-template-inline-mutation/main.svelte b/test/runtime/samples/component-template-inline-mutation/main.svelte new file mode 100644 index 0000000000..b77462c690 --- /dev/null +++ b/test/runtime/samples/component-template-inline-mutation/main.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/component-yield-follows-element/Foo.html b/test/runtime/samples/component-yield-follows-element/Foo.svelte similarity index 100% rename from test/runtime/samples/component-yield-follows-element/Foo.html rename to test/runtime/samples/component-yield-follows-element/Foo.svelte diff --git a/test/runtime/samples/component-yield-follows-element/main.html b/test/runtime/samples/component-yield-follows-element/main.html deleted file mode 100644 index b362e9a410..0000000000 --- a/test/runtime/samples/component-yield-follows-element/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - -test \ No newline at end of file diff --git a/test/runtime/samples/component-yield-follows-element/main.svelte b/test/runtime/samples/component-yield-follows-element/main.svelte new file mode 100644 index 0000000000..3a43b58231 --- /dev/null +++ b/test/runtime/samples/component-yield-follows-element/main.svelte @@ -0,0 +1,5 @@ + + +test \ No newline at end of file diff --git a/test/runtime/samples/component-yield-if/Widget.html b/test/runtime/samples/component-yield-if/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-if/Widget.html rename to test/runtime/samples/component-yield-if/Widget.svelte diff --git a/test/runtime/samples/component-yield-if/main.html b/test/runtime/samples/component-yield-if/main.svelte similarity index 72% rename from test/runtime/samples/component-yield-if/main.html rename to test/runtime/samples/component-yield-if/main.svelte index 768993e064..4e02155a8b 100644 --- a/test/runtime/samples/component-yield-if/main.html +++ b/test/runtime/samples/component-yield-if/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-multiple-in-if/Widget.html b/test/runtime/samples/component-yield-multiple-in-if/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-multiple-in-if/Widget.html rename to test/runtime/samples/component-yield-multiple-in-if/Widget.svelte diff --git a/test/runtime/samples/component-yield-multiple-in-if/main.html b/test/runtime/samples/component-yield-multiple-in-if/main.svelte similarity index 75% rename from test/runtime/samples/component-yield-multiple-in-if/main.html rename to test/runtime/samples/component-yield-multiple-in-if/main.svelte index 53eba749d6..db518183b5 100644 --- a/test/runtime/samples/component-yield-multiple-in-if/main.html +++ b/test/runtime/samples/component-yield-multiple-in-if/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-nested-if/Inner.html b/test/runtime/samples/component-yield-nested-if/Inner.svelte similarity index 100% rename from test/runtime/samples/component-yield-nested-if/Inner.html rename to test/runtime/samples/component-yield-nested-if/Inner.svelte diff --git a/test/runtime/samples/component-yield-nested-if/Outer.html b/test/runtime/samples/component-yield-nested-if/Outer.svelte similarity index 100% rename from test/runtime/samples/component-yield-nested-if/Outer.html rename to test/runtime/samples/component-yield-nested-if/Outer.svelte diff --git a/test/runtime/samples/component-yield-nested-if/main.html b/test/runtime/samples/component-yield-nested-if/main.html deleted file mode 100644 index 98c27812e6..0000000000 --- a/test/runtime/samples/component-yield-nested-if/main.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - One - - \ No newline at end of file diff --git a/test/runtime/samples/component-yield-nested-if/main.svelte b/test/runtime/samples/component-yield-nested-if/main.svelte new file mode 100644 index 0000000000..2107a21ed4 --- /dev/null +++ b/test/runtime/samples/component-yield-nested-if/main.svelte @@ -0,0 +1,11 @@ + + + + One + + \ No newline at end of file diff --git a/test/runtime/samples/component-yield-parent/Widget.html b/test/runtime/samples/component-yield-parent/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-parent/Widget.html rename to test/runtime/samples/component-yield-parent/Widget.svelte diff --git a/test/runtime/samples/component-yield-parent/main.html b/test/runtime/samples/component-yield-parent/main.svelte similarity index 64% rename from test/runtime/samples/component-yield-parent/main.html rename to test/runtime/samples/component-yield-parent/main.svelte index b36dbc1b14..8de37236ae 100644 --- a/test/runtime/samples/component-yield-parent/main.html +++ b/test/runtime/samples/component-yield-parent/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-placement/Modal.html b/test/runtime/samples/component-yield-placement/Modal.svelte similarity index 100% rename from test/runtime/samples/component-yield-placement/Modal.html rename to test/runtime/samples/component-yield-placement/Modal.svelte diff --git a/test/runtime/samples/component-yield-placement/main.html b/test/runtime/samples/component-yield-placement/main.svelte similarity index 83% rename from test/runtime/samples/component-yield-placement/main.html rename to test/runtime/samples/component-yield-placement/main.svelte index cc5bfd73ed..ee1a1221eb 100644 --- a/test/runtime/samples/component-yield-placement/main.html +++ b/test/runtime/samples/component-yield-placement/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/component-yield-static/Widget.html b/test/runtime/samples/component-yield-static/Widget.svelte similarity index 100% rename from test/runtime/samples/component-yield-static/Widget.html rename to test/runtime/samples/component-yield-static/Widget.svelte diff --git a/test/runtime/samples/component-yield-static/main.html b/test/runtime/samples/component-yield-static/main.html deleted file mode 100644 index 9d5807872d..0000000000 --- a/test/runtime/samples/component-yield-static/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - -Hello {name} \ No newline at end of file diff --git a/test/runtime/samples/component-yield-static/main.svelte b/test/runtime/samples/component-yield-static/main.svelte new file mode 100644 index 0000000000..3e99a8baa9 --- /dev/null +++ b/test/runtime/samples/component-yield-static/main.svelte @@ -0,0 +1,7 @@ + + +Hello {name} \ No newline at end of file diff --git a/test/runtime/samples/component-yield/main.html b/test/runtime/samples/component-yield/main.svelte similarity index 100% rename from test/runtime/samples/component-yield/main.html rename to test/runtime/samples/component-yield/main.svelte diff --git a/test/runtime/samples/component/Widget.html b/test/runtime/samples/component/Widget.svelte similarity index 100% rename from test/runtime/samples/component/Widget.html rename to test/runtime/samples/component/Widget.svelte diff --git a/test/runtime/samples/component/main.html b/test/runtime/samples/component/main.html deleted file mode 100644 index 1bd0073a0e..0000000000 --- a/test/runtime/samples/component/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - -
- -
\ No newline at end of file diff --git a/test/runtime/samples/component/main.svelte b/test/runtime/samples/component/main.svelte new file mode 100644 index 0000000000..fb2f332507 --- /dev/null +++ b/test/runtime/samples/component/main.svelte @@ -0,0 +1,7 @@ + + +
+ +
\ No newline at end of file diff --git a/test/runtime/samples/context-api/Tab.svelte b/test/runtime/samples/context-api/Tab.svelte new file mode 100644 index 0000000000..af3f002521 --- /dev/null +++ b/test/runtime/samples/context-api/Tab.svelte @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/context-api/TabList.svelte b/test/runtime/samples/context-api/TabList.svelte new file mode 100644 index 0000000000..08c86216ae --- /dev/null +++ b/test/runtime/samples/context-api/TabList.svelte @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/test/runtime/samples/context-api/TabPanel.svelte b/test/runtime/samples/context-api/TabPanel.svelte new file mode 100644 index 0000000000..a506ba9c07 --- /dev/null +++ b/test/runtime/samples/context-api/TabPanel.svelte @@ -0,0 +1,16 @@ + + +{#if $selectedPanel === panel} + +{/if} \ No newline at end of file diff --git a/test/runtime/samples/context-api/Tabs.svelte b/test/runtime/samples/context-api/Tabs.svelte new file mode 100644 index 0000000000..6692bb31e9 --- /dev/null +++ b/test/runtime/samples/context-api/Tabs.svelte @@ -0,0 +1,52 @@ + + + + + + +
+ +
\ No newline at end of file diff --git a/test/runtime/samples/context-api/_config.js b/test/runtime/samples/context-api/_config.js new file mode 100644 index 0000000000..1bc475a156 --- /dev/null +++ b/test/runtime/samples/context-api/_config.js @@ -0,0 +1,73 @@ +export default { + html: ` +
+
+ + +
+ +

Small panel

+
+ `, + + async test({ assert, component, target, window }) { + const click = new window.MouseEvent('click'); + let buttons = target.querySelectorAll('button'); + + await buttons[1].dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` +
+
+ + +
+ +

Large panel

+
+ `); + + component.show_medium = true; + + assert.htmlEqual(target.innerHTML, ` +
+
+ + + +
+ +

Large panel

+
+ `); + + buttons = target.querySelectorAll('button'); + + await buttons[1].dispatchEvent(click); + + assert.htmlEqual(target.innerHTML, ` +
+
+ + + +
+ +

Medium panel

+
+ `); + + component.show_medium = false; + + assert.htmlEqual(target.innerHTML, ` +
+
+ + +
+ +

Large panel

+
+ `); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/context-api/main.svelte b/test/runtime/samples/context-api/main.svelte new file mode 100644 index 0000000000..5d569a2125 --- /dev/null +++ b/test/runtime/samples/context-api/main.svelte @@ -0,0 +1,30 @@ + + + + + small + {#if show_medium}medium{/if} + large + + + +

Small panel

+
+ + {#if show_medium} + +

Medium panel

+
+ {/if} + + +

Large panel

+
+
\ No newline at end of file diff --git a/test/runtime/samples/css-comments/main.html b/test/runtime/samples/css-comments/main.svelte similarity index 100% rename from test/runtime/samples/css-comments/main.html rename to test/runtime/samples/css-comments/main.svelte diff --git a/test/runtime/samples/css-false/Widget.html b/test/runtime/samples/css-false/Widget.svelte similarity index 100% rename from test/runtime/samples/css-false/Widget.html rename to test/runtime/samples/css-false/Widget.svelte diff --git a/test/runtime/samples/css-false/main.html b/test/runtime/samples/css-false/main.html deleted file mode 100644 index dbbc5c325b..0000000000 --- a/test/runtime/samples/css-false/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

control

- \ No newline at end of file diff --git a/test/runtime/samples/css-false/main.svelte b/test/runtime/samples/css-false/main.svelte new file mode 100644 index 0000000000..5129d127ba --- /dev/null +++ b/test/runtime/samples/css-false/main.svelte @@ -0,0 +1,6 @@ + + +

control

+ \ No newline at end of file diff --git a/test/runtime/samples/css-space-in-attribute/Widget.html b/test/runtime/samples/css-space-in-attribute/Widget.svelte similarity index 100% rename from test/runtime/samples/css-space-in-attribute/Widget.html rename to test/runtime/samples/css-space-in-attribute/Widget.svelte diff --git a/test/runtime/samples/css-space-in-attribute/main.html b/test/runtime/samples/css-space-in-attribute/main.svelte similarity index 51% rename from test/runtime/samples/css-space-in-attribute/main.html rename to test/runtime/samples/css-space-in-attribute/main.svelte index 93bec897f3..e23e6c4e40 100644 --- a/test/runtime/samples/css-space-in-attribute/main.html +++ b/test/runtime/samples/css-space-in-attribute/main.svelte @@ -1,5 +1,5 @@

control

diff --git a/test/runtime/samples/css/Widget.html b/test/runtime/samples/css/Widget.svelte similarity index 100% rename from test/runtime/samples/css/Widget.html rename to test/runtime/samples/css/Widget.svelte diff --git a/test/runtime/samples/css/main.html b/test/runtime/samples/css/main.html deleted file mode 100644 index dbbc5c325b..0000000000 --- a/test/runtime/samples/css/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

control

- \ No newline at end of file diff --git a/test/runtime/samples/css/main.svelte b/test/runtime/samples/css/main.svelte new file mode 100644 index 0000000000..5129d127ba --- /dev/null +++ b/test/runtime/samples/css/main.svelte @@ -0,0 +1,6 @@ + + +

control

+ \ No newline at end of file diff --git a/test/runtime/samples/custom-method/main.html b/test/runtime/samples/custom-method/main.svelte similarity index 100% rename from test/runtime/samples/custom-method/main.html rename to test/runtime/samples/custom-method/main.svelte diff --git a/test/runtime/samples/deconflict-builtins/main.html b/test/runtime/samples/deconflict-builtins/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-builtins/main.html rename to test/runtime/samples/deconflict-builtins/main.svelte diff --git a/test/runtime/samples/deconflict-component-name-with-global/_config.js b/test/runtime/samples/deconflict-component-name-with-global/_config.js new file mode 100644 index 0000000000..4b8255868e --- /dev/null +++ b/test/runtime/samples/deconflict-component-name-with-global/_config.js @@ -0,0 +1,9 @@ +export default { + compileOptions: { + name: 'Set' + }, + + preserveIdentifiers: true, + + html: `

true

` +}; \ No newline at end of file diff --git a/test/runtime/samples/deconflict-component-name-with-global/main.svelte b/test/runtime/samples/deconflict-component-name-with-global/main.svelte new file mode 100644 index 0000000000..e5cc140b7a --- /dev/null +++ b/test/runtime/samples/deconflict-component-name-with-global/main.svelte @@ -0,0 +1,5 @@ + + +

{set.has('x')}

\ No newline at end of file diff --git a/test/runtime/samples/deconflict-component-name-with-module-global/_config.js b/test/runtime/samples/deconflict-component-name-with-module-global/_config.js new file mode 100644 index 0000000000..4b8255868e --- /dev/null +++ b/test/runtime/samples/deconflict-component-name-with-module-global/_config.js @@ -0,0 +1,9 @@ +export default { + compileOptions: { + name: 'Set' + }, + + preserveIdentifiers: true, + + html: `

true

` +}; \ No newline at end of file diff --git a/test/runtime/samples/deconflict-component-name-with-module-global/main.svelte b/test/runtime/samples/deconflict-component-name-with-module-global/main.svelte new file mode 100644 index 0000000000..a14f3e7a1e --- /dev/null +++ b/test/runtime/samples/deconflict-component-name-with-module-global/main.svelte @@ -0,0 +1,5 @@ + + +

{set.has('x')}

\ No newline at end of file diff --git a/test/runtime/samples/deconflict-component-refs/main.html b/test/runtime/samples/deconflict-component-refs/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-component-refs/main.html rename to test/runtime/samples/deconflict-component-refs/main.svelte diff --git a/test/runtime/samples/deconflict-contexts/main.html b/test/runtime/samples/deconflict-contexts/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-contexts/main.html rename to test/runtime/samples/deconflict-contexts/main.svelte diff --git a/test/runtime/samples/deconflict-elements-indexes/main.html b/test/runtime/samples/deconflict-elements-indexes/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-elements-indexes/main.html rename to test/runtime/samples/deconflict-elements-indexes/main.svelte diff --git a/test/runtime/samples/deconflict-non-helpers/main.html b/test/runtime/samples/deconflict-non-helpers/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-non-helpers/main.html rename to test/runtime/samples/deconflict-non-helpers/main.svelte diff --git a/test/runtime/samples/deconflict-self/main.html b/test/runtime/samples/deconflict-self/main.html deleted file mode 100644 index 30f524eb69..0000000000 --- a/test/runtime/samples/deconflict-self/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
\ No newline at end of file diff --git a/test/runtime/samples/deconflict-self/main.svelte b/test/runtime/samples/deconflict-self/main.svelte new file mode 100644 index 0000000000..7010a66c88 --- /dev/null +++ b/test/runtime/samples/deconflict-self/main.svelte @@ -0,0 +1,5 @@ + + +
\ No newline at end of file diff --git a/test/runtime/samples/deconflict-self/nested/main.html b/test/runtime/samples/deconflict-self/nested/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-self/nested/main.html rename to test/runtime/samples/deconflict-self/nested/main.svelte diff --git a/test/runtime/samples/deconflict-template-1/main.html b/test/runtime/samples/deconflict-template-1/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-template-1/main.html rename to test/runtime/samples/deconflict-template-1/main.svelte diff --git a/test/runtime/samples/deconflict-template-2/main.html b/test/runtime/samples/deconflict-template-2/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-template-2/main.html rename to test/runtime/samples/deconflict-template-2/main.svelte diff --git a/test/runtime/samples/deconflict-vars/main.html b/test/runtime/samples/deconflict-vars/main.svelte similarity index 100% rename from test/runtime/samples/deconflict-vars/main.html rename to test/runtime/samples/deconflict-vars/main.svelte diff --git a/test/runtime/samples/default-data-function/main.html b/test/runtime/samples/default-data-function/main.svelte similarity index 100% rename from test/runtime/samples/default-data-function/main.html rename to test/runtime/samples/default-data-function/main.svelte diff --git a/test/runtime/samples/default-data-override/main.html b/test/runtime/samples/default-data-override/main.svelte similarity index 100% rename from test/runtime/samples/default-data-override/main.html rename to test/runtime/samples/default-data-override/main.svelte diff --git a/test/runtime/samples/default-data/main.html b/test/runtime/samples/default-data/main.svelte similarity index 100% rename from test/runtime/samples/default-data/main.html rename to test/runtime/samples/default-data/main.svelte diff --git a/test/runtime/samples/destroy-twice/main.html b/test/runtime/samples/destroy-twice/main.svelte similarity index 100% rename from test/runtime/samples/destroy-twice/main.html rename to test/runtime/samples/destroy-twice/main.svelte diff --git a/test/runtime/samples/destructuring/main.html b/test/runtime/samples/destructuring/main.svelte similarity index 100% rename from test/runtime/samples/destructuring/main.html rename to test/runtime/samples/destructuring/main.svelte diff --git a/test/runtime/samples/dev-warning-destroy-twice/main.html b/test/runtime/samples/dev-warning-destroy-twice/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-destroy-twice/main.html rename to test/runtime/samples/dev-warning-destroy-twice/main.svelte diff --git a/test/runtime/samples/dev-warning-helper/main.html b/test/runtime/samples/dev-warning-helper/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-helper/main.html rename to test/runtime/samples/dev-warning-helper/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-binding/_config.js b/test/runtime/samples/dev-warning-missing-data-binding/_config.js index ffe62384a1..f23c5d5ec5 100644 --- a/test/runtime/samples/dev-warning-missing-data-binding/_config.js +++ b/test/runtime/samples/dev-warning-missing-data-binding/_config.js @@ -4,6 +4,6 @@ export default { }, warnings: [ - ` was created without expected prop 'value'` + `
was created without expected prop 'value'` ] }; diff --git a/test/runtime/samples/dev-warning-missing-data-binding/main.html b/test/runtime/samples/dev-warning-missing-data-binding/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-binding/main.html rename to test/runtime/samples/dev-warning-missing-data-binding/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-component/Foo.html b/test/runtime/samples/dev-warning-missing-data-component/Foo.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-component/Foo.html rename to test/runtime/samples/dev-warning-missing-data-component/Foo.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-component/_config.js b/test/runtime/samples/dev-warning-missing-data-component/_config.js index f3fc130528..a95e570988 100644 --- a/test/runtime/samples/dev-warning-missing-data-component/_config.js +++ b/test/runtime/samples/dev-warning-missing-data-component/_config.js @@ -4,6 +4,6 @@ export default { }, warnings: [ - ` was created without expected prop 'y'` + ` was created without expected prop 'y'` ] }; diff --git a/test/runtime/samples/dev-warning-missing-data-component/main.html b/test/runtime/samples/dev-warning-missing-data-component/main.html deleted file mode 100644 index 2bda6e2937..0000000000 --- a/test/runtime/samples/dev-warning-missing-data-component/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-missing-data-component/main.svelte b/test/runtime/samples/dev-warning-missing-data-component/main.svelte new file mode 100644 index 0000000000..15a5895b3d --- /dev/null +++ b/test/runtime/samples/dev-warning-missing-data-component/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-missing-data-each/main.html b/test/runtime/samples/dev-warning-missing-data-each/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-each/main.html rename to test/runtime/samples/dev-warning-missing-data-each/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data-excludes-event/main.html b/test/runtime/samples/dev-warning-missing-data-excludes-event/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data-excludes-event/main.html rename to test/runtime/samples/dev-warning-missing-data-excludes-event/main.svelte diff --git a/test/runtime/samples/dev-warning-missing-data/_config.js b/test/runtime/samples/dev-warning-missing-data/_config.js index 5bc6c8be1f..b929ff4741 100644 --- a/test/runtime/samples/dev-warning-missing-data/_config.js +++ b/test/runtime/samples/dev-warning-missing-data/_config.js @@ -4,7 +4,7 @@ export default { }, warnings: [ - ` was created without expected prop 'foo'`, - ` was created without expected prop 'bar'` + `
was created without expected prop 'foo'`, + `
was created without expected prop 'bar'` ] }; diff --git a/test/runtime/samples/dev-warning-missing-data/main.html b/test/runtime/samples/dev-warning-missing-data/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-missing-data/main.html rename to test/runtime/samples/dev-warning-missing-data/main.svelte diff --git a/test/runtime/samples/dev-warning-readonly-computed/_config.js b/test/runtime/samples/dev-warning-readonly-computed/_config.js index e8ffbaba3c..33339071f4 100644 --- a/test/runtime/samples/dev-warning-readonly-computed/_config.js +++ b/test/runtime/samples/dev-warning-readonly-computed/_config.js @@ -12,7 +12,7 @@ export default { component.foo = 1; throw new Error( 'Expected an error' ); } catch ( err ) { - assert.equal( err.message, `: Cannot set read-only property 'foo'` ); + assert.equal( err.message, `
: Cannot set read-only property 'foo'` ); } } }; \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-readonly-computed/main.html b/test/runtime/samples/dev-warning-readonly-computed/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-readonly-computed/main.html rename to test/runtime/samples/dev-warning-readonly-computed/main.svelte diff --git a/test/runtime/samples/dev-warning-readonly-window-binding/_config.js b/test/runtime/samples/dev-warning-readonly-window-binding/_config.js index 751cffde79..e0b46584e4 100644 --- a/test/runtime/samples/dev-warning-readonly-window-binding/_config.js +++ b/test/runtime/samples/dev-warning-readonly-window-binding/_config.js @@ -8,7 +8,7 @@ export default { component.width = 99; throw new Error('Expected an error'); } catch (err) { - assert.equal(err.message, `: Cannot set read-only property 'width'`); + assert.equal(err.message, `
: Cannot set read-only property 'width'`); } } }; \ No newline at end of file diff --git a/test/runtime/samples/dev-warning-readonly-window-binding/main.html b/test/runtime/samples/dev-warning-readonly-window-binding/main.svelte similarity index 100% rename from test/runtime/samples/dev-warning-readonly-window-binding/main.html rename to test/runtime/samples/dev-warning-readonly-window-binding/main.svelte diff --git a/test/runtime/samples/document-event/_config.js b/test/runtime/samples/document-event/_config.js index 98e619af0f..f5e4b46f4f 100644 --- a/test/runtime/samples/document-event/_config.js +++ b/test/runtime/samples/document-event/_config.js @@ -1,13 +1,13 @@ export default { - test({ assert, component, target, window }) { + test({ assert, component, window }) { assert.deepEqual(component.events, []); const event1 = new window.Event('mouseenter'); - window.document.dispatchEvent(event1); + window.document.body.dispatchEvent(event1); assert.deepEqual(component.events, ['enter']); const event2 = new window.Event('mouseleave'); - window.document.dispatchEvent(event2); + window.document.body.dispatchEvent(event2); assert.deepEqual(component.events, ['enter', 'leave']); }, -}; \ No newline at end of file +}; diff --git a/test/runtime/samples/document-event/main.html b/test/runtime/samples/document-event/main.svelte similarity index 50% rename from test/runtime/samples/document-event/main.html rename to test/runtime/samples/document-event/main.svelte index 6e7ab3a47c..078ae1ee02 100644 --- a/test/runtime/samples/document-event/main.html +++ b/test/runtime/samples/document-event/main.svelte @@ -6,4 +6,4 @@ } - \ No newline at end of file + diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/Green.html b/test/runtime/samples/dynamic-component-bindings-recreated-b/Green.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated-b/Green.html rename to test/runtime/samples/dynamic-component-bindings-recreated-b/Green.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/Red.html b/test/runtime/samples/dynamic-component-bindings-recreated-b/Red.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated-b/Red.html rename to test/runtime/samples/dynamic-component-bindings-recreated-b/Red.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/main.html b/test/runtime/samples/dynamic-component-bindings-recreated-b/main.html deleted file mode 100644 index cdae60e835..0000000000 --- a/test/runtime/samples/dynamic-component-bindings-recreated-b/main.html +++ /dev/null @@ -1,10 +0,0 @@ - - -

parent {foo}

- \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated-b/main.svelte b/test/runtime/samples/dynamic-component-bindings-recreated-b/main.svelte new file mode 100644 index 0000000000..019718e5cb --- /dev/null +++ b/test/runtime/samples/dynamic-component-bindings-recreated-b/main.svelte @@ -0,0 +1,10 @@ + + +

parent {foo}

+ \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Green.html b/test/runtime/samples/dynamic-component-bindings-recreated/Green.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated/Green.html rename to test/runtime/samples/dynamic-component-bindings-recreated/Green.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/Red.html b/test/runtime/samples/dynamic-component-bindings-recreated/Red.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings-recreated/Red.html rename to test/runtime/samples/dynamic-component-bindings-recreated/Red.svelte diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/main.html b/test/runtime/samples/dynamic-component-bindings-recreated/main.html deleted file mode 100644 index c91906e5df..0000000000 --- a/test/runtime/samples/dynamic-component-bindings-recreated/main.html +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings-recreated/main.svelte b/test/runtime/samples/dynamic-component-bindings-recreated/main.svelte new file mode 100644 index 0000000000..011ac923b2 --- /dev/null +++ b/test/runtime/samples/dynamic-component-bindings-recreated/main.svelte @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings/Bar.html b/test/runtime/samples/dynamic-component-bindings/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings/Bar.html rename to test/runtime/samples/dynamic-component-bindings/Bar.svelte diff --git a/test/runtime/samples/dynamic-component-bindings/Foo.html b/test/runtime/samples/dynamic-component-bindings/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-bindings/Foo.html rename to test/runtime/samples/dynamic-component-bindings/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-bindings/main.html b/test/runtime/samples/dynamic-component-bindings/main.html deleted file mode 100644 index 0df350a9f2..0000000000 --- a/test/runtime/samples/dynamic-component-bindings/main.html +++ /dev/null @@ -1,10 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-bindings/main.svelte b/test/runtime/samples/dynamic-component-bindings/main.svelte new file mode 100644 index 0000000000..31d0f86e5e --- /dev/null +++ b/test/runtime/samples/dynamic-component-bindings/main.svelte @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-destroy-null/main.html b/test/runtime/samples/dynamic-component-destroy-null/main.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-destroy-null/main.html rename to test/runtime/samples/dynamic-component-destroy-null/main.svelte diff --git a/test/runtime/samples/dynamic-component-events/Bar.html b/test/runtime/samples/dynamic-component-events/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-events/Bar.html rename to test/runtime/samples/dynamic-component-events/Bar.svelte diff --git a/test/runtime/samples/dynamic-component-events/Foo.html b/test/runtime/samples/dynamic-component-events/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-events/Foo.html rename to test/runtime/samples/dynamic-component-events/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-events/main.html b/test/runtime/samples/dynamic-component-events/main.svelte similarity index 58% rename from test/runtime/samples/dynamic-component-events/main.html rename to test/runtime/samples/dynamic-component-events/main.svelte index 77856e8e63..f60e578289 100644 --- a/test/runtime/samples/dynamic-component-events/main.html +++ b/test/runtime/samples/dynamic-component-events/main.svelte @@ -1,6 +1,6 @@ diff --git a/test/runtime/samples/dynamic-component-nulled-out/Foo.html b/test/runtime/samples/dynamic-component-nulled-out/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-nulled-out/Foo.html rename to test/runtime/samples/dynamic-component-nulled-out/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-nulled-out/main.html b/test/runtime/samples/dynamic-component-nulled-out/main.html deleted file mode 100644 index b98ecb8f7e..0000000000 --- a/test/runtime/samples/dynamic-component-nulled-out/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-nulled-out/main.svelte b/test/runtime/samples/dynamic-component-nulled-out/main.svelte new file mode 100644 index 0000000000..2df6837267 --- /dev/null +++ b/test/runtime/samples/dynamic-component-nulled-out/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-ref/Foo.html b/test/runtime/samples/dynamic-component-ref/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-ref/Foo.html rename to test/runtime/samples/dynamic-component-ref/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-ref/main.html b/test/runtime/samples/dynamic-component-ref/main.svelte similarity index 72% rename from test/runtime/samples/dynamic-component-ref/main.html rename to test/runtime/samples/dynamic-component-ref/main.svelte index fe9c52cab6..984f34fc7b 100644 --- a/test/runtime/samples/dynamic-component-ref/main.html +++ b/test/runtime/samples/dynamic-component-ref/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/dynamic-component-slot/Bar.html b/test/runtime/samples/dynamic-component-slot/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-slot/Bar.html rename to test/runtime/samples/dynamic-component-slot/Bar.svelte diff --git a/test/runtime/samples/dynamic-component-slot/Baz.html b/test/runtime/samples/dynamic-component-slot/Baz.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-slot/Baz.html rename to test/runtime/samples/dynamic-component-slot/Baz.svelte diff --git a/test/runtime/samples/dynamic-component-slot/Foo.html b/test/runtime/samples/dynamic-component-slot/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component-slot/Foo.html rename to test/runtime/samples/dynamic-component-slot/Foo.svelte diff --git a/test/runtime/samples/dynamic-component-slot/main.html b/test/runtime/samples/dynamic-component-slot/main.svelte similarity index 78% rename from test/runtime/samples/dynamic-component-slot/main.html rename to test/runtime/samples/dynamic-component-slot/main.svelte index 32f1ecce19..99bcf9e64f 100644 --- a/test/runtime/samples/dynamic-component-slot/main.html +++ b/test/runtime/samples/dynamic-component-slot/main.svelte @@ -1,7 +1,7 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component-update-existing-instance/main.svelte b/test/runtime/samples/dynamic-component-update-existing-instance/main.svelte new file mode 100644 index 0000000000..6e2a8cde5e --- /dev/null +++ b/test/runtime/samples/dynamic-component-update-existing-instance/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component/Bar.html b/test/runtime/samples/dynamic-component/Bar.svelte similarity index 100% rename from test/runtime/samples/dynamic-component/Bar.html rename to test/runtime/samples/dynamic-component/Bar.svelte diff --git a/test/runtime/samples/dynamic-component/Foo.html b/test/runtime/samples/dynamic-component/Foo.svelte similarity index 100% rename from test/runtime/samples/dynamic-component/Foo.html rename to test/runtime/samples/dynamic-component/Foo.svelte diff --git a/test/runtime/samples/dynamic-component/main.html b/test/runtime/samples/dynamic-component/main.html deleted file mode 100644 index efa9394d30..0000000000 --- a/test/runtime/samples/dynamic-component/main.html +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/dynamic-component/main.svelte b/test/runtime/samples/dynamic-component/main.svelte new file mode 100644 index 0000000000..6e2a8cde5e --- /dev/null +++ b/test/runtime/samples/dynamic-component/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/each-block-array-literal/main.html b/test/runtime/samples/each-block-array-literal/main.svelte similarity index 100% rename from test/runtime/samples/each-block-array-literal/main.html rename to test/runtime/samples/each-block-array-literal/main.svelte diff --git a/test/runtime/samples/each-block-containing-component-in-if/Nested.html b/test/runtime/samples/each-block-containing-component-in-if/Nested.svelte similarity index 100% rename from test/runtime/samples/each-block-containing-component-in-if/Nested.html rename to test/runtime/samples/each-block-containing-component-in-if/Nested.svelte diff --git a/test/runtime/samples/each-block-containing-component-in-if/main.html b/test/runtime/samples/each-block-containing-component-in-if/main.svelte similarity index 67% rename from test/runtime/samples/each-block-containing-component-in-if/main.html rename to test/runtime/samples/each-block-containing-component-in-if/main.svelte index 16f042a277..049948fa56 100644 --- a/test/runtime/samples/each-block-containing-component-in-if/main.html +++ b/test/runtime/samples/each-block-containing-component-in-if/main.svelte @@ -1,5 +1,5 @@ {#each items as item} diff --git a/test/runtime/samples/each-block-else-starts-empty/main.html b/test/runtime/samples/each-block-else-starts-empty/main.svelte similarity index 100% rename from test/runtime/samples/each-block-else-starts-empty/main.html rename to test/runtime/samples/each-block-else-starts-empty/main.svelte diff --git a/test/runtime/samples/each-block-else/main.html b/test/runtime/samples/each-block-else/main.svelte similarity index 100% rename from test/runtime/samples/each-block-else/main.html rename to test/runtime/samples/each-block-else/main.svelte diff --git a/test/runtime/samples/each-block-empty-outro/Thing.html b/test/runtime/samples/each-block-empty-outro/Thing.svelte similarity index 100% rename from test/runtime/samples/each-block-empty-outro/Thing.html rename to test/runtime/samples/each-block-empty-outro/Thing.svelte diff --git a/test/runtime/samples/each-block-empty-outro/main.html b/test/runtime/samples/each-block-empty-outro/main.svelte similarity index 79% rename from test/runtime/samples/each-block-empty-outro/main.html rename to test/runtime/samples/each-block-empty-outro/main.svelte index 325cbbcf45..338f471d31 100644 --- a/test/runtime/samples/each-block-empty-outro/main.html +++ b/test/runtime/samples/each-block-empty-outro/main.svelte @@ -2,7 +2,7 @@ export let visible; export let empty; - import Thing from './Thing.html'; + import Thing from './Thing.svelte'; {#if visible} diff --git a/test/runtime/samples/each-block-function/main.html b/test/runtime/samples/each-block-function/main.svelte similarity index 100% rename from test/runtime/samples/each-block-function/main.html rename to test/runtime/samples/each-block-function/main.svelte diff --git a/test/runtime/samples/each-block-in-if-block/main.html b/test/runtime/samples/each-block-in-if-block/main.svelte similarity index 100% rename from test/runtime/samples/each-block-in-if-block/main.html rename to test/runtime/samples/each-block-in-if-block/main.svelte diff --git a/test/runtime/samples/each-block-index-only/main.html b/test/runtime/samples/each-block-index-only/main.svelte similarity index 100% rename from test/runtime/samples/each-block-index-only/main.html rename to test/runtime/samples/each-block-index-only/main.svelte diff --git a/test/runtime/samples/each-block-indexed/main.html b/test/runtime/samples/each-block-indexed/main.svelte similarity index 100% rename from test/runtime/samples/each-block-indexed/main.html rename to test/runtime/samples/each-block-indexed/main.svelte diff --git a/test/runtime/samples/each-block-keyed-dynamic/main.html b/test/runtime/samples/each-block-keyed-dynamic/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-dynamic/main.html rename to test/runtime/samples/each-block-keyed-dynamic/main.svelte diff --git a/test/runtime/samples/each-block-keyed-empty/main.html b/test/runtime/samples/each-block-keyed-empty/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-empty/main.html rename to test/runtime/samples/each-block-keyed-empty/main.svelte diff --git a/test/runtime/samples/each-block-keyed-non-prop/main.html b/test/runtime/samples/each-block-keyed-non-prop/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-non-prop/main.html rename to test/runtime/samples/each-block-keyed-non-prop/main.svelte diff --git a/test/runtime/samples/each-block-keyed-random-permute/main.html b/test/runtime/samples/each-block-keyed-random-permute/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-random-permute/main.html rename to test/runtime/samples/each-block-keyed-random-permute/main.svelte diff --git a/test/runtime/samples/each-block-keyed-siblings/main.html b/test/runtime/samples/each-block-keyed-siblings/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-siblings/main.html rename to test/runtime/samples/each-block-keyed-siblings/main.svelte diff --git a/test/runtime/samples/each-block-keyed-static/main.html b/test/runtime/samples/each-block-keyed-static/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-static/main.html rename to test/runtime/samples/each-block-keyed-static/main.svelte diff --git a/test/runtime/samples/each-block-keyed-unshift/Nested.html b/test/runtime/samples/each-block-keyed-unshift/Nested.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed-unshift/Nested.html rename to test/runtime/samples/each-block-keyed-unshift/Nested.svelte diff --git a/test/runtime/samples/each-block-keyed-unshift/main.html b/test/runtime/samples/each-block-keyed-unshift/main.svelte similarity index 70% rename from test/runtime/samples/each-block-keyed-unshift/main.html rename to test/runtime/samples/each-block-keyed-unshift/main.svelte index 5af62d4e08..b8954e17fd 100644 --- a/test/runtime/samples/each-block-keyed-unshift/main.html +++ b/test/runtime/samples/each-block-keyed-unshift/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/each-block-keyed/main.html b/test/runtime/samples/each-block-keyed/main.svelte similarity index 100% rename from test/runtime/samples/each-block-keyed/main.html rename to test/runtime/samples/each-block-keyed/main.svelte diff --git a/test/runtime/samples/each-block-random-permute/main.html b/test/runtime/samples/each-block-random-permute/main.svelte similarity index 100% rename from test/runtime/samples/each-block-random-permute/main.html rename to test/runtime/samples/each-block-random-permute/main.svelte diff --git a/test/runtime/samples/each-block-scope-shadow/_config.js b/test/runtime/samples/each-block-scope-shadow/_config.js new file mode 100644 index 0000000000..8005bc93d5 --- /dev/null +++ b/test/runtime/samples/each-block-scope-shadow/_config.js @@ -0,0 +1,3 @@ +export default { + html: '(alpaca)(baboon)(capybara)' +}; diff --git a/test/runtime/samples/each-block-scope-shadow/main.svelte b/test/runtime/samples/each-block-scope-shadow/main.svelte new file mode 100644 index 0000000000..b6c256e14f --- /dev/null +++ b/test/runtime/samples/each-block-scope-shadow/main.svelte @@ -0,0 +1,8 @@ +{#each animals as animal} + ({animal}) +{/each} + + \ No newline at end of file diff --git a/test/runtime/samples/each-block-static/main.html b/test/runtime/samples/each-block-static/main.svelte similarity index 100% rename from test/runtime/samples/each-block-static/main.html rename to test/runtime/samples/each-block-static/main.svelte diff --git a/test/runtime/samples/each-block-text-node/main.html b/test/runtime/samples/each-block-text-node/main.svelte similarity index 100% rename from test/runtime/samples/each-block-text-node/main.html rename to test/runtime/samples/each-block-text-node/main.svelte diff --git a/test/runtime/samples/each-block/main.html b/test/runtime/samples/each-block/main.svelte similarity index 100% rename from test/runtime/samples/each-block/main.html rename to test/runtime/samples/each-block/main.svelte diff --git a/test/runtime/samples/each-blocks-expression/main.html b/test/runtime/samples/each-blocks-expression/main.svelte similarity index 100% rename from test/runtime/samples/each-blocks-expression/main.html rename to test/runtime/samples/each-blocks-expression/main.svelte diff --git a/test/runtime/samples/each-blocks-nested-b/main.html b/test/runtime/samples/each-blocks-nested-b/main.svelte similarity index 100% rename from test/runtime/samples/each-blocks-nested-b/main.html rename to test/runtime/samples/each-blocks-nested-b/main.svelte diff --git a/test/runtime/samples/each-blocks-nested/main.html b/test/runtime/samples/each-blocks-nested/main.svelte similarity index 100% rename from test/runtime/samples/each-blocks-nested/main.html rename to test/runtime/samples/each-blocks-nested/main.svelte diff --git a/test/runtime/samples/element-invalid-name/main.html b/test/runtime/samples/element-invalid-name/main.svelte similarity index 100% rename from test/runtime/samples/element-invalid-name/main.html rename to test/runtime/samples/element-invalid-name/main.svelte diff --git a/test/runtime/samples/element-source-location/Foo.html b/test/runtime/samples/element-source-location/Foo.svelte similarity index 100% rename from test/runtime/samples/element-source-location/Foo.html rename to test/runtime/samples/element-source-location/Foo.svelte diff --git a/test/runtime/samples/element-source-location/_config.js b/test/runtime/samples/element-source-location/_config.js index 7733688f23..61ae36d107 100644 --- a/test/runtime/samples/element-source-location/_config.js +++ b/test/runtime/samples/element-source-location/_config.js @@ -10,14 +10,14 @@ export default { const p = target.querySelector('p'); assert.deepEqual(h1.__svelte_meta.loc, { - file: path.relative(process.cwd(), path.resolve(__dirname, 'main.html')), + file: path.relative(process.cwd(), path.resolve(__dirname, 'main.svelte')), line: 4, column: 0, - char: 51 + char: 53 }); assert.deepEqual(p.__svelte_meta.loc, { - file: path.relative(process.cwd(), path.resolve(__dirname, 'Foo.html')), + file: path.relative(process.cwd(), path.resolve(__dirname, 'Foo.svelte')), line: 1, column: 1, char: 7 diff --git a/test/runtime/samples/element-source-location/main.html b/test/runtime/samples/element-source-location/main.svelte similarity index 54% rename from test/runtime/samples/element-source-location/main.html rename to test/runtime/samples/element-source-location/main.svelte index ca70895728..38855ef3ac 100644 --- a/test/runtime/samples/element-source-location/main.html +++ b/test/runtime/samples/element-source-location/main.svelte @@ -1,5 +1,5 @@

this is a header

diff --git a/test/runtime/samples/empty-style-block/main.html b/test/runtime/samples/empty-style-block/main.svelte similarity index 100% rename from test/runtime/samples/empty-style-block/main.html rename to test/runtime/samples/empty-style-block/main.svelte diff --git a/test/runtime/samples/escape-template-literals/Widget.html b/test/runtime/samples/escape-template-literals/Widget.svelte similarity index 100% rename from test/runtime/samples/escape-template-literals/Widget.html rename to test/runtime/samples/escape-template-literals/Widget.svelte diff --git a/test/runtime/samples/escape-template-literals/main.html b/test/runtime/samples/escape-template-literals/main.svelte similarity index 75% rename from test/runtime/samples/escape-template-literals/main.html rename to test/runtime/samples/escape-template-literals/main.svelte index bfd016de6b..d26aa6ea63 100644 --- a/test/runtime/samples/escape-template-literals/main.html +++ b/test/runtime/samples/escape-template-literals/main.svelte @@ -1,5 +1,5 @@ `${foo}\n` diff --git a/test/runtime/samples/escaped-text/main.html b/test/runtime/samples/escaped-text/main.svelte similarity index 100% rename from test/runtime/samples/escaped-text/main.html rename to test/runtime/samples/escaped-text/main.svelte diff --git a/test/runtime/samples/event-handler-console-log/main.html b/test/runtime/samples/event-handler-console-log/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-console-log/main.html rename to test/runtime/samples/event-handler-console-log/main.svelte diff --git a/test/runtime/samples/event-handler-deconflicted/_config.js b/test/runtime/samples/event-handler-deconflicted/_config.js new file mode 100644 index 0000000000..69151997a0 --- /dev/null +++ b/test/runtime/samples/event-handler-deconflicted/_config.js @@ -0,0 +1,11 @@ +export default { + preserveIdentifiers: true, + + props: { + click_handler: 'x' + }, + + html: ` + + ` +}; diff --git a/test/runtime/samples/event-handler-deconflicted/main.svelte b/test/runtime/samples/event-handler-deconflicted/main.svelte new file mode 100644 index 0000000000..38c923794e --- /dev/null +++ b/test/runtime/samples/event-handler-deconflicted/main.svelte @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/runtime/samples/event-handler-each-context/main.html b/test/runtime/samples/event-handler-each-context/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each-context/main.html rename to test/runtime/samples/event-handler-each-context/main.svelte diff --git a/test/runtime/samples/event-handler-each-deconflicted/main.html b/test/runtime/samples/event-handler-each-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each-deconflicted/main.html rename to test/runtime/samples/event-handler-each-deconflicted/main.svelte diff --git a/test/runtime/samples/event-handler-each-this/main.html b/test/runtime/samples/event-handler-each-this/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each-this/main.html rename to test/runtime/samples/event-handler-each-this/main.svelte diff --git a/test/runtime/samples/event-handler-each/main.html b/test/runtime/samples/event-handler-each/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-each/main.html rename to test/runtime/samples/event-handler-each/main.svelte diff --git a/test/runtime/samples/event-handler-event-methods/main.html b/test/runtime/samples/event-handler-event-methods/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-event-methods/main.html rename to test/runtime/samples/event-handler-event-methods/main.svelte diff --git a/test/runtime/samples/event-handler-hoisted/main.html b/test/runtime/samples/event-handler-hoisted/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-hoisted/main.html rename to test/runtime/samples/event-handler-hoisted/main.svelte diff --git a/test/runtime/samples/event-handler-modifier-once/main.html b/test/runtime/samples/event-handler-modifier-once/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-modifier-once/main.html rename to test/runtime/samples/event-handler-modifier-once/main.svelte diff --git a/test/runtime/samples/event-handler-modifier-prevent-default/main.html b/test/runtime/samples/event-handler-modifier-prevent-default/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-modifier-prevent-default/main.html rename to test/runtime/samples/event-handler-modifier-prevent-default/main.svelte diff --git a/test/runtime/samples/event-handler-modifier-stop-propagation/main.html b/test/runtime/samples/event-handler-modifier-stop-propagation/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-modifier-stop-propagation/main.html rename to test/runtime/samples/event-handler-modifier-stop-propagation/main.svelte diff --git a/test/runtime/samples/event-handler-removal/main.html b/test/runtime/samples/event-handler-removal/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-removal/main.html rename to test/runtime/samples/event-handler-removal/main.svelte diff --git a/test/runtime/samples/event-handler-sanitize/main.html b/test/runtime/samples/event-handler-sanitize/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-sanitize/main.html rename to test/runtime/samples/event-handler-sanitize/main.svelte diff --git a/test/runtime/samples/event-handler-shorthand-component/Widget.html b/test/runtime/samples/event-handler-shorthand-component/Widget.svelte similarity index 100% rename from test/runtime/samples/event-handler-shorthand-component/Widget.html rename to test/runtime/samples/event-handler-shorthand-component/Widget.svelte diff --git a/test/runtime/samples/event-handler-shorthand-component/main.html b/test/runtime/samples/event-handler-shorthand-component/main.html deleted file mode 100644 index 26586d3fd3..0000000000 --- a/test/runtime/samples/event-handler-shorthand-component/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/event-handler-shorthand-component/main.svelte b/test/runtime/samples/event-handler-shorthand-component/main.svelte new file mode 100644 index 0000000000..df21f9e8b8 --- /dev/null +++ b/test/runtime/samples/event-handler-shorthand-component/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.html b/test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.svelte similarity index 100% rename from test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.html rename to test/runtime/samples/event-handler-shorthand-dynamic-component/Widget.svelte diff --git a/test/runtime/samples/event-handler-shorthand-dynamic-component/main.html b/test/runtime/samples/event-handler-shorthand-dynamic-component/main.svelte similarity index 61% rename from test/runtime/samples/event-handler-shorthand-dynamic-component/main.html rename to test/runtime/samples/event-handler-shorthand-dynamic-component/main.svelte index f38a4d30bb..f6c5494ce4 100644 --- a/test/runtime/samples/event-handler-shorthand-dynamic-component/main.html +++ b/test/runtime/samples/event-handler-shorthand-dynamic-component/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/event-handler-this-methods/main.html b/test/runtime/samples/event-handler-this-methods/main.svelte similarity index 100% rename from test/runtime/samples/event-handler-this-methods/main.html rename to test/runtime/samples/event-handler-this-methods/main.svelte diff --git a/test/runtime/samples/event-handler/main.html b/test/runtime/samples/event-handler/main.svelte similarity index 100% rename from test/runtime/samples/event-handler/main.html rename to test/runtime/samples/event-handler/main.svelte diff --git a/test/runtime/samples/flush-before-bindings/Nested.html b/test/runtime/samples/flush-before-bindings/Nested.svelte similarity index 87% rename from test/runtime/samples/flush-before-bindings/Nested.html rename to test/runtime/samples/flush-before-bindings/Nested.svelte index a632b585a8..0a1721d308 100644 --- a/test/runtime/samples/flush-before-bindings/Nested.html +++ b/test/runtime/samples/flush-before-bindings/Nested.svelte @@ -1,5 +1,5 @@ {#if foo} diff --git a/test/runtime/samples/if-block-else-in-each/main.html b/test/runtime/samples/if-block-else-in-each/main.svelte similarity index 100% rename from test/runtime/samples/if-block-else-in-each/main.html rename to test/runtime/samples/if-block-else-in-each/main.svelte diff --git a/test/runtime/samples/if-block-else-partial-outro/Foo.html b/test/runtime/samples/if-block-else-partial-outro/Foo.svelte similarity index 100% rename from test/runtime/samples/if-block-else-partial-outro/Foo.html rename to test/runtime/samples/if-block-else-partial-outro/Foo.svelte diff --git a/test/runtime/samples/if-block-else-partial-outro/main.html b/test/runtime/samples/if-block-else-partial-outro/main.svelte similarity index 73% rename from test/runtime/samples/if-block-else-partial-outro/main.html rename to test/runtime/samples/if-block-else-partial-outro/main.svelte index 90c253c730..47f986ea48 100644 --- a/test/runtime/samples/if-block-else-partial-outro/main.html +++ b/test/runtime/samples/if-block-else-partial-outro/main.svelte @@ -2,7 +2,7 @@ export let y = false; export let x = 'x'; - import Foo from './Foo.html'; + import Foo from './Foo.svelte'; {#if y} diff --git a/test/runtime/samples/if-block-else/main.html b/test/runtime/samples/if-block-else/main.svelte similarity index 100% rename from test/runtime/samples/if-block-else/main.html rename to test/runtime/samples/if-block-else/main.svelte diff --git a/test/runtime/samples/if-block-elseif-no-else/main.html b/test/runtime/samples/if-block-elseif-no-else/main.svelte similarity index 100% rename from test/runtime/samples/if-block-elseif-no-else/main.html rename to test/runtime/samples/if-block-elseif-no-else/main.svelte diff --git a/test/runtime/samples/if-block-elseif-text/main.html b/test/runtime/samples/if-block-elseif-text/main.svelte similarity index 100% rename from test/runtime/samples/if-block-elseif-text/main.html rename to test/runtime/samples/if-block-elseif-text/main.svelte diff --git a/test/runtime/samples/if-block-elseif/main.html b/test/runtime/samples/if-block-elseif/main.svelte similarity index 100% rename from test/runtime/samples/if-block-elseif/main.html rename to test/runtime/samples/if-block-elseif/main.svelte diff --git a/test/runtime/samples/if-block-expression/main.html b/test/runtime/samples/if-block-expression/main.svelte similarity index 100% rename from test/runtime/samples/if-block-expression/main.html rename to test/runtime/samples/if-block-expression/main.svelte diff --git a/test/runtime/samples/if-block-first/main.html b/test/runtime/samples/if-block-first/main.svelte similarity index 100% rename from test/runtime/samples/if-block-first/main.html rename to test/runtime/samples/if-block-first/main.svelte diff --git a/test/runtime/samples/if-block-no-outro-else-with-outro/Widget.html b/test/runtime/samples/if-block-no-outro-else-with-outro/Widget.svelte similarity index 100% rename from test/runtime/samples/if-block-no-outro-else-with-outro/Widget.html rename to test/runtime/samples/if-block-no-outro-else-with-outro/Widget.svelte diff --git a/test/runtime/samples/if-block-no-outro-else-with-outro/main.html b/test/runtime/samples/if-block-no-outro-else-with-outro/main.svelte similarity index 77% rename from test/runtime/samples/if-block-no-outro-else-with-outro/main.html rename to test/runtime/samples/if-block-no-outro-else-with-outro/main.svelte index 2007bf2ea2..e32a7a52cb 100644 --- a/test/runtime/samples/if-block-no-outro-else-with-outro/main.html +++ b/test/runtime/samples/if-block-no-outro-else-with-outro/main.svelte @@ -2,7 +2,7 @@ export let foo; export let x = 'x'; - import Widget from './Widget.html'; + import Widget from './Widget.svelte'; {#if foo} diff --git a/test/runtime/samples/if-block-or/main.html b/test/runtime/samples/if-block-or/main.svelte similarity index 100% rename from test/runtime/samples/if-block-or/main.html rename to test/runtime/samples/if-block-or/main.svelte diff --git a/test/runtime/samples/if-block-outro-nested-else/Component.html b/test/runtime/samples/if-block-outro-nested-else/Component.svelte similarity index 100% rename from test/runtime/samples/if-block-outro-nested-else/Component.html rename to test/runtime/samples/if-block-outro-nested-else/Component.svelte diff --git a/test/runtime/samples/if-block-outro-nested-else/main.html b/test/runtime/samples/if-block-outro-nested-else/main.svelte similarity index 73% rename from test/runtime/samples/if-block-outro-nested-else/main.html rename to test/runtime/samples/if-block-outro-nested-else/main.svelte index c10f861a6c..3937998c40 100644 --- a/test/runtime/samples/if-block-outro-nested-else/main.html +++ b/test/runtime/samples/if-block-outro-nested-else/main.svelte @@ -1,7 +1,7 @@ {#if foo} diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/Component.html b/test/runtime/samples/if-block-outro-unique-select-block-type/Component.svelte similarity index 100% rename from test/runtime/samples/if-block-outro-unique-select-block-type/Component.html rename to test/runtime/samples/if-block-outro-unique-select-block-type/Component.svelte diff --git a/test/runtime/samples/if-block-outro-unique-select-block-type/main.html b/test/runtime/samples/if-block-outro-unique-select-block-type/main.svelte similarity index 76% rename from test/runtime/samples/if-block-outro-unique-select-block-type/main.html rename to test/runtime/samples/if-block-outro-unique-select-block-type/main.svelte index 77b3a6dfe3..0579a562eb 100644 --- a/test/runtime/samples/if-block-outro-unique-select-block-type/main.html +++ b/test/runtime/samples/if-block-outro-unique-select-block-type/main.svelte @@ -1,7 +1,7 @@ {#if foo} diff --git a/test/runtime/samples/if-block-widget/Widget.html b/test/runtime/samples/if-block-widget/Widget.svelte similarity index 100% rename from test/runtime/samples/if-block-widget/Widget.html rename to test/runtime/samples/if-block-widget/Widget.svelte diff --git a/test/runtime/samples/if-block-widget/main.html b/test/runtime/samples/if-block-widget/main.svelte similarity index 69% rename from test/runtime/samples/if-block-widget/main.html rename to test/runtime/samples/if-block-widget/main.svelte index 12996bbcd4..fef00e276c 100644 --- a/test/runtime/samples/if-block-widget/main.html +++ b/test/runtime/samples/if-block-widget/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/if-block/main.html b/test/runtime/samples/if-block/main.svelte similarity index 100% rename from test/runtime/samples/if-block/main.html rename to test/runtime/samples/if-block/main.svelte diff --git a/test/runtime/samples/if-in-keyed-each/main.html b/test/runtime/samples/if-in-keyed-each/main.svelte similarity index 100% rename from test/runtime/samples/if-in-keyed-each/main.html rename to test/runtime/samples/if-in-keyed-each/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-attribute-compound/main.html b/test/runtime/samples/ignore-unchanged-attribute-compound/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-attribute-compound/main.html rename to test/runtime/samples/ignore-unchanged-attribute-compound/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-attribute/main.html b/test/runtime/samples/ignore-unchanged-attribute/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-attribute/main.html rename to test/runtime/samples/ignore-unchanged-attribute/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-raw/main.html b/test/runtime/samples/ignore-unchanged-raw/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-raw/main.html rename to test/runtime/samples/ignore-unchanged-raw/main.svelte diff --git a/test/runtime/samples/ignore-unchanged-tag/main.html b/test/runtime/samples/ignore-unchanged-tag/main.svelte similarity index 100% rename from test/runtime/samples/ignore-unchanged-tag/main.html rename to test/runtime/samples/ignore-unchanged-tag/main.svelte diff --git a/test/runtime/samples/immutable-nested/Nested.html b/test/runtime/samples/immutable-nested/Nested.svelte similarity index 100% rename from test/runtime/samples/immutable-nested/Nested.html rename to test/runtime/samples/immutable-nested/Nested.svelte diff --git a/test/runtime/samples/immutable-nested/main.html b/test/runtime/samples/immutable-nested/main.svelte similarity index 68% rename from test/runtime/samples/immutable-nested/main.html rename to test/runtime/samples/immutable-nested/main.svelte index aa8efa9ebc..e50055be0c 100644 --- a/test/runtime/samples/immutable-nested/main.html +++ b/test/runtime/samples/immutable-nested/main.svelte @@ -1,7 +1,7 @@
diff --git a/test/runtime/samples/immutable-option/_config.js b/test/runtime/samples/immutable-option/_config.js new file mode 100644 index 0000000000..0aaa742fbe --- /dev/null +++ b/test/runtime/samples/immutable-option/_config.js @@ -0,0 +1,10 @@ +export default { + immutable: true, + + html: `

Called 1 times.

`, + + test({ assert, component, target }) { + component.foo = component.foo; + assert.htmlEqual(target.innerHTML, `

Called 1 times.

`); + } +}; diff --git a/test/runtime/samples/immutable-root/main.html b/test/runtime/samples/immutable-option/main.svelte similarity index 78% rename from test/runtime/samples/immutable-root/main.html rename to test/runtime/samples/immutable-option/main.svelte index 85c31ae989..cd0cfbcc95 100644 --- a/test/runtime/samples/immutable-root/main.html +++ b/test/runtime/samples/immutable-option/main.svelte @@ -1,6 +1,8 @@
diff --git a/test/runtime/samples/immutable-root/_config.js b/test/runtime/samples/immutable-root/_config.js deleted file mode 100644 index 174dbb808b..0000000000 --- a/test/runtime/samples/immutable-root/_config.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - immutable: true, - html: `

Called 0 times.

`, - - test({ assert, component, target, window }) { - component.$on('state', ({ changed }) => { - if (changed.foo) { - component.count = component.count + 1; - } - }); - - assert.htmlEqual(target.innerHTML, `

Called 0 times.

`); - - component.foo = component.foo; - assert.htmlEqual(target.innerHTML, `

Called 0 times.

`); - } -}; diff --git a/test/runtime/samples/immutable-svelte-meta-false/_config.js b/test/runtime/samples/immutable-svelte-meta-false/_config.js new file mode 100644 index 0000000000..933c151d6b --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta-false/_config.js @@ -0,0 +1,10 @@ +export default { + immutable: true, + + html: `

Called 1 times.

`, + + test({ assert, component, target }) { + component.foo = component.foo; + assert.htmlEqual(target.innerHTML, `

Called 2 times.

`); + } +}; diff --git a/test/runtime/samples/immutable-svelte-meta-false/main.svelte b/test/runtime/samples/immutable-svelte-meta-false/main.svelte new file mode 100644 index 0000000000..861260404b --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta-false/main.svelte @@ -0,0 +1,12 @@ + + + + +
+

Called {count} times.

+
diff --git a/test/runtime/samples/immutable-svelte-meta/_config.js b/test/runtime/samples/immutable-svelte-meta/_config.js new file mode 100644 index 0000000000..9bd32dbd11 --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta/_config.js @@ -0,0 +1,8 @@ +export default { + html: `

Called 1 times.

`, + + test({ assert, component, target }) { + component.foo = component.foo; + assert.htmlEqual(target.innerHTML, `

Called 1 times.

`); + } +}; diff --git a/test/runtime/samples/immutable-svelte-meta/main.svelte b/test/runtime/samples/immutable-svelte-meta/main.svelte new file mode 100644 index 0000000000..49ae354cb3 --- /dev/null +++ b/test/runtime/samples/immutable-svelte-meta/main.svelte @@ -0,0 +1,12 @@ + + + + +
+

Called {count} times.

+
diff --git a/test/runtime/samples/imported-renamed-components/ComponentOne.html b/test/runtime/samples/imported-renamed-components/ComponentOne.svelte similarity index 100% rename from test/runtime/samples/imported-renamed-components/ComponentOne.html rename to test/runtime/samples/imported-renamed-components/ComponentOne.svelte diff --git a/test/runtime/samples/imported-renamed-components/ComponentTwo.html b/test/runtime/samples/imported-renamed-components/ComponentTwo.svelte similarity index 100% rename from test/runtime/samples/imported-renamed-components/ComponentTwo.html rename to test/runtime/samples/imported-renamed-components/ComponentTwo.svelte diff --git a/test/runtime/samples/imported-renamed-components/main.html b/test/runtime/samples/imported-renamed-components/main.svelte similarity index 59% rename from test/runtime/samples/imported-renamed-components/main.html rename to test/runtime/samples/imported-renamed-components/main.svelte index 9c6efdb230..9055a9e9a5 100644 --- a/test/runtime/samples/imported-renamed-components/main.html +++ b/test/runtime/samples/imported-renamed-components/main.svelte @@ -1,6 +1,6 @@ - - - - \ No newline at end of file diff --git a/test/runtime/samples/internal-state/main.svelte b/test/runtime/samples/internal-state/main.svelte new file mode 100644 index 0000000000..594ab3c837 --- /dev/null +++ b/test/runtime/samples/internal-state/main.svelte @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/test/runtime/samples/lifecycle-events/main.html b/test/runtime/samples/lifecycle-events/main.svelte similarity index 100% rename from test/runtime/samples/lifecycle-events/main.html rename to test/runtime/samples/lifecycle-events/main.svelte diff --git a/test/runtime/samples/lifecycle-next-tick/_config.js b/test/runtime/samples/lifecycle-next-tick/_config.js new file mode 100644 index 0000000000..35a66f7a09 --- /dev/null +++ b/test/runtime/samples/lifecycle-next-tick/_config.js @@ -0,0 +1,30 @@ +export default { + async test({ assert, component, target, window }) { + const buttons = target.querySelectorAll('button'); + const click = new window.MouseEvent('click'); + + await buttons[0].dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1' + ]); + + await buttons[0].dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1', + 'before 1', + 'after 2' + ]); + + await buttons[1].dispatchEvent(click); + assert.deepEqual(component.snapshots, [ + 'before 0', + 'after 1', + 'before 1', + 'after 2', + 'before 2', + 'after 2' + ]); + } +}; diff --git a/test/runtime/samples/lifecycle-next-tick/main.svelte b/test/runtime/samples/lifecycle-next-tick/main.svelte new file mode 100644 index 0000000000..0c577c20e8 --- /dev/null +++ b/test/runtime/samples/lifecycle-next-tick/main.svelte @@ -0,0 +1,24 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/lifecycle-render-order/main.html b/test/runtime/samples/lifecycle-render-order/main.svelte similarity index 100% rename from test/runtime/samples/lifecycle-render-order/main.html rename to test/runtime/samples/lifecycle-render-order/main.svelte diff --git a/test/runtime/samples/module-context-with-instance-script/_config.js b/test/runtime/samples/module-context-with-instance-script/_config.js new file mode 100644 index 0000000000..902501fdd4 --- /dev/null +++ b/test/runtime/samples/module-context-with-instance-script/_config.js @@ -0,0 +1,3 @@ +export default { + html: `

(42)(99)

` +}; \ No newline at end of file diff --git a/test/runtime/samples/module-context-with-instance-script/main.svelte b/test/runtime/samples/module-context-with-instance-script/main.svelte new file mode 100644 index 0000000000..8769beaf3e --- /dev/null +++ b/test/runtime/samples/module-context-with-instance-script/main.svelte @@ -0,0 +1,9 @@ + + + + +

({foo})({bar})

\ No newline at end of file diff --git a/test/runtime/samples/module-context/main.html b/test/runtime/samples/module-context/main.svelte similarity index 100% rename from test/runtime/samples/module-context/main.html rename to test/runtime/samples/module-context/main.svelte diff --git a/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js b/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js new file mode 100644 index 0000000000..038db6dbbb --- /dev/null +++ b/test/runtime/samples/mutation-tracking-across-sibling-scopes/_config.js @@ -0,0 +1,12 @@ +export default { + async test({ assert, component, target }) { + assert.htmlEqual(component.div.innerHTML, '
+
-
'); + + const event = new window.Event('change'); + const input = target.querySelector('input'); + input.checked = false; + await input.dispatchEvent(event); + + assert.htmlEqual(component.div.innerHTML, '
-
-
'); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.svelte b/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.svelte new file mode 100644 index 0000000000..9ed06657d7 --- /dev/null +++ b/test/runtime/samples/mutation-tracking-across-sibling-scopes/main.svelte @@ -0,0 +1,18 @@ +{#each things as thing} +
+ +
+{/each} + +
+ {#each things as other} +
+ {other.ok ? '+' : '-'} +
+ {/each} +
+ + \ No newline at end of file diff --git a/test/runtime/samples/names-deconflicted-nested/main.html b/test/runtime/samples/names-deconflicted-nested/main.svelte similarity index 100% rename from test/runtime/samples/names-deconflicted-nested/main.html rename to test/runtime/samples/names-deconflicted-nested/main.svelte diff --git a/test/runtime/samples/names-deconflicted/Widget.html b/test/runtime/samples/names-deconflicted/Widget.svelte similarity index 100% rename from test/runtime/samples/names-deconflicted/Widget.html rename to test/runtime/samples/names-deconflicted/Widget.svelte diff --git a/test/runtime/samples/names-deconflicted/main.html b/test/runtime/samples/names-deconflicted/main.svelte similarity index 82% rename from test/runtime/samples/names-deconflicted/main.html rename to test/runtime/samples/names-deconflicted/main.svelte index f2c47a7718..60e3ea1320 100644 --- a/test/runtime/samples/names-deconflicted/main.html +++ b/test/runtime/samples/names-deconflicted/main.svelte @@ -1,5 +1,5 @@ - - \ No newline at end of file diff --git a/test/runtime/samples/nested-transition-detach-if-false/main.svelte b/test/runtime/samples/nested-transition-detach-if-false/main.svelte new file mode 100644 index 0000000000..2a7a4b49bf --- /dev/null +++ b/test/runtime/samples/nested-transition-detach-if-false/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/Span.html b/test/runtime/samples/nested-transition-if-block-not-remounted/Span.svelte similarity index 100% rename from test/runtime/samples/nested-transition-if-block-not-remounted/Span.html rename to test/runtime/samples/nested-transition-if-block-not-remounted/Span.svelte diff --git a/test/runtime/samples/nested-transition-if-block-not-remounted/main.html b/test/runtime/samples/nested-transition-if-block-not-remounted/main.svelte similarity index 75% rename from test/runtime/samples/nested-transition-if-block-not-remounted/main.html rename to test/runtime/samples/nested-transition-if-block-not-remounted/main.svelte index 373d3d0485..e6456a86f6 100644 --- a/test/runtime/samples/nested-transition-if-block-not-remounted/main.html +++ b/test/runtime/samples/nested-transition-if-block-not-remounted/main.svelte @@ -1,7 +1,7 @@
diff --git a/test/runtime/samples/noscript-removal/main.html b/test/runtime/samples/noscript-removal/main.svelte similarity index 100% rename from test/runtime/samples/noscript-removal/main.html rename to test/runtime/samples/noscript-removal/main.svelte diff --git a/test/runtime/samples/ondestroy-before-cleanup/Top.html b/test/runtime/samples/ondestroy-before-cleanup/Top.svelte similarity index 100% rename from test/runtime/samples/ondestroy-before-cleanup/Top.html rename to test/runtime/samples/ondestroy-before-cleanup/Top.svelte diff --git a/test/runtime/samples/ondestroy-before-cleanup/main.html b/test/runtime/samples/ondestroy-before-cleanup/main.svelte similarity index 74% rename from test/runtime/samples/ondestroy-before-cleanup/main.html rename to test/runtime/samples/ondestroy-before-cleanup/main.svelte index 34053dd613..efd940053e 100644 --- a/test/runtime/samples/ondestroy-before-cleanup/main.html +++ b/test/runtime/samples/ondestroy-before-cleanup/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/onmount-fires-when-ready-nested/Widget.html b/test/runtime/samples/onmount-fires-when-ready-nested/Widget.svelte similarity index 100% rename from test/runtime/samples/onmount-fires-when-ready-nested/Widget.html rename to test/runtime/samples/onmount-fires-when-ready-nested/Widget.svelte diff --git a/test/runtime/samples/onmount-fires-when-ready-nested/main.html b/test/runtime/samples/onmount-fires-when-ready-nested/main.html deleted file mode 100644 index 910f63e086..0000000000 --- a/test/runtime/samples/onmount-fires-when-ready-nested/main.html +++ /dev/null @@ -1,9 +0,0 @@ - - -
- - -
diff --git a/test/runtime/samples/onmount-fires-when-ready-nested/main.svelte b/test/runtime/samples/onmount-fires-when-ready-nested/main.svelte new file mode 100644 index 0000000000..a155293e26 --- /dev/null +++ b/test/runtime/samples/onmount-fires-when-ready-nested/main.svelte @@ -0,0 +1,9 @@ + + +
+ + +
diff --git a/test/runtime/samples/onmount-fires-when-ready/Widget.html b/test/runtime/samples/onmount-fires-when-ready/Widget.svelte similarity index 100% rename from test/runtime/samples/onmount-fires-when-ready/Widget.html rename to test/runtime/samples/onmount-fires-when-ready/Widget.svelte diff --git a/test/runtime/samples/onmount-fires-when-ready/main.html b/test/runtime/samples/onmount-fires-when-ready/main.svelte similarity index 70% rename from test/runtime/samples/onmount-fires-when-ready/main.html rename to test/runtime/samples/onmount-fires-when-ready/main.svelte index f2760ecff1..1204ac6719 100644 --- a/test/runtime/samples/onmount-fires-when-ready/main.html +++ b/test/runtime/samples/onmount-fires-when-ready/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/onmount-sibling-order/Nested.html b/test/runtime/samples/onmount-sibling-order/Nested.svelte similarity index 100% rename from test/runtime/samples/onmount-sibling-order/Nested.html rename to test/runtime/samples/onmount-sibling-order/Nested.svelte diff --git a/test/runtime/samples/onmount-sibling-order/main.html b/test/runtime/samples/onmount-sibling-order/main.html deleted file mode 100644 index e4218aa4b4..0000000000 --- a/test/runtime/samples/onmount-sibling-order/main.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/test/runtime/samples/onmount-sibling-order/main.svelte b/test/runtime/samples/onmount-sibling-order/main.svelte new file mode 100644 index 0000000000..3fbf499755 --- /dev/null +++ b/test/runtime/samples/onmount-sibling-order/main.svelte @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/runtime/samples/option-without-select/main.html b/test/runtime/samples/option-without-select/main.svelte similarity index 100% rename from test/runtime/samples/option-without-select/main.html rename to test/runtime/samples/option-without-select/main.svelte diff --git a/test/runtime/samples/paren-wrapped-expressions/main.html b/test/runtime/samples/paren-wrapped-expressions/main.svelte similarity index 100% rename from test/runtime/samples/paren-wrapped-expressions/main.html rename to test/runtime/samples/paren-wrapped-expressions/main.svelte diff --git a/test/runtime/samples/preload/main.html b/test/runtime/samples/preload/main.svelte similarity index 100% rename from test/runtime/samples/preload/main.html rename to test/runtime/samples/preload/main.svelte diff --git a/test/runtime/samples/prop-not-action/Nested.svelte b/test/runtime/samples/prop-not-action/Nested.svelte new file mode 100644 index 0000000000..b1029d2ad5 --- /dev/null +++ b/test/runtime/samples/prop-not-action/Nested.svelte @@ -0,0 +1 @@ +

Hello {user.name}!

\ No newline at end of file diff --git a/test/runtime/samples/prop-not-action/_config.js b/test/runtime/samples/prop-not-action/_config.js new file mode 100644 index 0000000000..17ab47b584 --- /dev/null +++ b/test/runtime/samples/prop-not-action/_config.js @@ -0,0 +1,9 @@ +export default { + props: { + currentUser: { name: 'world' } + }, + + html: ` +

Hello world!

+ ` +}; \ No newline at end of file diff --git a/test/runtime/samples/prop-not-action/main.svelte b/test/runtime/samples/prop-not-action/main.svelte new file mode 100644 index 0000000000..e1c40bc070 --- /dev/null +++ b/test/runtime/samples/prop-not-action/main.svelte @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/prop-without-semicolon-b/_config.js b/test/runtime/samples/prop-without-semicolon-b/_config.js new file mode 100644 index 0000000000..7104dc2b2d --- /dev/null +++ b/test/runtime/samples/prop-without-semicolon-b/_config.js @@ -0,0 +1,7 @@ +export default { + props: { + name: 'world' + }, + + html: `

Hello world!

` +}; \ No newline at end of file diff --git a/test/runtime/samples/prop-without-semicolon-b/main.svelte b/test/runtime/samples/prop-without-semicolon-b/main.svelte new file mode 100644 index 0000000000..671fb95186 --- /dev/null +++ b/test/runtime/samples/prop-without-semicolon-b/main.svelte @@ -0,0 +1,6 @@ +

Hello {name}!

+ + \ No newline at end of file diff --git a/test/runtime/samples/prop-without-semicolon/main.html b/test/runtime/samples/prop-without-semicolon/main.svelte similarity index 100% rename from test/runtime/samples/prop-without-semicolon/main.html rename to test/runtime/samples/prop-without-semicolon/main.svelte diff --git a/test/runtime/samples/props-excludes-external/RenderProps.svelte b/test/runtime/samples/props-excludes-external/RenderProps.svelte new file mode 100644 index 0000000000..ef9cb989cf --- /dev/null +++ b/test/runtime/samples/props-excludes-external/RenderProps.svelte @@ -0,0 +1,7 @@ + + + + +

{JSON.stringify(props)}

\ No newline at end of file diff --git a/test/runtime/samples/props-excludes-external/_config.js b/test/runtime/samples/props-excludes-external/_config.js new file mode 100644 index 0000000000..fc3c71d6f0 --- /dev/null +++ b/test/runtime/samples/props-excludes-external/_config.js @@ -0,0 +1,17 @@ +export default { + props: { + x: 1 + }, + + html: ` +

{"x":1}

+ `, + + test({ assert, component, target }) { + component.x = 2; + + assert.htmlEqual(target.innerHTML, ` +

{"x":2}

+ `); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/props-excludes-external/main.svelte b/test/runtime/samples/props-excludes-external/main.svelte new file mode 100644 index 0000000000..4a04faf348 --- /dev/null +++ b/test/runtime/samples/props-excludes-external/main.svelte @@ -0,0 +1,9 @@ + + + +

some (unused) slotted content, to create an internal prop

+
\ No newline at end of file diff --git a/test/runtime/samples/props-implicit/_config.js b/test/runtime/samples/props-implicit/_config.js new file mode 100644 index 0000000000..354aa1bcee --- /dev/null +++ b/test/runtime/samples/props-implicit/_config.js @@ -0,0 +1,17 @@ +export default { + props: { + x: 1 + }, + + html: ` +
{"x":1}
+ `, + + async test({ assert, component, target }) { + await component.$set({ x: 2 }); + + assert.htmlEqual(target.innerHTML, ` +
{"x":2}
+ `); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/props-implicit/main.svelte b/test/runtime/samples/props-implicit/main.svelte new file mode 100644 index 0000000000..0beafd3f07 --- /dev/null +++ b/test/runtime/samples/props-implicit/main.svelte @@ -0,0 +1,3 @@ + + +
{JSON.stringify(foo)}
\ No newline at end of file diff --git a/test/runtime/samples/props-undeclared/_config.js b/test/runtime/samples/props-undeclared/_config.js new file mode 100644 index 0000000000..e7d09b76bf --- /dev/null +++ b/test/runtime/samples/props-undeclared/_config.js @@ -0,0 +1,3 @@ +export default { + error: `'foo' is not defined` +}; \ No newline at end of file diff --git a/test/runtime/samples/props-undeclared/main.svelte b/test/runtime/samples/props-undeclared/main.svelte new file mode 100644 index 0000000000..a05b8985a6 --- /dev/null +++ b/test/runtime/samples/props-undeclared/main.svelte @@ -0,0 +1,5 @@ + + + + +
{JSON.stringify(foo)}
\ No newline at end of file diff --git a/test/runtime/samples/raw-anchor-first-child/main.html b/test/runtime/samples/raw-anchor-first-child/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-first-child/main.html rename to test/runtime/samples/raw-anchor-first-child/main.svelte diff --git a/test/runtime/samples/raw-anchor-first-last-child/main.html b/test/runtime/samples/raw-anchor-first-last-child/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-first-last-child/main.html rename to test/runtime/samples/raw-anchor-first-last-child/main.svelte diff --git a/test/runtime/samples/raw-anchor-last-child/main.html b/test/runtime/samples/raw-anchor-last-child/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-last-child/main.html rename to test/runtime/samples/raw-anchor-last-child/main.svelte diff --git a/test/runtime/samples/raw-anchor-next-previous-sibling/main.html b/test/runtime/samples/raw-anchor-next-previous-sibling/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-next-previous-sibling/main.html rename to test/runtime/samples/raw-anchor-next-previous-sibling/main.svelte diff --git a/test/runtime/samples/raw-anchor-next-sibling/main.html b/test/runtime/samples/raw-anchor-next-sibling/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-next-sibling/main.html rename to test/runtime/samples/raw-anchor-next-sibling/main.svelte diff --git a/test/runtime/samples/raw-anchor-previous-sibling/main.html b/test/runtime/samples/raw-anchor-previous-sibling/main.svelte similarity index 100% rename from test/runtime/samples/raw-anchor-previous-sibling/main.html rename to test/runtime/samples/raw-anchor-previous-sibling/main.svelte diff --git a/test/runtime/samples/raw-mustaches-preserved/main.html b/test/runtime/samples/raw-mustaches-preserved/main.svelte similarity index 100% rename from test/runtime/samples/raw-mustaches-preserved/main.html rename to test/runtime/samples/raw-mustaches-preserved/main.svelte diff --git a/test/runtime/samples/raw-mustaches/main.html b/test/runtime/samples/raw-mustaches/main.svelte similarity index 100% rename from test/runtime/samples/raw-mustaches/main.html rename to test/runtime/samples/raw-mustaches/main.svelte diff --git a/test/runtime/samples/reactive-function/main.html b/test/runtime/samples/reactive-function/main.svelte similarity index 100% rename from test/runtime/samples/reactive-function/main.html rename to test/runtime/samples/reactive-function/main.svelte diff --git a/test/runtime/samples/reactive-values-deconflicted/main.html b/test/runtime/samples/reactive-values-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-deconflicted/main.html rename to test/runtime/samples/reactive-values-deconflicted/main.svelte diff --git a/test/runtime/samples/reactive-values-function-dependency/main.html b/test/runtime/samples/reactive-values-function-dependency/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-function-dependency/main.html rename to test/runtime/samples/reactive-values-function-dependency/main.svelte diff --git a/test/runtime/samples/reactive-values-implicit/_config.js b/test/runtime/samples/reactive-values-implicit/_config.js new file mode 100644 index 0000000000..fae6f9e701 --- /dev/null +++ b/test/runtime/samples/reactive-values-implicit/_config.js @@ -0,0 +1,14 @@ +export default { + html: ` +

1 + 2 = 3

+

3 * 3 = 9

+ `, + + test({ assert, component, target }) { + component.a = 3; + assert.htmlEqual(target.innerHTML, ` +

3 + 2 = 5

+

5 * 5 = 25

+ `); + } +}; diff --git a/test/runtime/samples/reactive-values-implicit/main.svelte b/test/runtime/samples/reactive-values-implicit/main.svelte new file mode 100644 index 0000000000..745ba643e1 --- /dev/null +++ b/test/runtime/samples/reactive-values-implicit/main.svelte @@ -0,0 +1,10 @@ + + +

{a} + {b} = {c}

+

{c} * {c} = {cSquared}

\ No newline at end of file diff --git a/test/runtime/samples/reactive-values-non-cyclical/_config.js b/test/runtime/samples/reactive-values-non-cyclical/_config.js new file mode 100644 index 0000000000..e134a669ee --- /dev/null +++ b/test/runtime/samples/reactive-values-non-cyclical/_config.js @@ -0,0 +1,17 @@ +export default { + props: { + x: 42 + }, + + html: ` +

42 42

+ `, + + test({ assert, component, target }) { + component.x = 43; + + assert.htmlEqual(target.innerHTML, ` +

43 43

+ `); + } +}; diff --git a/test/runtime/samples/reactive-values-non-cyclical/main.svelte b/test/runtime/samples/reactive-values-non-cyclical/main.svelte new file mode 100644 index 0000000000..061a38857a --- /dev/null +++ b/test/runtime/samples/reactive-values-non-cyclical/main.svelte @@ -0,0 +1,13 @@ + + +

{a} {b}

\ No newline at end of file diff --git a/test/runtime/samples/reactive-values-readonly/_config.js b/test/runtime/samples/reactive-values-readonly/_config.js new file mode 100644 index 0000000000..bf5c9dbb67 --- /dev/null +++ b/test/runtime/samples/reactive-values-readonly/_config.js @@ -0,0 +1,21 @@ +export default { + html: ` +

doubled: 2

+ `, + + test({ assert, component, target }) { + component.a = 2; + + assert.equal(component.doubled, 4); + assert.htmlEqual(target.innerHTML, ` +

doubled: 4

+ `); + + component.doubled = 6; + + assert.equal(component.doubled, 4); + assert.htmlEqual(target.innerHTML, ` +

doubled: 4

+ `); + } +}; diff --git a/test/runtime/samples/reactive-values-readonly/main.svelte b/test/runtime/samples/reactive-values-readonly/main.svelte new file mode 100644 index 0000000000..bb49c3ad94 --- /dev/null +++ b/test/runtime/samples/reactive-values-readonly/main.svelte @@ -0,0 +1,8 @@ + + +

doubled: {doubled}

\ No newline at end of file diff --git a/test/runtime/samples/reactive-values-second-order/main.html b/test/runtime/samples/reactive-values-second-order/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-second-order/main.html rename to test/runtime/samples/reactive-values-second-order/main.svelte diff --git a/test/runtime/samples/reactive-values-self-dependency/main.html b/test/runtime/samples/reactive-values-self-dependency/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values-self-dependency/main.html rename to test/runtime/samples/reactive-values-self-dependency/main.svelte diff --git a/test/runtime/samples/reactive-values/main.html b/test/runtime/samples/reactive-values/main.svelte similarity index 100% rename from test/runtime/samples/reactive-values/main.html rename to test/runtime/samples/reactive-values/main.svelte diff --git a/test/runtime/samples/script-style-non-top-level/main.html b/test/runtime/samples/script-style-non-top-level/main.svelte similarity index 100% rename from test/runtime/samples/script-style-non-top-level/main.html rename to test/runtime/samples/script-style-non-top-level/main.svelte diff --git a/test/runtime/samples/select-bind-array/main.html b/test/runtime/samples/select-bind-array/main.svelte similarity index 100% rename from test/runtime/samples/select-bind-array/main.html rename to test/runtime/samples/select-bind-array/main.svelte diff --git a/test/runtime/samples/select-bind-in-array/main.html b/test/runtime/samples/select-bind-in-array/main.svelte similarity index 100% rename from test/runtime/samples/select-bind-in-array/main.html rename to test/runtime/samples/select-bind-in-array/main.svelte diff --git a/test/runtime/samples/select-change-handler/main.html b/test/runtime/samples/select-change-handler/main.svelte similarity index 100% rename from test/runtime/samples/select-change-handler/main.html rename to test/runtime/samples/select-change-handler/main.svelte diff --git a/test/runtime/samples/select-no-whitespace/main.html b/test/runtime/samples/select-no-whitespace/main.svelte similarity index 100% rename from test/runtime/samples/select-no-whitespace/main.html rename to test/runtime/samples/select-no-whitespace/main.svelte diff --git a/test/runtime/samples/select-one-way-bind-object/main.html b/test/runtime/samples/select-one-way-bind-object/main.svelte similarity index 100% rename from test/runtime/samples/select-one-way-bind-object/main.html rename to test/runtime/samples/select-one-way-bind-object/main.svelte diff --git a/test/runtime/samples/select-one-way-bind/main.html b/test/runtime/samples/select-one-way-bind/main.svelte similarity index 100% rename from test/runtime/samples/select-one-way-bind/main.html rename to test/runtime/samples/select-one-way-bind/main.svelte diff --git a/test/runtime/samples/select-props/main.html b/test/runtime/samples/select-props/main.svelte similarity index 100% rename from test/runtime/samples/select-props/main.html rename to test/runtime/samples/select-props/main.svelte diff --git a/test/runtime/samples/select/main.html b/test/runtime/samples/select/main.svelte similarity index 100% rename from test/runtime/samples/select/main.html rename to test/runtime/samples/select/main.svelte diff --git a/test/runtime/samples/self-reference-tree/main.html b/test/runtime/samples/self-reference-tree/main.svelte similarity index 100% rename from test/runtime/samples/self-reference-tree/main.html rename to test/runtime/samples/self-reference-tree/main.svelte diff --git a/test/runtime/samples/self-reference/main.html b/test/runtime/samples/self-reference/main.svelte similarity index 100% rename from test/runtime/samples/self-reference/main.html rename to test/runtime/samples/self-reference/main.svelte diff --git a/test/runtime/samples/set-after-destroy/main.html b/test/runtime/samples/set-after-destroy/main.svelte similarity index 100% rename from test/runtime/samples/set-after-destroy/main.html rename to test/runtime/samples/set-after-destroy/main.svelte diff --git a/test/runtime/samples/set-in-oncreate/main.html b/test/runtime/samples/set-in-oncreate/main.svelte similarity index 100% rename from test/runtime/samples/set-in-oncreate/main.html rename to test/runtime/samples/set-in-oncreate/main.svelte diff --git a/test/runtime/samples/set-in-onstate-dedupes-renders/Widget.html b/test/runtime/samples/set-in-onstate-dedupes-renders/Widget.svelte similarity index 100% rename from test/runtime/samples/set-in-onstate-dedupes-renders/Widget.html rename to test/runtime/samples/set-in-onstate-dedupes-renders/Widget.svelte diff --git a/test/runtime/samples/set-in-onstate-dedupes-renders/main.html b/test/runtime/samples/set-in-onstate-dedupes-renders/main.svelte similarity index 83% rename from test/runtime/samples/set-in-onstate-dedupes-renders/main.html rename to test/runtime/samples/set-in-onstate-dedupes-renders/main.svelte index d6fe905c3b..cf87944bb8 100644 --- a/test/runtime/samples/set-in-onstate-dedupes-renders/main.html +++ b/test/runtime/samples/set-in-onstate-dedupes-renders/main.svelte @@ -1,7 +1,7 @@ diff --git a/test/runtime/samples/sigil-static-#/main.html b/test/runtime/samples/sigil-static-#/main.svelte similarity index 100% rename from test/runtime/samples/sigil-static-#/main.html rename to test/runtime/samples/sigil-static-#/main.svelte diff --git a/test/runtime/samples/sigil-static-@/main.html b/test/runtime/samples/sigil-static-@/main.svelte similarity index 100% rename from test/runtime/samples/sigil-static-@/main.html rename to test/runtime/samples/sigil-static-@/main.svelte diff --git a/test/runtime/samples/single-static-element/main.html b/test/runtime/samples/single-static-element/main.svelte similarity index 100% rename from test/runtime/samples/single-static-element/main.html rename to test/runtime/samples/single-static-element/main.svelte diff --git a/test/runtime/samples/single-text-node/main.html b/test/runtime/samples/single-text-node/main.svelte similarity index 100% rename from test/runtime/samples/single-text-node/main.html rename to test/runtime/samples/single-text-node/main.svelte diff --git a/test/runtime/samples/slot-in-custom-element/main.html b/test/runtime/samples/slot-in-custom-element/main.svelte similarity index 100% rename from test/runtime/samples/slot-in-custom-element/main.html rename to test/runtime/samples/slot-in-custom-element/main.svelte diff --git a/test/runtime/samples/spread-component-dynamic-undefined/main.html b/test/runtime/samples/spread-component-dynamic-undefined/main.svelte similarity index 100% rename from test/runtime/samples/spread-component-dynamic-undefined/main.html rename to test/runtime/samples/spread-component-dynamic-undefined/main.svelte diff --git a/test/runtime/samples/spread-component-dynamic/Foo.html b/test/runtime/samples/spread-component-dynamic/Foo.svelte similarity index 100% rename from test/runtime/samples/spread-component-dynamic/Foo.html rename to test/runtime/samples/spread-component-dynamic/Foo.svelte diff --git a/test/runtime/samples/spread-component-dynamic/main.html b/test/runtime/samples/spread-component-dynamic/main.html deleted file mode 100644 index 4b83ee5307..0000000000 --- a/test/runtime/samples/spread-component-dynamic/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/spread-component-dynamic/main.svelte b/test/runtime/samples/spread-component-dynamic/main.svelte new file mode 100644 index 0000000000..879a5c2cd5 --- /dev/null +++ b/test/runtime/samples/spread-component-dynamic/main.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/spread-component-multiple-dependencies/Widget.html b/test/runtime/samples/spread-component-multiple-dependencies/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-component-multiple-dependencies/Widget.html rename to test/runtime/samples/spread-component-multiple-dependencies/Widget.svelte diff --git a/test/runtime/samples/spread-component-multiple-dependencies/main.html b/test/runtime/samples/spread-component-multiple-dependencies/main.svelte similarity index 80% rename from test/runtime/samples/spread-component-multiple-dependencies/main.html rename to test/runtime/samples/spread-component-multiple-dependencies/main.svelte index 79ed1d2974..a60043391a 100644 --- a/test/runtime/samples/spread-component-multiple-dependencies/main.html +++ b/test/runtime/samples/spread-component-multiple-dependencies/main.svelte @@ -4,7 +4,7 @@ export let b = 'b'; export let bar = { baz: 'baz' }; - import Widget from './Widget.html'; + import Widget from './Widget.svelte'; diff --git a/test/runtime/samples/spread-component-with-bind/Widget.html b/test/runtime/samples/spread-component-with-bind/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-component-with-bind/Widget.html rename to test/runtime/samples/spread-component-with-bind/Widget.svelte diff --git a/test/runtime/samples/spread-component-with-bind/main.html b/test/runtime/samples/spread-component-with-bind/main.html deleted file mode 100644 index e4c81624fd..0000000000 --- a/test/runtime/samples/spread-component-with-bind/main.html +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/spread-component-with-bind/main.svelte b/test/runtime/samples/spread-component-with-bind/main.svelte new file mode 100644 index 0000000000..98375e2348 --- /dev/null +++ b/test/runtime/samples/spread-component-with-bind/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/spread-component/Widget.html b/test/runtime/samples/spread-component/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-component/Widget.html rename to test/runtime/samples/spread-component/Widget.svelte diff --git a/test/runtime/samples/spread-component/main.html b/test/runtime/samples/spread-component/main.svelte similarity index 69% rename from test/runtime/samples/spread-component/main.html rename to test/runtime/samples/spread-component/main.svelte index 351a7964ef..3ca281903e 100644 --- a/test/runtime/samples/spread-component/main.html +++ b/test/runtime/samples/spread-component/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/spread-each-component/Nested.html b/test/runtime/samples/spread-each-component/Nested.svelte similarity index 100% rename from test/runtime/samples/spread-each-component/Nested.html rename to test/runtime/samples/spread-each-component/Nested.svelte diff --git a/test/runtime/samples/spread-each-component/main.html b/test/runtime/samples/spread-each-component/main.svelte similarity index 65% rename from test/runtime/samples/spread-each-component/main.html rename to test/runtime/samples/spread-each-component/main.svelte index 2124861160..f8c0cebaba 100644 --- a/test/runtime/samples/spread-each-component/main.html +++ b/test/runtime/samples/spread-each-component/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/spread-each-element/main.html b/test/runtime/samples/spread-each-element/main.svelte similarity index 100% rename from test/runtime/samples/spread-each-element/main.html rename to test/runtime/samples/spread-each-element/main.svelte diff --git a/test/runtime/samples/spread-element-boolean/main.html b/test/runtime/samples/spread-element-boolean/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-boolean/main.html rename to test/runtime/samples/spread-element-boolean/main.svelte diff --git a/test/runtime/samples/spread-element-input/main.html b/test/runtime/samples/spread-element-input/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-input/main.html rename to test/runtime/samples/spread-element-input/main.svelte diff --git a/test/runtime/samples/spread-element-multiple-dependencies/main.html b/test/runtime/samples/spread-element-multiple-dependencies/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-multiple-dependencies/main.html rename to test/runtime/samples/spread-element-multiple-dependencies/main.svelte diff --git a/test/runtime/samples/spread-element-multiple/main.html b/test/runtime/samples/spread-element-multiple/main.svelte similarity index 100% rename from test/runtime/samples/spread-element-multiple/main.html rename to test/runtime/samples/spread-element-multiple/main.svelte diff --git a/test/runtime/samples/spread-element/main.html b/test/runtime/samples/spread-element/main.svelte similarity index 100% rename from test/runtime/samples/spread-element/main.html rename to test/runtime/samples/spread-element/main.svelte diff --git a/test/runtime/samples/spread-own-props/Widget.html b/test/runtime/samples/spread-own-props/Widget.svelte similarity index 100% rename from test/runtime/samples/spread-own-props/Widget.html rename to test/runtime/samples/spread-own-props/Widget.svelte diff --git a/test/runtime/samples/spread-own-props/main.html b/test/runtime/samples/spread-own-props/main.svelte similarity index 54% rename from test/runtime/samples/spread-own-props/main.html rename to test/runtime/samples/spread-own-props/main.svelte index 5f0a0089b5..5fbd75d663 100644 --- a/test/runtime/samples/spread-own-props/main.html +++ b/test/runtime/samples/spread-own-props/main.svelte @@ -1,7 +1,7 @@ - + diff --git a/test/runtime/samples/state-deconflicted/main.html b/test/runtime/samples/state-deconflicted/main.svelte similarity index 100% rename from test/runtime/samples/state-deconflicted/main.html rename to test/runtime/samples/state-deconflicted/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-implicit/main.html b/test/runtime/samples/store-auto-subscribe-implicit/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-implicit/main.html rename to test/runtime/samples/store-auto-subscribe-implicit/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-in-each/main.html b/test/runtime/samples/store-auto-subscribe-in-each/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-in-each/main.html rename to test/runtime/samples/store-auto-subscribe-in-each/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.html b/test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.html rename to test/runtime/samples/store-auto-subscribe-in-reactive-declaration/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe-in-script/main.html b/test/runtime/samples/store-auto-subscribe-in-script/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe-in-script/main.html rename to test/runtime/samples/store-auto-subscribe-in-script/main.svelte diff --git a/test/runtime/samples/store-auto-subscribe/main.html b/test/runtime/samples/store-auto-subscribe/main.svelte similarity index 100% rename from test/runtime/samples/store-auto-subscribe/main.html rename to test/runtime/samples/store-auto-subscribe/main.svelte diff --git a/test/runtime/samples/store-dev-mode-error/main.html b/test/runtime/samples/store-dev-mode-error/main.svelte similarity index 100% rename from test/runtime/samples/store-dev-mode-error/main.html rename to test/runtime/samples/store-dev-mode-error/main.svelte diff --git a/test/runtime/samples/store-prevent-user-declarations/main.html b/test/runtime/samples/store-prevent-user-declarations/main.svelte similarity index 100% rename from test/runtime/samples/store-prevent-user-declarations/main.html rename to test/runtime/samples/store-prevent-user-declarations/main.svelte diff --git a/test/runtime/samples/svg-attributes/main.html b/test/runtime/samples/svg-attributes/main.svelte similarity index 100% rename from test/runtime/samples/svg-attributes/main.html rename to test/runtime/samples/svg-attributes/main.svelte diff --git a/test/validator/samples/svg-child-component-declared-namespace/input.html b/test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.svelte similarity index 81% rename from test/validator/samples/svg-child-component-declared-namespace/input.html rename to test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.svelte index 4e72c96fbe..3871f86c21 100644 --- a/test/validator/samples/svg-child-component-declared-namespace/input.html +++ b/test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.svelte @@ -1,4 +1,4 @@ - + - -{#if visible} -
delayed
-{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-css-duration/_config.js b/test/runtime/samples/transition-css-duration/_config.js index ed25357681..28a78944bb 100644 --- a/test/runtime/samples/transition-css-duration/_config.js +++ b/test/runtime/samples/transition-css-duration/_config.js @@ -4,8 +4,10 @@ export default { const div = target.querySelector('div'); raf.tick(25); + component.visible = false; + raf.tick(26); assert.ok(~div.style.animation.indexOf('25ms')); }, }; diff --git a/test/runtime/samples/transition-css-duration/main.html b/test/runtime/samples/transition-css-duration/main.svelte similarity index 100% rename from test/runtime/samples/transition-css-duration/main.html rename to test/runtime/samples/transition-css-duration/main.svelte diff --git a/test/runtime/samples/transition-css-in-out-in/_config.js b/test/runtime/samples/transition-css-in-out-in/_config.js new file mode 100644 index 0000000000..10719280e9 --- /dev/null +++ b/test/runtime/samples/transition-css-in-out-in/_config.js @@ -0,0 +1,20 @@ +export default { + test({ assert, component, target, window, raf }) { + component.visible = true; + const div = target.querySelector('div'); + + assert.equal(div.style.animation, `__svelte_3809512021_0 100ms linear 0ms 1 both`); + + raf.tick(50); + component.visible = false; + + // both in and out styles + assert.equal(div.style.animation, `__svelte_3809512021_0 100ms linear 0ms 1 both, __svelte_3750847757_0 100ms linear 0ms 1 both`); + + raf.tick(75); + component.visible = true; + + // reset original styles + assert.equal(div.style.animation, `__svelte_3809512021_1 100ms linear 0ms 1 both`); + }, +}; diff --git a/test/runtime/samples/transition-css-in-out-in/main.svelte b/test/runtime/samples/transition-css-in-out-in/main.svelte new file mode 100644 index 0000000000..5108452a39 --- /dev/null +++ b/test/runtime/samples/transition-css-in-out-in/main.svelte @@ -0,0 +1,25 @@ + + +{#if visible} +
+{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js b/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js index 75242d21af..e78862e86c 100644 --- a/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js +++ b/test/runtime/samples/transition-js-aborted-outro-in-each/_config.js @@ -7,7 +7,7 @@ export default { ] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { const { things } = component; component.things = []; diff --git a/test/runtime/samples/transition-js-aborted-outro-in-each/main.html b/test/runtime/samples/transition-js-aborted-outro-in-each/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-aborted-outro-in-each/main.html rename to test/runtime/samples/transition-js-aborted-outro-in-each/main.svelte diff --git a/test/runtime/samples/transition-js-aborted-outro/_config.js b/test/runtime/samples/transition-js-aborted-outro/_config.js index 87ad32be07..d61407e1bd 100644 --- a/test/runtime/samples/transition-js-aborted-outro/_config.js +++ b/test/runtime/samples/transition-js-aborted-outro/_config.js @@ -3,7 +3,7 @@ export default { visible: true, }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.visible = false; const span = target.querySelector('span'); diff --git a/test/runtime/samples/transition-js-aborted-outro/main.html b/test/runtime/samples/transition-js-aborted-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-aborted-outro/main.html rename to test/runtime/samples/transition-js-aborted-outro/main.svelte diff --git a/test/runtime/samples/transition-js-args/main.html b/test/runtime/samples/transition-js-args/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-args/main.html rename to test/runtime/samples/transition-js-args/main.svelte diff --git a/test/runtime/samples/transition-js-await-block/_config.js b/test/runtime/samples/transition-js-await-block/_config.js index 5cddc8a95c..2e01dd7f76 100644 --- a/test/runtime/samples/transition-js-await-block/_config.js +++ b/test/runtime/samples/transition-js-await-block/_config.js @@ -13,7 +13,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, target, raf }) { let p = target.querySelector('p'); assert.equal(p.className, 'pending'); diff --git a/test/runtime/samples/transition-js-await-block/main.html b/test/runtime/samples/transition-js-await-block/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-await-block/main.html rename to test/runtime/samples/transition-js-await-block/main.svelte diff --git a/test/runtime/samples/transition-js-context/main.html b/test/runtime/samples/transition-js-context/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-context/main.html rename to test/runtime/samples/transition-js-context/main.svelte diff --git a/test/runtime/samples/transition-js-deferred/main.html b/test/runtime/samples/transition-js-deferred/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-deferred/main.html rename to test/runtime/samples/transition-js-deferred/main.svelte diff --git a/test/runtime/samples/transition-js-delay-in-out/main.html b/test/runtime/samples/transition-js-delay-in-out/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-delay-in-out/main.html rename to test/runtime/samples/transition-js-delay-in-out/main.svelte diff --git a/test/runtime/samples/transition-js-delay/main.html b/test/runtime/samples/transition-js-delay/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-delay/main.html rename to test/runtime/samples/transition-js-delay/main.svelte diff --git a/test/runtime/samples/transition-js-destroyed-before-end/main.html b/test/runtime/samples/transition-js-destroyed-before-end/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-destroyed-before-end/main.html rename to test/runtime/samples/transition-js-destroyed-before-end/main.svelte diff --git a/test/runtime/samples/transition-js-dynamic-component/A.html b/test/runtime/samples/transition-js-dynamic-component/A.svelte similarity index 100% rename from test/runtime/samples/transition-js-dynamic-component/A.html rename to test/runtime/samples/transition-js-dynamic-component/A.svelte diff --git a/test/runtime/samples/transition-js-dynamic-component/B.html b/test/runtime/samples/transition-js-dynamic-component/B.svelte similarity index 100% rename from test/runtime/samples/transition-js-dynamic-component/B.html rename to test/runtime/samples/transition-js-dynamic-component/B.svelte diff --git a/test/runtime/samples/transition-js-dynamic-component/main.html b/test/runtime/samples/transition-js-dynamic-component/main.html deleted file mode 100644 index 85c88d9442..0000000000 --- a/test/runtime/samples/transition-js-dynamic-component/main.html +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/transition-js-dynamic-component/main.svelte b/test/runtime/samples/transition-js-dynamic-component/main.svelte new file mode 100644 index 0000000000..08697ec1a9 --- /dev/null +++ b/test/runtime/samples/transition-js-dynamic-component/main.svelte @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js b/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js index 6036be6055..aa0bd9e1aa 100644 --- a/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js +++ b/test/runtime/samples/transition-js-dynamic-if-block-bidi/_config.js @@ -3,7 +3,7 @@ export default { name: 'world' }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { global.count = 0; component.visible = true; diff --git a/test/runtime/samples/transition-js-dynamic-if-block-bidi/main.html b/test/runtime/samples/transition-js-dynamic-if-block-bidi/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-dynamic-if-block-bidi/main.html rename to test/runtime/samples/transition-js-dynamic-if-block-bidi/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-intro-outro/main.html b/test/runtime/samples/transition-js-each-block-intro-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-intro-outro/main.html rename to test/runtime/samples/transition-js-each-block-intro-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-intro/main.html b/test/runtime/samples/transition-js-each-block-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-intro/main.html rename to test/runtime/samples/transition-js-each-block-intro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.html b/test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.html rename to test/runtime/samples/transition-js-each-block-keyed-intro-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-keyed-intro/main.html b/test/runtime/samples/transition-js-each-block-keyed-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-keyed-intro/main.html rename to test/runtime/samples/transition-js-each-block-keyed-intro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-keyed-outro/main.html b/test/runtime/samples/transition-js-each-block-keyed-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-keyed-outro/main.html rename to test/runtime/samples/transition-js-each-block-keyed-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-block-outro/main.html b/test/runtime/samples/transition-js-each-block-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-each-block-outro/main.html rename to test/runtime/samples/transition-js-each-block-outro/main.svelte diff --git a/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js b/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js new file mode 100644 index 0000000000..b3a1882196 --- /dev/null +++ b/test/runtime/samples/transition-js-each-keyed-unchanged/_config.js @@ -0,0 +1,25 @@ +export default { + props: { + numbers: [1, 2, 3, 4, 5] + }, + + test({ assert, component, target, raf }) { + const divs1 = target.querySelectorAll('div'); + assert.equal(divs1[0].foo, undefined); + + component.numbers = [1, 2, 5, 4, 3]; + const divs2 = target.querySelectorAll('div'); + + assert.equal(divs1[0], divs2[0]); + assert.equal(divs1[1], divs2[1]); + assert.equal(divs1[2], divs2[4]); + assert.equal(divs1[3], divs2[3]); + assert.equal(divs1[4], divs2[2]); + + assert.equal(divs1[0].foo, undefined); + assert.equal(divs1[1].foo, undefined); + assert.equal(divs1[2].foo, undefined); + assert.equal(divs1[3].foo, undefined); + assert.equal(divs1[4].foo, undefined); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/transition-js-each-keyed-unchanged/main.svelte b/test/runtime/samples/transition-js-each-keyed-unchanged/main.svelte new file mode 100644 index 0000000000..ef2426c2db --- /dev/null +++ b/test/runtime/samples/transition-js-each-keyed-unchanged/main.svelte @@ -0,0 +1,16 @@ + + +{#each numbers as num, i (num)} +
{num}
+{/each} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-each-unchanged/_config.js b/test/runtime/samples/transition-js-each-unchanged/_config.js new file mode 100644 index 0000000000..9bd2206211 --- /dev/null +++ b/test/runtime/samples/transition-js-each-unchanged/_config.js @@ -0,0 +1,25 @@ +export default { + props: { + numbers: [1, 2, 3, 4, 5] + }, + + test({ assert, component, target, raf }) { + const divs1 = target.querySelectorAll('div'); + assert.equal(divs1[0].foo, undefined); + + component.numbers = [1, 2, 5, 4, 3]; + const divs2 = target.querySelectorAll('div'); + + assert.equal(divs1[0], divs2[0]); + assert.equal(divs1[1], divs2[1]); + assert.equal(divs1[2], divs2[2]); + assert.equal(divs1[3], divs2[3]); + assert.equal(divs1[4], divs2[4]); + + assert.equal(divs1[0].foo, undefined); + assert.equal(divs1[1].foo, undefined); + assert.equal(divs1[2].foo, undefined); + assert.equal(divs1[3].foo, undefined); + assert.equal(divs1[4].foo, undefined); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/transition-js-each-unchanged/main.svelte b/test/runtime/samples/transition-js-each-unchanged/main.svelte new file mode 100644 index 0000000000..d1cee7bd23 --- /dev/null +++ b/test/runtime/samples/transition-js-each-unchanged/main.svelte @@ -0,0 +1,16 @@ + + +{#each numbers as num, i} +
{num}
+{/each} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-events/main.html b/test/runtime/samples/transition-js-events/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-events/main.html rename to test/runtime/samples/transition-js-events/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-bidi/main.html b/test/runtime/samples/transition-js-if-block-bidi/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-bidi/main.html rename to test/runtime/samples/transition-js-if-block-bidi/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.html b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.html rename to test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js index 261731c700..04df38a09c 100644 --- a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js +++ b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/_config.js @@ -12,9 +12,7 @@ export default {
5
`, - test({ assert, component, target, window, raf }) { - const divs = target.querySelectorAll('div'); - + test({ assert, component, target, raf }) { raf.tick(100); component.threshold = 4; diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.html b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.html rename to test/runtime/samples/transition-js-if-block-in-each-block-bidi-3/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.html b/test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.html rename to test/runtime/samples/transition-js-if-block-in-each-block-bidi/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-intro-outro/main.html b/test/runtime/samples/transition-js-if-block-intro-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-intro-outro/main.html rename to test/runtime/samples/transition-js-if-block-intro-outro/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-intro/main.html b/test/runtime/samples/transition-js-if-block-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-intro/main.html rename to test/runtime/samples/transition-js-if-block-intro/main.svelte diff --git a/test/runtime/samples/transition-js-if-block-outro-timeout/main.html b/test/runtime/samples/transition-js-if-block-outro-timeout/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-block-outro-timeout/main.html rename to test/runtime/samples/transition-js-if-block-outro-timeout/main.svelte diff --git a/test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.html b/test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.html rename to test/runtime/samples/transition-js-if-else-block-dynamic-outro/main.svelte diff --git a/test/runtime/samples/transition-js-if-else-block-intro/_config.js b/test/runtime/samples/transition-js-if-else-block-intro/_config.js index 2bf1483dac..c5eccf50e5 100644 --- a/test/runtime/samples/transition-js-if-else-block-intro/_config.js +++ b/test/runtime/samples/transition-js-if-else-block-intro/_config.js @@ -1,7 +1,7 @@ export default { intro: true, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { assert.equal(target.querySelector('div'), component.no); assert.equal(component.no.foo, 0); diff --git a/test/runtime/samples/transition-js-if-else-block-intro/main.html b/test/runtime/samples/transition-js-if-else-block-intro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-else-block-intro/main.html rename to test/runtime/samples/transition-js-if-else-block-intro/main.svelte diff --git a/test/runtime/samples/transition-js-if-else-block-outro/main.html b/test/runtime/samples/transition-js-if-else-block-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-else-block-outro/main.html rename to test/runtime/samples/transition-js-if-else-block-outro/main.svelte diff --git a/test/runtime/samples/transition-js-if-elseif-block-outro/main.html b/test/runtime/samples/transition-js-if-elseif-block-outro/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-if-elseif-block-outro/main.html rename to test/runtime/samples/transition-js-if-elseif-block-outro/main.svelte diff --git a/test/runtime/samples/transition-js-initial/main.html b/test/runtime/samples/transition-js-initial/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-initial/main.html rename to test/runtime/samples/transition-js-initial/main.svelte diff --git a/test/runtime/samples/transition-js-intro-enabled-by-option/main.html b/test/runtime/samples/transition-js-intro-enabled-by-option/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-intro-enabled-by-option/main.html rename to test/runtime/samples/transition-js-intro-enabled-by-option/main.svelte diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.html b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.svelte similarity index 100% rename from test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.html rename to test/runtime/samples/transition-js-intro-skipped-by-default-nested/Widget.svelte diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.html b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.html deleted file mode 100644 index cbcde3f1ed..0000000000 --- a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.svelte b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.svelte new file mode 100644 index 0000000000..0a9d5bba87 --- /dev/null +++ b/test/runtime/samples/transition-js-intro-skipped-by-default-nested/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/transition-js-intro-skipped-by-default/main.html b/test/runtime/samples/transition-js-intro-skipped-by-default/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-intro-skipped-by-default/main.html rename to test/runtime/samples/transition-js-intro-skipped-by-default/main.svelte diff --git a/test/runtime/samples/transition-js-local-and-global/_config.js b/test/runtime/samples/transition-js-local-and-global/_config.js new file mode 100644 index 0000000000..b7f8baa7ee --- /dev/null +++ b/test/runtime/samples/transition-js-local-and-global/_config.js @@ -0,0 +1,67 @@ +export default { + props: { + x: false, + y: true + }, + + test({ assert, component, target, raf }) { + // first, toggle x — first element should snap in + // and out while second one transitions + component.x = true; + + let divs = target.querySelectorAll('div'); + assert.equal(divs[0].foo, undefined); + assert.equal(divs[1].foo, 0); + + raf.tick(50); + assert.equal(divs[0].foo, undefined); + assert.equal(divs[1].foo, 0.5); + + raf.tick(100); + + component.x = false; + assert.htmlEqual(target.innerHTML, ` +
snaps if x changes
+
transitions if x changes
+ `); + + raf.tick(150); + assert.equal(divs[0].foo, undefined); + assert.equal(divs[1].foo, 0.5); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + + // then toggle y + component.y = false; + component.x = true; + component.y = true; + + assert.htmlEqual(target.innerHTML, ` +
snaps if x changes
+
transitions if x changes
+ `); + divs = target.querySelectorAll('div'); + + raf.tick(250); + assert.equal(divs[0].foo, 0.5); + assert.equal(divs[1].foo, 0.5); + + raf.tick(300); + assert.equal(divs[0].foo, 1); + assert.equal(divs[1].foo, 1); + + component.y = false; + assert.htmlEqual(target.innerHTML, ` +
snaps if x changes
+
transitions if x changes
+ `); + + raf.tick(320); + assert.equal(divs[0].foo, 0.8); + assert.equal(divs[1].foo, 0.8); + + raf.tick(400); + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-and-global/main.svelte b/test/runtime/samples/transition-js-local-and-global/main.svelte new file mode 100644 index 0000000000..18fbaa1b78 --- /dev/null +++ b/test/runtime/samples/transition-js-local-and-global/main.svelte @@ -0,0 +1,20 @@ + + +{#if x} + {#if y} +
snaps if x changes
+
transitions if x changes
+ {/if} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-await/_config.js b/test/runtime/samples/transition-js-local-nested-await/_config.js new file mode 100644 index 0000000000..b07d88741f --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-await/_config.js @@ -0,0 +1,31 @@ +let fulfil; + +const promise = new Promise(f => { + fulfil = f; +}); + +export default { + props: { + x: false, + promise + }, + + test({ assert, component, target, raf }) { + component.x = true; + fulfil(); + + return promise.then(() => { + const div = target.querySelector('div'); + assert.equal(div.foo, 0); + + raf.tick(100); + assert.equal(div.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, ''); + + raf.tick(150); + assert.equal(div.foo, 1); + }); + } +}; diff --git a/test/runtime/samples/transition-js-local-nested-await/main.svelte b/test/runtime/samples/transition-js-local-nested-await/main.svelte new file mode 100644 index 0000000000..618dd3088d --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-await/main.svelte @@ -0,0 +1,19 @@ + + +{#if x} + {#await promise then value} +
+ {/await} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-component/Widget.svelte b/test/runtime/samples/transition-js-local-nested-component/Widget.svelte new file mode 100644 index 0000000000..f3baa4b004 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/Widget.svelte @@ -0,0 +1,12 @@ + + +
\ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-component/_config.js b/test/runtime/samples/transition-js-local-nested-component/_config.js new file mode 100644 index 0000000000..87d7aaa233 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/_config.js @@ -0,0 +1,24 @@ +export default { + props: { + x: false + }, + + test({ assert, component, target, raf }) { + component.x = true; + + const div = target.querySelector('div'); + assert.equal(div.foo, 0); + + raf.tick(100); + assert.equal(div.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, '
'); + + raf.tick(150); + assert.equal(div.foo, 0.5); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + } +}; diff --git a/test/runtime/samples/transition-js-nested-component/main.html b/test/runtime/samples/transition-js-local-nested-component/main.svelte similarity index 55% rename from test/runtime/samples/transition-js-nested-component/main.html rename to test/runtime/samples/transition-js-local-nested-component/main.svelte index b4b3beccd8..761ef9d860 100644 --- a/test/runtime/samples/transition-js-nested-component/main.html +++ b/test/runtime/samples/transition-js-local-nested-component/main.svelte @@ -1,7 +1,7 @@ {#if x} diff --git a/test/runtime/samples/transition-js-local-nested-each-keyed/_config.js b/test/runtime/samples/transition-js-local-nested-each-keyed/_config.js new file mode 100644 index 0000000000..0595e67013 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each-keyed/_config.js @@ -0,0 +1,30 @@ +export default { + props: { + x: false, + things: ['a'] + }, + + test({ assert, component, target, raf }) { + component.x = true; + + const div1 = target.querySelector('div'); + assert.equal(div1.foo, undefined); + + raf.tick(100); + assert.equal(div1.foo, undefined); + + component.things = ['a', 'b']; + assert.htmlEqual(target.innerHTML, '
'); + + const div2 = target.querySelector('div:last-child'); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 0); + + raf.tick(200); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-nested-each-keyed/main.svelte b/test/runtime/samples/transition-js-local-nested-each-keyed/main.svelte new file mode 100644 index 0000000000..90b6d110a7 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each-keyed/main.svelte @@ -0,0 +1,19 @@ + + +{#if x} + {#each things as thing (thing)} +
+ {/each} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-each/_config.js b/test/runtime/samples/transition-js-local-nested-each/_config.js new file mode 100644 index 0000000000..0595e67013 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each/_config.js @@ -0,0 +1,30 @@ +export default { + props: { + x: false, + things: ['a'] + }, + + test({ assert, component, target, raf }) { + component.x = true; + + const div1 = target.querySelector('div'); + assert.equal(div1.foo, undefined); + + raf.tick(100); + assert.equal(div1.foo, undefined); + + component.things = ['a', 'b']; + assert.htmlEqual(target.innerHTML, '
'); + + const div2 = target.querySelector('div:last-child'); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 0); + + raf.tick(200); + assert.equal(div1.foo, undefined); + assert.equal(div2.foo, 1); + + component.x = false; + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-nested-each/main.svelte b/test/runtime/samples/transition-js-local-nested-each/main.svelte new file mode 100644 index 0000000000..feaadd9283 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-each/main.svelte @@ -0,0 +1,19 @@ + + +{#if x} + {#each things as thing} +
+ {/each} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-if/_config.js b/test/runtime/samples/transition-js-local-nested-if/_config.js new file mode 100644 index 0000000000..d1550c0cff --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-if/_config.js @@ -0,0 +1,40 @@ +export default { + props: { + x: false, + y: true + }, + + test({ assert, component, target, raf }) { + component.x = true; + + let div = target.querySelector('div'); + assert.equal(div.foo, undefined); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
'); + div = target.querySelector('div'); + + raf.tick(50); + assert.equal(div.foo, 0.5); + + raf.tick(100); + assert.htmlEqual(target.innerHTML, ''); + + component.x = false; + component.y = true; + assert.htmlEqual(target.innerHTML, ''); + + component.x = true; + assert.htmlEqual(target.innerHTML, '
'); + div = target.querySelector('div'); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
'); + + raf.tick(150); + assert.equal(div.foo, 0.5); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local-nested-if/main.svelte b/test/runtime/samples/transition-js-local-nested-if/main.svelte new file mode 100644 index 0000000000..cbdfbd8c25 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-if/main.svelte @@ -0,0 +1,19 @@ + + +{#if x} + {#if y} +
+ {/if} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local/_config.js b/test/runtime/samples/transition-js-local/_config.js new file mode 100644 index 0000000000..fa8a55bfcd --- /dev/null +++ b/test/runtime/samples/transition-js-local/_config.js @@ -0,0 +1,40 @@ +export default { + props: { + x: false, + y: true + }, + + test({ assert, component, target, window, raf }) { + component.x = true; + + let div = target.querySelector('div'); + assert.equal(div.foo, undefined); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
'); + div = target.querySelector('div'); + + raf.tick(50); + assert.equal(div.foo, 0.5); + + raf.tick(100); + assert.htmlEqual(target.innerHTML, ''); + + component.x = false; + component.y = true; + assert.htmlEqual(target.innerHTML, ''); + + component.x = true; + assert.htmlEqual(target.innerHTML, '
'); + div = target.querySelector('div'); + + component.y = false; + assert.htmlEqual(target.innerHTML, '
'); + + raf.tick(120); + assert.equal(div.foo, 0.8); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + }, +}; diff --git a/test/runtime/samples/transition-js-local/main.svelte b/test/runtime/samples/transition-js-local/main.svelte new file mode 100644 index 0000000000..cbdfbd8c25 --- /dev/null +++ b/test/runtime/samples/transition-js-local/main.svelte @@ -0,0 +1,19 @@ + + +{#if x} + {#if y} +
+ {/if} +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-nested-await/main.html b/test/runtime/samples/transition-js-nested-await/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-await/main.html rename to test/runtime/samples/transition-js-nested-await/main.svelte diff --git a/test/runtime/samples/transition-js-nested-component/Widget.html b/test/runtime/samples/transition-js-nested-component/Widget.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-component/Widget.html rename to test/runtime/samples/transition-js-nested-component/Widget.svelte diff --git a/test/runtime/samples/transition-js-nested-component/main.svelte b/test/runtime/samples/transition-js-nested-component/main.svelte new file mode 100644 index 0000000000..8cfaa3bf02 --- /dev/null +++ b/test/runtime/samples/transition-js-nested-component/main.svelte @@ -0,0 +1,9 @@ + + +{#if x} + +{/if} \ No newline at end of file diff --git a/test/runtime/samples/transition-js-nested-each-delete/_config.js b/test/runtime/samples/transition-js-nested-each-delete/_config.js index c2a886db9a..041cbebc66 100644 --- a/test/runtime/samples/transition-js-nested-each-delete/_config.js +++ b/test/runtime/samples/transition-js-nested-each-delete/_config.js @@ -4,7 +4,7 @@ export default { things: ['a', 'b', 'c'] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { assert.htmlEqual(target.innerHTML, `
a
b
diff --git a/test/runtime/samples/transition-js-nested-each-delete/main.html b/test/runtime/samples/transition-js-nested-each-delete/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each-delete/main.html rename to test/runtime/samples/transition-js-nested-each-delete/main.svelte diff --git a/test/runtime/samples/transition-js-nested-each-keyed-2/Widget.html b/test/runtime/samples/transition-js-nested-each-keyed-2/Widget.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each-keyed-2/Widget.html rename to test/runtime/samples/transition-js-nested-each-keyed-2/Widget.svelte diff --git a/test/runtime/samples/transition-js-nested-each-keyed-2/main.html b/test/runtime/samples/transition-js-nested-each-keyed-2/main.svelte similarity index 65% rename from test/runtime/samples/transition-js-nested-each-keyed-2/main.html rename to test/runtime/samples/transition-js-nested-each-keyed-2/main.svelte index 11096498cb..8a8ef57576 100644 --- a/test/runtime/samples/transition-js-nested-each-keyed-2/main.html +++ b/test/runtime/samples/transition-js-nested-each-keyed-2/main.svelte @@ -2,7 +2,7 @@ export let x; export let things; - import Widget from './Widget.html'; + import Widget from './Widget.svelte'; {#if x} diff --git a/test/runtime/samples/transition-js-nested-each-keyed/main.html b/test/runtime/samples/transition-js-nested-each-keyed/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each-keyed/main.html rename to test/runtime/samples/transition-js-nested-each-keyed/main.svelte diff --git a/test/runtime/samples/transition-js-nested-each/main.html b/test/runtime/samples/transition-js-nested-each/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-each/main.html rename to test/runtime/samples/transition-js-nested-each/main.svelte diff --git a/test/runtime/samples/transition-js-nested-if/main.html b/test/runtime/samples/transition-js-nested-if/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-if/main.html rename to test/runtime/samples/transition-js-nested-if/main.svelte diff --git a/test/runtime/samples/transition-js-nested-intro/Child.html b/test/runtime/samples/transition-js-nested-intro/Child.svelte similarity index 100% rename from test/runtime/samples/transition-js-nested-intro/Child.html rename to test/runtime/samples/transition-js-nested-intro/Child.svelte diff --git a/test/runtime/samples/transition-js-nested-intro/main.html b/test/runtime/samples/transition-js-nested-intro/main.svelte similarity index 65% rename from test/runtime/samples/transition-js-nested-intro/main.html rename to test/runtime/samples/transition-js-nested-intro/main.svelte index f222940ad5..5ae29bee7b 100644 --- a/test/runtime/samples/transition-js-nested-intro/main.html +++ b/test/runtime/samples/transition-js-nested-intro/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/runtime/samples/transition-js-parameterised-with-state/main.html b/test/runtime/samples/transition-js-parameterised-with-state/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-parameterised-with-state/main.html rename to test/runtime/samples/transition-js-parameterised-with-state/main.svelte diff --git a/test/runtime/samples/transition-js-parameterised/main.html b/test/runtime/samples/transition-js-parameterised/main.svelte similarity index 100% rename from test/runtime/samples/transition-js-parameterised/main.html rename to test/runtime/samples/transition-js-parameterised/main.svelte diff --git a/test/runtime/samples/whitespace-each-block/main.html b/test/runtime/samples/whitespace-each-block/main.svelte similarity index 100% rename from test/runtime/samples/whitespace-each-block/main.html rename to test/runtime/samples/whitespace-each-block/main.svelte diff --git a/test/runtime/samples/whitespace-list/main.html b/test/runtime/samples/whitespace-list/main.svelte similarity index 100% rename from test/runtime/samples/whitespace-list/main.html rename to test/runtime/samples/whitespace-list/main.svelte diff --git a/test/runtime/samples/whitespace-normal/main.html b/test/runtime/samples/whitespace-normal/main.svelte similarity index 100% rename from test/runtime/samples/whitespace-normal/main.html rename to test/runtime/samples/whitespace-normal/main.svelte diff --git a/test/runtime/samples/window-bind-scroll-update/main.html b/test/runtime/samples/window-bind-scroll-update/main.svelte similarity index 100% rename from test/runtime/samples/window-bind-scroll-update/main.html rename to test/runtime/samples/window-bind-scroll-update/main.svelte diff --git a/test/runtime/samples/window-binding-multiple-handlers/_config.js b/test/runtime/samples/window-binding-multiple-handlers/_config.js new file mode 100644 index 0000000000..2f7c6be562 --- /dev/null +++ b/test/runtime/samples/window-binding-multiple-handlers/_config.js @@ -0,0 +1,3 @@ +export default { + html: '' +}; diff --git a/test/runtime/samples/window-binding-multiple-handlers/main.svelte b/test/runtime/samples/window-binding-multiple-handlers/main.svelte new file mode 100644 index 0000000000..8b28d53a9f --- /dev/null +++ b/test/runtime/samples/window-binding-multiple-handlers/main.svelte @@ -0,0 +1,2 @@ + + diff --git a/test/runtime/samples/window-binding-resize/main.html b/test/runtime/samples/window-binding-resize/main.svelte similarity index 100% rename from test/runtime/samples/window-binding-resize/main.html rename to test/runtime/samples/window-binding-resize/main.svelte diff --git a/test/runtime/samples/window-event-context/main.html b/test/runtime/samples/window-event-context/main.svelte similarity index 100% rename from test/runtime/samples/window-event-context/main.html rename to test/runtime/samples/window-event-context/main.svelte diff --git a/test/runtime/samples/window-event-custom/main.html b/test/runtime/samples/window-event-custom/main.svelte similarity index 100% rename from test/runtime/samples/window-event-custom/main.html rename to test/runtime/samples/window-event-custom/main.svelte diff --git a/test/runtime/samples/window-event/main.html b/test/runtime/samples/window-event/main.svelte similarity index 100% rename from test/runtime/samples/window-event/main.html rename to test/runtime/samples/window-event/main.svelte diff --git a/test/server-side-rendering/index.js b/test/server-side-rendering/index.js index 4fd5223b1f..6a546b0b7b 100644 --- a/test/server-side-rendering/index.js +++ b/test/server-side-rendering/index.js @@ -46,15 +46,7 @@ describe("ssr", () => { (solo ? it.only : it)(dir, () => { dir = path.resolve("test/server-side-rendering/samples", dir); try { - let Component; - - const mainHtmlFile = `${dir}/main.html`; - const mainSvelteFile = `${dir}/main.svelte`; - if (fs.existsSync(mainHtmlFile)) { - Component = require(mainHtmlFile).default; - } else if (fs.existsSync(mainSvelteFile)) { - Component = require(mainSvelteFile).default; - } + const Component = require(`${dir}/main.svelte`).default; const expectedHtml = tryToReadFile(`${dir}/_expected.html`); const expectedCss = tryToReadFile(`${dir}/_expected.css`) || ""; @@ -104,19 +96,21 @@ describe("ssr", () => { (config.skip ? it.skip : config.solo ? it.only : it)(dir, () => { const cwd = path.resolve("test/runtime/samples", dir); - glob('**/*.html', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { + glob('**/*.svelte', { cwd: `test/runtime/samples/${dir}` }).forEach(file => { const resolved = require.resolve(`../runtime/samples/${dir}/${file}`); delete require.cache[resolved]; }); - const compileOptions = Object.assign({ sveltePath }, config.compileOptions); + const compileOptions = Object.assign({ sveltePath }, config.compileOptions, { + generate: 'ssr' + }); require("../../register")(compileOptions); try { if (config.before_test) config.before_test(); - const Component = require(`../runtime/samples/${dir}/main.html`).default; + const Component = require(`../runtime/samples/${dir}/main.svelte`).default; const { html } = Component.render(config.props, { store: (config.store !== true) && config.store }); @@ -128,6 +122,10 @@ describe("ssr", () => { } if (config.after_test) config.after_test(); + + if (config.show) { + showOutput(cwd, compileOptions); + } } catch (err) { if (config.error) { if (typeof config.error === 'function') { @@ -136,7 +134,7 @@ describe("ssr", () => { assert.equal(config.error, err.message); } } else { - showOutput(cwd, { generate: "ssr" }); + showOutput(cwd, compileOptions); throw err; } } diff --git a/test/server-side-rendering/samples/attribute-boolean/main.html b/test/server-side-rendering/samples/attribute-boolean/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-boolean/main.html rename to test/server-side-rendering/samples/attribute-boolean/main.svelte diff --git a/test/server-side-rendering/samples/attribute-dynamic/main.html b/test/server-side-rendering/samples/attribute-dynamic/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-dynamic/main.html rename to test/server-side-rendering/samples/attribute-dynamic/main.svelte diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.html b/test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.html rename to test/server-side-rendering/samples/attribute-escaped-quotes-spread/main.svelte diff --git a/test/server-side-rendering/samples/attribute-escaped-quotes/main.html b/test/server-side-rendering/samples/attribute-escaped-quotes/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-escaped-quotes/main.html rename to test/server-side-rendering/samples/attribute-escaped-quotes/main.svelte diff --git a/test/server-side-rendering/samples/attribute-static/main.html b/test/server-side-rendering/samples/attribute-static/main.svelte similarity index 100% rename from test/server-side-rendering/samples/attribute-static/main.html rename to test/server-side-rendering/samples/attribute-static/main.svelte diff --git a/test/server-side-rendering/samples/bindings/main.html b/test/server-side-rendering/samples/bindings/main.svelte similarity index 100% rename from test/server-side-rendering/samples/bindings/main.html rename to test/server-side-rendering/samples/bindings/main.svelte diff --git a/test/server-side-rendering/samples/comment/main.html b/test/server-side-rendering/samples/comment/main.svelte similarity index 100% rename from test/server-side-rendering/samples/comment/main.html rename to test/server-side-rendering/samples/comment/main.svelte diff --git a/test/server-side-rendering/samples/component-binding-renamed/Foo.html b/test/server-side-rendering/samples/component-binding-renamed/Foo.svelte similarity index 100% rename from test/server-side-rendering/samples/component-binding-renamed/Foo.html rename to test/server-side-rendering/samples/component-binding-renamed/Foo.svelte diff --git a/test/server-side-rendering/samples/component-binding-renamed/main.html b/test/server-side-rendering/samples/component-binding-renamed/main.svelte similarity index 69% rename from test/server-side-rendering/samples/component-binding-renamed/main.html rename to test/server-side-rendering/samples/component-binding-renamed/main.svelte index 5c8af5f2ea..927239e1ec 100644 --- a/test/server-side-rendering/samples/component-binding-renamed/main.html +++ b/test/server-side-rendering/samples/component-binding-renamed/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/server-side-rendering/samples/component-data-dynamic/Widget.html b/test/server-side-rendering/samples/component-data-dynamic/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-data-dynamic/Widget.html rename to test/server-side-rendering/samples/component-data-dynamic/Widget.svelte diff --git a/test/server-side-rendering/samples/component-data-dynamic/main.html b/test/server-side-rendering/samples/component-data-dynamic/main.svelte similarity index 83% rename from test/server-side-rendering/samples/component-data-dynamic/main.html rename to test/server-side-rendering/samples/component-data-dynamic/main.svelte index 74998f4742..ce7f22d6ea 100644 --- a/test/server-side-rendering/samples/component-data-dynamic/main.html +++ b/test/server-side-rendering/samples/component-data-dynamic/main.svelte @@ -1,5 +1,5 @@
diff --git a/test/server-side-rendering/samples/component-refs-and-attributes/Widget.html b/test/server-side-rendering/samples/component-refs-and-attributes/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-refs-and-attributes/Widget.html rename to test/server-side-rendering/samples/component-refs-and-attributes/Widget.svelte diff --git a/test/server-side-rendering/samples/component-refs-and-attributes/main.html b/test/server-side-rendering/samples/component-refs-and-attributes/main.svelte similarity index 74% rename from test/server-side-rendering/samples/component-refs-and-attributes/main.html rename to test/server-side-rendering/samples/component-refs-and-attributes/main.svelte index 8192bdf402..5c86521df5 100644 --- a/test/server-side-rendering/samples/component-refs-and-attributes/main.html +++ b/test/server-side-rendering/samples/component-refs-and-attributes/main.svelte @@ -1,7 +1,7 @@ diff --git a/test/server-side-rendering/samples/component-refs/Widget.html b/test/server-side-rendering/samples/component-refs/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-refs/Widget.html rename to test/server-side-rendering/samples/component-refs/Widget.svelte diff --git a/test/server-side-rendering/samples/component-refs/main.html b/test/server-side-rendering/samples/component-refs/main.svelte similarity index 67% rename from test/server-side-rendering/samples/component-refs/main.html rename to test/server-side-rendering/samples/component-refs/main.svelte index 96b3d15de4..6ec0bc5438 100644 --- a/test/server-side-rendering/samples/component-refs/main.html +++ b/test/server-side-rendering/samples/component-refs/main.svelte @@ -1,7 +1,7 @@
diff --git a/test/server-side-rendering/samples/component-yield/Widget.html b/test/server-side-rendering/samples/component-yield/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component-yield/Widget.html rename to test/server-side-rendering/samples/component-yield/Widget.svelte diff --git a/test/server-side-rendering/samples/component-yield/main.html b/test/server-side-rendering/samples/component-yield/main.svelte similarity index 69% rename from test/server-side-rendering/samples/component-yield/main.html rename to test/server-side-rendering/samples/component-yield/main.svelte index 9c2f573c91..2dbd669a78 100644 --- a/test/server-side-rendering/samples/component-yield/main.html +++ b/test/server-side-rendering/samples/component-yield/main.svelte @@ -1,5 +1,5 @@ diff --git a/test/server-side-rendering/samples/component/Widget.html b/test/server-side-rendering/samples/component/Widget.svelte similarity index 100% rename from test/server-side-rendering/samples/component/Widget.html rename to test/server-side-rendering/samples/component/Widget.svelte diff --git a/test/server-side-rendering/samples/component/main.html b/test/server-side-rendering/samples/component/main.svelte similarity index 53% rename from test/server-side-rendering/samples/component/main.html rename to test/server-side-rendering/samples/component/main.svelte index ecb4297a40..ac0b429163 100644 --- a/test/server-side-rendering/samples/component/main.html +++ b/test/server-side-rendering/samples/component/main.svelte @@ -1,5 +1,5 @@
diff --git a/test/server-side-rendering/samples/computed/main.html b/test/server-side-rendering/samples/computed/main.svelte similarity index 100% rename from test/server-side-rendering/samples/computed/main.html rename to test/server-side-rendering/samples/computed/main.svelte diff --git a/test/server-side-rendering/samples/default-data-override/main.html b/test/server-side-rendering/samples/default-data-override/main.svelte similarity index 100% rename from test/server-side-rendering/samples/default-data-override/main.html rename to test/server-side-rendering/samples/default-data-override/main.svelte diff --git a/test/server-side-rendering/samples/default-data/main.html b/test/server-side-rendering/samples/default-data/main.svelte similarity index 100% rename from test/server-side-rendering/samples/default-data/main.html rename to test/server-side-rendering/samples/default-data/main.svelte diff --git a/test/server-side-rendering/samples/directives/main.html b/test/server-side-rendering/samples/directives/main.svelte similarity index 100% rename from test/server-side-rendering/samples/directives/main.html rename to test/server-side-rendering/samples/directives/main.svelte diff --git a/test/server-side-rendering/samples/dynamic-text-escaped/main.html b/test/server-side-rendering/samples/dynamic-text-escaped/main.svelte similarity index 100% rename from test/server-side-rendering/samples/dynamic-text-escaped/main.html rename to test/server-side-rendering/samples/dynamic-text-escaped/main.svelte diff --git a/test/server-side-rendering/samples/dynamic-text/main.html b/test/server-side-rendering/samples/dynamic-text/main.svelte similarity index 100% rename from test/server-side-rendering/samples/dynamic-text/main.html rename to test/server-side-rendering/samples/dynamic-text/main.svelte diff --git a/test/server-side-rendering/samples/each-block/main.html b/test/server-side-rendering/samples/each-block/main.svelte similarity index 100% rename from test/server-side-rendering/samples/each-block/main.html rename to test/server-side-rendering/samples/each-block/main.svelte diff --git a/test/server-side-rendering/samples/empty-elements-closed/main.html b/test/server-side-rendering/samples/empty-elements-closed/main.svelte similarity index 100% rename from test/server-side-rendering/samples/empty-elements-closed/main.html rename to test/server-side-rendering/samples/empty-elements-closed/main.svelte diff --git a/test/server-side-rendering/samples/entities/main.html b/test/server-side-rendering/samples/entities/main.svelte similarity index 100% rename from test/server-side-rendering/samples/entities/main.html rename to test/server-side-rendering/samples/entities/main.svelte diff --git a/test/server-side-rendering/samples/head-title/_actual-head.html b/test/server-side-rendering/samples/head-title/_actual-head.html deleted file mode 100644 index 7d696352f9..0000000000 --- a/test/server-side-rendering/samples/head-title/_actual-head.html +++ /dev/null @@ -1 +0,0 @@ -a custom title \ No newline at end of file diff --git a/test/server-side-rendering/samples/head-title/main.html b/test/server-side-rendering/samples/head-title/main.svelte similarity index 100% rename from test/server-side-rendering/samples/head-title/main.html rename to test/server-side-rendering/samples/head-title/main.svelte diff --git a/test/server-side-rendering/samples/helpers/main.html b/test/server-side-rendering/samples/helpers/main.svelte similarity index 100% rename from test/server-side-rendering/samples/helpers/main.html rename to test/server-side-rendering/samples/helpers/main.svelte diff --git a/test/server-side-rendering/samples/if-block-false/main.html b/test/server-side-rendering/samples/if-block-false/main.svelte similarity index 100% rename from test/server-side-rendering/samples/if-block-false/main.html rename to test/server-side-rendering/samples/if-block-false/main.svelte diff --git a/test/server-side-rendering/samples/if-block-true/main.html b/test/server-side-rendering/samples/if-block-true/main.svelte similarity index 100% rename from test/server-side-rendering/samples/if-block-true/main.html rename to test/server-side-rendering/samples/if-block-true/main.svelte diff --git a/test/server-side-rendering/samples/import-non-component/main.html b/test/server-side-rendering/samples/import-non-component/main.svelte similarity index 100% rename from test/server-side-rendering/samples/import-non-component/main.html rename to test/server-side-rendering/samples/import-non-component/main.svelte diff --git a/test/server-side-rendering/samples/raw-mustaches/main.html b/test/server-side-rendering/samples/raw-mustaches/main.svelte similarity index 100% rename from test/server-side-rendering/samples/raw-mustaches/main.html rename to test/server-side-rendering/samples/raw-mustaches/main.svelte diff --git a/test/server-side-rendering/samples/sanitize-name/[foo].html b/test/server-side-rendering/samples/sanitize-name/[foo].svelte similarity index 100% rename from test/server-side-rendering/samples/sanitize-name/[foo].html rename to test/server-side-rendering/samples/sanitize-name/[foo].svelte diff --git a/test/server-side-rendering/samples/sanitize-name/main.html b/test/server-side-rendering/samples/sanitize-name/main.html deleted file mode 100644 index 6d7986da2e..0000000000 --- a/test/server-side-rendering/samples/sanitize-name/main.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test/server-side-rendering/samples/sanitize-name/main.svelte b/test/server-side-rendering/samples/sanitize-name/main.svelte new file mode 100644 index 0000000000..1438843da9 --- /dev/null +++ b/test/server-side-rendering/samples/sanitize-name/main.svelte @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/server-side-rendering/samples/static-div/main.html b/test/server-side-rendering/samples/static-div/main.svelte similarity index 100% rename from test/server-side-rendering/samples/static-div/main.html rename to test/server-side-rendering/samples/static-div/main.svelte diff --git a/test/server-side-rendering/samples/static-text/main.html b/test/server-side-rendering/samples/static-text/main.svelte similarity index 100% rename from test/server-side-rendering/samples/static-text/main.html rename to test/server-side-rendering/samples/static-text/main.svelte diff --git a/test/server-side-rendering/samples/styles-nested/One.html b/test/server-side-rendering/samples/styles-nested/One.svelte similarity index 84% rename from test/server-side-rendering/samples/styles-nested/One.html rename to test/server-side-rendering/samples/styles-nested/One.svelte index df5512b91a..94b44675c8 100644 --- a/test/server-side-rendering/samples/styles-nested/One.html +++ b/test/server-side-rendering/samples/styles-nested/One.svelte @@ -1,5 +1,5 @@ diff --git a/test/server-side-rendering/samples/styles-nested/Two.html b/test/server-side-rendering/samples/styles-nested/Two.svelte similarity index 100% rename from test/server-side-rendering/samples/styles-nested/Two.html rename to test/server-side-rendering/samples/styles-nested/Two.svelte diff --git a/test/server-side-rendering/samples/styles-nested/main.html b/test/server-side-rendering/samples/styles-nested/main.svelte similarity index 78% rename from test/server-side-rendering/samples/styles-nested/main.html rename to test/server-side-rendering/samples/styles-nested/main.svelte index 11775475b8..d6f1d594e3 100644 --- a/test/server-side-rendering/samples/styles-nested/main.html +++ b/test/server-side-rendering/samples/styles-nested/main.svelte @@ -1,5 +1,5 @@
red
diff --git a/test/server-side-rendering/samples/styles/main.html b/test/server-side-rendering/samples/styles/main.svelte similarity index 100% rename from test/server-side-rendering/samples/styles/main.html rename to test/server-side-rendering/samples/styles/main.svelte diff --git a/test/server-side-rendering/samples/textarea-children/main.html b/test/server-side-rendering/samples/textarea-children/main.svelte similarity index 100% rename from test/server-side-rendering/samples/textarea-children/main.html rename to test/server-side-rendering/samples/textarea-children/main.svelte diff --git a/test/server-side-rendering/samples/textarea-value/main.html b/test/server-side-rendering/samples/textarea-value/main.svelte similarity index 100% rename from test/server-side-rendering/samples/textarea-value/main.html rename to test/server-side-rendering/samples/textarea-value/main.svelte diff --git a/test/server-side-rendering/samples/triple/main.html b/test/server-side-rendering/samples/triple/main.svelte similarity index 100% rename from test/server-side-rendering/samples/triple/main.html rename to test/server-side-rendering/samples/triple/main.svelte diff --git a/test/sourcemaps/index.js b/test/sourcemaps/index.js index 7bdcaa7f41..79028719b9 100644 --- a/test/sourcemaps/index.js +++ b/test/sourcemaps/index.js @@ -21,7 +21,7 @@ describe("sourcemaps", () => { const config = loadConfig(`./sourcemaps/samples/${dir}/_config.js`); const filename = path.resolve( - `test/sourcemaps/samples/${dir}/input.html` + `test/sourcemaps/samples/${dir}/input.svelte` ); const outputFilename = path.resolve( `test/sourcemaps/samples/${dir}/output` @@ -56,8 +56,8 @@ describe("sourcemaps", () => { ); } - assert.deepEqual(js.map.sources, ["input.html"]); - if (css.map) assert.deepEqual(css.map.sources, ["input.html"]); + assert.deepEqual(js.map.sources, ["input.svelte"]); + if (css.map) assert.deepEqual(css.map.sources, ["input.svelte"]); const { test } = require(`./samples/${dir}/test.js`); diff --git a/test/sourcemaps/samples/basic/input.html b/test/sourcemaps/samples/basic/input.svelte similarity index 100% rename from test/sourcemaps/samples/basic/input.html rename to test/sourcemaps/samples/basic/input.svelte diff --git a/test/sourcemaps/samples/basic/test.js b/test/sourcemaps/samples/basic/test.js index f0680b7351..f13ff5d0e1 100644 --- a/test/sourcemaps/samples/basic/test.js +++ b/test/sourcemaps/samples/basic/test.js @@ -12,7 +12,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column @@ -26,7 +26,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/binding-shorthand.skip/input.html b/test/sourcemaps/samples/binding-shorthand.skip/input.svelte similarity index 100% rename from test/sourcemaps/samples/binding-shorthand.skip/input.html rename to test/sourcemaps/samples/binding-shorthand.skip/input.svelte diff --git a/test/sourcemaps/samples/binding-shorthand.skip/test.js b/test/sourcemaps/samples/binding-shorthand.skip/test.js index 8c2216ead5..cdfbbdc091 100644 --- a/test/sourcemaps/samples/binding-shorthand.skip/test.js +++ b/test/sourcemaps/samples/binding-shorthand.skip/test.js @@ -13,7 +13,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/binding/input.html b/test/sourcemaps/samples/binding/input.svelte similarity index 100% rename from test/sourcemaps/samples/binding/input.html rename to test/sourcemaps/samples/binding/input.svelte diff --git a/test/sourcemaps/samples/binding/test.js b/test/sourcemaps/samples/binding/test.js index a0750d89a1..31c0e98442 100644 --- a/test/sourcemaps/samples/binding/test.js +++ b/test/sourcemaps/samples/binding/test.js @@ -12,7 +12,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column @@ -26,7 +26,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual(actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/css/input.html b/test/sourcemaps/samples/css/input.svelte similarity index 100% rename from test/sourcemaps/samples/css/input.html rename to test/sourcemaps/samples/css/input.svelte diff --git a/test/sourcemaps/samples/css/test.js b/test/sourcemaps/samples/css/test.js index c1f55612eb..54082bd4ee 100644 --- a/test/sourcemaps/samples/css/test.js +++ b/test/sourcemaps/samples/css/test.js @@ -9,7 +9,7 @@ export function test({ assert, smcCss, locateInSource, locateInGeneratedCss }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/each-block/input.html b/test/sourcemaps/samples/each-block/input.svelte similarity index 100% rename from test/sourcemaps/samples/each-block/input.html rename to test/sourcemaps/samples/each-block/input.svelte diff --git a/test/sourcemaps/samples/each-block/test.js b/test/sourcemaps/samples/each-block/test.js index b0c1eb9583..6e9d2d70b0 100644 --- a/test/sourcemaps/samples/each-block/test.js +++ b/test/sourcemaps/samples/each-block/test.js @@ -10,7 +10,7 @@ export function test({ assert, code, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/script/input.html b/test/sourcemaps/samples/script/input.svelte similarity index 100% rename from test/sourcemaps/samples/script/input.html rename to test/sourcemaps/samples/script/input.svelte diff --git a/test/sourcemaps/samples/script/test.js b/test/sourcemaps/samples/script/test.js index 87818fef09..73971ef487 100644 --- a/test/sourcemaps/samples/script/test.js +++ b/test/sourcemaps/samples/script/test.js @@ -8,7 +8,7 @@ export function test({ assert, smc, locateInSource, locateInGenerated }) { }); assert.deepEqual( actual, { - source: 'input.html', + source: 'input.svelte', name: null, line: expected.line + 1, column: expected.column diff --git a/test/sourcemaps/samples/static-no-script/input.html b/test/sourcemaps/samples/static-no-script/input.svelte similarity index 100% rename from test/sourcemaps/samples/static-no-script/input.html rename to test/sourcemaps/samples/static-no-script/input.svelte diff --git a/test/sourcemaps/samples/static-no-script/test.js b/test/sourcemaps/samples/static-no-script/test.js index d4b66d9abc..a8f4d89ab8 100644 --- a/test/sourcemaps/samples/static-no-script/test.js +++ b/test/sourcemaps/samples/static-no-script/test.js @@ -2,8 +2,8 @@ const fs = require( 'fs' ); const path = require( 'path' ); export function test({ assert, map }) { - assert.deepEqual( map.sources, [ 'input.html' ]); + assert.deepEqual( map.sources, [ 'input.svelte' ]); assert.deepEqual( map.sourcesContent, [ - fs.readFileSync( path.join( __dirname, 'input.html' ), 'utf-8' ) + fs.readFileSync( path.join( __dirname, 'input.svelte' ), 'utf-8' ) ]); } diff --git a/test/stats/index.js b/test/stats/index.js index e0b114dd9a..fe4c2ac55b 100644 --- a/test/stats/index.js +++ b/test/stats/index.js @@ -16,7 +16,7 @@ describe('stats', () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`./stats/samples/${dir}/_config.js`); - const filename = `test/stats/samples/${dir}/input.html`; + const filename = `test/stats/samples/${dir}/input.svelte`; const input = fs.readFileSync(filename, 'utf-8').replace(/\s+$/, ''); const expectedWarnings = diff --git a/test/stats/samples/basic/input.html b/test/stats/samples/basic/input.svelte similarity index 100% rename from test/stats/samples/basic/input.html rename to test/stats/samples/basic/input.svelte diff --git a/test/stats/samples/duplicate-globals/_config.js b/test/stats/samples/duplicate-globals/_config.js new file mode 100644 index 0000000000..71c255d54b --- /dev/null +++ b/test/stats/samples/duplicate-globals/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/test/stats/samples/duplicate-globals/input.svelte b/test/stats/samples/duplicate-globals/input.svelte new file mode 100644 index 0000000000..e7c004f54a --- /dev/null +++ b/test/stats/samples/duplicate-globals/input.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/stats/samples/duplicate-non-hoistable/_config.js b/test/stats/samples/duplicate-non-hoistable/_config.js new file mode 100644 index 0000000000..4b598412a9 --- /dev/null +++ b/test/stats/samples/duplicate-non-hoistable/_config.js @@ -0,0 +1,16 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'console', + injected: false, + export_name: null, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + } + ]); + }, +}; diff --git a/test/stats/samples/duplicate-non-hoistable/input.svelte b/test/stats/samples/duplicate-non-hoistable/input.svelte new file mode 100644 index 0000000000..90f7734008 --- /dev/null +++ b/test/stats/samples/duplicate-non-hoistable/input.svelte @@ -0,0 +1,9 @@ + + + + +

{console}

\ No newline at end of file diff --git a/test/stats/samples/duplicate-vars/_config.js b/test/stats/samples/duplicate-vars/_config.js new file mode 100644 index 0000000000..f4f71fe021 --- /dev/null +++ b/test/stats/samples/duplicate-vars/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'foo', + injected: false, + export_name: null, + module: true, + mutated: false, + reassigned: false, + referenced: false, + writable: true + }, + { + name: 'foo', + injected: false, + export_name: null, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + } + ]); + }, +}; diff --git a/test/stats/samples/duplicate-vars/input.svelte b/test/stats/samples/duplicate-vars/input.svelte new file mode 100644 index 0000000000..20c48738db --- /dev/null +++ b/test/stats/samples/duplicate-vars/input.svelte @@ -0,0 +1,9 @@ + + + + +

{foo}

\ No newline at end of file diff --git a/test/stats/samples/implicit-action/_config.js b/test/stats/samples/implicit-action/_config.js new file mode 100644 index 0000000000..71c255d54b --- /dev/null +++ b/test/stats/samples/implicit-action/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/test/stats/samples/implicit-action/input.svelte b/test/stats/samples/implicit-action/input.svelte new file mode 100644 index 0000000000..466495d255 --- /dev/null +++ b/test/stats/samples/implicit-action/input.svelte @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/test/stats/samples/implicit-reactive/_config.js b/test/stats/samples/implicit-reactive/_config.js new file mode 100644 index 0000000000..0137632d2c --- /dev/null +++ b/test/stats/samples/implicit-reactive/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'a', + injected: false, + export_name: null, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: 'b', + injected: true, + export_name: null, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + } + ]); + }, +}; diff --git a/test/stats/samples/implicit-reactive/input.svelte b/test/stats/samples/implicit-reactive/input.svelte new file mode 100644 index 0000000000..5958474d1b --- /dev/null +++ b/test/stats/samples/implicit-reactive/input.svelte @@ -0,0 +1,6 @@ + + +

{a} + 1 = {b}

\ No newline at end of file diff --git a/test/stats/samples/implicit/_config.js b/test/stats/samples/implicit/_config.js new file mode 100644 index 0000000000..71c255d54b --- /dev/null +++ b/test/stats/samples/implicit/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/test/stats/samples/implicit/input.svelte b/test/stats/samples/implicit/input.svelte new file mode 100644 index 0000000000..e076ac55f8 --- /dev/null +++ b/test/stats/samples/implicit/input.svelte @@ -0,0 +1 @@ +{foo} \ No newline at end of file diff --git a/test/stats/samples/imports/_config.js b/test/stats/samples/imports/_config.js index f7c15183dd..287c5837ad 100644 --- a/test/stats/samples/imports/_config.js +++ b/test/stats/samples/imports/_config.js @@ -1,17 +1,35 @@ export default { test(assert, stats) { - assert.deepEqual(stats.imports, [ + assert.deepEqual(stats.vars, [ { - source: 'x', - specifiers: [{ name: 'default', as: 'x' }] + name: 'x', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: false }, { - source: 'y', - specifiers: [{ name: 'y', as: 'y' }] + name: 'y', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: false }, { - source: 'z', - specifiers: [{ name: '*', as: 'z' }] + name: 'z', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: false } ]); } diff --git a/test/stats/samples/imports/input.html b/test/stats/samples/imports/input.svelte similarity index 100% rename from test/stats/samples/imports/input.html rename to test/stats/samples/imports/input.svelte diff --git a/test/stats/samples/mutated-vs-reassigned-bindings/_config.js b/test/stats/samples/mutated-vs-reassigned-bindings/_config.js new file mode 100644 index 0000000000..a1d027cbb5 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned-bindings/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'count', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + }, + { + name: 'user', + export_name: null, + injected: false, + module: false, + mutated: true, + reassigned: false, + referenced: true, + writable: false + } + ]); + } +}; \ No newline at end of file diff --git a/test/stats/samples/mutated-vs-reassigned-bindings/input.svelte b/test/stats/samples/mutated-vs-reassigned-bindings/input.svelte new file mode 100644 index 0000000000..c1186ad3a7 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned-bindings/input.svelte @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/test/stats/samples/mutated-vs-reassigned/_config.js b/test/stats/samples/mutated-vs-reassigned/_config.js new file mode 100644 index 0000000000..a1d027cbb5 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'count', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + }, + { + name: 'user', + export_name: null, + injected: false, + module: false, + mutated: true, + reassigned: false, + referenced: true, + writable: false + } + ]); + } +}; \ No newline at end of file diff --git a/test/stats/samples/mutated-vs-reassigned/input.svelte b/test/stats/samples/mutated-vs-reassigned/input.svelte new file mode 100644 index 0000000000..6a5e604c26 --- /dev/null +++ b/test/stats/samples/mutated-vs-reassigned/input.svelte @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/test/stats/samples/props/_config.js b/test/stats/samples/props/_config.js index 50c01e2ffb..cbec831f61 100644 --- a/test/stats/samples/props/_config.js +++ b/test/stats/samples/props/_config.js @@ -1,5 +1,46 @@ export default { test(assert, stats) { - assert.deepEqual(stats.props.sort(), ['cats', 'name']); + assert.deepEqual(stats.vars, [ + { + name: 'name', + export_name: 'name', + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: 'cats', + export_name: 'cats', + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: 'foo', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: false, + writable: true + }, + { + name: 'bar', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: true, + referenced: true, + writable: true + } + ]); } }; \ No newline at end of file diff --git a/test/stats/samples/props/input.html b/test/stats/samples/props/input.svelte similarity index 100% rename from test/stats/samples/props/input.html rename to test/stats/samples/props/input.svelte diff --git a/test/stats/samples/store-referenced/_config.js b/test/stats/samples/store-referenced/_config.js new file mode 100644 index 0000000000..ecb958df1e --- /dev/null +++ b/test/stats/samples/store-referenced/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'foo', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: '$foo', + export_name: null, + injected: true, + module: false, + mutated: true, + reassigned: false, + referenced: true, + writable: true + } + ]); + } +}; diff --git a/test/stats/samples/store-referenced/input.svelte b/test/stats/samples/store-referenced/input.svelte new file mode 100644 index 0000000000..0222372f4d --- /dev/null +++ b/test/stats/samples/store-referenced/input.svelte @@ -0,0 +1,5 @@ + + +{$foo} \ No newline at end of file diff --git a/test/stats/samples/store-unreferenced/_config.js b/test/stats/samples/store-unreferenced/_config.js new file mode 100644 index 0000000000..9ea5784f92 --- /dev/null +++ b/test/stats/samples/store-unreferenced/_config.js @@ -0,0 +1,26 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, [ + { + name: 'foo', + export_name: null, + injected: false, + module: false, + mutated: false, + reassigned: false, + referenced: true, + writable: true + }, + { + name: '$foo', + export_name: null, + injected: true, + module: false, + mutated: true, + reassigned: false, + referenced: false, + writable: true + } + ]); + } +}; diff --git a/test/stats/samples/store-unreferenced/input.svelte b/test/stats/samples/store-unreferenced/input.svelte new file mode 100644 index 0000000000..3ad525047d --- /dev/null +++ b/test/stats/samples/store-unreferenced/input.svelte @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/test/stats/samples/template-references/_config.js b/test/stats/samples/template-references/_config.js index 0bc844928f..71c255d54b 100644 --- a/test/stats/samples/template-references/_config.js +++ b/test/stats/samples/template-references/_config.js @@ -1,8 +1,5 @@ export default { test(assert, stats) { - assert.equal(stats.templateReferences.size, 3); - assert.ok(stats.templateReferences.has('foo')); - assert.ok(stats.templateReferences.has('Bar')); - assert.ok(stats.templateReferences.has('baz')); + assert.deepEqual(stats.vars, []); }, }; diff --git a/test/stats/samples/template-references/input.html b/test/stats/samples/template-references/input.svelte similarity index 100% rename from test/stats/samples/template-references/input.html rename to test/stats/samples/template-references/input.svelte diff --git a/test/stats/samples/undeclared/_config.js b/test/stats/samples/undeclared/_config.js new file mode 100644 index 0000000000..71c255d54b --- /dev/null +++ b/test/stats/samples/undeclared/_config.js @@ -0,0 +1,5 @@ +export default { + test(assert, stats) { + assert.deepEqual(stats.vars, []); + }, +}; diff --git a/test/stats/samples/undeclared/input.svelte b/test/stats/samples/undeclared/input.svelte new file mode 100644 index 0000000000..0178466fe3 --- /dev/null +++ b/test/stats/samples/undeclared/input.svelte @@ -0,0 +1,3 @@ + + +{foo} \ No newline at end of file diff --git a/test/store/index.js b/test/store/index.js index fb518cf24d..f4f89bf9a8 100644 --- a/test/store/index.js +++ b/test/store/index.js @@ -21,6 +21,27 @@ describe('store', () => { assert.deepEqual(values, [0, 1, 2]); }); + + it('calls provided subscribe handler', () => { + let called = 0; + + const store = writable(0, () => { + called += 1; + return () => called -= 1; + }); + + const unsubscribe1 = store.subscribe(() => {}); + assert.equal(called, 1); + + const unsubscribe2 = store.subscribe(() => {}); + assert.equal(called, 1); + + unsubscribe1(); + assert.equal(called, 1); + + unsubscribe2(); + assert.equal(called, 0); + }); }); describe('readable', () => { diff --git a/test/validator/index.js b/test/validator/index.js index 9ca3fc57d1..f68cb8831d 100644 --- a/test/validator/index.js +++ b/test/validator/index.js @@ -17,43 +17,33 @@ describe("validate", () => { (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`./validator/samples/${dir}/_config.js`); - const input = fs.readFileSync(`test/validator/samples/${dir}/input.html`, "utf-8").replace(/\s+$/, ""); - const expectedWarnings = tryToLoadJson(`test/validator/samples/${dir}/warnings.json`) || []; - const expectedErrors = tryToLoadJson(`test/validator/samples/${dir}/errors.json`); + const input = fs.readFileSync(`test/validator/samples/${dir}/input.svelte`, "utf-8").replace(/\s+$/, ""); + const expected_warnings = tryToLoadJson(`test/validator/samples/${dir}/warnings.json`) || []; + const expected_errors = tryToLoadJson(`test/validator/samples/${dir}/errors.json`); let error; try { - const warnings = []; - const { stats } = svelte.compile(input, { - onwarn(warning) { - const { code, message, pos, start, end } = warning; - warnings.push({ code, message, pos, start, end }); - }, dev: config.dev, legacy: config.legacy, generate: false }); - assert.equal(stats.warnings.length, warnings.length); - stats.warnings.forEach((full, i) => { - const lite = warnings[i]; - assert.deepEqual({ - code: full.code, - message: full.message, - pos: full.pos, - start: full.start, - end: full.end - }, lite); - }); + const warnings = stats.warnings.map(w => ({ + code: w.code, + message: w.message, + pos: w.pos, + start: w.start, + end: w.end + })); - assert.deepEqual(warnings, expectedWarnings); + assert.deepEqual(warnings, expected_warnings); } catch (e) { error = e; } - const expected = expectedErrors && expectedErrors[0]; + const expected = expected_errors && expected_errors[0]; if (error || expected) { if (error && !expected) { @@ -64,11 +54,16 @@ describe("validate", () => { throw new Error(`Expected an error: ${expected.message}`); } - assert.equal(error.code, expected.code); - assert.equal(error.message, expected.message); - assert.deepEqual(error.start, expected.start); - assert.deepEqual(error.end, expected.end); - assert.equal(error.pos, expected.pos); + try { + assert.equal(error.code, expected.code); + assert.equal(error.message, expected.message); + assert.deepEqual(error.start, expected.start); + assert.deepEqual(error.end, expected.end); + assert.equal(error.pos, expected.pos); + } catch (e) { + console.error(error) + throw e; + } } }); }); @@ -102,7 +97,7 @@ describe("validate", () => { name: "_", generate: false }); - + assert.deepEqual(stats.warnings, []); }); }); diff --git a/test/validator/samples/a11y-alt-text/input.html b/test/validator/samples/a11y-alt-text/input.svelte similarity index 100% rename from test/validator/samples/a11y-alt-text/input.html rename to test/validator/samples/a11y-alt-text/input.svelte diff --git a/test/validator/samples/a11y-anchor-has-content/input.html b/test/validator/samples/a11y-anchor-has-content/input.svelte similarity index 100% rename from test/validator/samples/a11y-anchor-has-content/input.html rename to test/validator/samples/a11y-anchor-has-content/input.svelte diff --git a/test/validator/samples/a11y-anchor-in-svg-is-valid/input.html b/test/validator/samples/a11y-anchor-in-svg-is-valid/input.svelte similarity index 100% rename from test/validator/samples/a11y-anchor-in-svg-is-valid/input.html rename to test/validator/samples/a11y-anchor-in-svg-is-valid/input.svelte diff --git a/test/validator/samples/a11y-anchor-is-valid/input.html b/test/validator/samples/a11y-anchor-is-valid/input.svelte similarity index 100% rename from test/validator/samples/a11y-anchor-is-valid/input.html rename to test/validator/samples/a11y-anchor-is-valid/input.svelte diff --git a/test/validator/samples/a11y-aria-props/input.html b/test/validator/samples/a11y-aria-props/input.svelte similarity index 100% rename from test/validator/samples/a11y-aria-props/input.html rename to test/validator/samples/a11y-aria-props/input.svelte diff --git a/test/validator/samples/a11y-aria-role/input.html b/test/validator/samples/a11y-aria-role/input.svelte similarity index 100% rename from test/validator/samples/a11y-aria-role/input.html rename to test/validator/samples/a11y-aria-role/input.svelte diff --git a/test/validator/samples/a11y-aria-unsupported-element/input.html b/test/validator/samples/a11y-aria-unsupported-element/input.svelte similarity index 100% rename from test/validator/samples/a11y-aria-unsupported-element/input.html rename to test/validator/samples/a11y-aria-unsupported-element/input.svelte diff --git a/test/validator/samples/a11y-figcaption-right-place/input.html b/test/validator/samples/a11y-figcaption-right-place/input.svelte similarity index 100% rename from test/validator/samples/a11y-figcaption-right-place/input.html rename to test/validator/samples/a11y-figcaption-right-place/input.svelte diff --git a/test/validator/samples/a11y-figcaption-wrong-place/input.html b/test/validator/samples/a11y-figcaption-wrong-place/input.svelte similarity index 100% rename from test/validator/samples/a11y-figcaption-wrong-place/input.html rename to test/validator/samples/a11y-figcaption-wrong-place/input.svelte diff --git a/test/validator/samples/a11y-heading-has-content/input.html b/test/validator/samples/a11y-heading-has-content/input.svelte similarity index 100% rename from test/validator/samples/a11y-heading-has-content/input.html rename to test/validator/samples/a11y-heading-has-content/input.svelte diff --git a/test/validator/samples/a11y-html-has-lang/input.html b/test/validator/samples/a11y-html-has-lang/input.svelte similarity index 100% rename from test/validator/samples/a11y-html-has-lang/input.html rename to test/validator/samples/a11y-html-has-lang/input.svelte diff --git a/test/validator/samples/a11y-iframe-has-title/input.html b/test/validator/samples/a11y-iframe-has-title/input.svelte similarity index 100% rename from test/validator/samples/a11y-iframe-has-title/input.html rename to test/validator/samples/a11y-iframe-has-title/input.svelte diff --git a/test/validator/samples/a11y-no-access-key/input.html b/test/validator/samples/a11y-no-access-key/input.svelte similarity index 100% rename from test/validator/samples/a11y-no-access-key/input.html rename to test/validator/samples/a11y-no-access-key/input.svelte diff --git a/test/validator/samples/a11y-no-autofocus/input.html b/test/validator/samples/a11y-no-autofocus/input.svelte similarity index 100% rename from test/validator/samples/a11y-no-autofocus/input.html rename to test/validator/samples/a11y-no-autofocus/input.svelte diff --git a/test/validator/samples/a11y-no-distracting-elements/input.html b/test/validator/samples/a11y-no-distracting-elements/input.svelte similarity index 100% rename from test/validator/samples/a11y-no-distracting-elements/input.html rename to test/validator/samples/a11y-no-distracting-elements/input.svelte diff --git a/test/validator/samples/a11y-not-on-components/input.html b/test/validator/samples/a11y-not-on-components/input.svelte similarity index 64% rename from test/validator/samples/a11y-not-on-components/input.html rename to test/validator/samples/a11y-not-on-components/input.svelte index e0ee327280..c7673a67ed 100644 --- a/test/validator/samples/a11y-not-on-components/input.html +++ b/test/validator/samples/a11y-not-on-components/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/a11y-not-on-components/warnings.json b/test/validator/samples/a11y-not-on-components/warnings.json index 7e17fda95a..4d8fb62182 100644 --- a/test/validator/samples/a11y-not-on-components/warnings.json +++ b/test/validator/samples/a11y-not-on-components/warnings.json @@ -5,13 +5,13 @@ "start": { "column": 8, "line": 6, - "character": 86 + "character": 88 }, "end": { "line": 6, "column": 17, - "character": 95 + "character": 97 }, - "pos": 86 + "pos": 88 } ] diff --git a/test/validator/samples/a11y-scope/input.html b/test/validator/samples/a11y-scope/input.svelte similarity index 100% rename from test/validator/samples/a11y-scope/input.html rename to test/validator/samples/a11y-scope/input.svelte diff --git a/test/validator/samples/a11y-tabindex-no-positive/input.html b/test/validator/samples/a11y-tabindex-no-positive/input.svelte similarity index 100% rename from test/validator/samples/a11y-tabindex-no-positive/input.html rename to test/validator/samples/a11y-tabindex-no-positive/input.svelte diff --git a/test/validator/samples/action-invalid/input.html b/test/validator/samples/action-invalid/input.svelte similarity index 100% rename from test/validator/samples/action-invalid/input.html rename to test/validator/samples/action-invalid/input.svelte diff --git a/test/validator/samples/action-on-component/errors.json b/test/validator/samples/action-on-component/errors.json index 596ef16482..7ffaeb45fd 100644 --- a/test/validator/samples/action-on-component/errors.json +++ b/test/validator/samples/action-on-component/errors.json @@ -1,15 +1,15 @@ [{ "code": "invalid-action", "message": "Actions can only be applied to DOM elements, not components", - "pos": 84, + "pos": 86, "start": { "line": 7, "column": 8, - "character": 84 + "character": 86 }, "end": { "line": 7, "column": 15, - "character": 91 + "character": 93 } }] \ No newline at end of file diff --git a/test/validator/samples/action-on-component/input.html b/test/validator/samples/action-on-component/input.html deleted file mode 100644 index 788bedaa94..0000000000 --- a/test/validator/samples/action-on-component/input.html +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/test/validator/samples/action-on-component/input.svelte b/test/validator/samples/action-on-component/input.svelte new file mode 100644 index 0000000000..a067c05dbd --- /dev/null +++ b/test/validator/samples/action-on-component/input.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/validator/samples/animation-duplicate/input.html b/test/validator/samples/animation-duplicate/input.svelte similarity index 100% rename from test/validator/samples/animation-duplicate/input.html rename to test/validator/samples/animation-duplicate/input.svelte diff --git a/test/validator/samples/animation-missing/input.html b/test/validator/samples/animation-missing/input.svelte similarity index 100% rename from test/validator/samples/animation-missing/input.html rename to test/validator/samples/animation-missing/input.svelte diff --git a/test/validator/samples/animation-not-in-each/input.html b/test/validator/samples/animation-not-in-each/input.svelte similarity index 100% rename from test/validator/samples/animation-not-in-each/input.html rename to test/validator/samples/animation-not-in-each/input.svelte diff --git a/test/validator/samples/animation-not-in-keyed-each/input.html b/test/validator/samples/animation-not-in-keyed-each/input.svelte similarity index 100% rename from test/validator/samples/animation-not-in-keyed-each/input.html rename to test/validator/samples/animation-not-in-keyed-each/input.svelte diff --git a/test/validator/samples/animation-siblings/input.html b/test/validator/samples/animation-siblings/input.svelte similarity index 100% rename from test/validator/samples/animation-siblings/input.html rename to test/validator/samples/animation-siblings/input.svelte diff --git a/test/validator/samples/await-component-is-used/input.html b/test/validator/samples/await-component-is-used/input.svelte similarity index 77% rename from test/validator/samples/await-component-is-used/input.html rename to test/validator/samples/await-component-is-used/input.svelte index 029b549675..5fe87e0c70 100644 --- a/test/validator/samples/await-component-is-used/input.html +++ b/test/validator/samples/await-component-is-used/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/binding-dimensions-svg-child/input.html b/test/validator/samples/binding-dimensions-svg-child/input.svelte similarity index 100% rename from test/validator/samples/binding-dimensions-svg-child/input.html rename to test/validator/samples/binding-dimensions-svg-child/input.svelte diff --git a/test/validator/samples/binding-dimensions-svg/input.html b/test/validator/samples/binding-dimensions-svg/input.svelte similarity index 100% rename from test/validator/samples/binding-dimensions-svg/input.html rename to test/validator/samples/binding-dimensions-svg/input.svelte diff --git a/test/validator/samples/binding-dimensions-void/input.html b/test/validator/samples/binding-dimensions-void/input.svelte similarity index 100% rename from test/validator/samples/binding-dimensions-void/input.html rename to test/validator/samples/binding-dimensions-void/input.svelte diff --git a/test/validator/samples/binding-input-checked/input.html b/test/validator/samples/binding-input-checked/input.svelte similarity index 100% rename from test/validator/samples/binding-input-checked/input.html rename to test/validator/samples/binding-input-checked/input.svelte diff --git a/test/validator/samples/binding-input-type-boolean/input.html b/test/validator/samples/binding-input-type-boolean/input.svelte similarity index 100% rename from test/validator/samples/binding-input-type-boolean/input.html rename to test/validator/samples/binding-input-type-boolean/input.svelte diff --git a/test/validator/samples/binding-input-type-dynamic/input.html b/test/validator/samples/binding-input-type-dynamic/input.svelte similarity index 100% rename from test/validator/samples/binding-input-type-dynamic/input.html rename to test/validator/samples/binding-input-type-dynamic/input.svelte diff --git a/test/validator/samples/binding-invalid-on-element/input.html b/test/validator/samples/binding-invalid-on-element/input.svelte similarity index 100% rename from test/validator/samples/binding-invalid-on-element/input.html rename to test/validator/samples/binding-invalid-on-element/input.svelte diff --git a/test/validator/samples/binding-invalid-value/errors.json b/test/validator/samples/binding-invalid-value/errors.json new file mode 100644 index 0000000000..07eb7b0f1c --- /dev/null +++ b/test/validator/samples/binding-invalid-value/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "binding-undeclared", + "message": "foo is not declared", + "pos": 37, + "start": { + "line": 2, + "column": 19, + "character": 37 + }, + "end": { + "line": 2, + "column": 22, + "character": 40 + } +}] \ No newline at end of file diff --git a/test/validator/samples/binding-invalid-value/input.svelte b/test/validator/samples/binding-invalid-value/input.svelte new file mode 100644 index 0000000000..9eeeba5fed --- /dev/null +++ b/test/validator/samples/binding-invalid-value/input.svelte @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/test/validator/samples/binding-invalid/input.html b/test/validator/samples/binding-invalid/input.svelte similarity index 100% rename from test/validator/samples/binding-invalid/input.html rename to test/validator/samples/binding-invalid/input.svelte diff --git a/test/validator/samples/binding-select-multiple-dynamic/input.html b/test/validator/samples/binding-select-multiple-dynamic/input.svelte similarity index 100% rename from test/validator/samples/binding-select-multiple-dynamic/input.html rename to test/validator/samples/binding-select-multiple-dynamic/input.svelte diff --git a/test/validator/samples/component-slot-default-duplicate.skip/input.html b/test/validator/samples/component-slot-default-duplicate.skip/input.svelte similarity index 100% rename from test/validator/samples/component-slot-default-duplicate.skip/input.html rename to test/validator/samples/component-slot-default-duplicate.skip/input.svelte diff --git a/test/validator/samples/component-slot-default-reserved/input.html b/test/validator/samples/component-slot-default-reserved/input.svelte similarity index 100% rename from test/validator/samples/component-slot-default-reserved/input.html rename to test/validator/samples/component-slot-default-reserved/input.svelte diff --git a/test/validator/samples/component-slot-dynamic-attribute/errors.json b/test/validator/samples/component-slot-dynamic-attribute/errors.json index 6108b89bfb..8944f9cd3e 100644 --- a/test/validator/samples/component-slot-dynamic-attribute/errors.json +++ b/test/validator/samples/component-slot-dynamic-attribute/errors.json @@ -4,12 +4,12 @@ "start": { "line": 6, "column": 9, - "character": 75 + "character": 77 }, "end": { "line": 6, "column": 19, - "character": 85 + "character": 87 }, - "pos": 75 + "pos": 77 }] \ No newline at end of file diff --git a/test/validator/samples/component-slot-dynamic-attribute/input.html b/test/validator/samples/component-slot-dynamic-attribute/input.svelte similarity index 58% rename from test/validator/samples/component-slot-dynamic-attribute/input.html rename to test/validator/samples/component-slot-dynamic-attribute/input.svelte index 83e1df8aa2..1eb8b4f1f0 100644 --- a/test/validator/samples/component-slot-dynamic-attribute/input.html +++ b/test/validator/samples/component-slot-dynamic-attribute/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/component-slot-dynamic/input.html b/test/validator/samples/component-slot-dynamic/input.svelte similarity index 100% rename from test/validator/samples/component-slot-dynamic/input.html rename to test/validator/samples/component-slot-dynamic/input.svelte diff --git a/test/validator/samples/component-slot-each-block/errors.json b/test/validator/samples/component-slot-each-block/errors.json deleted file mode 100644 index 97f88e4e60..0000000000 --- a/test/validator/samples/component-slot-each-block/errors.json +++ /dev/null @@ -1,15 +0,0 @@ -[{ - "code": "invalid-slot-placement", - "message": " cannot be a child of an each-block", - "start": { - "line": 2, - "column": 1, - "character": 25 - }, - "end": { - "line": 2, - "column": 1, - "character": 25 - }, - "pos": 25 -}] \ No newline at end of file diff --git a/test/validator/samples/component-slot-each-block/input.html b/test/validator/samples/component-slot-each-block/input.html deleted file mode 100644 index ddc27a7d0d..0000000000 --- a/test/validator/samples/component-slot-each-block/input.html +++ /dev/null @@ -1,3 +0,0 @@ -{#each things as thing} - -{/each} \ No newline at end of file diff --git a/test/validator/samples/component-slot-named-duplicate.skip/input.html b/test/validator/samples/component-slot-named-duplicate.skip/input.svelte similarity index 100% rename from test/validator/samples/component-slot-named-duplicate.skip/input.html rename to test/validator/samples/component-slot-named-duplicate.skip/input.svelte diff --git a/test/validator/samples/component-slotted-each-block/errors.json b/test/validator/samples/component-slotted-each-block/errors.json index b2ae858fb6..89f394bca4 100644 --- a/test/validator/samples/component-slotted-each-block/errors.json +++ b/test/validator/samples/component-slotted-each-block/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 7, - "character": 98 + "character": 100 }, "end": { "line": 7, "column": 17, - "character": 108 + "character": 110 }, - "pos": 98 + "pos": 100 }] \ No newline at end of file diff --git a/test/validator/samples/component-slotted-each-block/input.html b/test/validator/samples/component-slotted-each-block/input.svelte similarity index 66% rename from test/validator/samples/component-slotted-each-block/input.html rename to test/validator/samples/component-slotted-each-block/input.svelte index 2c053a1e6c..f000278a99 100644 --- a/test/validator/samples/component-slotted-each-block/input.html +++ b/test/validator/samples/component-slotted-each-block/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/component-slotted-if-block/errors.json b/test/validator/samples/component-slotted-if-block/errors.json index bd3ef87fad..ab35a77fce 100644 --- a/test/validator/samples/component-slotted-if-block/errors.json +++ b/test/validator/samples/component-slotted-if-block/errors.json @@ -4,12 +4,12 @@ "start": { "line": 7, "column": 7, - "character": 86 + "character": 88 }, "end": { "line": 7, "column": 17, - "character": 96 + "character": 98 }, - "pos": 86 + "pos": 88 }] \ No newline at end of file diff --git a/test/validator/samples/component-slotted-if-block/input.html b/test/validator/samples/component-slotted-if-block/input.svelte similarity index 62% rename from test/validator/samples/component-slotted-if-block/input.html rename to test/validator/samples/component-slotted-if-block/input.svelte index eda6bc2e13..d9159dfd60 100644 --- a/test/validator/samples/component-slotted-if-block/input.html +++ b/test/validator/samples/component-slotted-if-block/input.svelte @@ -1,5 +1,5 @@ diff --git a/test/validator/samples/css-invalid-global-placement/input.html b/test/validator/samples/css-invalid-global-placement/input.svelte similarity index 100% rename from test/validator/samples/css-invalid-global-placement/input.html rename to test/validator/samples/css-invalid-global-placement/input.svelte diff --git a/test/validator/samples/css-invalid-global/input.html b/test/validator/samples/css-invalid-global/input.svelte similarity index 100% rename from test/validator/samples/css-invalid-global/input.html rename to test/validator/samples/css-invalid-global/input.svelte diff --git a/test/validator/samples/debug-invalid-args/input.html b/test/validator/samples/debug-invalid-args/input.svelte similarity index 100% rename from test/validator/samples/debug-invalid-args/input.html rename to test/validator/samples/debug-invalid-args/input.svelte diff --git a/test/validator/samples/default-export/input.html b/test/validator/samples/default-export/input.svelte similarity index 100% rename from test/validator/samples/default-export/input.html rename to test/validator/samples/default-export/input.svelte diff --git a/test/validator/samples/directive-non-expression/input.html b/test/validator/samples/directive-non-expression/input.svelte similarity index 100% rename from test/validator/samples/directive-non-expression/input.html rename to test/validator/samples/directive-non-expression/input.svelte diff --git a/test/validator/samples/each-block-invalid-context-destructured/input.html b/test/validator/samples/each-block-invalid-context-destructured/input.svelte similarity index 100% rename from test/validator/samples/each-block-invalid-context-destructured/input.html rename to test/validator/samples/each-block-invalid-context-destructured/input.svelte diff --git a/test/validator/samples/each-block-invalid-context/input.html b/test/validator/samples/each-block-invalid-context/input.svelte similarity index 100% rename from test/validator/samples/each-block-invalid-context/input.html rename to test/validator/samples/each-block-invalid-context/input.svelte diff --git a/test/validator/samples/each-block-multiple-children/input.html b/test/validator/samples/each-block-multiple-children/input.svelte similarity index 100% rename from test/validator/samples/each-block-multiple-children/input.html rename to test/validator/samples/each-block-multiple-children/input.svelte diff --git a/test/validator/samples/empty-block-dev/_config.js b/test/validator/samples/empty-block-dev/_config.js deleted file mode 100644 index e26996239d..0000000000 --- a/test/validator/samples/empty-block-dev/_config.js +++ /dev/null @@ -1,3 +0,0 @@ -export default { - dev: true -}; \ No newline at end of file diff --git a/test/validator/samples/empty-block-prod/input.html b/test/validator/samples/empty-block-prod/input.html deleted file mode 100644 index 979ff837e9..0000000000 --- a/test/validator/samples/empty-block-prod/input.html +++ /dev/null @@ -1,5 +0,0 @@ -{#each things as thing} - -{/each} - -{#each things as thing}{/each} \ No newline at end of file diff --git a/test/validator/samples/empty-block-prod/warnings.json b/test/validator/samples/empty-block-prod/warnings.json deleted file mode 100644 index 0637a088a0..0000000000 --- a/test/validator/samples/empty-block-prod/warnings.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/test/validator/samples/empty-block-dev/input.html b/test/validator/samples/empty-block/input.svelte similarity index 100% rename from test/validator/samples/empty-block-dev/input.html rename to test/validator/samples/empty-block/input.svelte diff --git a/test/validator/samples/empty-block-dev/warnings.json b/test/validator/samples/empty-block/warnings.json similarity index 100% rename from test/validator/samples/empty-block-dev/warnings.json rename to test/validator/samples/empty-block/warnings.json diff --git a/test/validator/samples/event-modifiers-invalid-passive/input.html b/test/validator/samples/event-modifiers-invalid-passive/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-invalid-passive/input.html rename to test/validator/samples/event-modifiers-invalid-passive/input.svelte diff --git a/test/validator/samples/event-modifiers-invalid/input.html b/test/validator/samples/event-modifiers-invalid/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-invalid/input.html rename to test/validator/samples/event-modifiers-invalid/input.svelte diff --git a/test/validator/samples/event-modifiers-legacy/input.html b/test/validator/samples/event-modifiers-legacy/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-legacy/input.html rename to test/validator/samples/event-modifiers-legacy/input.svelte diff --git a/test/validator/samples/event-modifiers-redundant/input.html b/test/validator/samples/event-modifiers-redundant/input.svelte similarity index 100% rename from test/validator/samples/event-modifiers-redundant/input.html rename to test/validator/samples/event-modifiers-redundant/input.svelte diff --git a/test/validator/samples/missing-component/input.html b/test/validator/samples/missing-component/input.svelte similarity index 100% rename from test/validator/samples/missing-component/input.html rename to test/validator/samples/missing-component/input.svelte diff --git a/test/validator/samples/multiple-script-default-context/errors.json b/test/validator/samples/multiple-script-default-context/errors.json index 6e9a53d691..6f0637b51b 100644 --- a/test/validator/samples/multiple-script-default-context/errors.json +++ b/test/validator/samples/multiple-script-default-context/errors.json @@ -8,8 +8,8 @@ "character": 30 }, "end": { - "line": 7, - "column": 9, - "character": 58 + "line": 5, + "column": 0, + "character": 30 } }] \ No newline at end of file diff --git a/test/validator/samples/multiple-script-default-context/input.html b/test/validator/samples/multiple-script-default-context/input.svelte similarity index 100% rename from test/validator/samples/multiple-script-default-context/input.html rename to test/validator/samples/multiple-script-default-context/input.svelte diff --git a/test/validator/samples/multiple-script-module-context/errors.json b/test/validator/samples/multiple-script-module-context/errors.json index ef8dc15273..7b86c61926 100644 --- a/test/validator/samples/multiple-script-module-context/errors.json +++ b/test/validator/samples/multiple-script-module-context/errors.json @@ -8,8 +8,8 @@ "character": 47 }, "end": { - "line": 7, - "column": 9, - "character": 92 + "line": 5, + "column": 0, + "character": 47 } }] \ No newline at end of file diff --git a/test/validator/samples/multiple-script-module-context/input.html b/test/validator/samples/multiple-script-module-context/input.svelte similarity index 100% rename from test/validator/samples/multiple-script-module-context/input.html rename to test/validator/samples/multiple-script-module-context/input.svelte diff --git a/test/validator/samples/namespace-invalid-unguessable/errors.json b/test/validator/samples/namespace-invalid-unguessable/errors.json index 98e95676c1..50288aa2c6 100644 --- a/test/validator/samples/namespace-invalid-unguessable/errors.json +++ b/test/validator/samples/namespace-invalid-unguessable/errors.json @@ -1,15 +1,15 @@ [{ "code": "invalid-namespace-property", "message": "Invalid namespace 'lol'", - "pos": 13, + "pos": 16, "start": { "line": 1, - "column": 13, - "character": 13 + "column": 16, + "character": 16 }, "end": { "line": 1, - "column": 28, - "character": 28 + "column": 31, + "character": 31 } }] diff --git a/test/validator/samples/namespace-invalid-unguessable/input.html b/test/validator/samples/namespace-invalid-unguessable/input.html deleted file mode 100644 index 1f8500503d..0000000000 --- a/test/validator/samples/namespace-invalid-unguessable/input.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/test/validator/samples/namespace-invalid-unguessable/input.svelte b/test/validator/samples/namespace-invalid-unguessable/input.svelte new file mode 100644 index 0000000000..fdbd779b5c --- /dev/null +++ b/test/validator/samples/namespace-invalid-unguessable/input.svelte @@ -0,0 +1 @@ + diff --git a/test/validator/samples/namespace-invalid/errors.json b/test/validator/samples/namespace-invalid/errors.json index 9e99fe7ab1..ddb49a33e0 100644 --- a/test/validator/samples/namespace-invalid/errors.json +++ b/test/validator/samples/namespace-invalid/errors.json @@ -1,15 +1,15 @@ [{ "code": "invalid-namespace-property", "message": "Invalid namespace 'http://www.w3.org/1999/svg' (did you mean 'http://www.w3.org/2000/svg'?)", - "pos": 13, + "pos": 16, "start": { "line": 1, - "column": 13, - "character": 13 + "column": 16, + "character": 16 }, "end": { "line": 1, - "column": 51, - "character": 51 + "column": 54, + "character": 54 } }] diff --git a/test/validator/samples/namespace-invalid/input.html b/test/validator/samples/namespace-invalid/input.html deleted file mode 100644 index 6999e7ee02..0000000000 --- a/test/validator/samples/namespace-invalid/input.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/test/validator/samples/namespace-invalid/input.svelte b/test/validator/samples/namespace-invalid/input.svelte new file mode 100644 index 0000000000..7d0189bbb4 --- /dev/null +++ b/test/validator/samples/namespace-invalid/input.svelte @@ -0,0 +1 @@ + diff --git a/test/validator/samples/namespace-non-literal/errors.json b/test/validator/samples/namespace-non-literal/errors.json index 112e2ac73b..c365065e48 100644 --- a/test/validator/samples/namespace-non-literal/errors.json +++ b/test/validator/samples/namespace-non-literal/errors.json @@ -1,15 +1,15 @@ [{ "code": "invalid-namespace-attribute", "message": "The 'namespace' attribute must be a string literal representing a valid namespace", - "pos": 13, + "pos": 16, "start": { "line": 1, - "column": 13, - "character": 13 + "column": 16, + "character": 16 }, "end": { "line": 1, - "column": 27, - "character": 27 + "column": 30, + "character": 30 } }] diff --git a/test/validator/samples/namespace-non-literal/input.html b/test/validator/samples/namespace-non-literal/input.html deleted file mode 100644 index 5f88f6d899..0000000000 --- a/test/validator/samples/namespace-non-literal/input.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/test/validator/samples/namespace-non-literal/input.svelte b/test/validator/samples/namespace-non-literal/input.svelte new file mode 100644 index 0000000000..e7d600810f --- /dev/null +++ b/test/validator/samples/namespace-non-literal/input.svelte @@ -0,0 +1 @@ + diff --git a/test/validator/samples/non-empty-block-dev/input.html b/test/validator/samples/non-empty-block-dev/input.svelte similarity index 100% rename from test/validator/samples/non-empty-block-dev/input.html rename to test/validator/samples/non-empty-block-dev/input.svelte diff --git a/test/validator/samples/prop-slot/errors.json b/test/validator/samples/prop-slot/errors.json new file mode 100644 index 0000000000..4fbfa3935c --- /dev/null +++ b/test/validator/samples/prop-slot/errors.json @@ -0,0 +1,15 @@ +[{ + "code": "invalid-prop", + "message": "'slot' is reserved for future use in named slots", + "start": { + "line": 5, + "column": 8, + "character": 67 + }, + "end": { + "line": 5, + "column": 18, + "character": 77 + }, + "pos": 67 +}] diff --git a/test/validator/samples/prop-slot/input.svelte b/test/validator/samples/prop-slot/input.svelte new file mode 100644 index 0000000000..816c656aa0 --- /dev/null +++ b/test/validator/samples/prop-slot/input.svelte @@ -0,0 +1,5 @@ + + + diff --git a/test/validator/samples/reactive-declaration-cyclical/errors.json b/test/validator/samples/reactive-declaration-cyclical/errors.json new file mode 100644 index 0000000000..1e4169a0ee --- /dev/null +++ b/test/validator/samples/reactive-declaration-cyclical/errors.json @@ -0,0 +1,7 @@ +[{ + "message": "Cyclical dependency detected", + "code": "cyclical-reactive-declaration", + "start": { "line": 5, "column": 1, "character": 35 }, + "end": { "line": 5, "column": 14, "character": 48 }, + "pos": 35 +}] \ No newline at end of file diff --git a/test/validator/samples/reactive-declaration-cyclical/input.svelte b/test/validator/samples/reactive-declaration-cyclical/input.svelte new file mode 100644 index 0000000000..c8221b9aa8 --- /dev/null +++ b/test/validator/samples/reactive-declaration-cyclical/input.svelte @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/test/validator/samples/ref-not-supported-in-css/input.html b/test/validator/samples/ref-not-supported-in-css/input.svelte similarity index 100% rename from test/validator/samples/ref-not-supported-in-css/input.html rename to test/validator/samples/ref-not-supported-in-css/input.svelte diff --git a/test/validator/samples/ref-not-supported/input.html b/test/validator/samples/ref-not-supported/input.svelte similarity index 100% rename from test/validator/samples/ref-not-supported/input.html rename to test/validator/samples/ref-not-supported/input.svelte diff --git a/test/validator/samples/script-invalid-context/errors.json b/test/validator/samples/script-invalid-context/errors.json index 9c276d932d..07ad0f1270 100644 --- a/test/validator/samples/script-invalid-context/errors.json +++ b/test/validator/samples/script-invalid-context/errors.json @@ -9,7 +9,7 @@ }, "end": { "line": 1, - "column": 22, - "character": 22 + "column": 8, + "character": 8 } }] \ No newline at end of file diff --git a/test/validator/samples/script-invalid-context/input.html b/test/validator/samples/script-invalid-context/input.svelte similarity index 100% rename from test/validator/samples/script-invalid-context/input.html rename to test/validator/samples/script-invalid-context/input.svelte diff --git a/test/validator/samples/select-multiple/input.html b/test/validator/samples/select-multiple/input.svelte similarity index 100% rename from test/validator/samples/select-multiple/input.html rename to test/validator/samples/select-multiple/input.svelte diff --git a/test/validator/samples/slot-attribute-invalid/input.html b/test/validator/samples/slot-attribute-invalid/input.svelte similarity index 100% rename from test/validator/samples/slot-attribute-invalid/input.html rename to test/validator/samples/slot-attribute-invalid/input.svelte diff --git a/test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.html b/test/validator/samples/svg-child-component-declared-namespace/input.svelte similarity index 81% rename from test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.html rename to test/validator/samples/svg-child-component-declared-namespace/input.svelte index 4e72c96fbe..3871f86c21 100644 --- a/test/runtime/samples/svg-child-component-declared-namespace-shorthand/Rect.html +++ b/test/validator/samples/svg-child-component-declared-namespace/input.svelte @@ -1,4 +1,4 @@ - + - - \ No newline at end of file diff --git a/test/validator/samples/transition-on-component/input.svelte b/test/validator/samples/transition-on-component/input.svelte new file mode 100644 index 0000000000..12c3cd9bf8 --- /dev/null +++ b/test/validator/samples/transition-on-component/input.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/test/validator/samples/undefined-value/input.html b/test/validator/samples/undefined-value/input.svelte similarity index 100% rename from test/validator/samples/undefined-value/input.html rename to test/validator/samples/undefined-value/input.svelte diff --git a/test/validator/samples/window-binding-invalid-innerwidth/input.html b/test/validator/samples/window-binding-invalid-innerwidth/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid-innerwidth/input.html rename to test/validator/samples/window-binding-invalid-innerwidth/input.svelte diff --git a/test/validator/samples/window-binding-invalid-value/input.html b/test/validator/samples/window-binding-invalid-value/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid-value/input.html rename to test/validator/samples/window-binding-invalid-value/input.svelte diff --git a/test/validator/samples/window-binding-invalid-width/input.html b/test/validator/samples/window-binding-invalid-width/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid-width/input.html rename to test/validator/samples/window-binding-invalid-width/input.svelte diff --git a/test/validator/samples/window-binding-invalid/input.html b/test/validator/samples/window-binding-invalid/input.svelte similarity index 100% rename from test/validator/samples/window-binding-invalid/input.html rename to test/validator/samples/window-binding-invalid/input.svelte diff --git a/test/validator/samples/window-binding-online/input.html b/test/validator/samples/window-binding-online/input.svelte similarity index 100% rename from test/validator/samples/window-binding-online/input.html rename to test/validator/samples/window-binding-online/input.svelte