diff --git a/.eslintignore b/.eslintignore index 4a113378ce..b5cb03ae6e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,7 +1,18 @@ -src/shared -shared.js -store.js -test/test.js -test/setup.js **/_actual.js -**/expected.js \ No newline at end of file +**/expected.js +_output +test/*/samples/*/output.js +node_modules + +# automatically generated +internal_exports.ts + +# output files +animate/*.js +esing/*.js +internal/*.js +motion/*.js +store/*.js +transition/*.js +index.js +compiler.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..946a157e40 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,88 @@ +module.exports = { + root: true, + rules: { + indent: 'off', + 'no-unused-vars': 'off', + semi: [2, 'always'], + 'keyword-spacing': [2, { before: true, after: true }], + 'space-before-blocks': [2, 'always'], + 'no-mixed-spaces-and-tabs': [2, 'smart-tabs'], + 'no-cond-assign': 0, + 'object-shorthand': [2, 'always'], + 'no-const-assign': 2, + 'no-class-assign': 2, + 'no-this-before-super': 2, + 'no-var': 2, + 'no-unreachable': 2, + 'valid-typeof': 2, + 'quote-props': [2, 'as-needed'], + 'one-var': [2, 'never'], + 'prefer-arrow-callback': 2, + 'prefer-const': [2, { destructuring: 'all' }], + 'arrow-spacing': 2, + 'no-inner-declarations': 0, + 'require-atomic-updates': 'off', + '@typescript-eslint/indent': 'off', + '@typescript-eslint/camelcase': 'off', + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/array-type': ['error', 'array-simple'], + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-member-accessibility': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_' + } + ], + '@typescript-eslint/no-object-literal-type-assertion': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/prefer-interface': 'off' + }, + globals: { + globalThis: false + }, + env: { + es6: true, + browser: true, + node: true, + mocha: true + }, + extends: [ + 'eslint:recommended', + 'plugin:import/errors', + 'plugin:import/warnings', + 'plugin:import/typescript', + 'plugin:@typescript-eslint/recommended' + ], + parserOptions: { + ecmaVersion: 9, + sourceType: 'module' + }, + plugins: ['svelte3'], + settings: { + 'import/core-modules': [ + 'svelte', + 'svelte/internal', + 'svelte/store', + 'svelte/easing', + 'estree' + ], + 'svelte3/compiler': require('./compiler') + }, + overrides: [ + { + files: ['*.js'], + rules: { + '@typescript-eslint/no-var-requires': 'off' + } + }, + { + files: ['*.svelte'], + processor: 'svelte3/svelte3', + rules: { + '@typescript-eslint/indent': 'off' + } + } + ] +}; diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 7e8c26382a..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "root": true, - "rules": { - "indent": [2, "tab", { "SwitchCase": 1 }], - "semi": [2, "always"], - "keyword-spacing": [2, { "before": true, "after": true }], - "space-before-blocks": [2, "always"], - "no-mixed-spaces-and-tabs": [2, "smart-tabs"], - "no-cond-assign": 0, - "no-unused-vars": 2, - "object-shorthand": [2, "always"], - "no-const-assign": 2, - "no-class-assign": 2, - "no-this-before-super": 2, - "no-var": 2, - "no-unreachable": 2, - "valid-typeof": 2, - "quote-props": [2, "as-needed"], - "one-var": [2, "never"], - "prefer-arrow-callback": 2, - "prefer-const": [2, { "destructuring": "all" }], - "arrow-spacing": 2, - "no-inner-declarations": 0 - }, - "env": { - "es6": true, - "browser": true, - "node": true, - "mocha": true - }, - "extends": [ - "eslint:recommended", - "plugin:import/errors", - "plugin:import/warnings" - ], - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "module" - }, - "settings": { - "import/core-modules": ["svelte"], - "svelte3/extensions": ["html"] - } -} diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index 2ed2b0c713..0000000000 --- a/.flowconfig +++ /dev/null @@ -1,9 +0,0 @@ -[ignore] -/dist/.* - -[include] - -[libs] - -[options] -strip_root=true diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e7bd60d3f4..6871094f5c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,21 +1,26 @@ - +Thanks for being part of Svelte! +------- diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..f5369e9991 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,52 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: 'Bug' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Logs** +Please include browser console and server logs around the time this bug occurred. + +**To Reproduce** +To help us help you, if you've found a bug please consider the following: + +* If you can demonstrate the bug using https://svelte.dev/repl, please do. +* If that's not possible, we recommend creating a small repo that illustrates the problem. +* Reproductions should be small, self-contained, correct examples – http://sscce.org. + +Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Stacktraces** +If you have a stack trace to include, we recommend putting inside a `
` block for the sake of the thread's readability: + +
+ Stack trace + + Stack trace goes here... +
+ +**Information about your Svelte project:** +- Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10) + +- Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc) + +- Svelte version (Please check you can reproduce the issue with the latest release!) + +- Whether your project uses Webpack or Rollup + +**Severity** +How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely? + +Note: the more honest and specific you are here the more we will take you seriously. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..e533c21c96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: 'New Feature' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. For example: I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**How important is this feature to you?** +Note: the more honest and specific you are here the more we will take you seriously. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/questions-and-help.md b/.github/ISSUE_TEMPLATE/questions-and-help.md new file mode 100644 index 0000000000..a6e0dc6e19 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/questions-and-help.md @@ -0,0 +1,12 @@ +--- +name: Questions and help +about: If you think you need help with something related to Svelte +title: '' +labels: 'Question' +assignees: '' + +--- + +This issue tracker is intended to collect bug reports and feature requests. + +For help with installation, information on how features work, or questions about specific features of Svelte, please come and join us in the [Svelte Discord](https://svelte.dev/chat), or ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/svelte). Any issues open for help requests will be closed to keep from clogging up the issue tracker. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d2882acf4a..1e77e0337a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,8 @@ - + +### Before submitting the PR, please make sure you do the following +- [ ] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason. +- [ ] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them. +- [ ] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to `npm run lint`!) +### Tests +- [ ] Run the tests tests with `npm test` or `yarn test`) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..14824ecdfa --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI +on: [push, pull_request] +jobs: + Tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [8, 10, 12] + os: [ubuntu-latest, windows-latest, macOS-latest] + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test + env: + CI: true + Lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + - run: 'npm i && npm run lint' + Unit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + - run: 'npm i && npm run test:unit' diff --git a/.gitignore b/.gitignore index 06671edc2b..7a14244929 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,30 @@ +.idea .DS_Store .nyc_output node_modules *.map -/src/compile/internal-exports.ts -/compiler.js -/index.js -/internal.* -/store.js -/easing.js -/motion.* -/transition.js -/animate.js +/src/compiler/compile/internal_exports.ts +/compiler.d.ts +/compiler.*js +/index.*js +/internal +/store +/easing +/motion +/transition +/animate /scratch/ /coverage/ -/coverage.lcov/ +/coverage.lcov +/test/*/samples/_ /test/sourcemaps/samples/*/output.js /test/sourcemaps/samples/*/output.js.map /test/sourcemaps/samples/*/output.css /test/sourcemaps/samples/*/output.css.map /yarn-error.log _actual*.* +_output +/types /site/cypress/screenshots/ /site/__sapper__/ @@ -27,5 +32,9 @@ _actual*.* /site/.sessions /site/static/svelte-app.json /site/static/contributors.jpg +/site/static/workers +/site/static/organisations /site/scripts/svelte-app +/site/scripts/community /site/src/routes/_contributors.js +/site/src/routes/_components/WhosUsingSvelte.svelte diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 81451039fa..0000000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -useTabs: true -singleQuote: true -trailingComma: es5 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index aeadd48f8d..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js -node_js: - - "node" - -env: - global: - - BUILD_TIMEOUT=20000 - -addons: - apt: - packages: - - xvfb - -install: - - export DISPLAY=':99.0' - - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - - npm ci || npm install - -after_success: npm run codecov diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b049da08e..406f2a591a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,474 @@ # Svelte changelog +## Unreleased + +* Fix indirect bindings involving elements with spreads ([#3680](https://github.com/sveltejs/svelte/issues/3680)) +* Fix unneeded updating of keyed each blocks ([#4373](https://github.com/sveltejs/svelte/issues/4373)) + +## 3.18.2 + +* Fix binding to module-level variables ([#4086](https://github.com/sveltejs/svelte/issues/4086)) +* Improve parsing error messages when there is a pending unclosed tag ([#4131](https://github.com/sveltejs/svelte/issues/4131)) +* Disallow attribute/prop names from matching two-way-bound names or `{shorthand}` attribute/prop names ([#4325](https://github.com/sveltejs/svelte/issues/4325)) +* Improve performance of `flush()` by not using `.shift()` ([#4356](https://github.com/sveltejs/svelte/pull/4356)) +* Permit reserved keywords as destructuring keys in `{#each}` ([#4372](https://github.com/sveltejs/svelte/issues/4372)) +* Disallow reserved keywords in `{expressions}` ([#4372](https://github.com/sveltejs/svelte/issues/4372)) +* Fix code generation error with precedence of arrow functions ([#4384](https://github.com/sveltejs/svelte/issues/4384)) +* Fix event handlers that are dynamic via reactive declarations or stores ([#4388](https://github.com/sveltejs/svelte/issues/4388)) +* Fix invalidation in expressions like `++foo.bar` ([#4393](https://github.com/sveltejs/svelte/issues/4393)) + +## 3.18.1 + +* Fix code generation error with adjacent inline and block comments ([#4312](https://github.com/sveltejs/svelte/issues/4312)) +* Fix detection of unused CSS selectors that begin with a `:global()` but contain a scoped portion ([#4314](https://github.com/sveltejs/svelte/issues/4314)) + +## 3.18.0 + +* Fix infinite loop when instantiating another component during `onMount` ([#3218](https://github.com/sveltejs/svelte/issues/3218)) +* Make autosubscribing to a nullish store a no-op ([#2181](https://github.com/sveltejs/svelte/issues/2181)) + +## 3.17.3 + +* Fix updating a `` inside an `{#if}` or other block ([#4292](https://github.com/sveltejs/svelte/issues/4292)) +* Fix using RxJS observables in `derived` stores ([#4298](https://github.com/sveltejs/svelte/issues/4298)) +* Add dev mode check to disallow duplicate keys in a keyed `{#each}` ([#4301](https://github.com/sveltejs/svelte/issues/4301)) +* Fix hydration of `` when starting from SSR-generated code with `hydratable: true` ([#4310](https://github.com/sveltejs/svelte/issues/4310)) + +## 3.17.2 + +* Fix removing attributes during hydration ([#1733](https://github.com/sveltejs/svelte/issues/1733)) +* Disallow two-way binding to a variable declared by an `{#await}` block ([#4012](https://github.com/sveltejs/svelte/issues/4012)) +* Allow access to `let:` variables in sibling attributes on slot root ([#4173](https://github.com/sveltejs/svelte/issues/4173)) +* Fix `~=` and class selector matching against values separated by any whitespace characters ([#4242](https://github.com/sveltejs/svelte/issues/4242)) +* Fix code generation for `await`ed expressions that need parentheses ([#4267](https://github.com/sveltejs/svelte/issues/4267)) +* Preserve JavaScript comments from the original component source where possible ([#4268](https://github.com/sveltejs/svelte/issues/4268)) +* Add some more known globals ([#4276](https://github.com/sveltejs/svelte/pull/4276)) +* Correctly apply event modifiers to `<svelte:body>` events ([#4278](https://github.com/sveltejs/svelte/issues/4278)) + +## 3.17.1 + +* Only attach SSR mode markers to a component's `<head>` elements when compiling with `hydratable: true` ([#4258](https://github.com/sveltejs/svelte/issues/4258)) + +## 3.17.0 + +* Remove old `<head>` elements during hydration so they aren't duplicated ([#1607](https://github.com/sveltejs/svelte/issues/1607)) +* Prevent text input cursor jumping in Safari with one-way binding ([#3449](https://github.com/sveltejs/svelte/issues/3449)) +* Expose compiler version in dev events ([#4047](https://github.com/sveltejs/svelte/issues/4047)) +* Don't run actions before their element is in the document ([#4166](https://github.com/sveltejs/svelte/issues/4166)) +* Fix reactive assignments with destructuring and stores where the destructured value should be undefined ([#4170](https://github.com/sveltejs/svelte/issues/4170)) +* Fix hydrating `{:else}` in `{#each}` ([#4202](https://github.com/sveltejs/svelte/issues/4202)) +* Do not automatically declare variables in reactive declarations when assigning to a member expression ([#4212](https://github.com/sveltejs/svelte/issues/4212)) +* Fix stringifying of attributes in SSR mode when there are spread attributes ([#4240](https://github.com/sveltejs/svelte/issues/4240)) +* Only render one `<title>` in SSR mode when multiple components provide one ([#4250](https://github.com/sveltejs/svelte/pull/4250)) + +## 3.16.7 + +* Also apply actions in the order they're given along with other directives ([#2446](https://github.com/sveltejs/svelte/issues/2446), [#4156](https://github.com/sveltejs/svelte/pull/4156)) +* Check whether a dynamic event handler is a function before calling it ([#4090](https://github.com/sveltejs/svelte/issues/4090)) +* Correctly mark event handlers as dynamic when they involve an expression used in a `bind:` elsewhere ([#4155](https://github.com/sveltejs/svelte/pull/4155)) + +## 3.16.6 + +* Fix CSS specificity bug when encapsulating styles ([#1277](https://github.com/sveltejs/svelte/issues/1277)) +* Apply directives in the order they're given ([#2446](https://github.com/sveltejs/svelte/issues/2446)) +* Fix destructuring in `let:` directives ([#2751](https://github.com/sveltejs/svelte/issues/2751)) +* Preserve whitespace around `<tspan>`s in `<svg>`s ([#3998](https://github.com/sveltejs/svelte/issues/3998)) + +## 3.16.5 + +* Better fix for cascading invalidations and fix some regressions ([#4098](https://github.com/sveltejs/svelte/issues/4098), [#4114](https://github.com/sveltejs/svelte/issues/4114), [#4120](https://github.com/sveltejs/svelte/issues/4120)) + +## 3.16.4 + +* Fix slots with props not propagating through to inner slots ([#4061](https://github.com/sveltejs/svelte/issues/4061)) +* Fix noting autosubscribed stores as `referenced` in `vars` for tooling ([#4081](https://github.com/sveltejs/svelte/issues/4081)) +* Fix cascading invalidations in certain situations ([#4094](https://github.com/sveltejs/svelte/issues/4094)) + +## 3.16.3 + +* Fix bitmask overflow when using slotted components ([#4077](https://github.com/sveltejs/svelte/issues/4077)) +* Remove unnecessary `$$invalidate` calls from init block ([#4018](https://github.com/sveltejs/svelte/issues/4018)) + +## 3.16.2 + +* Handle slot updates when parent component has a bitmask overflow ([#4078](https://github.com/sveltejs/svelte/pull/4078)) + +## 3.16.1 + +* Fix unused export warning for props used as stores ([#4021](https://github.com/sveltejs/svelte/issues/4021)) +* Fix `{:then}` without resolved value containing `{#each}` ([#4022](https://github.com/sveltejs/svelte/issues/4022)) +* Fix incorrect code generated with `loopGuardTimeout` ([#4034](https://github.com/sveltejs/svelte/issues/4034)) +* Fix handling of bitmask overflow and globals ([#4037](https://github.com/sveltejs/svelte/issues/4037)) +* Fix `{:then}` containing `{#if}` ([#4044](https://github.com/sveltejs/svelte/issues/4044)) +* Fix bare `import`s in `format: 'cjs'` output mode ([#4055](https://github.com/sveltejs/svelte/issues/4050)) +* Warn when using a known global as a component name ([#4070](https://github.com/sveltejs/svelte/issues/4070)) + +## 3.16.0 + +* Use bitmasks to track changes ([#3945](https://github.com/sveltejs/svelte/pull/3945)) +* Fix heisenbug with component styles ([#3977](https://github.com/sveltejs/svelte/issues/3977)) +* Do not warn about missing expected props for `export function foo() {}` ([#3954](https://github.com/sveltejs/svelte/issues/3954)) +* Fix `context="module"` exports with the same name as an instance variable ([#3983](https://github.com/sveltejs/svelte/issues/3983)) +* Fix binding to contextual values from `{#each}` blocks referring to global variables ([#3992](https://github.com/sveltejs/svelte/issues/3992)) +* Use `requestAnimationFrame` callback argument for smoother transitions ([#4014](https://github.com/sveltejs/svelte/pull/4014)) +* Fix `listen_dev` argument order ([#4016](https://github.com/sveltejs/svelte/pull/4016)) + +## 3.15.0 + +* Hide commented sections from preprocessors ([#3894](https://github.com/sveltejs/svelte/pull/3894)) +* Add `seeking` and `ended` bindings to media elements ([#3650](https://github.com/sveltejs/svelte/pull/3650)) +* Add `videoWidth` and `videoHeight` bindings to video elements ([#3927](https://github.com/sveltejs/svelte/pull/3927)) +* Fix for dynamic event handlers ([#3934](https://github.com/sveltejs/svelte/pull/3934)) +* Handle scale transforms when using the `flip` animation ([#3555](https://github.com/sveltejs/svelte/issues/3555)) +* Fix some code generation bugs ([#3929](https://github.com/sveltejs/svelte/issues/3929), [#3939](https://github.com/sveltejs/svelte/issues/3939)) +* Add `aria-hidden="true"` to objects generated when adding resize-listeners, to improve accessibility ([#3948](https://github.com/sveltejs/svelte/issues/3948)) + +## 3.14.1 + +* Deconflict block method names with other variables ([#3900](https://github.com/sveltejs/svelte/issues/3900)) +* Fix entity encoding issue in text nodes with constant expressions ([#3911](https://github.com/sveltejs/svelte/issues/3911)) +* Make code for unknown prop warnings compatible with older js engines ([#3914](https://github.com/sveltejs/svelte/issues/3914)) + +## 3.14.0 + +* Add `loopGuardTimeout` option that augments `for`/`while` loops to prevent infinite loops, primarily for use in the REPL ([#3887](https://github.com/sveltejs/svelte/pull/3887)) +* Keep component bindings in sync when changed in reactive statements ([#3382](https://github.com/sveltejs/svelte/issues/3382)) +* Update attributes before bindings ([#3857](https://github.com/sveltejs/svelte/issues/3857)) +* Prevent variable naming conflict ([#3899](https://github.com/sveltejs/svelte/issues/3899)) + + +## 3.13.0 + +* New structured code generation, which eliminates a number of edge cases and obscure bugs ([#3539](https://github.com/sveltejs/svelte/pull/3539)) + +Also: + +* Fix `{#each}` context not shadowing outer scope when using `bind:` ([#1565](https://github.com/sveltejs/svelte/issues/1565)) +* Fix edge cases in matching selectors against elements ([#1710](https://github.com/sveltejs/svelte/issues/1710)) +* Fix several bugs related to interaction of `{...spread}` attributes with other features ([#2721](https://github.com/sveltejs/svelte/issues/2721), [#2916](https://github.com/sveltejs/svelte/issues/2916), [#3421](https://github.com/sveltejs/svelte/issues/3421), [#3681](https://github.com/sveltejs/svelte/issues/3681), [#3764](https://github.com/sveltejs/svelte/issues/3764), [#3790](https://github.com/sveltejs/svelte/issues/3790)) +* Allow exiting a reactive block early with `break $` ([#2828](https://github.com/sveltejs/svelte/issues/2828)) +* Fix binding to props that have been renamed with `export { ... as ... }` ([#3508](https://github.com/sveltejs/svelte/issues/3508)) +* Fix application of style scoping class in cases of ambiguity ([#3544](https://github.com/sveltejs/svelte/issues/3544)) +* Check attributes have changed before setting them to avoid image flicker ([#3579](https://github.com/sveltejs/svelte/pull/3579)) +* Fix generating malformed code for `{@debug}` tags with no dependencies ([#3588](https://github.com/sveltejs/svelte/issues/3588)) +* Fix generated code in specific case involving compound ifs and child components ([#3595](https://github.com/sveltejs/svelte/issues/3595)) +* Fix `bind:this` binding to a store ([#3591](https://github.com/sveltejs/svelte/issues/3591)) +* Use safer `HTMLElement` check before extending class ([#3608](https://github.com/sveltejs/svelte/issues/3608)) +* Add `location` as a known global ([#3619](https://github.com/sveltejs/svelte/pull/3619)) +* Support `{#await}` with `{:catch}` but no `{:then}` ([#3623](https://github.com/sveltejs/svelte/issues/3623)) +* Clean up dead code emitted for `<slot/>`s ([#3631](https://github.com/sveltejs/svelte/issues/3631)) +* Fix tracking of dependencies of compound assignments in reactive statements ([#3634](https://github.com/sveltejs/svelte/issues/3634)) +* Flush changes in newly attached block when using `{#await}` ([#3660](https://github.com/sveltejs/svelte/issues/3660)) +* Throw exception immediately when calling `createEventDispatcher()` after component instantiation ([#3667](https://github.com/sveltejs/svelte/pull/3667)) +* Fix globals shadowing contextual template scope ([#3674](https://github.com/sveltejs/svelte/issues/3674)) +* Fix `<svelte:window>` bindings to stores ([#3832](https://github.com/sveltejs/svelte/issues/3832)) +* Deconflict generated var names with builtins ([#3724](https://github.com/sveltejs/svelte/issues/3724)) +* Allow spring/tweened values to be initially undefined ([#3761](https://github.com/sveltejs/svelte/issues/3761)) +* Warn if using `<svelte:options tag="...">` without `customElement: true` option ([#3782](https://github.com/sveltejs/svelte/pull/3782)) +* Add `Event` to list of known globals ([#3810](https://github.com/sveltejs/svelte/pull/3810)) +* Throw helpful error on empty CSS declaration ([#3801](https://github.com/sveltejs/svelte/issues/3801)) +* Support `easing` param on `fade` transition ([#3823](https://github.com/sveltejs/svelte/pull/3823)) +* Generate valid names from filenames with unicode characters ([#3845](https://github.com/sveltejs/svelte/issues/3845)) +* Don't generate any code for markup-less components ([#2200](https://github.com/sveltejs/svelte/issues/2200)) +* Deconflict with internal name `block` ([#3854](https://github.com/sveltejs/svelte/issues/3854)) +* Set attributes before bindings, to prevent erroneous assignments to `input.files` ([#3828](https://github.com/sveltejs/svelte/issues/3828)) +* Smarter unused CSS detection ([#3825](https://github.com/sveltejs/svelte/pull/3825)) +* Allow dynamic event handlers ([#3040](https://github.com/sveltejs/svelte/issues/3040)) +* Prevent erroneous `"undefined"` class name ([#3876](https://github.com/sveltejs/svelte/pull/3876)) +* Prevent resetting of `src` attribute unless changed ([#3579](https://github.com/sveltejs/svelte/pull/3579)) +* Prevent hydration of void element 'children' ([#3882](https://github.com/sveltejs/svelte/issues/3882)) +* Hoist globals even if mentioned in `<script>` block ([#3745](https://github.com/sveltejs/svelte/pull/3745)) + + +## 3.12.1 + +* Escape `@` symbols in props, again ([#3545](https://github.com/sveltejs/svelte/issues/3545)) + +## 3.12.0 + +* Fire events on `document` in development to facilitate dev tooling ([#3005](https://github.com/sveltejs/svelte/pull/3005)) +* Remove old props when the keys in spread props are removed ([#2282](https://github.com/sveltejs/svelte/issues/2282)) + +## 3.11.0 + +* `$capture_state` and `$inject_state` HMR hooks in dev mode ([#3148](https://github.com/sveltejs/svelte/pull/3148)) +* Allow unclosed tags inside if/each/etc blocks ([#2807](https://github.com/sveltejs/svelte/issues/2807)) +* Invalidate unreferenced store values inside `<script>` ([#3537](https://github.com/sveltejs/svelte/issues/3537)) +* Print `null` text when hydrating ([#3379](https://github.com/sveltejs/svelte/pull/3379)) + +## 3.10.1 + +* Preserve reactivity inside if block heads etc ([#3512](https://github.com/sveltejs/svelte/issues/3512)) +* Fix store bindings inside each blocks ([#3455](https://github.com/sveltejs/svelte/issues/3455)) +* Generate correct code for if-else blocks with static conditions ([#3505](https://github.com/sveltejs/svelte/issues/3505)) +* Avoid generating unnecessary component update code ([#3526](https://github.com/sveltejs/svelte/issues/3526)) +* Make `bind:currentTime` more reliable ([#3524](https://github.com/sveltejs/svelte/issues/3524)) +* Prevent errors when setting spread props on SVG elements ([#3522](https://github.com/sveltejs/svelte/issues/3522)) + +## 3.10.0 + +* Add `blur` transition ([#3477](https://github.com/sveltejs/svelte/pull/3477)) +* Prevent `<input type="number">` edge case with spread props ([#3426](https://github.com/sveltejs/svelte/issues/3426)) +* Robustify cyclical dependency detection, improve errors ([#3459](https://github.com/sveltejs/svelte/issues/3459)) + +## 3.9.2 + +* Fix handling of additional @-rules in style blocks ([#2995](https://github.com/sveltejs/svelte/pull/2995)) +* Fix if blocks with complex but static conditions ([#3447](https://github.com/sveltejs/svelte/issues/3447)) + +## 3.9.1 + +* Only update style properties if necessary ([#3433](https://github.com/sveltejs/svelte/issues/3433)) +* Only update if/await blocks if necessary ([#2355](https://github.com/sveltejs/svelte/issues/2355)) +* Set context correctly inside await blocks ([#2443](https://github.com/sveltejs/svelte/issues/2443)) +* Handle `!important` inline styles ([#1834](https://github.com/sveltejs/svelte/issues/1834)) +* Make index references reactive in event handlers inside keyed each blocks ([#2569](https://github.com/sveltejs/svelte/issues/2569)) + +## 3.9.0 + +* Support `is` attribute on elements, with a warning ([#3182](https://github.com/sveltejs/svelte/issues/3182)) +* Handle missing slot prop ([#3322](https://github.com/sveltejs/svelte/issues/3322)) +* Don't set undefined/null input values, unless previous value exists ([#1233](https://github.com/sveltejs/svelte/issues/1233)) +* Fix style attribute optimisation bailout ([#1830](https://github.com/sveltejs/svelte/issues/1830)) + +## 3.8.1 + +* Set SVG namespace for slotted elements ([#3321](https://github.com/sveltejs/svelte/issues/3321)) + +## 3.8.0 + +* Add `self` event modifier ([#3372](https://github.com/sveltejs/svelte/issues/3372)) +* Generate valid code when spreading literal ([#3185](https://github.com/sveltejs/svelte/issues/3185)) +* Coerce tag values to string before checking equality ([#2290](https://github.com/sveltejs/svelte/issues/2290)) + +## 3.7.1 + +* Assume `let` variables are dynamic for slots ([#3354](https://github.com/sveltejs/svelte/issues/3354)) +* Allow transition functions to return nothing ([#2246](https://github.com/sveltejs/svelte/pull/2246)) + +## 3.7.0 + +* Disable warnings via `svelte-ignore` comments ([#3351](https://github.com/sveltejs/svelte/pull/3351)) +* Throw if `$` or `$$...` is referenced as global ([#3272](https://github.com/sveltejs/svelte/issues/3272)) +* Remount HTML tags correctly ([#3329](https://github.com/sveltejs/svelte/pull/3329)) +* Treat data attributes like other attributes ([#3337](https://github.com/sveltejs/svelte/issues/3337)) + +## 3.6.11 + +* Handle reassigned RxJS observables ([#3304](https://github.com/sveltejs/svelte/issues/3304)) +* Remove commas from HTMLified attributes with multiple chunks ([#3341](https://github.com/sveltejs/svelte/issues/3341)) +* Prevent `class` on element with scoped styles from rendering as `undefined` ([#3283](https://github.com/sveltejs/svelte/issues/3283)) +* Allow references to index in key expression ([#3274](https://github.com/sveltejs/svelte/issues/3274)) +* Mark attribute selectors as used if corresponding binding exists ([#3281](https://github.com/sveltejs/svelte/issues/3281)) +* Preserve `async`/`*` when hoisting functions ([#3179](https://github.com/sveltejs/svelte/issues/3179)) +* Make `raf` a noop on server ([#3324](https://github.com/sveltejs/svelte/issues/3324)) +* Prevent erroneous a11y warning for image input with alt attribute ([#3331](https://github.com/sveltejs/svelte/issues/3331)) +* Add several well-known globals ([#3316](https://github.com/sveltejs/svelte/pull/3316)) + +## 3.6.10 + +* Use `change` event for file inputs ([#3226](https://github.com/sveltejs/svelte/issues/3226)) +* Always fire reactive declarations with `$$props` ([#3286](https://github.com/sveltejs/svelte/issues/3286)) +* More conservative spread prop updates ([#3289](https://github.com/sveltejs/svelte/issues/3289)) +* Quote props if necessary in SSR mode ([#3312](https://github.com/sveltejs/svelte/issues/3312)) + +## 3.6.9 + +* Always update derived stores with a derived input whose value does not change ([#3191](https://github.com/sveltejs/svelte/issues/3191)) + +## 3.6.8 + +* Preserve global keyframes that don't match local elements ([#3228](https://github.com/sveltejs/svelte/issues/3228)) +* Fix spread/`class:` combination ([#3242](https://github.com/sveltejs/svelte/pull/3242)) +* Never scope `:root` selector ([#3250](https://github.com/sveltejs/svelte/pull/3250)) +* Prevent trailing commas in function arguments ([#3255](https://github.com/sveltejs/svelte/pull/3260)) + +## 3.6.7 + +* Prevent corruption of outro callbacks with nested keyed each blocks ([#3209](https://github.com/sveltejs/svelte/pull/3209)) +* Prevent cursor jumping in bound input in Safari ([#3199](https://github.com/sveltejs/svelte/issues/3199)) +* Make resize listener object unfocusable ([#3206](https://github.com/sveltejs/svelte/issues/3206)) + +## 3.6.6 + +* Prevent dynamic components being detached twice ([#3113](https://github.com/sveltejs/svelte/issues/3113), [#2086](https://github.com/sveltejs/svelte/issues/2086)) + +## 3.6.5 + +* Handle RxJS-style observables with `get` ([#3153](https://github.com/sveltejs/svelte/issues/3153)) +* Pass `let` values to bindings ([#3140](https://github.com/sveltejs/svelte/issues/3140)) +* Escape `@` symbols in props ([#3173](https://github.com/sveltejs/svelte/issues/3173)) +* Scale crossfaded elements ([#3175](https://github.com/sveltejs/svelte/pull/3175)) + +## 3.6.4 + +* Run `onMount` functions in correct order, and before initial `afterUpdate` functions ([#2281](https://github.com/sveltejs/svelte/issues/2281)) +* Fix code transformation for shorthand methods ([#2906](https://github.com/sveltejs/svelte/issues/2906)) +* Fix assignments in inline functions ([#3038](https://github.com/sveltejs/svelte/issues/3038)) + +## 3.6.3 + +* Fix await block mounting inside removed if block ([#1496](https://github.com/sveltejs/svelte/issues/1496)) +* Update when element references are removed ([#2034](https://github.com/sveltejs/svelte/issues/2034)) +* Don't attempt to serialize non-string values in server-rendered bindings ([#2135](https://github.com/sveltejs/svelte/issues/2135)) +* Recognise dependencies in function expressions ([#2693](https://github.com/sveltejs/svelte/issues/2693)) +* Scope pseudo-class selectors without class/type ([#1705](https://github.com/sveltejs/svelte/issues/1705)) +* Allow nested at-rules ([#3135](https://github.com/sveltejs/svelte/issues/3135)) +* Allow attributes to contain `=` characters ([#3149](https://github.com/sveltejs/svelte/pull/3149)) + +## 3.6.2 + +* Fix placement of each-else block ([#2917](https://github.com/sveltejs/svelte/issues/2917)) +* Make context accessible to `bind:this` ([#2806](https://github.com/sveltejs/svelte/issues/2806)) +* Pass hoisted values to slots ([#2586](https://github.com/sveltejs/svelte/issues/2586)) + +## 3.6.1 + +* Fix escaping of `@` in dev mode debug filename ([#3114](https://github.com/sveltejs/svelte/pull/3114)) + +## 3.6.0 + +* Add `innerHTML` and `textContent` bindings for `contenteditable` elements ([#2996](https://github.com/sveltejs/svelte/pull/2996)) +* Fix destructuring assignments where targets are member expressions ([#3092](https://github.com/sveltejs/svelte/issues/3092)) +* Deconflict with used globals ([#2963](https://github.com/sveltejs/svelte/pull/2963)) +* Always run `onDestroy` functions, not just for detaching components ([#3058](https://github.com/sveltejs/svelte/issues/3058)) +* Fix scope analysis around catch clauses ([#3064](https://github.com/sveltejs/svelte/issues/3064)) +* Add error constructors to known globals ([#3064](https://github.com/sveltejs/svelte/issues/3064)) +* Always bail out of hoisting on encountering local state in function definition ([#3044](https://github.com/sveltejs/svelte/issues/3044)) +* Fix incorrect merging of top-level text nodes ([#3027](https://github.com/sveltejs/svelte/issues/3027)) +* Handle removal of components in each blocks without props ([#3035](https://github.com/sveltejs/svelte/issues/3035)) +* Only call subscriber once when resubscribing to a store ([#3022](https://github.com/sveltejs/svelte/issues/3022)) +* Check for existence of dynamic component before introing ([#3054](https://github.com/sveltejs/svelte/issues/3054)) +* Sanitize names of bubbled event handlers ([#2923](https://github.com/sveltejs/svelte/issues/2923)) + + +## 3.5.4 + +* Preserve whitespace at the boundaries of `{#each}` blocks ([#713](https://github.com/sveltejs/svelte/issues/713)) +* Fix dynamic `bind:this` on components ([#2333](https://github.com/sveltejs/svelte/issues/2333)) +* Fix binding to values in a component when it uses `$$props` ([#2725](https://github.com/sveltejs/svelte/issues/2725)) +* Fix parsing ambiguous HTML entities ([#3071](https://github.com/sveltejs/svelte/pull/3071)) + +## 3.5.3 + +* Don't double-destroy keyed each blocks with outros ([#3055](https://github.com/sveltejs/svelte/issues/3055)) + +## 3.5.2 + +* Prevent duplicated outros causing errors ([#3001](https://github.com/sveltejs/svelte/issues/3001)) +* Fix automatic name generation ([#2843](https://github.com/sveltejs/svelte/issues/2843)) +* Fix .d.ts stubs ([#3009](https://github.com/sveltejs/svelte/pull/3009)) +* Don't strip non-breaking spaces ([#3014](https://github.com/sveltejs/svelte/issues/3014)) +* Fix `requestAnimationFrame` context ([#2933](https://github.com/sveltejs/svelte/issues/2933)) +* Allow space before attribute value ([#3026](https://github.com/sveltejs/svelte/issues/3026)) +* Remove null/undefined attributes ([#1434](https://github.com/sveltejs/svelte/issues/1434)) +* Fix whitespace in static markup ([#3030](https://github.com/sveltejs/svelte/pull/3030)) + +## 3.5.1 + +* Accommodate webpack idiosyncracies + +## 3.5.0 + +* Update package folder structure ([#2887](https://github.com/sveltejs/svelte/pull/2887)) +* Support `once` modifier on component events ([#2654](https://github.com/sveltejs/svelte/issues/2654)) +* Allow empty `<title>` tags ([#2980](https://github.com/sveltejs/svelte/issues/2980)) +* Render textarea binding values inside element ([#2975](https://github.com/sveltejs/svelte/pull/2975)) +* Fix delayed animation glitch ([#2871](https://github.com/sveltejs/svelte/issues/2871)) +* Solve diamond dependencies problem with stores ([#2660](https://github.com/sveltejs/svelte/issues/2660)) +* Fix missing outros inside each blocks ([#2689](https://github.com/sveltejs/svelte/issues/2689)) +* Support animations without transitions ([#2908](https://github.com/sveltejs/svelte/issues/2908)) +* Add missing transition events ([#2912](https://github.com/sveltejs/svelte/pull/2912)) + + +## 3.4.4 + +* Publish type declaration files ([#2874](https://github.com/sveltejs/svelte/issues/2874)) +* Don't trigger updates for unreferenced values ([#2865](https://github.com/sveltejs/svelte/pull/2865)) +* Omit readonly bindings from SSR output ([#2339](https://github.com/sveltejs/svelte/issues/2339)) +* Prevent outdated animation CSS ([#2871](https://github.com/sveltejs/svelte/issues/2871)) +* Repair dynamic `{@html ...}` in head ([#2880](https://github.com/sveltejs/svelte/pull/2880)) +* Don't create unknown prop warnings for internal props, or if component has `$$props` ([#2881](https://github.com/sveltejs/svelte/pull/2881)) + + +## 3.4.3 + +* Add type declaration files for everything ([#2842](https://github.com/sveltejs/svelte/pull/2842)) +* Prevent `svelte/store` being bundled ([#2786](https://github.com/sveltejs/svelte/issues/2786)) +* Warn on unknown props in dev mode ([#2840](https://github.com/sveltejs/svelte/pull/2840)) +* Treat `requestAnimationFrame` as a no-op on the server ([#2856](https://github.com/sveltejs/svelte/pull/2856)) +* Add `raw` property to AST's `Text` nodes ([#2714](https://github.com/sveltejs/svelte/issues/2714)) +* Add `<details bind:open>` ([#2854](https://github.com/sveltejs/svelte/issues/2854)) + +## 3.4.2 + +* Use empty string for empty data attributes ([#2804](https://github.com/sveltejs/svelte/pull/2804)) +* Support `customElement: true` with no `<svelte:options>` ([#2821](https://github.com/sveltejs/svelte/issues/2821)) +* Add docstrings to `svelte/store` ([#2795](https://github.com/sveltejs/svelte/pull/2795)) + +## 3.4.1 + +* Handle non-falsy non-function return values from derivers ([#2780](https://github.com/sveltejs/svelte/issues/2780)) +* Allow `spring` to work server-side ([#2773](https://github.com/sveltejs/svelte/issues/2773)) + +## 3.4.0 + +* Allow custom element to be defined without a `tag` ([#2417](https://github.com/sveltejs/svelte/issues/2417)) +* Fix parsing of quote marks inside attribute values ([#2715](https://github.com/sveltejs/svelte/pull/2754)) +* Convert `svelte/store` to TypeScript ([#2733](https://github.com/sveltejs/svelte/pull/2733)) +* Allow `debug` tags to include hoisted values ([#2764](https://github.com/sveltejs/svelte/issues/2764)) +* Parse error if attribute name is missing `=` ([#1513](https://github.com/sveltejs/svelte/pull/2770)) +* Allow reactive declarations to depend on mutated `const` values ([#2728](https://github.com/sveltejs/svelte/issues/2728)) + +## 3.3.0 + +* Allow multiple event listeners on a single node ([#2688](https://github.com/sveltejs/svelte/issues/2688)) +* Allow derivers to return a cleanup function ([#2553](https://github.com/sveltejs/svelte/issues/2553)) +* Support namespaced components (`<Foo.Bar/>`) ([#2743](https://github.com/sveltejs/svelte/pull/2743)) + +## 3.2.2 + +* Add `window` and `document` to expected globals ([#2722](https://github.com/sveltejs/svelte/pull/2722)) +* Prevent hoisting of functions that depend on reactive state ([#2703](https://github.com/sveltejs/svelte/pull/2703)) +* Generate correct code when slot has no changes ([#2697](https://github.com/sveltejs/svelte/issues/2697)) +* Prevent `Object.prototype`-related bugs ([#2696](https://github.com/sveltejs/svelte/pull/2696)) + +## 3.2.1 + +* Use same comparison logic for `derived` as for other stores ([#2644](https://github.com/sveltejs/svelte/issues/2644)) +* Invalidate dependencies of reactive declarations ([#2444](https://github.com/sveltejs/svelte/issues/2444)) +* Fix instrumentation of auto-subscription self-assignments ([#2681](https://github.com/sveltejs/svelte/issues/2681)) +* Warn on non-top-level or module-context statements labeled with `$:` ([#2176](https://github.com/sveltejs/svelte/issues/2176)) + +## 3.2.0 + +* Improve `spring` animations, and add `hard`/`soft` options ([#2627](https://github.com/sveltejs/svelte/pull/2627)) +* Expose `parse` and `walk` functions ([#2661](https://github.com/sveltejs/svelte/issues/2661), [#2534](https://github.com/sveltejs/svelte/pull/2534)) +* Support array/object rest in `each` block destructuring patterns ([#2647](https://github.com/sveltejs/svelte/issues/2647), [#2658](https://github.com/sveltejs/svelte/pull/2658)) +* Use `setAttribute` to change `form` property on form elements ([#1742](https://github.com/sveltejs/svelte/issues/1742)) +* Fix a11y warning when `<figcaption>` is non-direct descendant of `<figure>` ([#2582](https://github.com/sveltejs/svelte/issues/2582)) +* Squelch erroneous 'empty block' warnings ([#1716](https://github.com/sveltejs/svelte/issues/1716)) +* Fix IE9/10 error with `insertBefore` ([#2573](https://github.com/sveltejs/svelte/issues/2573)) +* Prevent `$$scope` from being spread onto an element ([#2520](https://github.com/sveltejs/svelte/issues/2520)) +* Resubscribe to stores that are assigned to in `<script>` ([#2435](https://github.com/sveltejs/svelte/issues/2435)) +* Allow reactive declarations to depend on `const` variables ([#2285](https://github.com/sveltejs/svelte/issues/2285)) +* Trigger store changes on UpdateExpression ([#2625](https://github.com/sveltejs/svelte/issues/2625)) +* Squelch missing prop warning if variable is initialised ([#2635](https://github.com/sveltejs/svelte/issues/2635)) +* Add `alert`, `confirm` and `prompt` to known globals ([#2648](https://github.com/sveltejs/svelte/issues/2648)) + + +## 3.1.0 + +* Allow store subscribe functions to return an object with an `unsubscribe` method, providing native RxJS support ([#2549](https://github.com/sveltejs/svelte/issues/2549)) + +## 3.0.1 + +* Prevent text input cursor jumping in Safari ([#2506](https://github.com/sveltejs/svelte/issues/2506)) +* Allow assignments to member expressions ([#2510](https://github.com/sveltejs/svelte/issues/2510)) +* Prevent mutually dependent functions causing an infinite during hoisting ([#2542](https://github.com/sveltejs/svelte/issues/2542)) +* Reuse scheduler promise instead of creating new one each time ([#2555](https://github.com/sveltejs/svelte/pull/2555)) +* Various site/docs fixes + ## 3.0.0 * Everything diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..f7df9770db --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,138 @@ +# Contributing to Svelte + +Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM. + +The [Open Source Guides](https://opensource.guide/) website has a collection of resources for individuals, communities, and companies. These resources help people who want to learn how to run and contribute to open source projects. Contributors and people new to open source alike will find the following guides especially useful: + +* [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) +* [Building Welcoming Communities](https://opensource.guide/building-community/) + +## Get involved + +There are many ways to contribute to Svelte, and many of them do not involve writing any code. Here's a few ideas to get started: + +- Simply start using Svelte. Go through the [Getting Started](https://svelte.dev/blog/the-easiest-way-to-get-started) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#reporting-new-issues). +- Look through the [open issues](https://github.com/sveltejs/svelte/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#triaging-issues-and-pull-requests). +- If you find an issue you would like to fix, [open a pull request](#your-first-pull-request). +- Read through our [tutorials](https://svelte.dev/tutorial/basics). If you find anything that is confusing or can be improved, you can make edits by clicking "Edit this chapter" at the bottom left of the tutorial page. +- Take a look at the [features requested](https://github.com/sveltejs/svelte/labels/enhancement) by others in the community and consider opening a pull request if you see something you want to work on. + +Contributions are very welcome. If you think you need help planning your contribution, please ping us on Discord at [svelte.dev/chat](https://svelte.dev/chat) and let us know you are looking for a bit of help. + +### Triaging issues and pull requests + +One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in. + +- Ask for more information if you believe the issue does not provide all the details required to solve it. +- Suggest [labels](https://github.com/sveltejs/svelte/labels) that can help categorize issues. +- Flag issues that are stale or that should be closed. +- Ask for test plans and review code. + +## Bugs + +We use [GitHub issues](https://github.com/sveltejs/svelte/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you are certain this is a new unreported bug, you can submit a [bug report](#reporting-new-issues). + +If you have questions about using Svelte, contact us on Discord at [svelte.dev/chat](https://svelte.dev/chat), and we will do our best to answer your questions. + +If you see anything you'd like to be implemented, create a [feature request issue](https://github.com/sveltejs/svelte/issues/new?template=feature_request.md) + +## Reporting new issues + +When [opening a new issue](https://github.com/sveltejs/svelte/issues/new/choose), always make sure to fill out the issue template. **This step is very important!** Not doing so may result in your issue not being managed in a timely fashion. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template. + +- **One issue, one bug:** Please report a single bug per issue. +- **Provide reproduction steps:** List all the steps necessary to reproduce the issue. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort. If possible, use the [REPL](https://svelte.dev/repl) to create your reproduction. + +## Installation + +1. Ensure you have [npm](https://www.npmjs.com/get-npm) installed. +1. After cloning the repository, run `npm install` in the root of the repository. +1. To start a development server, run `npm run dev`. + + +## Pull requests + +### Your first pull request + +So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at. + +Working on your first Pull Request? You can learn how from this free video series: + +[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) + +### Proposing a change + +If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with [feature template](https://github.com/sveltejs/svelte/issues/new?template=feature_request.md). + +If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend that you file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue. + +### Sending a pull request + +Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. + +Please make sure the following is done when submitting a pull request: + +1. Fork [the repository](https://github.com/sveltejs/svelte) and create your branch from `master`. +1. Describe your **test plan** in your pull request description. Make sure to test your changes. +1. Make sure your code lints (`npm run lint`). +1. Make sure your tests pass (`npm run test`). + +All pull requests should be opened against the `master` branch. + +#### Test plan + +A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI. + +- If you've changed APIs, update the documentation. + +#### Writing tests + +All tests are located in `/test` folder. + +Test samples are kept in `/test/xxx/samples` folder. + +#### Running tests + +1. To run test, run `npm run test` +1. To run test for a specific feature, you can use the `-g` (aka `--grep`) option. For example, to only run test involving transitions, run `npm run test -- -g transition`. + +##### Running solo test + +1. To run only one test, rename the test sample folder to end with `.solo`. For example, to run the `test/js/samples/action` only, rename it to `test/js/samples/action.solo`. +1. To run only one test suite, rename the test suite folder to end with `.solo`. For example, to run the `test/js` test suite only, rename it to `test/js.solo`. +1. Remember to rename the test folder back. The CI will fail if there's a solo test. + +##### Updating `.expected` files + +1. Tests suites like `css`, `js`, `server-side-rendering` asserts that the generated output has to match the content in the `.expected` file. For example, in the `js` test suites, the generated js code is compared against the content in `expected.js`. +1. To update the content of the `.expected` file, run the test with `--update` flag. (`npm run test --update`) + +#### Breaking changes + +When adding a new breaking change, follow this template in your pull request: + +```md +### New breaking change here + +- **Who does this affect**: +- **How to migrate**: +- **Why make this breaking change**: +- **Severity (number of people affected x effort)**: +``` + +### What happens next? + +The core Svelte team will be monitoring for pull requests. Do help us by making your pull request easy to review by following the guidelines above. + +## Style guide + +[Eslint](https://eslint.org) will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `npm run lint`. + +### Code conventions + +- `snake_case` for internal variable names and methods +- `camelCase` for public variable names and methods. + +## License + +By contributing to Svelte, you agree that your contributions will be licensed under its [MIT license](https://github.com/sveltejs/svelte/blob/master/LICENSE). diff --git a/LICENSE b/LICENSE index 939579e8bd..a8e26a756d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016 [these people](https://github.com/sveltejs/svelte/graphs/contributors) +Copyright (c) 2016-20 [these people](https://github.com/sveltejs/svelte/graphs/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index ff409c86a9..e05154bd7c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,19 @@ -<p align="center"> +<p> <a href="https://svelte.dev"> - <img alt="Cybernetically enhanced web apps: Svelte" src="https://svelte-assets.surge.sh/banner.png"> + <img alt="Cybernetically enhanced web apps: Svelte" src="https://sveltejs.github.io/assets/banner.png"> + </a> + + <a href="https://www.npmjs.com/package/svelte"> + <img src="https://img.shields.io/npm/v/svelte.svg" alt="npm version"> + </a> + + <a href="https://github.com/sveltejs/svelte/actions"> + <img src="https://github.com/sveltejs/svelte/workflows/CI/badge.svg?branch=master" + alt="build status"> + </a> + + <a href="https://github.com/sveltejs/svelte/blob/master/LICENSE"> + <img src="https://img.shields.io/npm/l/svelte.svg" alt="license"> </a> </p> @@ -9,7 +22,7 @@ Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM. -Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://discord.gg/yy75DKs). +Learn more at the [Svelte website](https://svelte.dev), or stop by the [Discord chatroom](https://svelte.dev/chat). ## Development @@ -19,11 +32,16 @@ Pull requests are encouraged and always welcome. [Pick an issue](https://github. To install and work on Svelte locally: ```bash -git clone git@github.com:sveltejs/svelte.git +git clone https://github.com/sveltejs/svelte.git cd svelte npm install ``` +> Many tests depend on newlines being preserved as `<LF>`. On Windows, you can ensure this by cloning with: +> ```bash +> git -c core.autocrlf=false clone https://github.com/sveltejs/svelte.git +> ``` + To build the compiler, and all the other modules included in the package: ```bash @@ -36,7 +54,7 @@ To watch for changes and continually rebuild the package (this is useful if you' npm run dev ``` -The compiler is written in [TypeScript](https://www.typescriptlang.org/), but don't let that put you off — it's basically just JavaScript with type annotations. You'll pick it up in no time. If you're using an editor other than [VSCode](https://code.visualstudio.com/) you may need to install a plugin in order to get syntax highlighting and code hints etc. +The compiler is written in [TypeScript](https://www.typescriptlang.org/), but don't let that put you off — it's basically just JavaScript with type annotations. You'll pick it up in no time. If you're using an editor other than [Visual Studio Code](https://code.visualstudio.com/) you may need to install a plugin in order to get syntax highlighting and code hints etc. ### Running Tests @@ -54,11 +72,11 @@ npm run test -- -g transition ## svelte.dev -The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [Sapper](https://sapper.svelte.technology) To develop locally: +The source code for https://svelte.dev, including all the documentation, lives in the [site](site) directory. The site is built with [Sapper](https://sapper.svelte.dev). To develop locally: ```bash cd site -npm install +npm install && npm run update npm run dev ``` diff --git a/animate.mjs b/animate.mjs deleted file mode 100644 index f22fabe401..0000000000 --- a/animate.mjs +++ /dev/null @@ -1,25 +0,0 @@ -import { cubicOut } from './easing'; -import { is_function } from './internal'; - -export function flip(node, animation, params) { - const style = getComputedStyle(node); - const transform = style.transform === 'none' ? '' : style.transform; - - const dx = animation.from.left - animation.to.left; - const dy = animation.from.top - animation.to.top; - - const d = Math.sqrt(dx * dx + dy * dy); - - const { - delay = 0, - duration = d => Math.sqrt(d) * 120, - easing = cubicOut - } = params; - - return { - delay, - duration: is_function(duration) ? duration(d) : duration, - easing, - css: (t, u) => `transform: ${transform} translate(${u * dx}px, ${u * dy}px);` - }; -} \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 249f61abf4..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,30 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml - -version: "{build}" - -clone_depth: 10 - -init: - - git config --global core.autocrlf false - -environment: - matrix: - # node.js - - nodejs_version: 10 - -install: - - ps: Install-Product node $env:nodejs_version - - npm install - -build: off - -test_script: - - node --version && npm --version - - npm test - -matrix: - fast_finish: false - -# cache: -# - C:\Users\appveyor\AppData\Roaming\npm-cache -> package.json # npm cache -# - node_modules -> package.json # local npm modules diff --git a/index.mjs b/index.mjs deleted file mode 100644 index ee5b575171..0000000000 --- a/index.mjs +++ /dev/null @@ -1,10 +0,0 @@ -export { - onMount, - onDestroy, - beforeUpdate, - afterUpdate, - setContext, - getContext, - tick, - createEventDispatcher -} from './internal'; diff --git a/mocha.coverage.opts b/mocha.coverage.opts index 5bf853ae30..cfec67a99a 100644 --- a/mocha.coverage.opts +++ b/mocha.coverage.opts @@ -1,4 +1,3 @@ ---compilers ts-node/register --require source-map-support/register --full-trace --recursive diff --git a/package-lock.json b/package-lock.json index 79b4a3d5fa..8f0b7469f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { "name": "svelte", - "version": "3.0.0-beta.25", + "version": "3.18.2", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", "dev": true, "requires": { "@babel/highlight": "^7.0.0" } }, "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", "dev": true, "requires": { "chalk": "^2.0.0", @@ -25,21 +25,124 @@ } }, "@bcoe/v8-coverage": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.1.0.tgz", - "integrity": "sha512-UdVB1rSL7H8TS8674fH02p5lRbhfIqQ18YKLxLKEnHFztHUH6bhMqjebMxgSTmWVrs5raS5JSLJIKKHFT4WfPg==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.1.tgz", + "integrity": "sha512-KioOCsSvSvXx6xUNLiJz+P+VMb7NRcePjoefOr74Y5P6lEKsiOn35eZyZzgpK4XCNJdXTDR7+zykj0lwxRvZ2g==", + "dev": true + }, + "@rollup/plugin-commonjs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.0.tgz", + "integrity": "sha512-jnm//T5ZWOZ6zmJ61fReSCBOif+Ax8dHVoVggA+d2NA7T4qCWgQ3KYr+zN2faGEYLpe1wa03IzvhR+sqVLxUWg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.0", + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + } + } + }, + "@rollup/plugin-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.0.1.tgz", + "integrity": "sha512-soxllkhOGgchswBAAaTe7X9G80U2tjjHvXv0sBrriLJcC/89PkP59iTrKPOfbz3SjX088mKDmMhAscuyLz8ZSg==", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.5.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-6.0.0.tgz", + "integrity": "sha512-GqWz1CfXOsqpeVMcoM315+O7zMxpRsmhWyhJoxLFHVSp9S64/u02i7len/FnbTNbmgYs+sZyilasijH8UiuboQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.0", + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1" + } + }, + "@rollup/plugin-replace": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.3.0.tgz", + "integrity": "sha512-rzWAMqXAHC1w3eKpK6LxRqiF4f3qVFaa1sGii6Bp3rluKcwHNOpPt+hWRCmAH6SDEPtbPiLFf0pfNQyHs6Btlg==", + "dev": true, + "requires": { + "magic-string": "^0.25.2", + "rollup-pluginutils": "^2.6.0" + } + }, + "@rollup/plugin-sucrase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-sucrase/-/plugin-sucrase-3.0.0.tgz", + "integrity": "sha512-sUQkoAXdw+bnd/cNZHGy5yQKW6OYYU7QlYBGhReI95uZljxO8t1LlbqCO2viIMV/u9pcCjgi8N9PcApcrJCA8Q==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.1", + "sucrase": "^3.10.1" + } + }, + "@rollup/plugin-typescript": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-2.0.1.tgz", + "integrity": "sha512-UA/bN/DlHN19xdOllXmp7G7pM2ac9dQMg0q2T1rg4Bogzb7oHXj2WGafpiNpEm54PivcJdzGRJvRnI6zCISW3w==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.0", + "resolve": "^1.12.2" + }, + "dependencies": { + "resolve": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz", + "integrity": "sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "@rollup/plugin-virtual": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-virtual/-/plugin-virtual-2.0.0.tgz", + "integrity": "sha512-yUyQjcflsN1DGcUHj3I0NYL6Y6xrna6qjdaGjM93LjFLq8NFowhR0655ICeV9bNDbk+LI4pz7Q6xqeDdj1RdlA==", "dev": true }, - "@sveltejs/svelte-repl": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.0.5.tgz", - "integrity": "sha512-SKSX4xkqwH0XcUHQozwTNm3OCqatk66CXYZnqOW9Jf4E1B6opyQUb9f96KwAxh7ghZMbeePRv51oOWsw6n0Yww==", + "@rollup/pluginutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.1.tgz", + "integrity": "sha512-PmNurkecagFimv7ZdKCVOfQuqKDPkrcpLFxRBcQ00LYr4HAjJwhCFxBiY2Xoletll2htTIiXBg6g0Yg21h2M3w==", "dev": true, "requires": { - "codemirror": "^5.45.0", - "yootils": "0.0.15" + "estree-walker": "^0.6.1" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + } } }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -52,18 +155,118 @@ "integrity": "sha1-byTuSHMdMRaOpRBhDW3RXl/Jxv8=", "dev": true }, + "@types/istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", + "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==", + "dev": true + }, "@types/mocha": { - "version": "5.2.5", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", - "integrity": "sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", "dev": true }, "@types/node": { - "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", + "version": "8.10.53", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.53.tgz", + "integrity": "sha512-aOmXdv1a1/vYUn1OT1CED8ftbkmmYbKhKGSyMDeJiidLvKRKvZUQOdXwG/wcNY7T1Qb0XTlVdiYjIq00U7pLrQ==", "dev": true }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.13.0.tgz", + "integrity": "sha512-WQHCozMnuNADiqMtsNzp96FNox5sOVpU8Xt4meaT4em8lOG1SrOv92/mUbEHQVh90sldKSfcOc/I0FOb/14G1g==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.13.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "tsutils": "^3.7.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz", + "integrity": "sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "1.13.0", + "eslint-scope": "^4.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz", + "integrity": "sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.1.0.tgz", + "integrity": "sha512-ZJGLYXa4nxjNzomaEk1qts38B/vludg2LOM7dRc7SppEKsMPTS1swaTKS/pom+x4d/luJGoG00BDIss7PR1NQA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.1.0", + "eslint-scope": "^4.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.1.0.tgz", + "integrity": "sha512-0+hzirRJoqE1T4lSSvCfKD+kWjIpDWfbGBiisK5CENcr+22pPkHB2sfV1giON+UxHV4A08SSrQonZk7X2zIQdw==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.1.0", + "@typescript-eslint/typescript-estree": "2.1.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.1.0.tgz", + "integrity": "sha512-482ErJJ7QYghBh+KA9G+Fwcuk/PLTy+9NBMz8S+6UFrUUnVvHRNAL7I70kdws2te0FBYEZW7pkDaXoT+y8UARw==", + "dev": true, + "requires": { + "glob": "^7.1.4", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "abab": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", @@ -71,74 +274,64 @@ "dev": true }, "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", "dev": true }, "acorn-globals": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz", - "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.3.tgz", + "integrity": "sha512-vkR40VwS2SYO98AIeFvzWWh+xyc2qi9s7OoXSFEGIP/rOJKzjnhykaZJNnHdoq4BL2gGxI5EZOU16z896EYnOQ==", "dev": true, "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "dev": true + } } }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", + "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", "dev": true }, "acorn-walk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", - "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz", + "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", "dev": true }, "agadoo": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/agadoo/-/agadoo-1.0.1.tgz", - "integrity": "sha512-rEOSqXQ3ABoxmgvxqEvUfS7mcMJBqRhcMbmJq4j+EpCXN0P1cFHYQT66V7rYSu0C+3jialSk58yHTBqzY0m+Sw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/agadoo/-/agadoo-1.1.0.tgz", + "integrity": "sha512-MiTXQ3As5jARRXa0eZF+ObtzsseQurCXOc1RB19NOGDsimEvoT8DB8iQiC0zAGTfsF/nBhzEle+eV9UpXyWnbw==", "dev": true, "requires": { - "rollup": "^0.64.1", + "rollup": "^1", "rollup-plugin-virtual": "^1.0.1" - }, - "dependencies": { - "rollup": { - "version": "0.64.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.64.1.tgz", - "integrity": "sha512-+ThdVXrvonJdOTzyybMBipP0uz605Z8AnzWVY3rf+cSGnLO7uNkJBlN+9jXqWOomkvumXfm/esmBpA5d53qm7g==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "@types/node": "*" - } - } } }, "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "dev": true, "requires": { "es6-promisify": "^5.0.0" } }, "ajv": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", - "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -147,16 +340,22 @@ "uri-js": "^4.2.2" } }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", "dev": true }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "ansi-styles": { @@ -174,12 +373,6 @@ "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", "dev": true }, - "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", @@ -195,29 +388,21 @@ "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", "dev": true }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, "array-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } }, "asn1": { "version": "0.2.4", @@ -234,27 +419,12 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", @@ -267,12 +437,6 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -291,73 +455,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -396,106 +493,41 @@ "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.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, "c8": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-3.4.0.tgz", - "integrity": "sha512-LJcCHZlcWzTeRdUciC3fTq2AoIjBAZ18oHMG3StFVpKHxN+6IDUesrG6uiK3DlRm2PaDBfEOyp2N69VqQte1XA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/c8/-/c8-5.0.1.tgz", + "integrity": "sha512-63V/XrzqX2wgByuJyafJYuaudvxxmGrm/acqRJpvbtKvRUj6h/85EFrVweQ14j1F7wRASp0W9zyZqj8fnWI+4Q==", "dev": true, "requires": { - "@bcoe/v8-coverage": "^0.1.0", + "@bcoe/v8-coverage": "^0.2.1", "find-up": "^3.0.0", "foreground-child": "^1.5.6", "furi": "^1.3.0", "istanbul-lib-coverage": "^2.0.1", "istanbul-lib-report": "^2.0.1", - "istanbul-reports": "^2.0.0", + "istanbul-reports": "^2.2.4", "rimraf": "^2.6.2", "test-exclude": "^5.0.0", - "uuid": "^3.3.2", - "v8-to-istanbul": "^2.0.2", - "yargs": "^12.0.5", + "v8-to-istanbul": "^3.1.3", + "yargs": "^13.1.0", "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", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "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" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "callsites": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", - "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "caseless": { @@ -513,49 +545,25 @@ "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "has-flag": "^3.0.0" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -572,14 +580,14 @@ "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==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, "code-point-at": { @@ -588,33 +596,29 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, - "codecov": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.1.0.tgz", - "integrity": "sha512-aWQc/rtHbcWEQLka6WmBAOpV58J2TwyXqlpAQGhQaSiEUoigTTUk6lLd2vB3kXkhnDyzyH74RXfmV4dq2txmdA==", + "code-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-0.1.1.tgz", + "integrity": "sha512-2pEIyya4fxI9HxQcrl9dJl20+9He1nLeja50zkf7gK2OTTV9NpD3CgA74gzXnPqWv2zJpa6uXNSaE0haOCpOsw==", "dev": true, "requires": { - "argv": "^0.0.2", - "ignore-walk": "^3.0.1", - "js-yaml": "^3.12.0", - "request": "^2.87.0", - "urlgrey": "^0.4.4" + "acorn": "^7.1.0", + "is-reference": "^1.1.4", + "periscopic": "^2.0.1", + "sourcemap-codec": "^1.4.6" } }, - "codemirror": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.45.0.tgz", - "integrity": "sha512-c19j644usCE8gQaXa0jqn2B/HN9MnB2u6qPIrrhrMkB+QAP42y8G4QnTwuwbVSoUS1jEl7JU9HZMGhCDL0nsAw==", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "codecov": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.5.0.tgz", + "integrity": "sha512-/OsWOfIHaQIr7aeZ4pY0UC1PZT6kimoKFOFYFNb6wxo3iw12nRrh+mNGH72rnXxNsq6SGfesVPizm/6Q3XqcFQ==", "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "argv": "^0.0.2", + "ignore-walk": "^3.0.1", + "js-yaml": "^3.13.1", + "teeny-request": "^3.11.3", + "urlgrey": "^0.4.4" } }, "color-convert": { @@ -633,24 +637,18 @@ "dev": true }, "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { "delayed-stream": "~1.0.0" } }, "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", "dev": true }, "concat-map": { @@ -669,32 +667,6 @@ "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "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" - } - } } }, "contains-path": { @@ -703,11 +675,14 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } }, "core-util-is": { "version": "1.0.2", @@ -716,15 +691,12 @@ "dev": true }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", + "lru-cache": "^4.0.1", "which": "^1.2.9" } }, @@ -747,15 +719,15 @@ } }, "cssom": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", - "integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, "cssstyle": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.1.1.tgz", - "integrity": "sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", + "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", "dev": true, "requires": { "cssom": "0.3.x" @@ -782,9 +754,9 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "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" @@ -796,69 +768,19 @@ "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", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } + "object-keys": "^1.0.12" } }, "delayed-stream": { @@ -874,38 +796,14 @@ "dev": true }, "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" } }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -915,25 +813,6 @@ "webidl-conversions": "^4.0.2" } }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -944,6 +823,12 @@ "safer-buffer": "^2.1.0" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", @@ -953,12 +838,6 @@ "once": "^1.4.0" } }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -968,10 +847,35 @@ "is-arrayish": "^0.2.1" } }, + "es-abstract": { + "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.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "dev": true }, "es6-promisify": { @@ -990,9 +894,9 @@ "dev": true }, "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", + "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", "dev": true, "requires": { "esprima": "^3.1.3", @@ -1007,52 +911,107 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true } } }, "eslint": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.12.1.tgz", - "integrity": "sha512-54NV+JkTpTu0d8+UYSA8mMKAG4XAsaOrozA9rCW7tgneg1mevcL7wIotPC+fZ0SkWwdhNqoXoxnQCTBp7UvTsg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.3.0.tgz", + "integrity": "sha512-ZvZTKaqDue+N8Y9g0kp6UPZtS4FSY3qARxBs7p4f0H0iof381XHduqVerFWtK8DPtKmemqbqCFENWSQgPR/Gow==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "ajv": "^6.5.3", + "ajv": "^6.10.0", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", "debug": "^4.0.1", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.0", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.2", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.1", "esquery": "^1.0.1", "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", + "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", + "glob-parent": "^5.0.0", "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", + "inquirer": "^6.4.1", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.5", + "lodash": "^4.17.14", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", "progress": "^2.0.0", "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.0.2", - "text-table": "^0.2.0" + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "eslint-import-resolver-node": { @@ -1083,9 +1042,9 @@ } }, "eslint-module-utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz", - "integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "dev": true, "requires": { "debug": "^2.6.8", @@ -1109,31 +1068,23 @@ } } }, - "eslint-plugin-html": { - "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.10.0" - } - }, "eslint-plugin-import": { - "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==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "dev": true, "requires": { + "array-includes": "^3.0.3", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.3.0", + "eslint-module-utils": "^2.4.0", "has": "^1.0.3", - "lodash": "^4.17.11", "minimatch": "^3.0.4", + "object.values": "^1.1.0", "read-pkg-up": "^2.0.0", - "resolve": "^1.9.0" + "resolve": "^1.11.0" }, "dependencies": { "debug": { @@ -1155,18 +1106,124 @@ "isarray": "^1.0.0" } }, + "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" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } } } }, + "eslint-plugin-svelte3": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte3/-/eslint-plugin-svelte3-2.7.3.tgz", + "integrity": "sha512-p6HhxyICX9x/x+8WSy6AVk2bmv9ayoznoTSyCvK47th/k/07ksuJixMwbGX9qxJVAmPBaYMjEIMSEZtJHPIN7w==", + "dev": true + }, "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -1174,26 +1231,29 @@ } }, "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", + "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.0.0" + } }, "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true }, "espree": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.0.tgz", - "integrity": "sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz", + "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==", "dev": true, "requires": { - "acorn": "^6.0.2", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^7.0.0", + "acorn-jsx": "^5.0.2", + "eslint-visitor-keys": "^1.1.0" } }, "esprima": { @@ -1227,15 +1287,15 @@ "dev": true }, "estree-walker": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz", - "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.0.tgz", + "integrity": "sha512-vY6xMN2j47HfQfVWGRqHshr1olf+XS1Y488NoqjDP1c8E1TcoZr/D3eSGa6akBs76WL1X9nluWjgBsCKdt/qKg==", "dev": true }, "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "execa": { @@ -1251,39 +1311,33 @@ "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" }, "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "requires": { "chardet": "^0.7.0", @@ -1363,40 +1417,47 @@ } }, "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "^2.0.1" } }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "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" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", "dev": true, "requires": { - "locate-path": "^2.0.0" + "is-buffer": "~2.0.3" } }, "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "dev": true, "requires": { - "circular-json": "^0.3.1", - "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", - "write": "^0.2.1" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", "dev": true }, "foreground-child": { @@ -1407,18 +1468,6 @@ "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": { @@ -1438,15 +1487,6 @@ "mime-types": "^2.1.12" } }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1476,9 +1516,9 @@ } }, "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==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-stream": { @@ -1490,12 +1530,6 @@ "pump": "^3.0.0" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1506,9 +1540,9 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -1519,16 +1553,25 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", + "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globals": { - "version": "11.10.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.10.0.tgz", - "integrity": "sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "globalyzer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", - "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.4.tgz", + "integrity": "sha512-LeguVWaxgHN0MNbWC6YljNMzHkrCny9fzjmEUdnF1kQ7wATFD1RHFRqA1qxaX2tgxGENlcxjOflopBwj3YZiXA==", "dev": true }, "globrex": { @@ -1538,9 +1581,9 @@ "dev": true }, "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", "dev": true }, "growl": { @@ -1550,15 +1593,23 @@ "dev": true }, "handlebars": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz", - "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", "dev": true, "requires": { - "async": "^2.5.0", + "neo-async": "^2.6.0", "optimist": "^0.6.1", "source-map": "^0.6.1", "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "har-schema": { @@ -1592,70 +1643,16 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "has-values": { + "has-symbols": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true }, "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "hosted-git-info": { @@ -1673,20 +1670,6 @@ "whatwg-encoding": "^1.0.1" } }, - "htmlparser2": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.0.tgz", - "integrity": "sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.0.6" - } - }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -1699,24 +1682,13 @@ } }, "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", "dev": true, "requires": { - "agent-base": "^4.1.0", + "agent-base": "^4.3.0", "debug": "^3.1.0" - }, - "dependencies": { - "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" - } - } } }, "iconv-lite": { @@ -1744,9 +1716,9 @@ } }, "import-fresh": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", - "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -1770,45 +1742,57 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "inquirer": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", - "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^3.0.0", + "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.17.10", + "lodash": "^4.17.12", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^6.1.0", + "rxjs": "^6.4.0", "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", + "strip-ansi": "^5.1.0", "through": "^2.3.6" }, "dependencies": { "ansi-regex": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", - "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "strip-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", - "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "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": { - "ansi-regex": "^4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "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" + } + } } } } @@ -1819,14 +1803,11 @@ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true }, "is-arrayish": { "version": "0.2.1", @@ -1835,52 +1816,27 @@ "dev": true }, "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://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-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "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", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-fullwidth-code-point": { @@ -1889,29 +1845,21 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", @@ -1919,20 +1867,38 @@ "dev": true }, "is-reference": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.1.tgz", - "integrity": "sha512-URlByVARcyP2E2GC7d3Ur702g3vqW391VKCHuF5Goo/M8IT97k4RU/+56OYImwDdX1J/V/VRxECE/wJqB0I2tg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", + "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", "dev": true, "requires": { "@types/estree": "0.0.39" } }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "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", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1964,29 +1930,29 @@ "dev": true }, "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", "dev": true }, "istanbul-lib-report": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz", - "integrity": "sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.1", - "make-dir": "^1.3.0", - "supports-color": "^5.4.0" + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" } }, "istanbul-reports": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.0.1.tgz", - "integrity": "sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", + "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", "dev": true, "requires": { - "handlebars": "^4.0.11" + "handlebars": "^4.1.2" } }, "js-tokens": { @@ -1996,9 +1962,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", - "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2012,36 +1978,54 @@ "dev": true }, "jsdom": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-12.2.0.tgz", - "integrity": "sha512-QPOggIJ8fquWPLaYYMoh+zqUmdphDtu1ju0QGTitZT1Yd8I5qenPpXM1etzUegu3MjVp8XPzgZxdn8Yj7e40ig==", + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.1.1.tgz", + "integrity": "sha512-cQZRBB33arrDAeCrAEWn1U3SvrvC8XysBua9Oqg1yWrsY/gYcusloJC3RZJXuY5eehSCmws8f2YeliCqGSkrtQ==", "dev": true, "requires": { "abab": "^2.0.0", - "acorn": "^6.0.2", - "acorn-globals": "^4.3.0", + "acorn": "^6.1.1", + "acorn-globals": "^4.3.2", "array-equal": "^1.0.0", - "cssom": "^0.3.4", - "cssstyle": "^1.1.1", - "data-urls": "^1.0.1", + "cssom": "^0.3.6", + "cssstyle": "^1.2.2", + "data-urls": "^1.1.0", "domexception": "^1.0.1", - "escodegen": "^1.11.0", + "escodegen": "^1.11.1", "html-encoding-sniffer": "^1.0.2", - "nwsapi": "^2.0.9", + "nwsapi": "^2.1.4", "parse5": "5.1.0", "pn": "^1.1.0", "request": "^2.88.0", - "request-promise-native": "^1.0.5", - "saxes": "^3.1.3", + "request-promise-native": "^1.0.7", + "saxes": "^3.1.9", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.4.3", + "tough-cookie": "^3.0.1", "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.1.2", "webidl-conversions": "^4.0.2", "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.2.0", + "whatwg-mimetype": "^2.3.0", "whatwg-url": "^7.0.0", - "ws": "^6.1.0", + "ws": "^7.0.0", "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "dev": true + }, + "ws": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.1.1.tgz", + "integrity": "sha512-o41D/WmDeca0BqYhsr3nJzQyg9NF5X8l/UdnFNux9cS3lwB+swm8qGWX5rn+aD6xfBU3rGmtHij7g7x6LxFU3A==", + "dev": true, + "requires": { + "async-limiter": "^1.0.0" + } + } } }, "json-parse-better-errors": { @@ -2086,19 +2070,10 @@ "verror": "1.10.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, "kleur": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.1.tgz", - "integrity": "sha512-P3kRv+B+Ra070ng2VKQqW4qW7gd/v3iD8sy/zOdcYRsfiD+QBokQNOps/AfP6Hr48cBhIIBFWckB9aO+IZhrWg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, "lcid": { @@ -2127,15 +2102,23 @@ "dev": true }, "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "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": "^2.2.0", - "pify": "^2.0.0", + "parse-json": "^4.0.0", + "pify": "^3.0.0", "strip-bom": "^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 + } } }, "locate-character": { @@ -2145,19 +2128,19 @@ "dev": true }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "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": "^2.0.0", + "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==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lodash.sortby": { @@ -2166,6 +2149,21 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -2177,37 +2175,32 @@ } }, "magic-string": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", - "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", + "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", "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==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "^4.0.1", + "semver": "^5.6.0" }, "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true } } }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "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", @@ -2217,21 +2210,6 @@ "p-defer": "^1.0.0" } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, "mdn-data": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.2.0.tgz", @@ -2239,41 +2217,41 @@ "dev": true }, "mem": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", - "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "dev": true, "requires": { "map-age-cleaner": "^0.1.1", - "mimic-fn": "^1.0.0", - "p-is-promise": "^1.1.0" + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" } }, "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", "dev": true }, "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", "dev": true }, "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", "dev": true, "requires": { - "mime-db": "~1.37.0" + "mime-db": "1.40.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==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimatch": { @@ -2286,32 +2264,11 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -2319,40 +2276,80 @@ "dev": true, "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } } }, "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", + "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", "dev": true, "requires": { + "ansi-colors": "3.2.3", "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", + "debug": "3.2.6", "diff": "3.5.0", "escape-string-regexp": "1.0.5", - "glob": "7.1.2", + "find-up": "3.0.0", + "glob": "7.1.3", "growl": "1.10.5", - "he": "1.1.1", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "5.4.0" + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.2.2", + "yargs-parser": "13.0.0", + "yargs-unparser": "1.5.0" }, "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "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": { - "ms": "2.0.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "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" + } + } } }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "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", @@ -2364,28 +2361,119 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "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-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", "dev": true, "requires": { "has-flag": "^3.0.0" } - } - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "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" + } + } + } + }, + "yargs": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", + "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.0.0" + } + }, + "yargs-parser": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", + "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -2403,57 +2491,48 @@ "thenify-all": "^1.0.0" } }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "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-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": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-environment-flags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + } + } + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "dev": true + }, "node-modules-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", @@ -2461,13 +2540,13 @@ "dev": 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==", + "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" } @@ -2488,9 +2567,9 @@ "dev": true }, "nwsapi": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz", - "integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", + "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==", "dev": true }, "oauth-sign": { @@ -2505,60 +2584,44 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" } }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", "dev": true, "requires": { - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", "dev": true, "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" } }, "once": { @@ -2577,6 +2640,14 @@ "dev": true, "requires": { "mimic-fn": "^1.0.0" + }, + "dependencies": { + "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 + } } }, "optimist": { @@ -2587,14 +2658,6 @@ "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": { @@ -2609,6 +2672,14 @@ "prelude-ls": "~1.1.2", "type-check": "~0.3.2", "wordwrap": "~1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } } }, "os-locale": { @@ -2641,51 +2712,52 @@ "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=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", "dev": true }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "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": "^1.1.0" + "p-limit": "^2.0.0" } }, "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "parent-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", - "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" } }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "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.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse5": { @@ -2694,12 +2766,6 @@ "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", "dev": true }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -2712,12 +2778,6 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -2731,12 +2791,20 @@ "dev": true }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "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": "^2.0.0" + "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 + } } }, "pend": { @@ -2751,16 +2819,25 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "periscopic": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-2.0.1.tgz", + "integrity": "sha512-twJ8e4RatllMAcbmBqKj8cvZ94HtqSzbb8hJoGj4iSCcCHXxKb06HRxOq4heyq2x/6mKynJDvTTreHCz+m6lJw==", + "dev": true, + "requires": { + "is-reference": "^1.1.4" + } + }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pirates": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.0.tgz", - "integrity": "sha512-8t5BsXy1LUIjn3WWOlOuFDuKswhQb/tkak641lvBgmPOBUQHXveORtlMCp6OdPV1dtuTaEahKA8VNz6uLfKBtA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", "dev": true, "requires": { "node-modules-regexp": "^1.0.0" @@ -2773,26 +2850,59 @@ "dev": true, "requires": { "find-up": "^2.1.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" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } } }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -2800,9 +2910,9 @@ "dev": true }, "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, "progress": { @@ -2824,9 +2934,9 @@ "dev": true }, "psl": { - "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==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", + "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", "dev": true }, "pump": { @@ -2846,9 +2956,9 @@ "dev": true }, "puppeteer": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.13.0.tgz", - "integrity": "sha512-LUXgvhjfB/P6IOUDAKxOcbCz9ISwBLL9UpKghYrcBDwrOGx1m60y0iN2M64mdAUbT4+7oZM5DTxOW7equa2fxQ==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.19.0.tgz", + "integrity": "sha512-2S6E6ygpoqcECaagDbBopoSOPDv0pAZvTbnBgUY+6hq0/XDFDOLEMNlHF/SKJlzcaZ9ckiKjKDuueWI3FN/WXw==", "dev": true, "requires": { "debug": "^4.1.0", @@ -2859,6 +2969,17 @@ "proxy-from-env": "^1.0.0", "rimraf": "^2.6.1", "ws": "^6.1.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } } }, "qs": { @@ -2868,45 +2989,39 @@ "dev": true }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "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": "^2.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "path-type": "^3.0.0" } }, "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "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": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" } }, "readable-stream": { - "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", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "regexpp": { @@ -2915,18 +3030,6 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -2953,26 +3056,56 @@ "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + } } }, "request-promise-core": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", - "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", + "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", "dev": true, "requires": { - "lodash": "^4.13.1" + "lodash": "^4.17.11" } }, "request-promise-native": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", - "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", + "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", "dev": true, "requires": { - "request-promise-core": "1.1.1", - "stealthy-require": "^1.1.0", - "tough-cookie": ">=2.3.3" + "request-promise-core": "1.1.2", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } } }, "require-directory": { @@ -2982,15 +3115,15 @@ "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=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -3002,12 +3135,6 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, "restore-cursor": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", @@ -3018,12 +3145,6 @@ "signal-exit": "^3.0.2" } }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -3034,415 +3155,52 @@ } }, "rollup": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.1.2.tgz", - "integrity": "sha512-OkdMxqMl8pWoQc5D8y1cIinYQPPLV8ZkfLgCzL6SytXeNA2P7UHynEQXI9tYxuAjAMsSyvRaWnyJDLHMxq0XAg==", + "version": "1.27.14", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.27.14.tgz", + "integrity": "sha512-DuDjEyn8Y79ALYXMt+nH/EI58L5pEw5HU9K38xXdRnxQhvzUTI/nxAawhkAHUQeudANQ//8iyrhVRHJBuR6DSQ==", "dev": true, "requires": { - "@types/estree": "0.0.39", + "@types/estree": "*", "@types/node": "*", - "acorn": "^6.0.5" + "acorn": "^7.1.0" } }, - "rollup-plugin-commonjs": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.2.0.tgz", - "integrity": "sha512-0RM5U4Vd6iHjL6rLvr3lKBwnPsaVml+qxOGaaNUWN1lSq6S33KhITOfHmvxV3z2vy9Mk4t0g4rNlVaJJsNQPWA==", + "rollup-plugin-virtual": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-virtual/-/rollup-plugin-virtual-1.0.1.tgz", + "integrity": "sha512-HCTBpV8MwP5lNzZrHD2moVxHIToHU1EkzkKGVj6Z0DcgUfxrxrZmeQirQeLz2yhnkJqRjwiVywK9CS8jDYakrw==", + "dev": true + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", "dev": true, "requires": { - "estree-walker": "^0.5.2", - "magic-string": "^0.25.1", - "resolve": "^1.8.1", - "rollup-pluginutils": "^2.3.3" + "estree-walker": "^0.6.1" }, "dependencies": { "estree-walker": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz", - "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", "dev": true } } }, - "rollup-plugin-json": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz", - "integrity": "sha512-BlYk5VspvGpjz7lAwArVzBXR60JK+4EKtPkCHouAWg39obk9S61hZYJDBfMK+oitPdoe11i69TlxKlMQNFC/Uw==", + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "rollup-pluginutils": "^2.3.1" + "is-promise": "^2.1.0" } }, - "rollup-plugin-node-resolve": { - "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": "^3.0.0", - "is-module": "^1.0.0", - "resolve": "^1.8.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 - } - } - }, - "rollup-plugin-replace": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-replace/-/rollup-plugin-replace-2.1.0.tgz", - "integrity": "sha512-SxrAIgpH/B5/W4SeULgreOemxcpEgKs2gcD42zXw50bhqGWmcnlXneVInQpAqzA/cIly4bJrOpeelmB9p4YXSQ==", - "dev": true, - "requires": { - "magic-string": "^0.25.1", - "minimatch": "^3.0.2", - "rollup-pluginutils": "^2.0.1" - } - }, - "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": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-virtual/-/rollup-plugin-virtual-1.0.1.tgz", - "integrity": "sha512-HCTBpV8MwP5lNzZrHD2moVxHIToHU1EkzkKGVj6Z0DcgUfxrxrZmeQirQeLz2yhnkJqRjwiVywK9CS8jDYakrw==", - "dev": true - }, - "rollup-pluginutils": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.4.1.tgz", - "integrity": "sha512-wesMQ9/172IJDIW/lYWm0vW0LiKe5Ekjws481R7z9WTRtmO59cqyM/2uUlxvf6yzm/fElFmHUobeQOYz46dZJw==", - "dev": true, - "requires": { - "estree-walker": "^0.6.0", - "micromatch": "^3.1.10" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "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" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "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": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "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" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "rxjs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -3454,15 +3212,6 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -3470,18 +3219,18 @@ "dev": true }, "saxes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.6.tgz", - "integrity": "sha512-LAYs+lChg1v5uKNzPtsgTxSS5hLo8aIhSMCJt1WMpefAxm3D1RTpMwSpb6ebdL31cubiLTnhokVktBW+cv9Y9w==", + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.11.tgz", + "integrity": "sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==", "dev": true, "requires": { - "xmlchars": "^1.3.1" + "xmlchars": "^2.1.1" } }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "set-blocking": { @@ -3490,29 +3239,6 @@ "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", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -3535,9 +3261,9 @@ "dev": true }, "slice-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz", - "integrity": "sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -3545,174 +3271,34 @@ "is-fullwidth-code-point": "^2.0.0" } }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "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", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "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 - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "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-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, "sourcemap-codec": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", - "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", "dev": true }, "spdx-correct": { @@ -3742,20 +3328,11 @@ } }, "spdx-license-ids": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", + "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", "dev": true }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -3763,9 +3340,9 @@ "dev": true }, "sshpk": { - "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==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -3779,27 +3356,6 @@ "tweetnacl": "~0.14.0" } }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", @@ -3807,31 +3363,32 @@ "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" } }, "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "version": "1.1.1", + "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=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } }, "strip-bom": { @@ -3847,171 +3404,71 @@ "dev": true }, "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", "dev": true }, "sucrase": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.9.5.tgz", - "integrity": "sha512-gvNjd3PJ0WAXxWUAQzCw/nlG4J5a2j7q8jN+sX8Fwe3ryIsl9UrEcWPxWoEzBPrj3Fias4U05iN84m4/IFQLdw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.10.1.tgz", + "integrity": "sha512-nMOs6rFWwkYRxcKHHDjyQmC5CmLbHN2LwRyWF1n2i0kb/pq0xcB9M19TdY5Ivfcj1BsWfs+az9Ga5B0tFdE5ww==", "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 - } } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-tree": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", - "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", - "dev": true - }, - "table": { - "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", - "lodash": "^4.17.11", - "slice-ansi": "2.0.0", - "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" - } - } + }, + "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" + } + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, + "teeny-request": { + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-3.11.3.tgz", + "integrity": "sha512-CKncqSF7sH6p4rzCgkb/z/Pcos5efl0DmolzvlqRQUNcpRIruOhY9+T1FsIlyEbfWd7MsFpodROOwHYh2BaXzw==", + "dev": true, + "requires": { + "https-proxy-agent": "^2.2.1", + "node-fetch": "^2.2.0", + "uuid": "^3.3.2" + } + }, + "test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "requires": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" } }, "text-table": { @@ -4063,64 +3520,15 @@ "os-tmpdir": "~1.0.2" } }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "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", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - } - } - }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "tr46": { @@ -4132,25 +3540,21 @@ "punycode": "^2.1.0" } }, - "ts-node": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", - "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==", + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", "dev": true, "requires": { - "arg": "^4.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" + "tslib": "^1.8.1" } }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -4182,112 +3586,31 @@ "dev": true }, "typescript": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", - "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", + "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", "dev": true }, "uglify-js": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", - "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", "dev": true, "optional": true, "requires": { - "commander": "~2.17.1", + "commander": "~2.20.0", "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==", + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "optional": true } } }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "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", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -4297,24 +3620,12 @@ "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, "urlgrey": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=", "dev": true }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -4327,12 +3638,23 @@ "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==", + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, + "v8-to-istanbul": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-3.2.3.tgz", + "integrity": "sha512-B8d/oxMtc/x0TYXr9b+Ywu5KexA/on4QMQ9M1kTYnoGZzKdo8LLk9ySlWePdDOtr2G0/2Injgcp3sOR9gU+3vQ==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -4363,6 +3685,17 @@ "browser-process-hrtime": "^0.1.2" } }, + "w3c-xmlserializer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz", + "integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==", + "dev": true, + "requires": { + "domexception": "^1.0.1", + "webidl-conversions": "^4.0.2", + "xml-name-validator": "^3.0.0" + } + }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", @@ -4410,59 +3743,59 @@ "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=", + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "^1.0.2 || 2" }, "dependencies": { "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "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=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.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=", + "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": "^2.0.0" + "ansi-regex": "^3.0.0" } } } }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4470,18 +3803,18 @@ "dev": true }, "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", "dev": true, "requires": { "mkdirp": "^0.5.1" } }, "ws": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.3.tgz", - "integrity": "sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", "dev": true, "requires": { "async-limiter": "~1.0.0" @@ -4494,9 +3827,9 @@ "dev": true }, "xmlchars": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz", - "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.1.1.tgz", + "integrity": "sha512-7hew1RPJ1iIuje/Y01bGD/mXokXxegAgVS+e+E0wSi2ILHQkYAH1+JXARwTjZSM4Z4Z+c73aKspEcqj+zPPL/w==", "dev": true }, "y18n": { @@ -4512,73 +3845,178 @@ "dev": true }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "version": "13.2.4", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", + "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.0" + }, + "dependencies": { + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "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": "5.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true - }, - "find-up": { + } + } + }, + "yargs-unparser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", + "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.11", + "yargs": "^12.0.5" + }, + "dependencies": { + "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "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": { - "locate-path": "^3.0.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.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==", + "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 + }, + "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 + }, + "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": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.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==", + "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": { - "p-try": "^2.0.0" + "ansi-regex": "^3.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==", + "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": { - "p-limit": "^2.0.0" + "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" + } + } } }, - "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": { + "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", @@ -4592,23 +4030,6 @@ } } }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - }, "yauzl": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", @@ -4617,18 +4038,6 @@ "requires": { "fd-slicer": "~1.0.1" } - }, - "yn": { - "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 - }, - "yootils": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.15.tgz", - "integrity": "sha512-GvGLuJ7XHJPGEUQ52vh8fh+vPjfikuGcu7yBswfrsNsHqnAoytOVuSb69eM0j8wQIjMz0U3kY3YsfwMhJgfG9w==", - "dev": true } } } diff --git a/package.json b/package.json index 44ff6d2655..6000e9d1c4 100644 --- a/package.json +++ b/package.json @@ -1,37 +1,43 @@ { "name": "svelte", - "version": "3.0.0", + "version": "3.18.2", "description": "Cybernetically enhanced web apps", "module": "index.mjs", "main": "index", "files": [ - "compiler.js", + "types", + "compiler.*", "register.js", "index.*", - "internal.*", - "store.*", - "animate.*", - "transition.*", - "easing.*", - "motion.*", + "internal", + "store", + "animate", + "transition", + "easing", + "motion", "svelte", "README.md" ], + "engines": { + "node": ">= 8" + }, + "types": "types/runtime/index.d.ts", "scripts": { "test": "mocha --opts mocha.opts", - "test:unit": "mocha --require sucrase/register --recursive ./**/__test__.ts", + "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts", "quicktest": "mocha --opts mocha.opts", "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", + "build": "rollup -c && npm run tsd", "prepare": "npm run build", "dev": "rollup -cw", "pretest": "npm run build", - "posttest": "agadoo src/internal/index.js", - "prepublishOnly": "export PUBLISH=true && npm run lint && npm test" + "posttest": "agadoo internal/index.mjs", + "prepublishOnly": "npm run lint && PUBLISH=true npm test", + "tsd": "tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly", + "lint": "eslint \"{src,test}/**/*.{ts,js}\"" }, "repository": { "type": "git", @@ -50,40 +56,41 @@ }, "homepage": "https://github.com/sveltejs/svelte#README", "devDependencies": { - "@sveltejs/svelte-repl": "0.0.5", - "@types/mocha": "^5.2.0", - "@types/node": "^10.5.5", - "acorn": "^6.1.1", - "acorn-dynamic-import": "^4.0.0", - "agadoo": "^1.0.1", - "c8": "^3.4.0", - "codecov": "^3.0.0", + "@rollup/plugin-commonjs": "^11.0.0", + "@rollup/plugin-json": "^4.0.1", + "@rollup/plugin-node-resolve": "^6.0.0", + "@rollup/plugin-replace": "^2.3.0", + "@rollup/plugin-sucrase": "^3.0.0", + "@rollup/plugin-typescript": "^2.0.1", + "@rollup/plugin-virtual": "^2.0.0", + "@types/mocha": "^5.2.7", + "@types/node": "^8.10.53", + "@typescript-eslint/eslint-plugin": "^1.13.0", + "@typescript-eslint/parser": "^2.1.0", + "acorn": "^7.1.0", + "agadoo": "^1.1.0", + "c8": "^5.0.1", + "code-red": "0.1.1", + "codecov": "^3.5.0", "css-tree": "1.0.0-alpha22", - "eslint": "^5.3.0", - "eslint-plugin-html": "^5.0.0", - "eslint-plugin-import": "^2.11.0", - "estree-walker": "^0.6.0", - "is-reference": "^1.1.1", - "jsdom": "^12.2.0", - "kleur": "^3.0.0", + "eslint": "^6.3.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-svelte3": "^2.7.3", + "estree-walker": "^1.0.0", + "is-reference": "^1.1.4", + "jsdom": "^15.1.1", + "kleur": "^3.0.3", "locate-character": "^2.0.5", - "magic-string": "^0.25.2", - "mocha": "^5.2.0", - "puppeteer": "^1.13.0", - "rollup": "^1.1.2", - "rollup-plugin-commonjs": "^9.1.0", - "rollup-plugin-json": "^3.0.0", - "rollup-plugin-node-resolve": "^4.0.0", - "rollup-plugin-replace": "^2.0.0", - "rollup-plugin-sucrase": "^2.1.0", - "rollup-plugin-typescript": "^1.0.0", - "rollup-plugin-virtual": "^1.0.1", - "source-map": "0.6", - "source-map-support": "^0.5.4", - "tiny-glob": "^0.2.1", - "ts-node": "^8.0.2", - "tslib": "^1.8.0", - "typescript": "^3.0.1" + "magic-string": "^0.25.3", + "mocha": "^6.2.0", + "periscopic": "^2.0.1", + "puppeteer": "^1.19.0", + "rollup": "^1.27.14", + "source-map": "^0.7.3", + "source-map-support": "^0.5.13", + "tiny-glob": "^0.2.6", + "tslib": "^1.10.0", + "typescript": "^3.5.3" }, "nyc": { "include": [ diff --git a/register.js b/register.js index 2c0069c241..3278c1cbf5 100644 --- a/register.js +++ b/register.js @@ -2,7 +2,7 @@ const fs = require('fs'); const path = require('path'); const { compile } = require('./compiler.js'); -let extensions = ['.svelte', '.html']; +const extensions = ['.svelte', '.html']; let compileOptions = {}; function capitalise(name) { @@ -25,8 +25,7 @@ function deregisterExtension(extension) { function registerExtension(extension) { require.extensions[extension] = function(module, filename) { - const name = path.basename(filename) - .slice(0, -path.extname(filename).length) + const name = path.parse(filename).name .replace(/^\d/, '_$&') .replace(/[^a-zA-Z0-9_$]/g, ''); @@ -46,4 +45,4 @@ function registerExtension(extension) { registerExtension('.svelte'); registerExtension('.html'); -module.exports = register; \ No newline at end of file +module.exports = register; diff --git a/rollup.config.js b/rollup.config.js index f7b2d07d4b..6f3d893a33 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,44 +1,93 @@ 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 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; +const ts_plugin = is_publish + ? typescript({ + include: 'src/**', + typescript: require('typescript') + }) + : sucrase({ + transforms: ['typescript'] + }); + +const external = id => id.startsWith('svelte/'); + +fs.writeFileSync(`./compiler.d.ts`, `export { compile, parse, preprocess, VERSION } from './types/compiler/index';`); + export default [ - /* internal.[m]js */ + /* runtime */ { - input: `src/internal/index.js`, + input: `src/runtime/index.ts`, output: [ { - file: `internal.mjs`, + file: `index.mjs`, format: 'esm', - paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') + paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '.')}` }, { - file: `internal.js`, + file: `index.js`, format: 'cjs', - paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') + 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)});`); - } - } - }] + external, + plugins: [ts_plugin] }, + ...fs.readdirSync('src/runtime') + .filter(dir => fs.statSync(`src/runtime/${dir}`).isDirectory()) + .map(dir => ({ + input: `src/runtime/${dir}/index.ts`, + output: [ + { + file: `${dir}/index.mjs`, + format: 'esm', + paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '..')}` + }, + { + file: `${dir}/index.js`, + format: 'cjs', + paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '..')}` + } + ], + external, + plugins: [ + replace({ + __VERSION__: pkg.version + }), + ts_plugin, + { + writeBundle(bundle) { + if (dir === 'internal') { + const mod = bundle['index.mjs']; + if (mod) { + fs.writeFileSync('src/compiler/compile/internal_exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`); + } + } + + fs.writeFileSync(`${dir}/package.json`, JSON.stringify({ + main: './index', + module: './index.mjs', + types: './index.d.ts' + }, null, ' ')); + + fs.writeFileSync(`${dir}/index.d.ts`, `export * from '../types/runtime/${dir}/index';`); + } + } + ] + })), + /* compiler.js */ { - input: 'src/index.ts', + input: 'src/compiler/index.ts', plugins: [ replace({ __VERSION__: pkg.version @@ -48,15 +97,7 @@ export default [ include: ['node_modules/**'] }), json(), - is_publish - ? typescript({ - include: 'src/**', - exclude: 'src/internal/**', - typescript: require('typescript') - }) - : sucrase({ - transforms: ['typescript'] - }) + ts_plugin ], output: { file: 'compiler.js', @@ -67,34 +108,5 @@ export default [ external: is_publish ? [] : id => id === 'acorn' || id === 'magic-string' || id.startsWith('css-tree') - }, - - /* motion.mjs */ - { - input: `src/motion/index.js`, - output: [ - { - file: `motion.mjs`, - format: 'esm', - paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') - }, - { - file: `motion.js`, - format: 'cjs', - paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') - } - ], - external: id => id.startsWith('svelte/') - }, - - // everything else - ...['index', 'store', 'easing', 'transition', 'animate'].map(name => ({ - input: `${name}.mjs`, - output: { - file: `${name}.js`, - format: 'cjs', - paths: id => id.startsWith('svelte/') && id.replace('svelte', '.') - }, - external: id => id !== `${name}.mjs` - })) + } ]; diff --git a/site/.env.example b/site/.env.example new file mode 100644 index 0000000000..9cfe50cd6c --- /dev/null +++ b/site/.env.example @@ -0,0 +1,13 @@ +NODE_ENV= + +PORT= +BASEURL= +GITHUB_CLIENT_ID= +GITHUB_CLIENT_SECRET= +MAPBOX_ACCESS_TOKEN= + +PGHOST=hostname +PGPORT=port +PGUSER=username +PGPASSWORD=password +PGDATABASE=database_name diff --git a/site/.eslintrc.js b/site/.eslintrc.js new file mode 100644 index 0000000000..255b8af9c5 --- /dev/null +++ b/site/.eslintrc.js @@ -0,0 +1,58 @@ +module.exports = { + root: true, + rules: { + indent: [2, 'tab', { SwitchCase: 1 }], + semi: [2, 'always'], + 'keyword-spacing': [2, { before: true, after: true }], + 'space-before-blocks': [2, 'always'], + 'no-mixed-spaces-and-tabs': [2, 'smart-tabs'], + 'no-cond-assign': 0, + 'no-unused-vars': 2, + 'object-shorthand': [2, 'always'], + 'no-const-assign': 2, + 'no-class-assign': 2, + 'no-this-before-super': 2, + 'no-var': 2, + 'no-unreachable': 2, + 'valid-typeof': 2, + 'quote-props': [2, 'as-needed'], + 'one-var': [2, 'never'], + 'prefer-arrow-callback': 2, + 'prefer-const': [2, { destructuring: 'all' }], + 'arrow-spacing': 2, + 'no-inner-declarations': 0, + 'require-atomic-updates': 0 + }, + env: { + es6: true, + browser: true, + node: true, + mocha: true + }, + extends: [ + 'eslint:recommended', + 'plugin:import/errors', + 'plugin:import/warnings' + ], + plugins: ['svelte3'], + overrides: [ + { + files: ['*.svelte'], + processor: 'svelte3/svelte3' + } + ], + parserOptions: { + ecmaVersion: 9, + sourceType: 'module' + }, + settings: { + 'import/core-modules': ['svelte'], + 'svelte3/compiler': (() => { + try { + return require('svelte/compiler'); + } catch (e) { + return null; + } + })() + } +}; diff --git a/site/.eslintrc.json b/site/.eslintrc.json deleted file mode 100644 index 98a3b0889c..0000000000 --- a/site/.eslintrc.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "root": true, - "rules": { - "indent": [2, "tab", { "SwitchCase": 1 }], - "semi": [2, "always"], - "keyword-spacing": [2, { "before": true, "after": true }], - "space-before-blocks": [2, "always"], - "no-mixed-spaces-and-tabs": [2, "smart-tabs"], - "no-cond-assign": 0, - "no-unused-vars": 2, - "object-shorthand": [2, "always"], - "no-const-assign": 2, - "no-class-assign": 2, - "no-this-before-super": 2, - "no-var": 2, - "no-unreachable": 2, - "valid-typeof": 2, - "quote-props": [2, "as-needed"], - "one-var": [2, "never"], - "prefer-arrow-callback": 2, - "prefer-const": [2, { "destructuring": "all" }], - "arrow-spacing": 2, - "no-inner-declarations": 0 - }, - "env": { - "es6": true, - "browser": true, - "node": true, - "mocha": true - }, - "extends": [ - "eslint:recommended", - "plugin:import/errors", - "plugin:import/warnings" - ], - "plugins": ["svelte3"], - "parserOptions": { - "ecmaVersion": 8, - "sourceType": "module" - }, - "settings": { - "import/core-modules": ["svelte"] - } -} diff --git a/site/Dockerfile b/site/Dockerfile index f53e6a0c4a..0261a69521 100644 --- a/site/Dockerfile +++ b/site/Dockerfile @@ -1,4 +1,7 @@ -FROM mhart/alpine-node:11.14 +# IMPORTANT: Don't use this Dockerfile in your own Sapper projects without also looking at the .dockerignore file. +# Without an appropriate .dockerignore, this Dockerfile will copy a large number of unneeded files into your image. + +FROM mhart/alpine-node:12 # install dependencies WORKDIR /app @@ -9,7 +12,7 @@ RUN npm ci --production # Only copy over the Node pieces we need # ~> Saves 35MB ### -FROM mhart/alpine-node:base-11.14 +FROM mhart/alpine-node:slim-12 WORKDIR /app COPY --from=0 /app . diff --git a/site/Makefile b/site/Makefile index c8d8b236a6..6fd08fd8ee 100644 --- a/site/Makefile +++ b/site/Makefile @@ -14,9 +14,9 @@ sapper: docker: @echo "\n~> building docker image" - @gcloud builds submit -t $(IMAGE) + @gcloud builds submit --project $(PROJECT) -t $(IMAGE) deploy: sapper docker @echo "\n~> deploying $(SERVICE) to Cloud Run servers" - @gcloud beta run deploy $(SERVICE) --allow-unauthenticated --region us-central1 --image $(IMAGE) --memory=512Mi + @gcloud run deploy $(SERVICE) --project $(PROJECT) --allow-unauthenticated --platform managed --region us-central1 --image $(IMAGE) --memory=512Mi diff --git a/site/README.md b/site/README.md index 223830b3fa..259e956003 100644 --- a/site/README.md +++ b/site/README.md @@ -4,7 +4,10 @@ Set up the project: ```bash git clone https://github.com/sveltejs/svelte.git -cd svelte/site +cd svelte +npm ci +PUBLISH=1 npm run build +cd site npm ci npm run update ``` @@ -13,20 +16,35 @@ Start the server with `npm run dev`, and navigate to [localhost:3000](http://loc ## Using a local copy of Svelte -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). To produce the proper browser-compatible UMD build, you will need to run `npm run build` with the `PUBLISH` environment variable set (to any non-empty string). +By default, the REPL will fetch the most recent version of Svelte from https://unpkg.com/svelte. When running the site locally, you can also use your local copy of Svelte. + +To produce the proper browser-compatible UMD build of the compiler, you will need to run `npm run build` (or `npm run dev`) in the root of this repository with the `PUBLISH` environment variable set to any non-empty string. + +Then visit the REPL at [localhost:3000/repl?version=local](http://localhost:3000/repl?version=local). Please note that the local REPL only works with `npm run dev` and not when building the site for production usage. ## REPL GitHub integration -In order for the REPL's GitHub integration to work properly when running locally, you will need to create a GitHub OAuth app. Set its authorization callback URL to `http://localhost:3000/auth/callback`, and in this project, create `site/.env` containing: +In order for the REPL's GitHub integration to work properly when running locally, you will need to: +- [create a GitHub OAuth app](https://github.com/settings/developers): + - set `Authorization callback URL` to `http://localhost:3000/auth/callback`; + - set `Application name` as you like, and `Homepage URL` as `http://localhost:3000/`; + - create the app and take note of `Client ID` and `Client Secret` +- in this repo, create `site/.env` containing: + ``` + GITHUB_CLIENT_ID=[your app's Client ID] + GITHUB_CLIENT_SECRET=[your app's Client Secret] + BASEURL=http://localhost:3000 + ``` +## Building the site -``` -GITHUB_CLIENT_ID=[your app's client id] -GITHUB_CLIENT_SECRET=[your app's client secret] -BASEURL=http://localhost:3000 -``` +To build the website, run `npm run sapper`. The output can be found in `__sapper__/build`. + +## Testing + +Tests can be run using `npm run test`. ## Translating the API docs Anchors are automatically generated using headings in the documentation and by default (for the english language) they are latinised to make sure the URL is always conforming to RFC3986. -If we need to translate the API documentation to a language using unicode chars, we can setup this app to export the correct anchors by setting up `SLUG_PRESERVE_UNICODE` to `true` and `SLUG_LANG` to the ISO 639-1 two-letter language code of your choice in `config.js`. +If we need to translate the API documentation to a language using unicode chars, we can setup this app to export the correct anchors by setting up `SLUG_PRESERVE_UNICODE` to `true` in `config.js`. diff --git a/site/config.js b/site/config.js index 25dfce0c22..097bd173a8 100644 --- a/site/config.js +++ b/site/config.js @@ -1,3 +1,2 @@ export const SLUG_PRESERVE_UNICODE = false; export const SLUG_SEPARATOR = '_'; -export const SLUG_LANG = 'en'; diff --git a/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md b/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md index 394cee6a69..9d4c661615 100644 --- a/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md +++ b/site/content/blog/2017-08-07-the-easiest-way-to-get-started.md @@ -38,28 +38,23 @@ This will serve your app on [localhost:5000](http://localhost:5000) and rebuild When you download from the REPL, you're getting a customised version of the [sveltejs/template](https://github.com/sveltejs/template) repo. You can skip messing around with zip files by using [degit](https://github.com/Rich-Harris/degit), a project scaffolding tool. -In the terminal, install degit globally (you only need to do this once): +In the terminal, you can instantly create a new project like so: ```bash -npm install -g degit -``` - -After that, you can instantly create a new project like so: - -```bash -degit sveltejs/template my-new-project -cd my-new-project - +npx degit sveltejs/template my-svelte-project +cd my-svelte-project npm install npm run dev ``` +This will create a new project in the `my-svelte-project` directory, install its dependencies, and start a server on http://localhost:5000. + Once you've tinkered a bit and understood how everything fits together, you can fork [sveltejs/template](https://github.com/sveltejs/template) and start doing this instead: ```bash -degit your-name/template my-new-project +npx degit your-name/template my-new-project ``` And that's it! Do `npm run build` to create a production-ready version of your app, and check the project template's [README](https://github.com/sveltejs/template/blob/master/README.md) for instructions on how to easily deploy your app to the web with [Now](https://zeit.co/now) or [Surge](http://surge.sh/). -You're not restricted to using Rollup — there are also integrations for [webpack](https://github.com/sveltejs/svelte-loader), [Browserify](https://github.com/tehshrike/sveltify) and others, or you can use the [Svelte CLI](https://github.com/sveltejs/svelte-cli) or the [API](https://github.com/sveltejs/svelte/tree/v2#api) directly. If you make a project template using one of these tools, please share it with the [Svelte Discord chatroom](https://discord.gg/yy75DKs), or via [@sveltejs](https://twitter.com/sveltejs) on Twitter! +You're not restricted to using Rollup — there are also integrations for [webpack](https://github.com/sveltejs/svelte-loader), [Browserify](https://github.com/tehshrike/sveltify) and others, or you can use the [Svelte CLI](https://github.com/sveltejs/svelte-cli) (Update from 2019: with Svelte 3 the CLI was deprecated and we now use [sirv-cli](https://www.npmjs.com/package/sirv-cli) in our template. Feel free to use whatever tool you like!) or the [API](https://github.com/sveltejs/svelte/tree/v2#api) directly. If you make a project template using one of these tools, please share it with the [Svelte Discord chatroom](chat), or via [@sveltejs](https://twitter.com/sveltejs) on Twitter! diff --git a/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md b/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md index 040e95a8c3..cca200e966 100644 --- a/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md +++ b/site/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md @@ -53,7 +53,7 @@ What happens if we use the new model as a starting point? The same 'hello world' app that took 204kb with React and Next weighs just 7kb with Sapper. That number is likely to fall further in the future as we explore the space of optimisation possibilities, such as not shipping any JavaScript *at all* for pages that aren't interactive, beyond the tiny Sapper runtime that handles client-side routing. -What about a more 'real world' example? Conveniently, the [RealWorld](https://github.com/gothinkster/realworld) project, which challenges frameworks to develop an implementation of a Medium clone, gives us a way to find out. The [Sapper implementation](http://svelte-realworld.now.sh/) takes 39.6kb (11.8kb zipped) to render an interactive homepage. +What about a more 'real world' example? Conveniently, the [RealWorld](https://github.com/gothinkster/realworld) project, which challenges frameworks to develop an implementation of a Medium clone, gives us a way to find out. The [Sapper implementation](https://github.com/sveltejs/realworld) takes 39.6kb (11.8kb zipped) to render an interactive homepage. <aside><p>Code-splitting isn't free — if the reference implementation used code-splitting, it would be larger still</p></aside> @@ -81,4 +81,4 @@ I believe the next frontier of web performance is 'whole-app optimisation'. Curr Speaking of Glimmer, the idea of compiling components to bytecode is one that we'll probably steal in 2018. A framework like Sapper could conceivably determine which compilation mode to use based on the characteristics of your app. It could even serve JavaScript for the initial route for the fastest possible startup time, then lazily serve a bytecode interpreter for subsequent routes, resulting in the optimal combination of startup size and total app size. -Mostly, though, we want the direction of Sapper to be determined by its users. If you're the kind of developer who enjoys life on the bleeding edge and would like to help shape the future of how we build web apps, please join us on [GitHub](https://github.com/sveltejs/svelte) and [Discord](https://discord.gg/yy75DKs). +Mostly, though, we want the direction of Sapper to be determined by its users. If you're the kind of developer who enjoys life on the bleeding edge and would like to help shape the future of how we build web apps, please join us on [GitHub](https://github.com/sveltejs/svelte) and [Discord](chat). diff --git a/site/content/blog/2018-04-18-version-2.md b/site/content/blog/2018-04-18-version-2.md index 778d703b1d..900debc0fb 100644 --- a/site/content/blog/2018-04-18-version-2.md +++ b/site/content/blog/2018-04-18-version-2.md @@ -12,7 +12,7 @@ Almost a year after we first started talking about version 2 on the Svelte issue ## tl;dr -Each of these items is described in more depth below. If you get stuck, ask for help in our friendly [Discord chatroom](https://discord.gg/yy75DKs). +Each of these items is described in more depth below. If you get stuck, ask for help in our friendly [Discord chatroom](chat). - Install Svelte v2 from npm - Upgrade your templates with [svelte-upgrade](https://github.com/sveltejs/svelte-upgrade) @@ -201,4 +201,4 @@ Before, there was a `svelte.validate` method which checked your component was va ## My app is broken! Help! -Hopefully this covers everything, and the update should be easier for you than it was for us. But if you find bugs, or discover things that aren't mentioned here, swing by [Discord chatroom](https://discord.gg/yy75DKs) or raise an issue on the [tracker](https://github.com/sveltejs/svelte/issues). +Hopefully this covers everything, and the update should be easier for you than it was for us. But if you find bugs, or discover things that aren't mentioned here, swing by [Discord chatroom](chat) or raise an issue on the [tracker](https://github.com/sveltejs/svelte/issues). diff --git a/site/content/blog/2018-12-26-svelte-css-in-js.md b/site/content/blog/2018-12-26-svelte-css-in-js.md index 5e8e6ed71b..f77eb83206 100644 --- a/site/content/blog/2018-12-26-svelte-css-in-js.md +++ b/site/content/blog/2018-12-26-svelte-css-in-js.md @@ -19,7 +19,7 @@ Here, we're using [Emotion](https://emotion.sh) to generate scoped class names t <div class="max"> <iframe title="Aphrodite example" - src="/repl/embed?gist=ad495ff5ba9ceefe5984fe62c1f15e19" + src="/repl/embed?example=blog-svelte-css-in-js" scrolling="no" ></iframe> </div> @@ -27,4 +27,3 @@ Here, we're using [Emotion](https://emotion.sh) to generate scoped class names t It's important to note that most CSS-in-JS libraries have a runtime library, and many don't support statically extracting styles out into a separate <code>.css</code> file at build time (which is essential for the best performance). You should therefore only use CSS-in-JS if it's necessary for your application! Note that you can mix-and-match — you can still use Svelte's built-in CSS handling alongside a CSS-in-JS library. - 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 index 936c50240e..0b8e1894e4 100644 --- a/site/content/blog/2019-01-31-svelte-on-the-changelog.md +++ b/site/content/blog/2019-01-31-svelte-on-the-changelog.md @@ -14,9 +14,8 @@ Earlier this month, I had the privilege of appearing on [The Changelog](https:// ...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. +Unless you hang out in our [Discord server](chat) or follow [@sveltejs](https://twitter.com/sveltejs) on Twitter, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it *will* be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it. 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). <audio data-theme="night" style="width: 100%" data-src="https://changelog.com/podcast/332/embed" src="https://cdn.changelog.com/uploads/podcast/332/the-changelog-332.mp3" preload="none" class="changelog-episode" controls></audio><p><a href="https://changelog.com/podcast/332">The Changelog 332: A UI framework without the framework</a> – Listen on <a href="https://changelog.com/">Changelog.com</a></p><script async src="//cdn.changelog.com/embed.js"></script> - diff --git a/site/content/blog/2019-04-15-setting-up-your-editor.md b/site/content/blog/2019-04-15-setting-up-your-editor.md index c157682e44..b80223d820 100644 --- a/site/content/blog/2019-04-15-setting-up-your-editor.md +++ b/site/content/blog/2019-04-15-setting-up-your-editor.md @@ -6,8 +6,64 @@ authorURL: https://twitter.com/Rich_Harris draft: true --- -*Coming soon* This post will walk you through setting up your editor so that recognises Svelte files: +*__Coming soon__* + +This post will walk you through setting up your editor so that recognises Svelte files: * eslint-plugin-svelte3 * svelte-vscode -* associating .svelte files with HTML in VSCode, Sublime, Atom, etc etc etc \ No newline at end of file +* associating .svelte files with HTML in VSCode, Sublime, etc. + +## Atom + +To treat `*.svelte` files as HTML, open *__Edit → Config...__* and add the following lines to your `core` section: + +```cson +"*": + core: + … + customFileTypes: + "text.html.basic": [ + "svelte" + ] +``` + +## Vim/Neovim + +To treat all `*.svelte` files as HTML, add the following line to your `init.vim`: + +``` +au! BufNewFile,BufRead *.svelte set ft=html +``` + +To temporarily turn on HTML syntax highlighting for the current buffer, use: + +``` +:set ft=html +``` + +To set the filetype for a single file, use a [modeline](https://vim.fandom.com/wiki/Modeline_magic): + +``` +<!-- vim: set ft=html :--> +``` + +## Visual Studio Code + +To treat `*.svelte` files as HTML, add the following lines to your `settings.json` file: + +```cson + "files.associations": { + "*.svelte": "html" + } +``` + +## JetBrains WebStorm + +The [Svelte Framework Integration](https://plugins.jetbrains.com/plugin/12375-svelte/) can be used to add support for Svelte to WebStorm, or other Jetbrains IDEs. Consult the [WebStorm plugin installation guide](https://www.jetbrains.com/help/webstorm/managing-plugins.html) on the JetBrains website for more details. + +## Sublime Text 3 + +Open any `.svelte` file. + +Go to *__View → Syntax → Open all with current extension as... → HTML__*. diff --git a/site/content/blog/2019-04-16-svelte-for-new-developers.md b/site/content/blog/2019-04-16-svelte-for-new-developers.md index 54d5a2b7ce..fc8e993e88 100644 --- a/site/content/blog/2019-04-16-svelte-for-new-developers.md +++ b/site/content/blog/2019-04-16-svelte-for-new-developers.md @@ -3,7 +3,109 @@ title: Svelte for new developers description: Never used Node.js or the command line? No problem author: Rich Harris authorURL: https://twitter.com/Rich_Harris -draft: true --- -*Coming soon* This blog post will walk you through installing Node.js and git and using Terminal.app to clone a project template and start developing with Svelte \ No newline at end of file +This short guide is designed to help you — someone who has looked at the [tutorial](/tutorial) and wants to start creating Svelte apps, but doesn't have a ton of experience using JavaScript build tooling — get up and running. + +If there are things that don't make sense, or that we're glossing over, feel free to [raise an issue](https://github.com/sveltejs/svelte/issues) or [suggest edits to this page](https://github.com/sveltejs/svelte/blob/master/site/content/blog/2019-04-16-svelte-for-new-developers.md) that will help us help more people. + +If you get stuck at any point following this guide, the best place to ask for help is in the [chatroom](https://svelte.dev/chat). + + +## First things first + +You'll be using the *command line*, also known as the terminal. On Windows, you can access it by running **Command Prompt** from the Start menu; on a Mac, hit `Cmd` and `Space` together to bring up **Spotlight**, then start typing `Terminal.app`. On most Linux systems, `Ctrl-Alt-T` brings up the command line. + +The command line is a way to interact with your computer (or another computer! but that's a topic for another time) with more power and control than the GUI (graphical user interface) that most people use day-to-day. + +Once on the command line, you can navigate the filesystem using `ls` to list the contents of your current directory, and `cd` to change the current directory. For example, if you had a `Development` directory of your projects inside your home directory, you would type + +```bash +cd Development +``` + +to go to it. From there, you could create a new project directory with the `mkdir` command: + +```bash +mkdir svelte-projects +cd svelte-projects +``` + +A full introduction to the command line is out of the scope of this guide, but here are a few more useful commands: + +* `cd ..` — navigates to the parent of the current directory +* `cat my-file.txt` — on Mac/Linux, lists the contents of `my-file.txt` +* `open .` (or `start .` on Windows) — opens the current directory in Finder or File Explorer + + +## Installing Node.js + +[Node](https://nodejs.org/en/) is a way to run JavaScript on the command line. It's used by many tools, including Svelte. If you don't yet have it installed, the easiest way is to download the latest version straight from the [website](https://nodejs.org/en/). + +Once installed, you'll have access to three new commands: + +* `node my-file.js` — runs the JavaScript in `my-file.js` +* `npm [subcommand]` — [npm](https://www.npmjs.com/) is a way to install 'packages' that your application depends on, such as the [svelte](https://www.npmjs.com/) package +* `npx [subcommand]` — a convenient way to run programs available on npm without permanently installing them + + +## Installing a text editor + +To write code, you need a good editor. The most popular choice is [Visual Studio Code](https://code.visualstudio.com/) or VSCode, and justifiably so — it's well-designed and fully-featured, and has a wealth of extensions ([including one for Svelte](https://marketplace.visualstudio.com/items?itemName=JamesBirtles.svelte-vscode), which provides syntax highlighting and diagnostic messages when you're writing components). + + +## Creating a project + +We're going to follow the instructions in part two of [The easiest way to get started with Svelte](/blog/the-easiest-way-to-get-started). + +First, we'll use npx to run [degit](https://github.com/Rich-Harris/degit), a program for cloning project templates from [GitHub](https://github.com) and other code storage websites. You don't have to use a project template, but it means you have to do a lot less setup work. + +(Eventually you'll probably have to learn [git](https://git-scm.com/), which most programmers use to manage their projects. But you don't need to worry about it just yet.) + +On the command line, navigate to where you want to create a new project, then type the following lines (you can paste the whole lot, but you'll develop better muscle memory if you get into the habit of writing each line out one at a time then running it): + +```bash +npx degit sveltejs/template my-svelte-project +cd my-svelte-project +npm install +``` + +This creates a new directory, `my-svelte-project`, adds files from the [sveltejs/template](https://github.com/sveltejs/template) code repository, and installs a number of packages from npm. Open the directory in your text editor and take a look around. The app's 'source code' lives in the `src` directory, while the files your app can load are in `public`. + +In the `package.json` file, there is a section called `"scripts"`. These scripts define shortcuts for working with your application — `dev`, `build` and `start`. To launch your app in development mode, type the following: + +> TODO update the template, it needs... some work + +```bash +npm run dev +``` + +Running the `dev` script starts a program called [Rollup](https://rollupjs.org/guide/en/). Rollup's job is to take your application's source files (so far, just `src/main.js` and `src/App.svelte`), pass them to other programs (including Svelte, in our case) and convert them into the code that will actually run when you open the application in a browser. + +Speaking of which, open a browser and navigate to http://localhost:5000. This is your application running on a local *web server* (hence 'localhost') on port 5000. + +Try changing `src/App.svelte` and saving it. The application will reload with your changes. + + +## Building your app + +In the last step, we were running the app in 'development mode'. In dev mode, Svelte adds extra code that helps with debugging, and Rollup skips the final step where your app's JavaScript is compressed using [Terser](https://terser.org/). + +When you share your app with the world, you want to build it in 'production mode', so that it's as small and efficient as possible for end users. To do that, use the `build` command: + +```bash +npm run build +``` + +Your `public` directory now contains a compressed `bundle.js` file containing your app's JavaScript. You can run it like so: + +```bash +npm run start +``` + +This will run the app on http://localhost:5000. + + +## Next steps + +To share your app with the world you'll need to *deploy* it. There are many ways to do so — some are listed in the `README.md` file inside your project. diff --git a/site/content/blog/2019-04-20-write-less-code.md b/site/content/blog/2019-04-20-write-less-code.md index daa22b9206..d56c5312e8 100644 --- a/site/content/blog/2019-04-20-write-less-code.md +++ b/site/content/blog/2019-04-20-write-less-code.md @@ -42,7 +42,7 @@ Reducing the amount of code you have to write is an explicit goal of Svelte. To <div class="max"> <iframe title="Simple component example" - src="/repl/embed?gist=6b573f1819d12defc441098236fb9abe" + src="/repl/embed?example=blog-write-less-code" scrolling="no" ></iframe> </div> @@ -159,6 +159,6 @@ In Vue, meanwhile, we have a default export with a `data` function that returns ## Death to boilerplate -These are just some of the ways that Svelte helps you build user interfaces with a minimum of fuss. There are plenty of others — for example, [reactive declarations](https://svelte.dev/tutorial/reactive-declarations) essentially do the work of React's `useMemo`, `useCallback` and `useEffect` without the boilerplate (or indeed the garbage collection overhead of creating inline functions and arrays on each state change). +These are just some of the ways that Svelte helps you build user interfaces with a minimum of fuss. There are plenty of others — for example, [reactive declarations](tutorial/reactive-declarations) essentially do the work of React's `useMemo`, `useCallback` and `useEffect` without the boilerplate (or indeed the garbage collection overhead of creating inline functions and arrays on each state change). -How? By choosing a different set of constraints. Because [Svelte is a compiler](blog/frameworks-without-the-framework), we're not bound to the peculiarities of JavaScript: we can *design* a component authoring experience, rather than having to fit it around the semantics of the language. Paradoxically, this results in *more* idiomatic code — for example using variables naturally rather than via proxies or hooks — while delivering significantly more performant apps. \ No newline at end of file +How? By choosing a different set of constraints. Because [Svelte is a compiler](blog/frameworks-without-the-framework), we're not bound to the peculiarities of JavaScript: we can *design* a component authoring experience, rather than having to fit it around the semantics of the language. Paradoxically, this results in *more* idiomatic code — for example using variables naturally rather than via proxies or hooks — while delivering significantly more performant apps. diff --git a/site/content/blog/2019-04-22-svelte-3-rethinking-reactivity.md b/site/content/blog/2019-04-22-svelte-3-rethinking-reactivity.md index dcb8c50fc0..3ae0085e86 100644 --- a/site/content/blog/2019-04-22-svelte-3-rethinking-reactivity.md +++ b/site/content/blog/2019-04-22-svelte-3-rethinking-reactivity.md @@ -92,6 +92,6 @@ We don't take this lightly: hopefully once you've experienced Svelte 3 you'll un ## Still to come -As grueling as this release has been, we're nowhere near finished. We have a ton of ideas for generating smarter, more compact code, and a long feature wish-list. [Sapper](https://sapper.svelte.technology), our Next.js-style app framework, is still in the middle of being updated to use Svelte 3. The [Svelte Native](https://svelte-native.technology/) community project, which allows you to write Android and iOS apps in Svelte, is making solid progress but deserves more complete support from core. We don't yet have the bounty of editor extensions, syntax highlighters, component kits, devtools and so on that other frameworks have, and we should fix that. We *really* want to add first-class TypeScript support. +As grueling as this release has been, we're nowhere near finished. We have a ton of ideas for generating smarter, more compact code, and a long feature wish-list. [Sapper](https://sapper.svelte.dev), our Next.js-style app framework, is still in the middle of being updated to use Svelte 3. The [Svelte Native](https://svelte-native.technology/) community project, which allows you to write Android and iOS apps in Svelte, is making solid progress but deserves more complete support from core. We don't yet have the bounty of editor extensions, syntax highlighters, component kits, devtools and so on that other frameworks have, and we should fix that. We *really* want to add first-class TypeScript support. -But in the meantime we think Svelte 3 is the best way to build web apps yet. Take an hour to go through the [tutorial](tutorial) and we hope to convince you of the same. Either way, we'd love to see you in our [Discord chatroom](https://discord.gg/yy75DKs) and on [GitHub](https://github.com/sveltejs/svelte) — everyone is welcome, especially you. \ No newline at end of file +But in the meantime we think Svelte 3 is the best way to build web apps yet. Take an hour to go through the [tutorial](tutorial) and we hope to convince you of the same. Either way, we'd love to see you in our [Discord chatroom](chat) and on [GitHub](https://github.com/sveltejs/svelte) — everyone is welcome, especially you. \ No newline at end of file diff --git a/site/content/docs/00-introduction.md b/site/content/docs/00-introduction.md index 4730a0c1d5..15fdffbde2 100644 --- a/site/content/docs/00-introduction.md +++ b/site/content/docs/00-introduction.md @@ -2,8 +2,8 @@ title: Before we begin --- -> Temporary note: This document is a work-in-progress. Please forgive any missing or misleading parts, and don't be shy about asking for help in the [Discord chatroom](https://discord.gg/yy75DKs). The [tutorial](tutorial) is more complete; start there. - This page contains detailed API reference documentation. It's intended to be a resource for people who already have some familiarity with Svelte. If that's not you (yet), you may prefer to visit the [interactive tutorial](tutorial) or the [examples](examples) before consulting this reference. + +Don't be shy about asking for help in the [Discord chatroom](chat). \ No newline at end of file diff --git a/site/content/docs/01-component-format.md b/site/content/docs/01-component-format.md index d116dd8ff4..026a2da5b3 100644 --- a/site/content/docs/01-component-format.md +++ b/site/content/docs/01-component-format.md @@ -28,23 +28,60 @@ A `<script>` block contains JavaScript that runs when a component instance is cr --- -Svelte uses the `export` keyword to mark a variable declaration as a *property* or *prop*, which means it becomes accessible to consumers of the component: +Svelte uses the `export` keyword to mark a variable declaration as a *property* or *prop*, which means it becomes accessible to consumers of the component (see the section on [attributes and props](docs#Attributes_and_props) for more information). ```html <script> - // these properties can be set externally export let foo; - export let bar = 'optional default value'; // Values that are passed in as props // are immediately available - console.log(foo, bar); + console.log({ foo }); +</script> +``` + +--- + +You can specify a default value, which will be used if the component's consumer doesn't specify a prop. + +In development mode (see the [compiler options](docs#svelte_compile)), a warning will be printed if no default is provided and the consumer does not specify a value. To squelch this warning, ensure that a default is specified, even if it is `undefined`. + +```html +<script> + export let bar = 'optional default value'; + export let baz = undefined; +</script> +``` - // function declarations cannot be set externally, - // but can be accessed from outside - export function instanceMethod() { - alert(foo); +--- + +If you export a `const`, `class` or `function`, it is readonly from outside the component. Function *expressions* are valid props, however. + +```html +<script> + // these are readonly + export const thisIs = 'readonly'; + + export function greet(name) { + alert(`hello ${name}!`); } + + // this is a prop + export let format = n => n.toFixed(2); +</script> +``` + +--- + +You can use reserved words as prop names. + +```html +<script> + let className; + + // creates a `class` property, even + // though it is a reserved word + export { className as class }; </script> ``` @@ -56,13 +93,15 @@ To change component state and trigger a re-render, just assign to a locally decl Update expressions (`count += 1`) and property assignments (`obj.x = y`) have the same effect. +Because Svelte's reactivity is based on assignments, using array methods like `.push()` and `.splice()` won't automatically trigger updates. Options for getting around this can be found in the [tutorial](tutorial/updating-arrays-and-objects). + ```html <script> let count = 0; function handleClick () { - // calling this function will trigger a re-render - // if the markup references `count` + // calling this function will trigger an + // update if the markup references `count` count = count + 1; } </script> @@ -72,7 +111,7 @@ Update expressions (`count += 1`) and property assignments (`obj.x = y`) have th --- -Any top-level statement (i.e. not inside a block or a function) can be made reactive by prefixing it with the `$:` label. Reactive statements run immediately before the component updates, whenever the values that they depend on have changed. +Any top-level statement (i.e. not inside a block or a function) can be made reactive by prefixing it with the `$:` [JS label syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label). Reactive statements run immediately before the component updates, whenever the values that they depend on have changed. ```html <script> @@ -108,8 +147,12 @@ If a statement consists entirely of an assignment to an undeclared variable, Sve --- +A *store* is an object that allows reactive access to a value via a simple *store contract*. The [`svelte/store` module](docs#svelte_store) contains minimal store implementations which fulfil this contract. + Any time you have a reference to a store, you can access its value inside a component by prefixing it with the `$` character. This causes Svelte to declare the prefixed variable, and set up a store subscription that will be unsubscribed when appropriate. +Assignments to `$`-prefixed variables require that the variable be a writable store, and will result in a call to the store's `.set` method. + Note that the store must be declared at the top level of the component — not inside an `if` block or a function, for example. Local variables (that do not represent store values) must *not* have a `$` prefix. @@ -123,9 +166,26 @@ Local variables (that do not represent store values) must *not* have a `$` prefi count.set(1); console.log($count); // logs 1 + + $count = 2; + console.log($count); // logs 2 </script> ``` +##### Store contract + +```js +store = { subscribe: (subscription: (value: any) => void) => () => void, set?: (value: any) => void } +``` + +You can create your own stores without relying on [`svelte/store`](docs#svelte_store), by implementing the *store contract*: + +1. A store must contain a `.subscribe` method, which must accept as its argument a subscription function. This subscription function must be immediately and synchronously called with the store's current value upon calling `.subscribe`. All of a store's active subscription functions must later be synchronously called whenever the store's value changes. +2. The `.subscribe` method must return an unsubscribe function. Calling an unsubscribe function must stop its subscription, and its corresponding subscription function must not be called again by the store. +3. A store may *optionally* contain a `.set` method, which must accept as its argument a new value for the store, and which synchronously calls all of the store's active subscription functions. Such a store is called a *writable store*. + +For interoperability with RxJS Observables, the `.subscribe` method is also allowed to return an object with an `.unsubscribe` method, rather than return the unsubscription function directly. Note however that unless `.subscribe` synchronously calls the subscription (which is not required by the Observable spec), Svelte will see the value of the store as `undefined` until it does. + ### <script context="module"> @@ -137,6 +197,8 @@ You can `export` bindings from this block, and they will become exports of the c You cannot `export default`, since the default export is the component itself. +> Variables defined in `module` scripts are not reactive — reassigning them will not trigger a rerender even though the variable itself will update. For values shared between multiple components, consider using a [store](docs#svelte_store). + ```html <script context="module"> let totalComponents = 0; @@ -191,3 +253,15 @@ To apply styles to a selector globally, use the `:global(...)` modifier. } </style> ``` + +--- + +If you want to make @keyframes that are accessible globally, you need to prepend your keyframe names with `-global-`. + +The `-global-` part will be removed when compiled, and the keyframe then be referenced using just `my-animation-name` elsewhere in your code. + +```html +<style> + @keyframes -global-my-animation-name {...} +</style> +``` diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 5bbd7b4e1e..0a4ca2ee1a 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -7,7 +7,7 @@ title: Template syntax --- -A lowercase tag, like `<div>`, denotes a regular HTML element. A capitalised tag, such as `<Widget>`, indicates a *component*. +A lowercase tag, like `<div>`, denotes a regular HTML element. A capitalised tag, such as `<Widget>` or `<Namespace.Widget>`, indicates a *component*. ```html <script> @@ -20,7 +20,7 @@ A lowercase tag, like `<div>`, denotes a regular HTML element. A capitalised tag ``` -### Attributes +### Attributes and props --- @@ -76,6 +76,16 @@ When the attribute name and value match (`name={name}`), they can be replaced wi --- +By convention, values passed to components are referred to as *properties* or *props* rather than *attributes*, which are a feature of the DOM. + +As with elements, `name={name}` can be replaced with the `{name}` shorthand. + +```html +<Widget foo={bar} answer={42} text="hello"/> +``` + +--- + *Spread attributes* allow many attributes or properties to be passed to an element or component at once. An element or component can have multiple spread attributes, interspersed with regular ones. @@ -84,6 +94,14 @@ An element or component can have multiple spread attributes, interspersed with r <Widget {...things}/> ``` +--- + +*`$$props`* references all props that are passed to a component – including ones that are not declared with `export`. It is useful in rare cases, but not generally recommended, as it is difficult for Svelte to optimise. + +```html +<Widget {...$$props}/> +``` + ### Text expressions @@ -101,27 +119,28 @@ Text can also contain JavaScript expressions: ``` -### HTML expressions +### Comments -```sv -{@html expression} +--- + +You can use HTML comments inside components. + +```html +<!-- this is a comment! --> +<h1>Hello world</h1> ``` --- -In a text expression, characters like `<` and `>` are escaped. With HTML expressions, they're not. - -> Svelte does not sanitize expressions before injecting HTML. If the data comes from an untrusted source, you must sanitize it, or you are exposing your users to an XSS vulnerability. +Comments beginning with `svelte-ignore` disable warnings for the next block of markup. Usually these are accessibility warnings; make sure that you're disabling them for a good reason. ```html -<div class="blog-post"> - <h1>{post.title}</h1> - {@html post.content} -</div> +<!-- svelte-ignore a11y-autofocus --> +<input bind:value={name} autofocus> ``` -### If blocks +### {#if ...} ```sv {#if expression}...{/if} @@ -158,7 +177,7 @@ Additional conditions can be added with `{:else if expression}`, optionally endi ``` -### Each blocks +### {#each ...} ```sv {#each expression as name}...{/each} @@ -186,6 +205,8 @@ Iterating over lists of values can be done with an each block. </ul> ``` +You can use each blocks to iterate over any array or array-like value — that is, any object with a `length` property. + --- An each block can also specify an *index*, equivalent to the second argument in an `array.map(...)` callback: @@ -208,12 +229,20 @@ If a *key* expression is provided — which must uniquely identify each list ite --- -You can freely use destructuring patterns in each blocks. +You can freely use destructuring and rest patterns in each blocks. ```html {#each items as { id, name, qty }, i (id)} <li>{i + 1}: {name} x {qty}</li> {/each} + +{#each objects as { id, ...rest }} + <li><span>{id}</span><MyComponent {...rest}/></li> +{/each} + +{#each items as [id, ...rest]} + <li><span>{id}</span><MyComponent values={rest}/></li> +{/each} ``` --- @@ -229,7 +258,7 @@ An each block can also have an `{:else}` clause, which is rendered if the list i ``` -### Await blocks +### {#await ...} ```sv {#await expression}...{:then name}...{:catch name}...{/await} @@ -283,7 +312,82 @@ If you don't care about the pending state, you can also omit the initial block. ``` -### DOM events +### {@html ...} + +```sv +{@html expression} +``` + +--- + +In a text expression, characters like `<` and `>` are escaped; however, with HTML expressions, they're not. + +The expression should be valid standalone HTML — `{@html "<div>"}content{@html "</div>"}` will *not* work, because `</div>` is not valid HTML. + +> Svelte does not sanitize expressions before injecting HTML. If the data comes from an untrusted source, you must sanitize it, or you are exposing your users to an XSS vulnerability. + +```html +<div class="blog-post"> + <h1>{post.title}</h1> + {@html post.content} +</div> +``` + + +### {@debug ...} + +```sv +{@debug} +``` +```sv +{@debug var1, var2, ..., varN} +``` + +--- + +The `{@debug ...}` tag offers an alternative to `console.log(...)`. It logs the values of specific variables whenever they change, and pauses code execution if you have devtools open. + +It accepts a comma-separated list of variable names (not arbitrary expressions). + +```html +<script> + let user = { + firstname: 'Ada', + lastname: 'Lovelace' + }; +</script> + +{@debug user} + +<h1>Hello {user.firstname}!</h1> +``` + +--- + +`{@debug ...}` accepts a comma-separated list of variable names (not arbitrary expressions). + +```html +<!-- Compiles --> +{@debug user} +{@debug user1, user2, user3} + +<!-- WON'T compile --> +{@debug user.firstname} +{@debug myArray[0]} +{@debug !isReady} +{@debug typeof user === 'object'} +``` + +The `{@debug}` tag without any arguments will insert a `debugger` statement that gets triggered when *any* state changes, as opposed to the specified variables. + + + +### Element directives + +As well as attributes, elements can have *directives*, which control the element's behaviour in some way. + + +#### [on:*eventname*](on_element_event) ```sv on:eventname={handler} @@ -324,6 +428,13 @@ Handlers can be declared inline with no performance penalty. As with attributes, Add *modifiers* to DOM events with the `|` character. +```html +<form on:submit|preventDefault={handleSubmit}> + <!-- the `submit` event's default is prevented, + so the page won't reload --> +</form> +``` + The following modifiers are available: * `preventDefault` — calls `event.preventDefault()` before running the handler @@ -334,13 +445,6 @@ The following modifiers are available: Modifiers can be chained together, e.g. `on:click|once|capture={...}`. -```html -<form on:submit|preventDefault={handleSubmit}> - <!-- the `submit` event's default is prevented, - so the page won't reload --> -</form> -``` - --- If the `on:` directive is used without a value, the component will *forward* the event, meaning that a consumer of the component can listen for it. @@ -351,34 +455,30 @@ If the `on:` directive is used without a value, the component will *forward* the </button> ``` - -### Component events - -```sv -on:eventname={handler} -``` - --- -Components can emit events using [createEventDispatcher](docs#createEventDispatcher), or by forwarding DOM events. Listening for component events looks the same as listening for DOM events: +It's possible to have multiple event listeners for the same event: ```html -<SomeComponent on:whatever={handler}/> -``` +<script> + let counter = 0; + function increment() { + counter = counter + 1; + } + function track(event) { + trackEvent(event) + } +</script> +<button on:click={increment} on:click={track}>Click me!</button> +``` -### Element bindings +#### [bind:*property*](bind_element_property) ```sv bind:property={variable} ``` -```sv -bind:group={variable} -``` -```sv -bind:this={dom_node} -``` --- @@ -412,31 +512,8 @@ Numeric input values are coerced; even though `input.value` is a string as far a <input type="range" bind:value={num}> ``` -#### Binding related elements - ---- - -Inputs that work together can use `bind:group`. -```html -<script> - let tortilla = 'Plain'; - let fillings = []; -</script> - -<!-- grouped radio inputs are mutually exclusive --> -<input type="radio" bind:group={tortilla} value="Plain"> -<input type="radio" bind:group={tortilla} value="Whole wheat"> -<input type="radio" bind:group={tortilla} value="Spinach"> - -<!-- grouped checkbox inputs populate an array --> -<input type="checkbox" bind:group={fillings} value="Rice"> -<input type="checkbox" bind:group={fillings} value="Beans"> -<input type="checkbox" bind:group={fillings} value="Cheese"> -<input type="checkbox" bind:group={fillings} value="Guac (extra)"> -``` - -#### Binding `<select>` value +##### Binding `<select>` value --- @@ -476,37 +553,54 @@ When the value of an `<option>` matches its text content, the attribute can be o </select> ``` -#### Media element bindings +--- + +Elements with the `contenteditable` attribute support `innerHTML` and `textContent` bindings. + +```html +<div contenteditable="true" bind:innerHTML={html}></div> +``` + +##### Media element bindings --- -Media elements (`<audio>` and `<video>`) have their own set of bindings — four *readonly* ones... +Media elements (`<audio>` and `<video>`) have their own set of bindings — six *readonly* ones... * `duration` (readonly) — the total duration of the video, in seconds * `buffered` (readonly) — an array of `{start, end}` objects * `seekable` (readonly) — ditto * `played` (readonly) — ditto +* `seeking` (readonly) — boolean +* `ended` (readonly) — boolean -...and three *two-way* bindings: +...and four *two-way* bindings: * `currentTime` — the current point in the video, in seconds +* `playbackRate` — how fast to play the video, where 1 is 'normal' * `paused` — this one should be self-explanatory * `volume` — a value between 0 and 1 +Videos additionally have readonly `videoWidth` and `videoHeight` bindings. + ```html <video src={clip} bind:duration bind:buffered bind:seekable + bind:seeking bind:played + bind:ended bind:currentTime bind:paused bind:volume + bind:videoWidth + bind:videoHeight ></video> ``` -#### Block-level element bindings +##### Block-level element bindings --- @@ -526,61 +620,61 @@ Block-level elements have 4 readonly bindings, measured using a technique simila </div> ``` -#### Binding a DOM node +#### bind:group + +```sv +bind:group={variable} +``` --- -To get a reference to a DOM node, use `bind:this`. +Inputs that work together can use `bind:group`. ```html <script> - import { onMount } from 'svelte'; - - let canvasElement; - - onMount(() => { - const ctx = canvasElement.getContext('2d'); - drawStuff(ctx); - }); + let tortilla = 'Plain'; + let fillings = []; </script> -<canvas bind:this={canvasElement}></canvas> -``` +<!-- grouped radio inputs are mutually exclusive --> +<input type="radio" bind:group={tortilla} value="Plain"> +<input type="radio" bind:group={tortilla} value="Whole wheat"> +<input type="radio" bind:group={tortilla} value="Spinach"> +<!-- grouped checkbox inputs populate an array --> +<input type="checkbox" bind:group={fillings} value="Rice"> +<input type="checkbox" bind:group={fillings} value="Beans"> +<input type="checkbox" bind:group={fillings} value="Cheese"> +<input type="checkbox" bind:group={fillings} value="Guac (extra)"> +``` -### Component bindings +#### [bind:this](bind_element) ```sv -bind:property={variable} -``` -```sv -bind:this={component_instance} +bind:this={dom_node} ``` --- -You can bind to component props using the same mechanism. +To get a reference to a DOM node, use `bind:this`. ```html -<Keypad bind:value={pin}/> -``` - ---- - -Components also support `bind:this`, allowing you to interact with component instances programmatically. +<script> + import { onMount } from 'svelte'; -> Note that we can do `{cart.empty}` rather than `{() => cart.empty()}`, since component methods are closures. You don't need to worry about the value of `this` when calling them. + let canvasElement; -```html -<ShoppingCart bind:this={cart}/> + onMount(() => { + const ctx = canvasElement.getContext('2d'); + drawStuff(ctx); + }); +</script> -<button on:click={cart.empty}> - Empty shopping cart -</button> +<canvas bind:this={canvasElement}></canvas> ``` -### Classes +#### class:*name* ```sv class:name={value} @@ -600,10 +694,13 @@ A `class:` directive provides a shorter way of toggling a class on an element. <!-- Shorthand, for when name and value match --> <div class:active>...</div> + +<!-- Multiple class toggles can be included --> +<div class:active class:inactive={!active} class:isAdmin>...</div> ``` -### Actions +#### use:*action* ```sv use:action @@ -668,43 +765,19 @@ An action can have parameters. If the returned value has an `update` method, it ``` -### Transitions +#### transition:*fn* ```sv -transition:name -``` -```sv -transition:name={params} +transition:fn ``` ```sv -transition:name|local +transition:fn={params} ``` ```sv -transition:name|local={params} +transition:fn|local ``` ```sv -in:name -``` -```sv -in:name={params} -``` -```sv -in:name|local -``` -```sv -in:name|local={params} -``` -```sv -out:name -``` -```sv -out:name={params} -``` -```sv -out:name|local -``` -```sv -out:name|local={params} +transition:fn|local={params} ``` @@ -720,7 +793,7 @@ transition = (node: HTMLElement, params: any) => { --- -A transition is triggered by an element entering or leaving the DOM as a result of a state change. Transitions do not run when a component is first mounted, but only on subsequent updates. +A transition is triggered by an element entering or leaving the DOM as a result of a state change. Elements inside an *outroing* block are kept in the DOM until all current transitions have completed. @@ -734,19 +807,9 @@ The `transition:` directive indicates a *bidirectional* transition, which means {/if} ``` ---- +> By default intro transitions will not play on first render. You can modify this behaviour by setting `intro: true` when you [create a component](docs#Client-side_component_API). -The `in:` and `out:` directives are not bidirectional. An in transition will continue to 'play' alongside the out transition, if the block is outroed while the transition is in progress. If an out transition is aborted, transitions will restart from scratch. - -```html -{#if visible} - <div in:fly out:fade> - flies in, fades out - </div> -{/if} -``` - -#### Transition parameters +##### Transition parameters --- @@ -762,7 +825,7 @@ Like actions, transitions can have parameters. {/if} ``` -#### Custom transition functions +##### Custom transition functions --- @@ -838,7 +901,7 @@ A custom transition function can also return a `tick` function, which is called If a transition returns a function instead of a transition object, the function will be called in the next microtask. This allows multiple transitions to coordinate, making [crossfade effects](tutorial/deferred-transitions) possible. -#### Transition events +##### Transition events --- @@ -882,12 +945,246 @@ Local transitions only play when the block they belong to is created or destroye ``` -### Animations +#### in:*fn*/out:*fn* + +```sv +in:fn +``` +```sv +in:fn={params} +``` +```sv +in:fn|local +``` +```sv +in:fn|local={params} +``` + +```sv +out:fn +``` +```sv +out:fn={params} +``` +```sv +out:fn|local +``` +```sv +out:fn|local={params} +``` -TODO i can't remember how any of this works +--- +Similar to `transition:`, but only applies to elements entering (`in:`) or leaving (`out:`) the DOM. -### Slots +Unlike with `transition:`, transitions applied with `in:` and `out:` are not bidirectional — an in transition will continue to 'play' alongside the out transition, rather than reversing, if the block is outroed while the transition is in progress. If an out transition is aborted, transitions will restart from scratch. + +```html +{#if visible} + <div in:fly out:fade> + flies in, fades out + </div> +{/if} +``` + + + +#### animate:*fn* + +```sv +animate:name +``` + +```sv +animate:name={params} +``` + +```js +animation = (node: HTMLElement, { from: DOMRect, to: DOMRect } , params: any) => { + delay?: number, + duration?: number, + easing?: (t: number) => number, + css?: (t: number, u: number) => string, + tick?: (t: number, u: number) => void +} +``` + +```js +DOMRect { + bottom: number, + height: number, + ​​left: number, + right: number, + ​top: number, + width: number, + x: number, + y: number +} +``` + +--- + +An animation is triggered when the contents of a [keyed each block](docs#each) are re-ordered. Animations do not run when an element is removed, only when the each block's data is reordered. Animate directives must be on an element that is an *immediate* child of a keyed each block. + +Animations can be used with Svelte's [built-in animation functions](docs#svelte_animate) or [custom animation functions](docs#Custom_animation_functions). + +```html +<!-- When `list` is reordered the animation will run--> +{#each list as item, index (item)} + <li animate:flip>{item}</li> +{/each} +``` + +##### Animation Parameters + +--- + +As with actions and transitions, animations can have parameters. + +(The double `{{curlies}}` aren't a special syntax; this is an object literal inside an expression tag.) + +```html +{#each list as item, index (item)} + <li animate:flip="{{ delay: 500 }}">{item}</li> +{/each} +``` + +##### Custom animation functions + +--- + +Animations can use custom functions that provide the `node`, an `animation` object and any `paramaters` as arguments. The `animation` parameter is an object containing `from` and `to` properties each containing a [DOMRect](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect#Properties) describing the geometry of the element in its `start` and `end` positions. The `from` property is the DOMRect of the element in its starting position, the `to` property is the DOMRect of the element in its final position after the list has been reordered and the DOM updated. + +If the returned object has a `css` method, Svelte will create a CSS animation that plays on the element. + +The `t` argument passed to `css` is a value that goes from `0` and `1` after the `easing` function has been applied. The `u` argument is equal to `1 - t`. + +The function is called repeatedly *before* the animation begins, with different `t` and `u` arguments. + + +```html +<script> + import { cubicOut } from 'svelte/easing'; + + function whizz(node, { from, to }, params) { + + const dx = from.left - to.left; + const dy = from.top - to.top; + + const d = Math.sqrt(dx * dx + dy * dy); + + return { + delay: 0, + duration: Math.sqrt(d) * 120, + easing: cubicOut, + css: (t, u) => + `transform: translate(${u * dx}px, ${u * dy}px) rotate(${t*360}deg);` + }; + } +</script> + +{#each list as item, index (item)} + <div animate:whizz>{item}</div> +{/each} +``` + +--- + + +A custom animation function can also return a `tick` function, which is called *during* the animation with the same `t` and `u` arguments. + +> If it's possible to use `css` instead of `tick`, do so — CSS animations can run off the main thread, preventing jank on slower devices. + +```html +<script> + import { cubicOut } from 'svelte/easing'; + + function whizz(node, { from, to }, params) { + + const dx = from.left - to.left; + const dy = from.top - to.top; + + const d = Math.sqrt(dx * dx + dy * dy); + + return { + delay: 0, + duration: Math.sqrt(d) * 120, + easing: cubicOut, + tick: (t, u) => + Object.assign(node.style, { + color: t > 0.5 ? 'Pink' : 'Blue' + }); + }; + } +</script> + +{#each list as item, index (item)} + <div animate:whizz>{item}</div> +{/each} +``` + +### Component directives + +#### [on:*eventname*](on_component_event) + +```sv +on:eventname={handler} +``` + +--- + +Components can emit events using [createEventDispatcher](docs#createEventDispatcher), or by forwarding DOM events. Listening for component events looks the same as listening for DOM events: + +```html +<SomeComponent on:whatever={handler}/> +``` + +--- + +As with DOM events, if the `on:` directive is used without a value, the component will *forward* the event, meaning that a consumer of the component can listen for it. + +```html +<SomeComponent on:whatever/> +``` + + +#### [bind:*property*](bind_component_property) + +```sv +bind:property={variable} +``` + +--- + +You can bind to component props using the same syntax as for elements. + +```html +<Keypad bind:value={pin}/> +``` + +#### [bind:this](bind_component) + +```sv +bind:this={component_instance} +``` + +--- + +Components also support `bind:this`, allowing you to interact with component instances programmatically. + +> Note that we can't do `{cart.empty}` since `cart` is `undefined` when the button is first rendered and throws an error. + +```html +<ShoppingCart bind:this={cart}/> + +<button on:click={() => cart.empty()}> + Empty shopping cart +</button> +``` + + + +### `<slot>` ```sv <slot><!-- optional fallback --></slot> @@ -907,18 +1204,22 @@ The content is exposed in the child component using the `<slot>` element, which ```html <!-- App.svelte --> +<Widget></Widget> + <Widget> - <p>this is some child content</p> + <p>this is some child content that will overwrite the default slot content</p> </Widget> <!-- Widget.svelte --> <div> <slot> - this will be rendered if someone does <Widget/> + this fallback content will be rendered when no content is provided, like in the first example </slot> </div> ``` +#### [`<slot name="`*name*`">`](slot_name) + --- Named slots allow consumers to target specific areas. They can also have fallback content. @@ -934,10 +1235,12 @@ Named slots allow consumers to target specific areas. They can also have fallbac <div> <slot name="header">No header was provided</slot> <p>Some content between header and footer</p> - </slot name="footer"></slot> + <slot name="footer"></slot> </div> ``` +#### [`<slot let:`*name*`={`*value*`}>`](slot_let) + --- Slots can be rendered zero or more times, and can pass values *back* to the parent using props. The parent exposes the values to the slot template using the `let:` directive. @@ -980,11 +1283,11 @@ Named slots can also expose values. The `let:` directive goes on the element wit {/each} </ul> -</slot name="footer"></slot> +<slot name="footer"></slot> ``` -### <svelte:self> +### `<svelte:self>` --- @@ -1005,10 +1308,10 @@ It cannot appear at the top level of your markup; it must be inside an if or eac {/if} ``` -### <svelte:component> +### `<svelte:component>` ```sv -<svelte:component this={expression}> +<svelte:component this={expression}/> ``` --- @@ -1022,7 +1325,7 @@ If `this` is falsy, no component is rendered. ``` -### <svelte:window> +### `<svelte:window>` ```sv <svelte:window on:event={handler}/> @@ -1064,7 +1367,7 @@ All except `scrollX` and `scrollY` are readonly. ``` -### <svelte:body> +### `<svelte:body>` ```sv <svelte:body on:event={handler}/> @@ -1082,15 +1385,15 @@ As with `<svelte:window>`, this element allows you to add listeners to events on ``` -### <svelte:head> +### `<svelte:head>` ```sv -<svelte:head> +<svelte:head>...</svelte:head> ``` --- -This element makes it possible to insert elements into `document.head`. During server-side rendering, `head` content exposed separately to the main `html` content. +This element makes it possible to insert elements into `document.head`. During server-side rendering, `head` content is exposed separately to the main `html` content. ```html <svelte:head> @@ -1099,10 +1402,10 @@ This element makes it possible to insert elements into `document.head`. During s ``` -### <svelte:options> +### `<svelte:options>` ```sv -<svelte:options option={value}> +<svelte:options option={value}/> ``` --- diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 843ac05e4c..c75ec694d9 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -156,6 +156,8 @@ Like lifecycle functions, this must be called during component initialisation. </script> ``` +> Context is not inherently reactive. If you need reactive values in context then you can pass a store into context, which *will* be reactive. + #### `getContext` ```js @@ -176,45 +178,48 @@ Retrieves the context that belongs to the closest parent component with the spec #### `createEventDispatcher` -TODO - +```js +dispatch: ((name: string, detail?: any) => void) = createEventDispatcher(); +``` -### `svelte/store` +--- -The `svelte/store` module exports functions for creating [stores](tutorial/writable-stores). +Creates an event dispatcher that can be used to dispatch [component events](docs#on_component_event). Event dispatchers are functions that can take two arguments: `name` and `detail`. ---- +Component events created with `createEventDispatcher` create a [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent). These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture) and are not cancellable with `event.preventDefault()`. The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) property and can contain any type of data. -To be considered a store, an object must have a `subscribe` method that returns an `unsubscribe` function. +```html +<script> + import { createEventDispatcher } from 'svelte'; -```js -const unsubscribe = store.subscribe(value => { - console.log(value); -}); // logs `value` + const dispatch = createEventDispatcher(); +</script> -// later... -unsubscribe(); +<button on:click="{() => dispatch('notify', 'detail value')}">Fire Event</button> ``` --- -Stores have special significance inside Svelte components. Their values can be read by prefixing the store's name with the `$` character, which causes Svelte to set up subscriptions and unsubscriptions automatically during the component's lifecycle. +Events dispatched from child components can be listened to in their parent. Any data provided when the event was dispatched is available on the `detail` property of the event object. ```html <script> - import { count } from './stores.js'; - - function handleClick() { - // this is equivalent to count.update(n => n + 1) - $count += 1; + function callbackFunction(event) { + console.log(`Notify fired! Detail: ${event.detail}`) } </script> -<button on:click={handleClick}> - Clicks: {$count} -</button> +<Child on:notify="{callbackFunction}"/> ``` +### `svelte/store` + +The `svelte/store` module exports functions for creating [readable](docs#readable), [writable](docs#writable) and [derived](docs#derived) stores. + +Keep in mind that you don't *have* to use these functions to enjoy the [reactive `$store` syntax](docs#4_Prefix_stores_with_$_to_access_their_values) in your components. Any object that correctly implements `.subscribe`, unsubscribe, and (optionally) `.set` is a valid store, and will work both with the special syntax, and with Svelte's built-in [`derived` stores](docs#derived). + +This makes it possible to wrap almost any other reactive state handling library for use in Svelte. Read more about the [store contract](docs#Store_contract) to see what a correct implementation looks like. + #### `writable` ```js @@ -226,7 +231,11 @@ store = writable(value: any, (set: (value: any) => void) => () => void) --- -Creates a store with additional `set` and `update` methods. +Function that creates a store which has values that can be set from 'outside' components. It gets created as an object with additional `set` and `update` methods. + +`set` is a method that takes one argument which is the value to be set. The store value gets set to the value of the argument if the store value is not already equal to it. + +`update` is a method that takes one argument which is a callback. The callback takes the existing store value as its argument and returns the new value to be set to the store. ```js import { writable } from 'svelte/store'; @@ -293,13 +302,13 @@ const time = readable(new Date(), set => { store = derived(a, callback: (a: any) => any) ``` ```js -store = derived(a, callback: (a: any, set: (value: any) => void) => void, initial_value: any) +store = derived(a, callback: (a: any, set: (value: any) => void) => void | () => void, initial_value: any) ``` ```js store = derived([a, ...b], callback: ([a: any, ...b: any[]]) => any) ``` ```js -store = derived([a, ...b], callback: ([a: any, ...b: any[]], set: (value: any) => void) => void, initial_value: any) +store = derived([a, ...b], callback: ([a: any, ...b: any[]], set: (value: any) => void) => void | () => void, initial_value: any) ``` --- @@ -330,6 +339,24 @@ const delayed = derived(a, ($a, set) => { --- +If you return a function from the callback, it will be called when a) the callback runs again, or b) the last subscriber unsubscribes. + +```js +import { derived } from 'svelte/store'; + +const tick = derived(frequency, ($frequency, set) => { + const interval = setInterval(() => { + set(Date.now()); + }, 1000 / $frequency); + + return () => { + clearInterval(interval); + }; +}, 'one moment...'); +``` + +--- + In both cases, an array of arguments can be passed as the first argument instead of a single store. ```js @@ -376,7 +403,7 @@ Tweened stores update their values over a fixed duration. The following options * `delay` (`number`, default 0) — milliseconds before starting * `duration` (`number`, default 400) — milliseconds the tween lasts * `easing` (`function`, default `t => t`) — an [easing function](docs#svelte_easing) -* `interpolator` (`function`) — see below +* `interpolate` (`function`) — see below `store.set` and `store.update` can accept a second `options` argument that will override the options passed in upon instantiation. @@ -410,7 +437,20 @@ Out of the box, Svelte will interpolate between two numbers, two arrays or two o --- -The `interpolator` option allows you to tween between *any* arbitrary values. It must be an `(a, b) => t => value` function, where `a` is the starting value, `b` is the target value, `t` is a number between 0 and 1, and `value` is the result. For example, we can use the [d3-interpolate](https://github.com/d3/d3-interpolate) package to smoothly interpolate between two colours. +If the initial value is `undefined` or `null`, the first value change will take effect immediately. This is useful when you have tweened values that are based on props, and don't want any motion when the component first renders. + +```js +const size = tweened(undefined, { + duration: 300, + easing: cubicOut +}); + +$: $size = big ? 100 : 10; +``` + +--- + +The `interpolate` option allows you to tween between *any* arbitrary values. It must be an `(a, b) => t => value` function, where `a` is the starting value, `b` is the target value, `t` is a number between 0 and 1, and `value` is the result. For example, we can use the [d3-interpolate](https://github.com/d3/d3-interpolate) package to smoothly interpolate between two colours. ```html <script> @@ -453,7 +493,9 @@ A `spring` store gradually changes to its target value based on its `stiffness` --- -As with [`tweened`](#tweened) stores, `set` and `update` return a Promise that resolves if the spring settles. The `store.stiffness` and `store.damping` properties can be changed while the spring is in motion, and will take immediate effect. +As with [`tweened`](docs#tweened) stores, `set` and `update` return a Promise that resolves if the spring settles. The `store.stiffness` and `store.damping` properties can be changed while the spring is in motion, and will take immediate effect. + +Both `set` and `update` can take a second argument — an object with `hard` or `soft` properties. `{ hard: true }` sets the target value immediately; `{ soft: n }` preserves existing momentum for `n` seconds before settling. `{ soft: true }` is equivalent to `{ soft: 0.5 }`. [See a full example on the spring tutorial.](tutorial/spring) @@ -468,28 +510,343 @@ As with [`tweened`](#tweened) stores, `set` and `update` return a Promise that r </script> ``` +--- + +If the initial value is `undefined` or `null`, the first value change will take effect immediately, just as with `tweened` values (see above). + +```js +const size = spring(); +$: $size = big ? 100 : 10; +``` + ### `svelte/transition` -TODO +The `svelte/transition` module exports six functions: `fade`, `fly`, `slide`, `scale`, `draw` and `crossfade`. They are for use with svelte [`transitions`](docs#Transitions). + +#### `fade` + +```sv +transition:fade={params} +``` +```sv +in:fade={params} +``` +```sv +out:fade={params} +``` + +--- + +Animates the opacity of an element from 0 to the current opacity for `in` transitions and from the current opacity to 0 for `out` transitions. + +`fade` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `duration` (`number`, default 400) — milliseconds the transition lasts + +You can see the `fade` transition in action in the [transition tutorial](tutorial/transition). + +```html +<script> + import { fade } from 'svelte/transition'; +</script> + +{#if condition} + <div transition:fade="{{delay: 250, duration: 300}}"> + fades in and out + </div> +{/if} +``` + +#### `blur` + +```sv +transition:blur={params} +``` +```sv +in:blur={params} +``` +```sv +out:blur={params} +``` + +--- + +Animates a `blur` filter alongside an element's opacity. + +`blur` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `duration` (`number`, default 400) — milliseconds the transition lasts +* `easing` (`function`, default `cubicInOut`) — an [easing function](docs#svelte_easing) +* `opacity` (`number`, default 0) - the opacity value to animate out to and in from +* `amount` (`number`, default 5) - the size of the blur in pixels + +```html +<script> + import { blur } from 'svelte/transition'; +</script> + +{#if condition} + <div transition:blur="{{amount: 10}}"> + fades in and out + </div> +{/if} +``` + +#### `fly` + +```sv +transition:fly={params} +``` +```sv +in:fly={params} +``` +```sv +out:fly={params} +``` + +--- + +Animates the x and y positions and the opacity of an element. `in` transitions animate from an element's current (default) values to the provided values, passed as parameters. `out` transitions animate from the provided values to an element's default values. + +`fly` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `duration` (`number`, default 400) — milliseconds the transition lasts +* `easing` (`function`, default `cubicOut`) — an [easing function](docs#svelte_easing) +* `x` (`number`, default 0) - the x offset to animate out to and in from +* `y` (`number`, default 0) - the y offset to animate out to and in from +* `opacity` (`number`, default 0) - the opacity value to animate out to and in from + +You can see the `fly` transition in action in the [transition tutorial](tutorial/adding-parameters-to-transitions). + +```html +<script> + import { fly } from 'svelte/transition'; + import { quintOut } from 'svelte/easing'; +</script> + +{#if condition} + <div transition:fly="{{delay: 250, duration: 300, x: 100, y: 500, opacity: 0.5, easing: quintOut}}"> + flies in and out + </div> +{/if} +``` + +#### `slide` + +```sv +transition:slide={params} +``` +```sv +in:slide={params} +``` +```sv +out:slide={params} +``` + +--- + +Slides an element in and out. + +`slide` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `duration` (`number`, default 400) — milliseconds the transition lasts +* `easing` (`function`, default `cubicOut`) — an [easing function](docs#svelte_easing) + +```html +<script> + import { slide } from 'svelte/transition'; + import { quintOut } from 'svelte/easing'; +</script> + +{#if condition} + <div transition:slide="{{delay: 250, duration: 300, easing: quintOut }}"> + slides in and out + </div> +{/if} +``` + +#### `scale` + +```sv +transition:scale={params} +``` +```sv +in:scale={params} +``` +```sv +out:scale={params} +``` + +--- + +Animates the opacity and scale of an element. `in` transitions animate from an element's current (default) values to the provided values, passed as parameters. `out` transitions animate from the provided values to an element's default values. + +`scale` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `duration` (`number`, default 400) — milliseconds the transition lasts +* `easing` (`function`, default `cubicOut`) — an [easing function](docs#svelte_easing) +* `start` (`number`, default 0) - the scale value to animate out to and in from +* `opacity` (`number`, default 0) - the opacity value to animate out to and in from + +```html +<script> + import { scale } from 'svelte/transition'; + import { quintOut } from 'svelte/easing'; +</script> + +{#if condition} + <div transition:scale="{{duration: 500, delay: 500, opacity: 0.5, start: 0.5, easing: quintOut}}"> + scales in and out + </div> +{/if} +``` + +#### `draw` + +```sv +transition:draw={params} +``` +```sv +in:draw={params} +``` +```sv +out:draw={params} +``` -* fade, fly, slide, scale, draw -* crossfade... +--- -### `svelte/animation` +Animates the stroke of an SVG element, like a snake in a tube. `in` transitions begin with the path invisible and draw the path to the screen over time. `out` transitions start in a visible state and gradually erase the path. `draw` only works with elements that have a `getTotalLength` method, like `<path>` and `<polyline>`. -TODO +`draw` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `speed` (`number`, default undefined) - the speed of the animation, see below. +* `duration` (`number` | `function`, default 800) — milliseconds the transition lasts +* `easing` (`function`, default `cubicInOut`) — an [easing function](docs#svelte_easing) + +The `speed` parameter is a means of setting the duration of the transition relative to the path's length. It is modifier that is applied to the length of the path: `duration = length / speed`. A path that is 1000 pixels with a speed of 1 will have a duration of `1000ms`, setting the speed to `0.5` will double that duration and setting it to `2` will halve it. + +```html +<script> + import { draw } from 'svelte/transition'; + import { quintOut } from 'svelte/easing'; +</script> + +<svg viewBox="0 0 5 5" xmlns="http://www.w3.org/2000/svg"> + {#if condition} + <path transition:draw="{{duration: 5000, delay: 500, easing: quintOut}}" + d="M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z" + fill="none" + stroke="cornflowerblue" + stroke-width="0.1px" + stroke-linejoin="round" + /> + {/if} +</svg> + +``` + + +<!-- Crossfade is coming soon... --> + + + +### `svelte/animate` + +The `svelte/animate` module exports one function for use with svelte [animations](docs#Animations). + +#### `flip` + +```sv +animate:flip={params} +``` + +The `flip` function calculates the start and end position of an element and animates between them, translating the `x` and `y` values. `flip` stands for [First, Last, Invert, Play](https://aerotwist.com/blog/flip-your-animations/). + +`flip` accepts the following parameters: + +* `delay` (`number`, default 0) — milliseconds before starting +* `duration` (`number` | `function`, default `d => Math.sqrt(d) * 120`) — see below +* `easing` (`function`, default [`cubicOut`](docs#cubicOut)) — an [easing function](docs#svelte_easing) + + +`duration` can be be provided as either: + +- a `number`, in milliseconds. +- a function, `distance: number => duration: number`, receiving the distance the element will travel in pixels and returning the duration in milliseconds. This allows you to assign a duration that is relative to the distance travelled by each element. + +--- + +You can see a full example on the [animations tutorial](tutorial/animate) + + +```html +<script> + import { flip } from 'svelte/animate'; + import { quintOut } from 'svelte/easing'; + + let list = [1, 2, 3]; +</script> + +{#each list as n (n)} + <div animate:flip="{{delay: 250, duration: 250, easing: quintOut}}"> + {n} + </div> +{/each} +``` -* TODO this doesn't even exist yet -TODO ### `svelte/easing` -* TODO could have nice little interactive widgets showing the different functions, maybe +Easing functions specificy the rate of change over time and are useful when working with Svelte's built-in transitions and animations as well as the tweened and spring utilities. `svelte/easing` contains 31 named exports, a `linear` ease and 3 variants of 10 different easing functions: `in`, `out` and `inOut`. + +You can explore the various eases using the [ease visualiser](examples#easing) in the [examples section](examples). + + +| ease | in | out | inOut | +| --- | --- | --- | --- | +| **back** | `backIn` | `backOut` | `backInOut` | +| **bounce** | `bounceIn` | `bounceOut` | `bounceInOut` | +| **circ** | `circIn` | `circOut` | `circInOut` | +| **cubic** | `cubicIn` | `cubicOut` | `cubicInOut` | +| **elastic** | `elasticIn` | `elasticOut` | `elasticInOut` | +| **expo** | `expoIn` | `expoOut` | `expoInOut` | +| **quad** | `quadIn` | `quadOut` | `quadInOut` | +| **quart** | `quartIn` | `quartOut` | `quartInOut` | +| **quint** | `quintIn` | `quintOut` | `quintInOut` | +| **sine** | `sineIn` | `sineOut` | `sineInOut` | + ### `svelte/register` -TODO +To render Svelte components in Node.js without bundling, use `require('svelte/register')`. After that, you can use `require` to include any `.svelte` file. + +```js +require('svelte/register'); + +const App = require('./App.svelte').default; + +... + +const { html, css, head } = App.render({ answer: 42 }); +``` + +> The `.default` is necessary because we're converting from native JavaScript modules to the CommonJS modules recognised by Node. Note that if your component imports JavaScript modules, they will fail to load in Node and you will need to use a bundler instead. + +To set compile options, or to use a custom file extension, call the `register` hook as a function: + +```js +require('svelte/register')({ + extensions: ['.customextension'], // defaults to ['.html', '.svelte'] + preserveComments: true +}); +``` ### Client-side component API @@ -500,8 +857,6 @@ TODO const component = new Component(options) ``` ---- - A client-side component — that is, a component compiled with `generate: 'dom'` (or the `generate` option left unspecified) is a JavaScript class. ```js @@ -532,7 +887,7 @@ Existing children of `target` are left where they are. --- -The `hydrate` option instructs Svelte to upgrade existing DOM (usually from server-side rendering) rather than creating new elements. It will only work if the component was compiled with the [`hydratable: true` option](docs#svelte_compile). +The `hydrate` option instructs Svelte to upgrade existing DOM (usually from server-side rendering) rather than creating new elements. It will only work if the component was compiled with the [`hydratable: true` option](docs#svelte_compile). Hydration of `<head>` elements only works properly if the server-side rendering code was also compiled with `hydratable: true`, which adds a marker to each element in the `<head>` so that the component knows which elements it's responsible for removing during hydration. Whereas children of `target` are normally left alone, `hydrate: true` will cause any children to be removed. For that reason, the `anchor` option cannot be used alongside `hydrate: true`. @@ -573,10 +928,14 @@ component.$on(event, callback) Causes the `callback` function to be called whenever the component dispatches an `event`. +A function is returned that will remove the event listener when called. + ```js -app.$on('selected', event => { +const off = app.$on('selected', event => { console.log(event.detail.selection); }); + +off(); ``` #### `$destroy` @@ -610,7 +969,68 @@ app.count += 1; ### Custom element API -* TODO +--- + +Svelte components can also be compiled to custom elements (aka web components) using the `customElement: true` compiler option. You should specify a tag name for the component using the `<svelte:options>` [element](docs#svelte_options). + +```html +<svelte:options tag="my-element"> + +<script> + export let name = 'world'; +</script> + +<h1>Hello {name}!</h1> +<slot></slot> +``` + +--- + +Alternatively, use `tag={null}` to indicate that the consumer of the custom element should name it. + +```js +import MyElement from './MyElement.svelte'; + +customElements.define('my-element', MyElement); +``` + +--- + +Once a custom element has been defined, it can be used as a regular DOM element: + +```js +document.body.innerHTML = ` + <my-element> + <p>This is some slotted content</p> + </my-element> +`; +``` + +--- + +By default, custom elements are compiled with `accessors: true`, which means that any [props](docs#Attributes_and_props) are exposed as properties of the DOM element (as well as being readable/writable as attributes, where possible). + +To prevent this, add `accessors={false}` to `<svelte:options>`. + +```js +const el = document.querySelector('my-element'); + +// get the current value of the 'name' prop +console.log(el.name); + +// set a new value, updating the shadow DOM +el.name = 'everybody'; +``` + +Custom elements can be a useful way to package components for consumption in a non-Svelte app, as they will work with vanilla HTML and JavaScript as well as [most frameworks](https://custom-elements-everywhere.com/). There are, however, some important differences to be aware of: + +* Styles are *encapsulated*, rather than merely *scoped*. This means that any non-component styles (such as you might have in a `global.css` file) will not apply to the custom element, including styles with the `:global(...)` modifier +* Instead of being extracted out as a separate .css file, styles are inlined into the component as a JavaScript string +* Custom elements are not generally suitable for server-side rendering, as the shadow DOM is invisible until JavaScript loads +* In Svelte, slotted content renders *lazily*. In the DOM, it renders *eagerly*. In other words, it will always be created even if the component's `<slot>` element is inside an `{#if ...}` block. Similarly, including a `<slot>` in an `{#each ...}` block will not cause the slotted content to be rendered multiple times +* The `let:` directive has no effect +* Polyfills are required to support older browsers + ### Server-side component API @@ -625,8 +1045,12 @@ Unlike client-side components, server-side components don't have a lifespan afte A server-side component exposes a `render` method that can be called with optional props. It returns an object with `head`, `html`, and `css` properties, where `head` contains the contents of any `<svelte:head>` elements encountered. +You can import a Svelte component directly into Node using [`svelte/register`](docs#svelte_register). + ```js -const App = require('./App.svelte'); +require('svelte/register'); + +const App = require('./App.svelte').default; const { head, html, css } = App.render({ answer: 42 diff --git a/site/content/docs/04-compile-time.md b/site/content/docs/04-compile-time.md index 7dd1e371f6..0cb2ac3caf 100644 --- a/site/content/docs/04-compile-time.md +++ b/site/content/docs/04-compile-time.md @@ -4,9 +4,9 @@ title: Compile time Typically, you won't interact with the Svelte compiler directly, but will instead integrate it into your build system using a bundler plugin: -* [rollup-plugin-svelte](https://github.com/rollup/rollup-plugin-svelte) for users of [Rollup](https://rollupjs.org) +* [rollup-plugin-svelte](https://github.com/sveltejs/rollup-plugin-svelte) for users of [Rollup](https://rollupjs.org) * [svelte-loader](https://github.com/sveltejs/svelte-loader) for users of [webpack](https://webpack.js.org) -* [parcel-plugin-svelte](https://github.com/DeMoorJasper/parcel-plugin-svelte) for users of [Parcel](https://parceljs.org/) +* or one of the [community-maintained plugins](https://github.com/sveltejs/integrations#bundler-plugins) Nonetheless, it's useful to understand how to use the compiler, since bundler plugins generally expose compiler options to you. @@ -53,6 +53,7 @@ The following options can be passed to the compiler. None are required: | `tag` | string | null | `accessors` | boolean | `false` | `css` | boolean | `true` +| `loopGuardTimeout` | number | 0 | `preserveComments` | boolean | `false` | `preserveWhitespace` | boolean | `false` | `outputFilename` | string | `null` @@ -67,14 +68,15 @@ The following options can be passed to the compiler. None are required: | `generate` | `"dom"` | If `"dom"`, Svelte emits a JavaScript class for mounting to the DOM. If `"ssr"`, Svelte emits an object with a `render` method suitable for server-side rendering. If `false`, no JavaScript or CSS is returned; just metadata. | `dev` | `false` | If `true`, causes extra code to be added to components that will perform runtime checks and provide debugging information during development. | `immutable` | `false` | If `true`, tells the compiler that you promise not to mutate any objects. This allows it to be less conservative about checking whether values have changed. -| `hydratable` | `false` | If `true`, enables the `hydrate: true` runtime option, which allows a component to upgrade existing DOM rather than creating new DOM from scratch. +| `hydratable` | `false` | If `true` when generating DOM code, enables the `hydrate: true` runtime option, which allows a component to upgrade existing DOM rather than creating new DOM from scratch. When generating SSR code, this adds markers to `<head>` elements so that hydration knows which to replace. | `legacy` | `false` | If `true`, generates code that will work in IE9 and IE10, which don't support things like `element.dataset`. | `accessors` | `false` | If `true`, getters and setters will be created for the component's props. If `false`, they will only be created for readonly exported values (i.e. those declared with `const`, `class` and `function`). If compiling with `customElement: true` this option defaults to `true`. | `customElement` | `false` | If `true`, tells the compiler to generate a custom element constructor instead of a regular Svelte component. | `tag` | `null` | A `string` that tells Svelte what tag name to register the custom element with. It must be a lowercase alphanumeric string with at least one hyphen, e.g. `"my-element"`. | `css` | `true` | If `true`, styles will be included in the JavaScript class and injected at runtime. It's recommended that you set this to `false` and use the CSS that is statically generated, as it will result in smaller JavaScript bundles and better performance. +| `loopGuardTimeout` | 0 | A `number` that tells Svelte to break the loop if it blocks the thread for more than `loopGuardTimeout` ms. This is useful to prevent infinite loops. **Only available when `dev: true`** | `preserveComments` | `false` | If `true`, your HTML comments will be preserved during server-side rendering. By default, they are stripped out. -| `preserveWhitespace` | `false` | If `true`, whitespace inside and between elements is kept as you typed it, rather than optimised by Svelte. +| `preserveWhitespace` | `false` | If `true`, whitespace inside and between elements is kept as you typed it, rather than removed or collapsed to a single space where possible. | `outputFilename` | `null` | A `string` used for your JavaScript sourcemap. | `cssOutputFilename` | `null` | A `string` used for your CSS sourcemap. | `sveltePath` | `"svelte"` | The location of the `svelte` package. Any imports from `svelte` or `svelte/[module]` will be modified accordingly. @@ -153,24 +155,48 @@ compiled: { --> +### `svelte.parse` + +```js +ast: object = svelte.parse( + source: string, + options?: { + filename?: string, + customElement?: boolean + } +) +``` + +--- + +The `parse` function parses a component, returning only its abstract syntax tree. Unlike compiling with the `generate: false` option, this will not perform any validation or other analysis of the component beyond parsing it. + + +```js +const svelte = require('svelte/compiler'); + +const ast = svelte.parse(source, { filename: 'App.svelte' }); +``` + + ### `svelte.preprocess` ```js result: { code: string, dependencies: Array<string> -} = svelte.preprocess( +} = await svelte.preprocess( source: string, preprocessors: Array<{ - markup?: (input: { source: string, filename: string }) => Promise<{ + markup?: (input: { content: string, filename: string }) => Promise<{ code: string, dependencies?: Array<string> }>, - script?: (input: { source: string, attributes: Record<string, string>, filename: string }) => Promise<{ + script?: (input: { content: string, attributes: Record<string, string>, filename: string }) => Promise<{ code: string, dependencies?: Array<string> }>, - style?: (input: { source: string, attributes: Record<string, string>, filename: string }) => Promise<{ + style?: (input: { content: string, attributes: Record<string, string>, filename: string }) => Promise<{ code: string, dependencies?: Array<string> }> @@ -196,7 +222,7 @@ The `markup` function receives the entire component source text, along with the ```js const svelte = require('svelte/compiler'); -const { code } = svelte.preprocess(source, { +const { code } = await svelte.preprocess(source, { markup: ({ content, filename }) => { return { code: content.replace(/foo/g, 'bar') @@ -211,14 +237,14 @@ const { code } = svelte.preprocess(source, { The `script` and `style` functions receive the contents of `<script>` and `<style>` elements respectively. In addition to `filename`, they get an object of the element's attributes. -If a `dependencies` array is returned, it will be included in the result object. This is used by packages like [rollup-plugin-svelte](https://github.com/rollup/rollup-plugin-svelte) to watch additional files for changes, in the case where your `<style>` tag has an `@import` (for example). +If a `dependencies` array is returned, it will be included in the result object. This is used by packages like [rollup-plugin-svelte](https://github.com/sveltejs/rollup-plugin-svelte) to watch additional files for changes, in the case where your `<style>` tag has an `@import` (for example). ```js const svelte = require('svelte/compiler'); const sass = require('node-sass'); const { dirname } = require('path'); -const { code, dependencies } = svelte.preprocess(source, { +const { code, dependencies } = await svelte.preprocess(source, { style: async ({ content, attributes, filename }) => { // only process <style lang="sass"> if (attributes.lang !== 'sass') return; @@ -251,7 +277,7 @@ Multiple preprocessors can be used together. The output of the first becomes the ```js const svelte = require('svelte/compiler'); -const { code } = svelte.preprocess(source, [ +const { code } = await svelte.preprocess(source, [ { markup: () => { console.log('this runs first'); @@ -280,6 +306,38 @@ const { code } = svelte.preprocess(source, [ ``` +### `svelte.walk` + +```js +walk(ast: Node, { + enter(node: Node, parent: Node, prop: string, index: number)?: void, + leave(node: Node, parent: Node, prop: string, index: number)?: void +}) +``` + +--- + +The `walk` function provides a way to walk the abstract syntax trees generated by the parser, using the compiler's own built-in instance of [estree-walker](https://github.com/Rich-Harris/estree-walker). + +The walker takes an abstract syntax tree to walk and an object with two optional methods: `enter` and `leave`. For each node, `enter` is called (if present). Then, unless `this.skip()` is called during `enter`, each of the children are traversed, and then `leave` is called on the node. + + +```js +const svelte = require('svelte/compiler'); +svelte.walk(ast, { + enter(node, parent, prop, index) { + do_something(node); + if (should_skip_children(node)) { + this.skip(); + } + }, + leave(node, parent, prop, index) { + do_something_else(node); + } +}); +``` + + ### `svelte.VERSION` --- diff --git a/site/content/examples/00-introduction/02-styling/App.svelte b/site/content/examples/00-introduction/02-styling/App.svelte index cacaf8ccba..7148dcf10f 100644 --- a/site/content/examples/00-introduction/02-styling/App.svelte +++ b/site/content/examples/00-introduction/02-styling/App.svelte @@ -1,7 +1,7 @@ <style> p { color: purple; - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; } </style> diff --git a/site/content/examples/00-introduction/03-nested-components/App.svelte b/site/content/examples/00-introduction/03-nested-components/App.svelte index e0a2e5fe17..bb97f50ace 100644 --- a/site/content/examples/00-introduction/03-nested-components/App.svelte +++ b/site/content/examples/00-introduction/03-nested-components/App.svelte @@ -5,7 +5,7 @@ <style> p { color: purple; - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; } </style> diff --git a/site/content/examples/03-logic/04-keyed-each-blocks/App.svelte b/site/content/examples/03-logic/04-keyed-each-blocks/App.svelte index 5cd279d7a7..cd12eed954 100644 --- a/site/content/examples/03-logic/04-keyed-each-blocks/App.svelte +++ b/site/content/examples/03-logic/04-keyed-each-blocks/App.svelte @@ -2,11 +2,11 @@ import Thing from './Thing.svelte'; let things = [ - { id: 1, value: 'a' }, - { id: 2, value: 'b' }, - { id: 3, value: 'c' }, - { id: 4, value: 'd' }, - { id: 5, value: 'e' } + { id: 1, color: '#0d0887' }, + { id: 2, color: '#6a00a8' }, + { id: 3, color: '#b12a90' }, + { id: 4, color: '#e16462' }, + { id: 5, color: '#fca636' } ]; function handleClick() { @@ -22,14 +22,14 @@ <div> <h2>Keyed</h2> {#each things as thing (thing.id)} - <Thing value={thing.value}/> + <Thing current={thing.color}/> {/each} </div> <div> <h2>Unkeyed</h2> {#each things as thing} - <Thing value={thing.value}/> + <Thing current={thing.color}/> {/each} </div> </div> \ No newline at end of file diff --git a/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte b/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte index 4e86d32109..28c3c65d05 100644 --- a/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte +++ b/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte @@ -1,9 +1,24 @@ <script> - // `value` is updated whenever the prop value changes... - export let value; + // `current` is updated whenever the prop value changes... + export let current; - // ...but `valueAtStart` is fixed upon initialisation - const valueAtStart = value; + // ...but `initial` is fixed upon initialisation + const initial = current; </script> -<p>{valueAtStart} / {value}</p> \ No newline at end of file +<p> + <span style="background-color: {initial}">initial</span> + <span style="background-color: {current}">current</span> +</p> + +<style> + span { + display: inline-block; + padding: 0.2em 0.5em; + margin: 0 0.2em 0.2em 0; + width: 4em; + text-align: center; + border-radius: 0.2em; + color: white; + } +</style> \ No newline at end of file diff --git a/site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte b/site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte index 75630ea99c..68dcc68636 100644 --- a/site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte +++ b/site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte @@ -1,6 +1,6 @@ <style> button { - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; padding: 0.5em 1em; color: royalblue; diff --git a/site/content/examples/05-bindings/04-textarea-inputs/App.svelte b/site/content/examples/05-bindings/04-textarea-inputs/App.svelte index be338bf47f..5a9e18f79d 100644 --- a/site/content/examples/05-bindings/04-textarea-inputs/App.svelte +++ b/site/content/examples/05-bindings/04-textarea-inputs/App.svelte @@ -1,12 +1,12 @@ <script> import marked from 'marked'; - let value = `Some words are *italic*, some are **bold**`; + let text = `Some words are *italic*, some are **bold**`; </script> <style> textarea { width: 100%; height: 200px; } </style> -<textarea bind:value></textarea> +<textarea bind:value={text}></textarea> -{@html marked(value)} \ No newline at end of file +{@html marked(text)} \ No newline at end of file diff --git a/site/content/examples/05-bindings/08-media-elements/App.svelte b/site/content/examples/05-bindings/08-media-elements/App.svelte index 2cf819fca0..469e9e12eb 100644 --- a/site/content/examples/05-bindings/08-media-elements/App.svelte +++ b/site/content/examples/05-bindings/08-media-elements/App.svelte @@ -14,7 +14,7 @@ showControlsTimeout = setTimeout(() => showControls = false, 2500); showControls = true; - if (e.which !== 1) return; // mouse not down + if (!(e.buttons & 1)) return; // mouse not down if (!duration) return; // video not loaded yet const { left, right } = this.getBoundingClientRect(); @@ -109,8 +109,8 @@ <div> <video - poster="http://svelte-assets.surge.sh/caminandes-llamigos.jpg" - src="http://svelte-assets.surge.sh/caminandes-llamigos.mp4" + poster="http://sveltejs.github.io/assets/caminandes-llamigos.jpg" + src="http://sveltejs.github.io/assets/caminandes-llamigos.mp4" on:mousemove={handleMousemove} on:mousedown={handleMousedown} bind:currentTime={time} @@ -127,4 +127,4 @@ <span class="time">{format(duration)}</span> </div> </div> -</div> \ No newline at end of file +</div> diff --git a/site/content/examples/05-bindings/10-bind-this/App.svelte b/site/content/examples/05-bindings/10-bind-this/App.svelte index eacd203629..8e4b3c5bef 100644 --- a/site/content/examples/05-bindings/10-bind-this/App.svelte +++ b/site/content/examples/05-bindings/10-bind-this/App.svelte @@ -2,10 +2,6 @@ import { onMount } from 'svelte'; let canvas; - let ctx; - let running = false; - - const r = Math.random(); onMount(() => { const ctx = canvas.getContext('2d'); @@ -47,8 +43,8 @@ width: 100%; height: 100%; background-color: #666; - -webkit-mask: url(logo-mask.svg) 50% 50% no-repeat; - mask: url(logo-mask.svg) 50% 50% no-repeat; + -webkit-mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; + mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; } </style> @@ -56,4 +52,4 @@ bind:this={canvas} width={32} height={32} -></canvas> \ No newline at end of file +></canvas> diff --git a/site/content/examples/06-lifecycle/02-update/App.svelte b/site/content/examples/06-lifecycle/02-update/App.svelte index 373b6dcb6a..3eb2dceb52 100644 --- a/site/content/examples/06-lifecycle/02-update/App.svelte +++ b/site/content/examples/06-lifecycle/02-update/App.svelte @@ -1,5 +1,5 @@ <script> - import Eliza from 'elizanode'; + import Eliza from 'elizabot'; import { beforeUpdate, afterUpdate } from 'svelte'; let div; diff --git a/site/content/examples/09-transitions/06-deferred-transitions/App.svelte b/site/content/examples/09-transitions/06-deferred-transitions/App.svelte index 674f1fb9b0..f8c74081fe 100644 --- a/site/content/examples/09-transitions/06-deferred-transitions/App.svelte +++ b/site/content/examples/09-transitions/06-deferred-transitions/App.svelte @@ -1,140 +1,153 @@ <script> - import { quintOut } from 'svelte/easing'; - import crossfade from './crossfade.js'; // TODO put this in svelte/transition! - - const { send, receive } = crossfade({ - fallback(node, params) { - const style = getComputedStyle(node); - const transform = style.transform === 'none' ? '' : style.transform; - - return { - duration: 600, - easing: quintOut, - css: t => ` - transform: ${transform} scale(${t}); - opacity: ${t} - ` - }; - } + import { crossfade, scale } from 'svelte/transition'; + import images from './images.js'; + + const [send, receive] = crossfade({ + duration: 200, + fallback: scale }); - let todos = [ - { id: 1, done: false, description: 'write some docs' }, - { id: 2, done: false, description: 'start writing JSConf talk' }, - { id: 3, done: true, description: 'buy some milk' }, - { id: 4, done: false, description: 'mow the lawn' }, - { id: 5, done: false, description: 'feed the turtle' }, - { id: 6, done: false, description: 'fix some bugs' }, - ]; - - let uid = todos.length + 1; - - function add(input) { - const todo = { - id: uid++, - done: false, - description: input.value - }; + let selected = null; + let loading = null; - todos = [todo, ...todos]; - input.value = ''; - } + const ASSETS = `https://sveltejs.github.io/assets/crossfade`; - function remove(todo) { - todos = todos.filter(t => t !== todo); - } + const load = image => { + const timeout = setTimeout(() => loading = image, 100); + + const img = new Image(); + + img.onload = () => { + selected = image; + clearTimeout(timeout); + loading = null; + }; + + img.src = `${ASSETS}/${image.id}.jpg`; + }; </script> +<div class="container"> + <div class="phone"> + <h1>Photo gallery</h1> + + <div class="grid"> + {#each images as image} + <div class="square"> + {#if selected !== image} + <button + style="background-color: {image.color};" + on:click="{() => load(image)}" + in:receive={{key:image.id}} + out:send={{key:image.id}} + >{loading === image ? '...' : image.id}</button> + {/if} + </div> + {/each} + </div> + + {#if selected} + {#await selected then d} + <div class="photo" in:receive={{key:d.id}} out:send={{key:d.id}}> + <img + alt={d.alt} + src="{ASSETS}/{d.id}.jpg" + on:click="{() => selected = null}" + > + + <p class='credit'> + <a target="_blank" href="https://www.flickr.com/photos/{d.path}">via Flickr</a> – + <a target="_blank" href={d.license.url}>{d.license.name}</a> + </p> + </div> + {/await} + {/if} + </div> +</div> + <style> - .new-todo { - font-size: 1.4em; + .container { + position: absolute; + display: flex; + align-items: center; + justify-content: center; width: 100%; - margin: 2em 0 1em 0; + height: 100%; + top: 0; + left: 0; } - .board { - max-width: 36em; - margin: 0 auto; + .phone { + position: relative; + display: flex; + flex-direction: column; + width: 52vmin; + height: 76vmin; + border: 2vmin solid #ccc; + border-bottom-width: 10vmin; + padding: 3vmin; + border-radius: 2vmin; } - .left, .right { - float: left; - width: 50%; - padding: 0 1em 0 0; - box-sizing: border-box; + h1 { + font-weight: 300; + text-transform: uppercase; + font-size: 5vmin; + margin: 0.2em 0 0.5em 0; } - h2 { - font-size: 2em; - font-weight: 200; - user-select: none; + .grid { + display: grid; + flex: 1; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(4, 1fr); + grid-gap: 2vmin; } - label { + button { + width: 100%; + height: 100%; + color: white; + font-size: 5vmin; + border: none; + margin: 0; + will-change: transform; + } + + .photo, img { + position: absolute; top: 0; left: 0; - display: block; - font-size: 1em; - line-height: 1; - padding: 0.5em; - margin: 0 auto 0.5em auto; - border-radius: 2px; - background-color: #eee; - user-select: none; + width: 100%; + height: 100%; + overflow: hidden; } - input { margin: 0 } - - .right label { - background-color: rgb(180,240,100); + .photo { + display: flex; + align-items: stretch; + justify-content: flex-end; + flex-direction: column; + will-change: transform; } - button { - float: right; - height: 1em; - box-sizing: border-box; - padding: 0 0.5em; - line-height: 1; - background-color: transparent; - border: none; - color: rgb(170,30,30); - opacity: 0; - transition: opacity 0.2s; + img { + object-fit: cover; + cursor: pointer; } - label:hover button { - opacity: 1; + .credit { + text-align: right; + font-size: 2.5vmin; + padding: 1em; + margin: 0; + color: white; + font-weight: bold; + opacity: 0.6; + background: rgba(0,0,0,0.4); } -</style> - -<div class='board'> - <input class="new-todo" placeholder="what needs to be done?" on:keydown="{event => event.which === 13 && add(event.target)}"> - - <div class='left'> - <h2>todo</h2> - {#each todos.filter(t => !t.done) as todo (todo.id)} - <label - in:receive="{{key: todo.id}}" - out:send="{{key: todo.id}}" - > - <input type=checkbox bind:checked={todo.done}> - {todo.description} - <button on:click="{() => remove(todo)}">x</button> - </label> - {/each} - </div> - <div class='right'> - <h2>done</h2> - {#each todos.filter(t => t.done) as todo (todo.id)} - <label - in:receive="{{key: todo.id}}" - out:send="{{key: todo.id}}" - > - <input type=checkbox bind:checked={todo.done}> - {todo.description} - <button on:click="{() => remove(todo)}">x</button> - </label> - {/each} - </div> -</div> \ No newline at end of file + .credit a, .credit a:visited { + color: white; + } +</style> \ No newline at end of file diff --git a/site/content/examples/09-transitions/06-deferred-transitions/crossfade.js b/site/content/examples/09-transitions/06-deferred-transitions/crossfade.js deleted file mode 100644 index e11e18b60e..0000000000 --- a/site/content/examples/09-transitions/06-deferred-transitions/crossfade.js +++ /dev/null @@ -1,65 +0,0 @@ -import { quintOut } from 'svelte/easing'; - -export default function crossfade({ send, receive, fallback }) { - let requested = new Map(); - let provided = new Map(); - - function crossfade(from, node) { - const to = node.getBoundingClientRect(); - const dx = from.left - to.left; - const dy = from.top - to.top; - - const style = getComputedStyle(node); - const transform = style.transform === 'none' ? '' : style.transform; - - return { - duration: 400, - easing: quintOut, - css: (t, u) => ` - opacity: ${t}; - transform: ${transform} translate(${u * dx}px,${u * dy}px); - ` - }; - } - - return { - send(node, params) { - provided.set(params.key, { - rect: node.getBoundingClientRect() - }); - - return () => { - if (requested.has(params.key)) { - const { rect } = requested.get(params.key); - requested.delete(params.key); - - return crossfade(rect, node); - } - - // if the node is disappearing altogether - // (i.e. wasn't claimed by the other list) - // then we need to supply an outro - provided.delete(params.key); - return fallback(node, params); - }; - }, - - receive(node, params) { - requested.set(params.key, { - rect: node.getBoundingClientRect() - }); - - return () => { - if (provided.has(params.key)) { - const { rect } = provided.get(params.key); - provided.delete(params.key); - - return crossfade(rect, node); - } - - requested.delete(params.key); - return fallback(node, params); - }; - } - }; -} \ No newline at end of file diff --git a/site/content/examples/09-transitions/06-deferred-transitions/images.js b/site/content/examples/09-transitions/06-deferred-transitions/images.js new file mode 100644 index 0000000000..d3ce723758 --- /dev/null +++ b/site/content/examples/09-transitions/06-deferred-transitions/images.js @@ -0,0 +1,102 @@ +const BY = { + name: 'CC BY 2.0', + url: 'https://creativecommons.org/licenses/by/2.0/' +}; + +const BY_SA = { + name: 'CC BY-SA 2.0', + url: 'https://creativecommons.org/licenses/by-sa/2.0/' +}; + +const BY_ND = { + name: 'CC BY-ND 2.0', + url: 'https://creativecommons.org/licenses/by-nd/2.0/' +}; + +// via http://labs.tineye.com/multicolr +export default [ + { + color: '#001f3f', + id: '1', + alt: 'Crepuscular rays', + path: '43428526@N03/7863279376', + license: BY + }, + { + color: '#0074D9', + id: '2', + alt: 'Lapland winter scene', + path: '25507134@N00/6527537485', + license: BY + }, + { + color: '#7FDBFF', + id: '3', + alt: 'Jellyfish', + path: '37707866@N00/3354331318', + license: BY + }, + { + color: '#39CCCC', + id: '4', + alt: 'A man scuba diving', + path: '32751486@N00/4608886209', + license: BY_SA + }, + { + color: '#3D9970', + id: '5', + alt: 'Underwater scene', + path: '25483059@N08/5548569010', + license: BY + }, + { + color: '#2ECC40', + id: '6', + alt: 'Ferns', + path: '8404611@N06/2447470760', + license: BY + }, + { + color: '#01FF70', + id: '7', + alt: 'Posters in a bar', + path: '33917831@N00/114428206', + license: BY_SA + }, + { + color: '#FFDC00', + id: '8', + alt: 'Daffodil', + path: '46417125@N04/4818617089', + license: BY_ND + }, + { + color: '#FF851B', + id: '9', + alt: 'Dust storm in Sydney', + path: '56068058@N00/3945496657', + license: BY + }, + { + color: '#FF4136', + id: '10', + alt: 'Postbox', + path: '31883499@N05/4216820032', + license: BY + }, + { + color: '#85144b', + id: '11', + alt: 'Fireworks', + path: '8484971@N07/2625506561', + license: BY_ND + }, + { + color: '#B10DC9', + id: '12', + alt: 'The Stereophonics', + path: '58028312@N00/5385464371', + license: BY_ND + } +]; \ No newline at end of file diff --git a/site/content/examples/10-animations/00-animate/App.svelte b/site/content/examples/10-animations/00-animate/App.svelte index c46096c204..279821491b 100644 --- a/site/content/examples/10-animations/00-animate/App.svelte +++ b/site/content/examples/10-animations/00-animate/App.svelte @@ -1,8 +1,9 @@ <script> import { quintOut } from 'svelte/easing'; - import crossfade from './crossfade.js'; // TODO put this in svelte/transition! + import { crossfade } from 'svelte/transition'; + import { flip } from 'svelte/animate'; - const { send, receive } = crossfade({ + const [send, receive] = crossfade({ fallback(node, params) { const style = getComputedStyle(node); const transform = style.transform === 'none' ? '' : style.transform; @@ -43,12 +44,6 @@ function remove(todo) { todos = todos.filter(t => t !== todo); } - - function handleKeydown(event) { - if (event.which === 13) { - addTodo(event.target); - } - } </script> <style> @@ -114,7 +109,11 @@ </style> <div class='board'> - <input class="new-todo" placeholder="what needs to be done?" on:enter={add}> + <input + class="new-todo" + placeholder="what needs to be done?" + on:keydown="{event => event.which === 13 && add(event.target)}" + > <div class='left'> <h2>todo</h2> @@ -122,6 +121,7 @@ <label in:receive="{{key: todo.id}}" out:send="{{key: todo.id}}" + animate:flip > <input type=checkbox bind:checked={todo.done}> {todo.description} @@ -136,6 +136,7 @@ <label in:receive="{{key: todo.id}}" out:send="{{key: todo.id}}" + animate:flip > <input type=checkbox bind:checked={todo.done}> {todo.description} @@ -143,4 +144,4 @@ </label> {/each} </div> -</div> \ No newline at end of file +</div> diff --git a/site/content/examples/10-animations/00-animate/crossfade.js b/site/content/examples/10-animations/00-animate/crossfade.js deleted file mode 100644 index e11e18b60e..0000000000 --- a/site/content/examples/10-animations/00-animate/crossfade.js +++ /dev/null @@ -1,65 +0,0 @@ -import { quintOut } from 'svelte/easing'; - -export default function crossfade({ send, receive, fallback }) { - let requested = new Map(); - let provided = new Map(); - - function crossfade(from, node) { - const to = node.getBoundingClientRect(); - const dx = from.left - to.left; - const dy = from.top - to.top; - - const style = getComputedStyle(node); - const transform = style.transform === 'none' ? '' : style.transform; - - return { - duration: 400, - easing: quintOut, - css: (t, u) => ` - opacity: ${t}; - transform: ${transform} translate(${u * dx}px,${u * dy}px); - ` - }; - } - - return { - send(node, params) { - provided.set(params.key, { - rect: node.getBoundingClientRect() - }); - - return () => { - if (requested.has(params.key)) { - const { rect } = requested.get(params.key); - requested.delete(params.key); - - return crossfade(rect, node); - } - - // if the node is disappearing altogether - // (i.e. wasn't claimed by the other list) - // then we need to supply an outro - provided.delete(params.key); - return fallback(node, params); - }; - }, - - receive(node, params) { - requested.set(params.key, { - rect: node.getBoundingClientRect() - }); - - return () => { - if (provided.has(params.key)) { - const { rect } = provided.get(params.key); - provided.delete(params.key); - - return crossfade(rect, node); - } - - requested.delete(params.key); - return fallback(node, params); - }; - } - }; -} \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/App.svelte b/site/content/examples/11-easing/00-easing/App.svelte new file mode 100644 index 0000000000..c33e73518e --- /dev/null +++ b/site/content/examples/11-easing/00-easing/App.svelte @@ -0,0 +1,106 @@ +<script> + import { interpolateString as interpolate } from 'd3-interpolate'; + import { tweened } from 'svelte/motion'; + + import Grid from './Grid.svelte'; + import Controls from './Controls.svelte'; + + import { eases, types } from './eases.js'; + + let current_type = 'In'; + let current_ease = 'sine'; + let duration = 2000; + let current = eases.get(current_ease)[current_type]; + let playing = false; + let width; + + const ease_path = tweened(current.shape, { interpolate }); + const time = tweened(0); + const value = tweened(1000); + + async function runAnimations() { + playing = true; + + value.set(1000, {duration: 0}); + time.set(0, {duration: 0}); + + await ease_path.set(current.shape); + await Promise.all([ + time.set(1000, {duration, easing: x => x}), + value.set(0, {duration, easing: current.fn}) + ]); + + playing = false; + } + + $: current = eases.get(current_ease)[current_type]; + $: current && runAnimations(); +</script> + +<style> + .easing-vis { + display: flex; + max-height: 95%; + max-width: 800px; + margin: auto; + padding: 10px; + border: 1px solid #333; + border-radius: 2px; + padding: 20px; + } + + svg { + width: 100%; + margin: 0 20px 0 0; + } + + .graph { + transform: translate(200px,400px) + } + + @media (max-width:600px) { + .easing-vis { + flex-direction: column; + max-height: calc(100% - 3rem); + } + } +</style> + +<div bind:offsetWidth={width} class="easing-vis"> + <svg viewBox="0 0 1400 1802"> + <g class="canvas"> + <Grid x={$time} y={$value}/> + <g class="graph"> + <path + d={$ease_path} + stroke="#333" + stroke-width="2" + fill="none" + /> + + <path d="M0,23.647C0,22.41 27.014,0.407 28.496,0.025C29.978,-0.357 69.188,3.744 70.104,4.744C71.02,5.745 71.02,41.499 70.104,42.5C69.188,43.501 29.978,47.601 28.496,47.219C27.014,46.837 0,24.884 0,23.647Z" + fill="#ff3e00" + style="transform: translate(1060px, {($value - 24)}px)" + /> + + <circle + cx="{$time}" + cy="{$value}" + r="15" + fill="#ff3e00" + /> + </g> + </g> + </svg> + + <Controls + {eases} + {types} + {playing} + {width} + bind:duration + bind:current_ease + bind:current_type + on:play={runAnimations} + /> +</div> \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/Controls.svelte b/site/content/examples/11-easing/00-easing/Controls.svelte new file mode 100644 index 0000000000..66a297323f --- /dev/null +++ b/site/content/examples/11-easing/00-easing/Controls.svelte @@ -0,0 +1,186 @@ +<script> + import { createEventDispatcher } from 'svelte'; + + export let current_ease; + export let current_type; + export let eases; + export let types; + export let duration; + export let playing; + export let width; + + const dispatch = createEventDispatcher(); + + $: mobile = width && width < 600; +</script> + +<style> + .easing-sidebar { + width: 11em; + } + + ul { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + align-items: flex-start; + font-size: 18px; + } + + li { + padding: 5px 10px; + background: #eee; + border-radius: 2px; + margin: 3px 0; + cursor:pointer; + } + + li:hover { + background: #676778; + color: white; + } + + .selected { + background: #ff3e00; + color: white; + } + + h3 { + margin: 0 10px 0 0; + } + + h4 { + margin-bottom: 0; + } + + select { + display: inline; + padding: 0.2em; + margin: 0; + } + + .duration { + width: 100%; + display: flex; + align-items: center; + flex-wrap: wrap; + } + + .duration span { + display: flex; + } + + .duration input { + width: 80px; + margin: 10px 10px 10px 0 ; + } + + .duration button { + margin: 10px 5px; + } + + .duration .number { + width: 30px; + } + + .duration .play { + margin: 0 5px 0 auto; + width: 100%; + } + + @media (max-width:600px) { + .easing-types { + display: flex; + align-items: center; + margin-top: 10px; + } + + .easing-sidebar { + width: 100%; + } + + .duration .play { + margin-left: auto; + width: unset; + } + + h3 { + font-size: 0.9em; + display: inline; + } + + h3:nth-of-type(2) { + margin-left: auto; + } + + ul li { + margin-right: 10px; + } + } +</style> + +<div class="easing-sidebar"> + <div class="easing-types"> + <h3>Ease</h3> + {#if mobile} + <select bind:value={current_ease}> + {#each [...eases] as [name]} + <option + value={name} + class:selected={name === current_ease} + > + {name} + </option> + {/each} + </select> + {:else} + <ul> + {#each [...eases] as [name]} + <li + class:selected={name === current_ease} + on:click={() => current_ease = name} + > + {name} + </li> + {/each} + </ul> + {/if} + <h3>Type</h3> + {#if mobile } + <select bind:value={current_type}> + {#each types as [name, type]} + <option + value={type} + > + {name} + </option> + {/each} + </select> + {:else} + <ul> + {#each types as [name, type]} + <li + class:selected={type === current_type} + on:click={() => current_type = type} + > + {name} + </li> + {/each} + </ul> + {/if} + </div> + <h4> + Duration + </h4> + <div class="duration"> + <span> + <input type="number" bind:value={duration} min="0" step="100"/> + <button class="number" on:click={() => duration -= 100}>-</button> + <button class="number" on:click={() => duration += 100}>+</button> + </span> + <button class="play" on:click={() => dispatch('play')}> + {playing ? 'Restart' : 'Play'} + </button> + </div> + </div> \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/Grid.svelte b/site/content/examples/11-easing/00-easing/Grid.svelte new file mode 100644 index 0000000000..e704f46cf7 --- /dev/null +++ b/site/content/examples/11-easing/00-easing/Grid.svelte @@ -0,0 +1,62 @@ +<script> + export let x, y; +</script> + +<style> + .grid-line { + stroke:#ccc; + opacity: 0.5; + stroke-width: 2; + } + + .grid-line-xy { + stroke: tomato; + stroke-width: 2; + } +</style> + +<svelte:options namespace="svg" /> + +<rect + x=0 + y=0 + width=1400 + height=1800 + stroke=#ccc + style="opacity: 0.5" + fill=none + stroke-width=2 +/> + +{#each { length: 8 } as _, i} + {#if i < 6} + <path + d="M{(i+1) * 200} 0 L{(i+1)*200} 1802" + class="grid-line" + /> + {/if} + <path + d="M0 {(i+1) * 200} L1400 {(i+1)*200} " + class="grid-line" + /> +{/each} + +<path + style="transform: translateX({x+200}px)" + d="M0 0 L0 1800" + class="grid-line-xy" +/> +<path + style="transform: translateY({y}px)" + d="M0 400 L1400 400" + class="grid-line-xy" +/> +<rect + x=200 + y=400 + width=1000 + height=1000 + stroke=#999 + fill=none + stroke-width=2 +/> \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/eases.js b/site/content/examples/11-easing/00-easing/eases.js new file mode 100644 index 0000000000..a24246005a --- /dev/null +++ b/site/content/examples/11-easing/00-easing/eases.js @@ -0,0 +1,43 @@ +import * as eases from 'svelte/easing'; + +const processed_eases = {}; + +for (const ease in eases) { + if (ease === "linear") { + processed_eases.linear = eases.linear; + } else { + const name = ease.replace(/In$|InOut$|Out$/, ''); + const type = ease.match(/In$|InOut$|Out$/)[0]; + + if (!(name in processed_eases)) processed_eases[name] = {}; + processed_eases[name][type] = {}; + processed_eases[name][type].fn = eases[ease]; + + let shape = 'M0 1000'; + for (let i = 1; i <= 1000; i++) { + shape = `${shape} L${(i / 1000) * 1000} ${1000 - eases[ease](i / 1000) * 1000} `; + processed_eases[name][type].shape = shape; + } + } +} + +const sorted_eases = new Map([ + ['sine', processed_eases.sine], + ['quad', processed_eases.quad], + ['cubic', processed_eases.cubic], + ['quart', processed_eases.quart], + ['quint', processed_eases.quint], + ['expo', processed_eases.expo], + ['circ', processed_eases.circ], + ['back', processed_eases.back], + ['elastic', processed_eases.elastic], + ['bounce', processed_eases.bounce], +]); + +export const types = [ + ['Ease In', 'In'], + ['Ease Out', 'Out'], + ['Ease In Out', 'InOut'] +]; + +export { sorted_eases as eases }; \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/meta.json b/site/content/examples/11-easing/00-easing/meta.json new file mode 100644 index 0000000000..59ad604b26 --- /dev/null +++ b/site/content/examples/11-easing/00-easing/meta.json @@ -0,0 +1,3 @@ +{ + "title": "Ease Visualiser" +} \ No newline at end of file diff --git a/site/content/examples/11-easing/meta.json b/site/content/examples/11-easing/meta.json new file mode 100644 index 0000000000..78341a522d --- /dev/null +++ b/site/content/examples/11-easing/meta.json @@ -0,0 +1,3 @@ +{ + "title": "Easing" +} \ No newline at end of file diff --git a/site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte b/site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte deleted file mode 100644 index 0bd9d56113..0000000000 --- a/site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte +++ /dev/null @@ -1,70 +0,0 @@ -<script> - let language = "english"; - - const translations = { - english: { - tooltip: "Switch Languages", - }, - latin: { - tooltip: "Itchsway Anguageslay", - } - }; - - function tooltip(node, text) { - const tooltip = document.createElement('div'); - tooltip.textContent = text; - - Object.assign(tooltip.style, { - position: 'absolute', - background: 'black', - color: 'white', - padding: '0.5em 1em', - fontSize: '12px', - pointerEvents: 'none', - transform: 'translate(5px, -50%)', - borderRadius: '2px', - transition: 'opacity 0.4s' - }); - - function position() { - const { top, right, bottom } = node.getBoundingClientRect(); - tooltip.style.top = `${(top + bottom) / 2}px`; - tooltip.style.left = `${right}px`; - } - - function append() { - document.body.appendChild(tooltip); - tooltip.style.opacity = 0; - setTimeout(() => tooltip.style.opacity = 1); - position(); - } - - function remove() { - tooltip.remove(); - } - - node.addEventListener('mouseenter', append); - node.addEventListener('mouseleave', remove); - - return { - update(text) { - tooltip.textContent = text; - position(); - }, - - destroy() { - tooltip.remove(); - node.removeEventListener('mouseenter', append); - node.removeEventListener('mouseleave', remove); - } - }; - } - - function toggleLanguage() { - language = language === 'english' ? 'latin' : 'english' - } -</script> - -<button on:click={toggleLanguage} use:tooltip={translations[language].tooltip}> - {language} -</button> \ No newline at end of file diff --git a/site/content/examples/11-svg/01-clock/App.svelte b/site/content/examples/12-svg/01-clock/App.svelte similarity index 100% rename from site/content/examples/11-svg/01-clock/App.svelte rename to site/content/examples/12-svg/01-clock/App.svelte diff --git a/site/content/examples/11-svg/01-clock/meta.json b/site/content/examples/12-svg/01-clock/meta.json similarity index 100% rename from site/content/examples/11-svg/01-clock/meta.json rename to site/content/examples/12-svg/01-clock/meta.json diff --git a/site/content/examples/11-svg/02-bar-chart/App.svelte b/site/content/examples/12-svg/02-bar-chart/App.svelte similarity index 100% rename from site/content/examples/11-svg/02-bar-chart/App.svelte rename to site/content/examples/12-svg/02-bar-chart/App.svelte diff --git a/site/content/examples/11-svg/02-bar-chart/meta.json b/site/content/examples/12-svg/02-bar-chart/meta.json similarity index 100% rename from site/content/examples/11-svg/02-bar-chart/meta.json rename to site/content/examples/12-svg/02-bar-chart/meta.json diff --git a/site/content/examples/11-svg/03-area-chart/App.svelte b/site/content/examples/12-svg/03-area-chart/App.svelte similarity index 100% rename from site/content/examples/11-svg/03-area-chart/App.svelte rename to site/content/examples/12-svg/03-area-chart/App.svelte diff --git a/site/content/examples/11-svg/03-area-chart/data.js b/site/content/examples/12-svg/03-area-chart/data.js similarity index 100% rename from site/content/examples/11-svg/03-area-chart/data.js rename to site/content/examples/12-svg/03-area-chart/data.js diff --git a/site/content/examples/11-svg/03-area-chart/meta.json b/site/content/examples/12-svg/03-area-chart/meta.json similarity index 100% rename from site/content/examples/11-svg/03-area-chart/meta.json rename to site/content/examples/12-svg/03-area-chart/meta.json diff --git a/site/content/examples/11-svg/04-scatterplot/App.svelte b/site/content/examples/12-svg/04-scatterplot/App.svelte similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/App.svelte rename to site/content/examples/12-svg/04-scatterplot/App.svelte diff --git a/site/content/examples/11-svg/04-scatterplot/Scatterplot.svelte b/site/content/examples/12-svg/04-scatterplot/Scatterplot.svelte similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/Scatterplot.svelte rename to site/content/examples/12-svg/04-scatterplot/Scatterplot.svelte diff --git a/site/content/examples/11-svg/04-scatterplot/data.js b/site/content/examples/12-svg/04-scatterplot/data.js similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/data.js rename to site/content/examples/12-svg/04-scatterplot/data.js diff --git a/site/content/examples/11-svg/04-scatterplot/meta.json b/site/content/examples/12-svg/04-scatterplot/meta.json similarity index 100% rename from site/content/examples/11-svg/04-scatterplot/meta.json rename to site/content/examples/12-svg/04-scatterplot/meta.json diff --git a/site/content/examples/11-svg/05-svg-transitions/App.svelte b/site/content/examples/12-svg/05-svg-transitions/App.svelte similarity index 96% rename from site/content/examples/11-svg/05-svg-transitions/App.svelte rename to site/content/examples/12-svg/05-svg-transitions/App.svelte index 6059b3645f..6e1e636b20 100644 --- a/site/content/examples/11-svg/05-svg-transitions/App.svelte +++ b/site/content/examples/12-svg/05-svg-transitions/App.svelte @@ -33,7 +33,7 @@ font-family: 'Overpass'; letter-spacing: 0.12em; color: #676778; - font-weight: 100; + font-weight: 400; } .centered span { @@ -71,4 +71,4 @@ toggle me </label> -<link href="https://fonts.googleapis.com/css?family=Overpass:100" rel="stylesheet"> \ No newline at end of file +<link href="https://fonts.googleapis.com/css?family=Overpass:100,400" rel="stylesheet"> diff --git a/site/content/examples/11-svg/05-svg-transitions/custom-transitions.js b/site/content/examples/12-svg/05-svg-transitions/custom-transitions.js similarity index 100% rename from site/content/examples/11-svg/05-svg-transitions/custom-transitions.js rename to site/content/examples/12-svg/05-svg-transitions/custom-transitions.js diff --git a/site/content/examples/11-svg/05-svg-transitions/meta.json b/site/content/examples/12-svg/05-svg-transitions/meta.json similarity index 100% rename from site/content/examples/11-svg/05-svg-transitions/meta.json rename to site/content/examples/12-svg/05-svg-transitions/meta.json diff --git a/site/content/examples/11-svg/05-svg-transitions/shape.js b/site/content/examples/12-svg/05-svg-transitions/shape.js similarity index 100% rename from site/content/examples/11-svg/05-svg-transitions/shape.js rename to site/content/examples/12-svg/05-svg-transitions/shape.js diff --git a/site/content/examples/11-svg/meta.json b/site/content/examples/12-svg/meta.json similarity index 100% rename from site/content/examples/11-svg/meta.json rename to site/content/examples/12-svg/meta.json diff --git a/site/content/examples/12-actions/00-actions/App.svelte b/site/content/examples/13-actions/00-actions/App.svelte similarity index 100% rename from site/content/examples/12-actions/00-actions/App.svelte rename to site/content/examples/13-actions/00-actions/App.svelte diff --git a/site/content/examples/12-actions/00-actions/meta.json b/site/content/examples/13-actions/00-actions/meta.json similarity index 100% rename from site/content/examples/12-actions/00-actions/meta.json rename to site/content/examples/13-actions/00-actions/meta.json diff --git a/site/content/examples/12-actions/00-actions/pannable.js b/site/content/examples/13-actions/00-actions/pannable.js similarity index 100% rename from site/content/examples/12-actions/00-actions/pannable.js rename to site/content/examples/13-actions/00-actions/pannable.js diff --git a/site/content/examples/13-actions/01-adding-parameters-to-actions/App.svelte b/site/content/examples/13-actions/01-adding-parameters-to-actions/App.svelte new file mode 100644 index 0000000000..d6eaa0ff12 --- /dev/null +++ b/site/content/examples/13-actions/01-adding-parameters-to-actions/App.svelte @@ -0,0 +1,20 @@ +<script> + import { longpress } from './longpress.js'; + + let pressed = false; + let duration = 2000; +</script> + +<label> + <input type=range bind:value={duration} max={2000} step={100}> + {duration}ms +</label> + +<button use:longpress={duration} + on:longpress="{() => pressed = true}" + on:mouseenter="{() => pressed = false}" +>press and hold</button> + +{#if pressed} + <p>congratulations, you pressed and held for {duration}ms</p> +{/if} \ No newline at end of file diff --git a/site/content/examples/13-actions/01-adding-parameters-to-actions/longpress.js b/site/content/examples/13-actions/01-adding-parameters-to-actions/longpress.js new file mode 100644 index 0000000000..9d807cb13a --- /dev/null +++ b/site/content/examples/13-actions/01-adding-parameters-to-actions/longpress.js @@ -0,0 +1,28 @@ +export function longpress(node, duration) { + let timer; + + const handleMousedown = () => { + timer = setTimeout(() => { + node.dispatchEvent( + new CustomEvent('longpress') + ); + }, duration); + }; + + const handleMouseup = () => { + clearTimeout(timer) + }; + + node.addEventListener('mousedown', handleMousedown); + node.addEventListener('mouseup', handleMouseup); + + return { + update(newDuration) { + duration = newDuration; + }, + destroy() { + node.removeEventListener('mousedown', handleMousedown); + node.removeEventListener('mouseup', handleMouseup); + } + }; +} \ No newline at end of file diff --git a/site/content/examples/12-actions/01-adding-parameters-to-actions/meta.json b/site/content/examples/13-actions/01-adding-parameters-to-actions/meta.json similarity index 100% rename from site/content/examples/12-actions/01-adding-parameters-to-actions/meta.json rename to site/content/examples/13-actions/01-adding-parameters-to-actions/meta.json diff --git a/site/content/examples/12-actions/meta.json b/site/content/examples/13-actions/meta.json similarity index 100% rename from site/content/examples/12-actions/meta.json rename to site/content/examples/13-actions/meta.json diff --git a/site/content/examples/13-classes/00-classes/App.svelte b/site/content/examples/14-classes/00-classes/App.svelte similarity index 100% rename from site/content/examples/13-classes/00-classes/App.svelte rename to site/content/examples/14-classes/00-classes/App.svelte diff --git a/site/content/examples/13-classes/00-classes/meta.json b/site/content/examples/14-classes/00-classes/meta.json similarity index 100% rename from site/content/examples/13-classes/00-classes/meta.json rename to site/content/examples/14-classes/00-classes/meta.json diff --git a/site/content/examples/13-classes/01-class-shorthand/App.svelte b/site/content/examples/14-classes/01-class-shorthand/App.svelte similarity index 100% rename from site/content/examples/13-classes/01-class-shorthand/App.svelte rename to site/content/examples/14-classes/01-class-shorthand/App.svelte diff --git a/site/content/examples/13-classes/01-class-shorthand/meta.json b/site/content/examples/14-classes/01-class-shorthand/meta.json similarity index 100% rename from site/content/examples/13-classes/01-class-shorthand/meta.json rename to site/content/examples/14-classes/01-class-shorthand/meta.json diff --git a/site/content/examples/13-classes/meta.json b/site/content/examples/14-classes/meta.json similarity index 100% rename from site/content/examples/13-classes/meta.json rename to site/content/examples/14-classes/meta.json diff --git a/site/content/examples/14-composition/04-modal/Modal.svelte b/site/content/examples/14-composition/04-modal/Modal.svelte deleted file mode 100644 index 5ffa5989a4..0000000000 --- a/site/content/examples/14-composition/04-modal/Modal.svelte +++ /dev/null @@ -1,45 +0,0 @@ -<script> - import { createEventDispatcher } from 'svelte'; - - const dispatch = createEventDispatcher(); -</script> - -<style> - .modal-background { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0,0,0,0.3); - } - - .modal { - position: absolute; - left: 50%; - top: 50%; - width: calc(100vw - 4em); - max-width: 32em; - max-height: calc(100vh - 4em); - overflow: auto; - transform: translate(-50%,-50%); - padding: 1em; - border-radius: 0.2em; - background: white; - } - - button { - display: block; - } -</style> - -<div class='modal-background' on:click='{() => dispatch("close")}'></div> - -<div class='modal'> - <slot name='header'></slot> - <hr> - <slot></slot> - <hr> - - <button on:click='{() => dispatch("close")}'>close modal</button> -</div> diff --git a/site/content/examples/14-composition/00-slots/App.svelte b/site/content/examples/15-composition/00-slots/App.svelte similarity index 100% rename from site/content/examples/14-composition/00-slots/App.svelte rename to site/content/examples/15-composition/00-slots/App.svelte diff --git a/site/content/examples/14-composition/00-slots/Box.svelte b/site/content/examples/15-composition/00-slots/Box.svelte similarity index 100% rename from site/content/examples/14-composition/00-slots/Box.svelte rename to site/content/examples/15-composition/00-slots/Box.svelte diff --git a/site/content/examples/14-composition/00-slots/meta.json b/site/content/examples/15-composition/00-slots/meta.json similarity index 100% rename from site/content/examples/14-composition/00-slots/meta.json rename to site/content/examples/15-composition/00-slots/meta.json diff --git a/site/content/examples/14-composition/01-slot-fallbacks/App.svelte b/site/content/examples/15-composition/01-slot-fallbacks/App.svelte similarity index 100% rename from site/content/examples/14-composition/01-slot-fallbacks/App.svelte rename to site/content/examples/15-composition/01-slot-fallbacks/App.svelte diff --git a/site/content/examples/14-composition/01-slot-fallbacks/Box.svelte b/site/content/examples/15-composition/01-slot-fallbacks/Box.svelte similarity index 100% rename from site/content/examples/14-composition/01-slot-fallbacks/Box.svelte rename to site/content/examples/15-composition/01-slot-fallbacks/Box.svelte diff --git a/site/content/examples/14-composition/01-slot-fallbacks/meta.json b/site/content/examples/15-composition/01-slot-fallbacks/meta.json similarity index 100% rename from site/content/examples/14-composition/01-slot-fallbacks/meta.json rename to site/content/examples/15-composition/01-slot-fallbacks/meta.json diff --git a/site/content/examples/14-composition/02-named-slots/App.svelte b/site/content/examples/15-composition/02-named-slots/App.svelte similarity index 100% rename from site/content/examples/14-composition/02-named-slots/App.svelte rename to site/content/examples/15-composition/02-named-slots/App.svelte diff --git a/site/content/examples/14-composition/02-named-slots/ContactCard.svelte b/site/content/examples/15-composition/02-named-slots/ContactCard.svelte similarity index 100% rename from site/content/examples/14-composition/02-named-slots/ContactCard.svelte rename to site/content/examples/15-composition/02-named-slots/ContactCard.svelte diff --git a/site/content/examples/14-composition/02-named-slots/meta.json b/site/content/examples/15-composition/02-named-slots/meta.json similarity index 100% rename from site/content/examples/14-composition/02-named-slots/meta.json rename to site/content/examples/15-composition/02-named-slots/meta.json diff --git a/site/content/examples/14-composition/03-slot-props/App.svelte b/site/content/examples/15-composition/03-slot-props/App.svelte similarity index 100% rename from site/content/examples/14-composition/03-slot-props/App.svelte rename to site/content/examples/15-composition/03-slot-props/App.svelte diff --git a/site/content/examples/14-composition/03-slot-props/Hoverable.svelte b/site/content/examples/15-composition/03-slot-props/Hoverable.svelte similarity index 100% rename from site/content/examples/14-composition/03-slot-props/Hoverable.svelte rename to site/content/examples/15-composition/03-slot-props/Hoverable.svelte diff --git a/site/content/examples/14-composition/03-slot-props/meta.json b/site/content/examples/15-composition/03-slot-props/meta.json similarity index 100% rename from site/content/examples/14-composition/03-slot-props/meta.json rename to site/content/examples/15-composition/03-slot-props/meta.json diff --git a/site/content/examples/14-composition/04-modal/App.svelte b/site/content/examples/15-composition/04-modal/App.svelte similarity index 88% rename from site/content/examples/14-composition/04-modal/App.svelte rename to site/content/examples/15-composition/04-modal/App.svelte index ac9d441f52..cfd3856447 100644 --- a/site/content/examples/14-composition/04-modal/App.svelte +++ b/site/content/examples/15-composition/04-modal/App.svelte @@ -1,9 +1,13 @@ <script> import Modal from './Modal.svelte'; - let showModal = true; + let showModal = false; </script> +<button on:click="{() => showModal = true}"> + show modal +</button> + {#if showModal} <Modal on:close="{() => showModal = false}"> <h2 slot="header"> @@ -22,8 +26,4 @@ <a href="https://www.merriam-webster.com/dictionary/modal">merriam-webster.com</a> </Modal> -{:else} - <button on:click="{() => showModal = true}"> - show modal - </button> -{/if} \ No newline at end of file +{/if} diff --git a/site/content/examples/15-composition/04-modal/Modal.svelte b/site/content/examples/15-composition/04-modal/Modal.svelte new file mode 100644 index 0000000000..4a5329b05b --- /dev/null +++ b/site/content/examples/15-composition/04-modal/Modal.svelte @@ -0,0 +1,81 @@ +<script> + import { createEventDispatcher, onDestroy } from 'svelte'; + + const dispatch = createEventDispatcher(); + const close = () => dispatch('close'); + + let modal; + + const handle_keydown = e => { + if (e.key === 'Escape') { + close(); + return; + } + + if (e.key === 'Tab') { + // trap focus + const nodes = modal.querySelectorAll('*'); + const tabbable = Array.from(nodes).filter(n => n.tabIndex >= 0); + + let index = tabbable.indexOf(document.activeElement); + if (index === -1 && e.shiftKey) index = 0; + + index += tabbable.length + (e.shiftKey ? -1 : 1); + index %= tabbable.length; + + tabbable[index].focus(); + e.preventDefault(); + } + }; + + const previously_focused = typeof document !== 'undefined' && document.activeElement; + + if (previously_focused) { + onDestroy(() => { + previously_focused.focus(); + }); + } +</script> + +<svelte:window on:keydown={handle_keydown}/> + +<div class="modal-background" on:click={close}></div> + +<div class="modal" role="dialog" aria-modal="true" bind:this={modal}> + <slot name="header"></slot> + <hr> + <slot></slot> + <hr> + + <!-- svelte-ignore a11y-autofocus --> + <button autofocus on:click={close}>close modal</button> +</div> + +<style> + .modal-background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.3); + } + + .modal { + position: absolute; + left: 50%; + top: 50%; + width: calc(100vw - 4em); + max-width: 32em; + max-height: calc(100vh - 4em); + overflow: auto; + transform: translate(-50%,-50%); + padding: 1em; + border-radius: 0.2em; + background: white; + } + + button { + display: block; + } +</style> diff --git a/site/content/examples/14-composition/04-modal/meta.json b/site/content/examples/15-composition/04-modal/meta.json similarity index 100% rename from site/content/examples/14-composition/04-modal/meta.json rename to site/content/examples/15-composition/04-modal/meta.json diff --git a/site/content/examples/14-composition/meta.json b/site/content/examples/15-composition/meta.json similarity index 100% rename from site/content/examples/14-composition/meta.json rename to site/content/examples/15-composition/meta.json diff --git a/site/content/examples/15-context/00-context-api/App.svelte b/site/content/examples/16-context/00-context-api/App.svelte similarity index 100% rename from site/content/examples/15-context/00-context-api/App.svelte rename to site/content/examples/16-context/00-context-api/App.svelte diff --git a/site/content/examples/15-context/00-context-api/Map.svelte b/site/content/examples/16-context/00-context-api/Map.svelte similarity index 100% rename from site/content/examples/15-context/00-context-api/Map.svelte rename to site/content/examples/16-context/00-context-api/Map.svelte diff --git a/site/content/examples/15-context/00-context-api/MapMarker.svelte b/site/content/examples/16-context/00-context-api/MapMarker.svelte similarity index 100% rename from site/content/examples/15-context/00-context-api/MapMarker.svelte rename to site/content/examples/16-context/00-context-api/MapMarker.svelte diff --git a/site/content/examples/15-context/00-context-api/mapbox.js b/site/content/examples/16-context/00-context-api/mapbox.js similarity index 100% rename from site/content/examples/15-context/00-context-api/mapbox.js rename to site/content/examples/16-context/00-context-api/mapbox.js diff --git a/site/content/examples/15-context/00-context-api/meta.json b/site/content/examples/16-context/00-context-api/meta.json similarity index 100% rename from site/content/examples/15-context/00-context-api/meta.json rename to site/content/examples/16-context/00-context-api/meta.json diff --git a/site/content/examples/15-context/meta.json b/site/content/examples/16-context/meta.json similarity index 100% rename from site/content/examples/15-context/meta.json rename to site/content/examples/16-context/meta.json diff --git a/site/content/examples/16-special-elements/00-svelte-self/App.svelte b/site/content/examples/17-special-elements/00-svelte-self/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/App.svelte rename to site/content/examples/17-special-elements/00-svelte-self/App.svelte diff --git a/site/content/examples/16-special-elements/00-svelte-self/File.svelte b/site/content/examples/17-special-elements/00-svelte-self/File.svelte similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/File.svelte rename to site/content/examples/17-special-elements/00-svelte-self/File.svelte diff --git a/site/content/examples/16-special-elements/00-svelte-self/Folder.svelte b/site/content/examples/17-special-elements/00-svelte-self/Folder.svelte similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/Folder.svelte rename to site/content/examples/17-special-elements/00-svelte-self/Folder.svelte diff --git a/site/content/examples/16-special-elements/00-svelte-self/meta.json b/site/content/examples/17-special-elements/00-svelte-self/meta.json similarity index 100% rename from site/content/examples/16-special-elements/00-svelte-self/meta.json rename to site/content/examples/17-special-elements/00-svelte-self/meta.json diff --git a/site/content/examples/16-special-elements/01-svelte-component/App.svelte b/site/content/examples/17-special-elements/01-svelte-component/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/App.svelte rename to site/content/examples/17-special-elements/01-svelte-component/App.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/BlueThing.svelte b/site/content/examples/17-special-elements/01-svelte-component/BlueThing.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/BlueThing.svelte rename to site/content/examples/17-special-elements/01-svelte-component/BlueThing.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/GreenThing.svelte b/site/content/examples/17-special-elements/01-svelte-component/GreenThing.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/GreenThing.svelte rename to site/content/examples/17-special-elements/01-svelte-component/GreenThing.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/RedThing.svelte b/site/content/examples/17-special-elements/01-svelte-component/RedThing.svelte similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/RedThing.svelte rename to site/content/examples/17-special-elements/01-svelte-component/RedThing.svelte diff --git a/site/content/examples/16-special-elements/01-svelte-component/meta.json b/site/content/examples/17-special-elements/01-svelte-component/meta.json similarity index 100% rename from site/content/examples/16-special-elements/01-svelte-component/meta.json rename to site/content/examples/17-special-elements/01-svelte-component/meta.json diff --git a/site/content/examples/16-special-elements/02-svelte-window/App.svelte b/site/content/examples/17-special-elements/02-svelte-window/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/02-svelte-window/App.svelte rename to site/content/examples/17-special-elements/02-svelte-window/App.svelte diff --git a/site/content/examples/16-special-elements/02-svelte-window/meta.json b/site/content/examples/17-special-elements/02-svelte-window/meta.json similarity index 100% rename from site/content/examples/16-special-elements/02-svelte-window/meta.json rename to site/content/examples/17-special-elements/02-svelte-window/meta.json diff --git a/site/content/examples/16-special-elements/03-svelte-window-bindings/App.svelte b/site/content/examples/17-special-elements/03-svelte-window-bindings/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/03-svelte-window-bindings/App.svelte rename to site/content/examples/17-special-elements/03-svelte-window-bindings/App.svelte diff --git a/site/content/examples/16-special-elements/03-svelte-window-bindings/meta.json b/site/content/examples/17-special-elements/03-svelte-window-bindings/meta.json similarity index 100% rename from site/content/examples/16-special-elements/03-svelte-window-bindings/meta.json rename to site/content/examples/17-special-elements/03-svelte-window-bindings/meta.json diff --git a/site/content/examples/16-special-elements/04-svelte-body/App.svelte b/site/content/examples/17-special-elements/04-svelte-body/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/04-svelte-body/App.svelte rename to site/content/examples/17-special-elements/04-svelte-body/App.svelte diff --git a/site/content/examples/16-special-elements/04-svelte-body/meta.json b/site/content/examples/17-special-elements/04-svelte-body/meta.json similarity index 100% rename from site/content/examples/16-special-elements/04-svelte-body/meta.json rename to site/content/examples/17-special-elements/04-svelte-body/meta.json diff --git a/site/content/examples/16-special-elements/05-svelte-head/App.svelte b/site/content/examples/17-special-elements/05-svelte-head/App.svelte similarity index 100% rename from site/content/examples/16-special-elements/05-svelte-head/App.svelte rename to site/content/examples/17-special-elements/05-svelte-head/App.svelte diff --git a/site/content/examples/16-special-elements/05-svelte-head/meta.json b/site/content/examples/17-special-elements/05-svelte-head/meta.json similarity index 100% rename from site/content/examples/16-special-elements/05-svelte-head/meta.json rename to site/content/examples/17-special-elements/05-svelte-head/meta.json diff --git a/site/content/examples/16-special-elements/meta.json b/site/content/examples/17-special-elements/meta.json similarity index 100% rename from site/content/examples/16-special-elements/meta.json rename to site/content/examples/17-special-elements/meta.json diff --git a/site/content/examples/17-module-context/01-module-exports/App.svelte b/site/content/examples/18-module-context/01-module-exports/App.svelte similarity index 78% rename from site/content/examples/17-module-context/01-module-exports/App.svelte rename to site/content/examples/18-module-context/01-module-exports/App.svelte index cd5ab44b21..1d5d94b5d1 100644 --- a/site/content/examples/17-module-context/01-module-exports/App.svelte +++ b/site/content/examples/18-module-context/01-module-exports/App.svelte @@ -8,7 +8,7 @@ <!-- https://musopen.org/music/9862-the-blue-danube-op-314/ --> <AudioPlayer - src="tutorial/music/strauss.mp3" + src="https://sveltejs.github.io/assets/music/strauss.mp3" title="The Blue Danube Waltz" composer="Johann Strauss" performer="European Archive" @@ -16,7 +16,7 @@ <!-- https://musopen.org/music/43775-the-planets-op-32/ --> <AudioPlayer - src="tutorial/music/holst.mp3" + src="https://sveltejs.github.io/assets/music/holst.mp3" title="Mars, the Bringer of War" composer="Gustav Holst" performer="USAF Heritage of America Band" @@ -24,7 +24,7 @@ <!-- https://musopen.org/music/8010-3-gymnopedies/ --> <AudioPlayer - src="tutorial/music/satie.mp3" + src="https://sveltejs.github.io/assets/music/satie.mp3" title="Gymnopédie no. 1" composer="Erik Satie" performer="Prodigal Procrastinator" @@ -32,7 +32,7 @@ <!-- https://musopen.org/music/2567-symphony-no-5-in-c-minor-op-67/ --> <AudioPlayer - src="tutorial/music/beethoven.mp3" + src="https://sveltejs.github.io/assets/music/beethoven.mp3" title="Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio" composer="Ludwig van Beethoven" performer="European Archive" @@ -40,7 +40,7 @@ <!-- https://musopen.org/music/43683-requiem-in-d-minor-k-626/ --> <AudioPlayer - src="tutorial/music/mozart.mp3" + src="https://sveltejs.github.io/assets/music/mozart.mp3" title="Requiem in D minor, K. 626 - III. Sequence - Lacrymosa" composer="Wolfgang Amadeus Mozart" performer="Markus Staab" diff --git a/site/content/examples/17-module-context/01-module-exports/AudioPlayer.svelte b/site/content/examples/18-module-context/01-module-exports/AudioPlayer.svelte similarity index 100% rename from site/content/examples/17-module-context/01-module-exports/AudioPlayer.svelte rename to site/content/examples/18-module-context/01-module-exports/AudioPlayer.svelte diff --git a/site/content/examples/17-module-context/01-module-exports/meta.json b/site/content/examples/18-module-context/01-module-exports/meta.json similarity index 100% rename from site/content/examples/17-module-context/01-module-exports/meta.json rename to site/content/examples/18-module-context/01-module-exports/meta.json diff --git a/site/content/examples/17-module-context/meta.json b/site/content/examples/18-module-context/meta.json similarity index 100% rename from site/content/examples/17-module-context/meta.json rename to site/content/examples/18-module-context/meta.json diff --git a/site/content/examples/18-debugging/00-debug/App.svelte b/site/content/examples/19-debugging/00-debug/App.svelte similarity index 100% rename from site/content/examples/18-debugging/00-debug/App.svelte rename to site/content/examples/19-debugging/00-debug/App.svelte diff --git a/site/content/examples/18-debugging/00-debug/meta.json b/site/content/examples/19-debugging/00-debug/meta.json similarity index 100% rename from site/content/examples/18-debugging/00-debug/meta.json rename to site/content/examples/19-debugging/00-debug/meta.json diff --git a/site/content/examples/18-debugging/meta.json b/site/content/examples/19-debugging/meta.json similarity index 100% rename from site/content/examples/18-debugging/meta.json rename to site/content/examples/19-debugging/meta.json diff --git a/site/content/examples/19-7guis/01-7guis-counter/App.svelte b/site/content/examples/20-7guis/01-7guis-counter/App.svelte similarity index 100% rename from site/content/examples/19-7guis/01-7guis-counter/App.svelte rename to site/content/examples/20-7guis/01-7guis-counter/App.svelte diff --git a/site/content/examples/19-7guis/01-7guis-counter/meta.json b/site/content/examples/20-7guis/01-7guis-counter/meta.json similarity index 100% rename from site/content/examples/19-7guis/01-7guis-counter/meta.json rename to site/content/examples/20-7guis/01-7guis-counter/meta.json diff --git a/site/content/examples/19-7guis/02-7guis-temperature/App.svelte b/site/content/examples/20-7guis/02-7guis-temperature/App.svelte similarity index 100% rename from site/content/examples/19-7guis/02-7guis-temperature/App.svelte rename to site/content/examples/20-7guis/02-7guis-temperature/App.svelte diff --git a/site/content/examples/19-7guis/02-7guis-temperature/meta.json b/site/content/examples/20-7guis/02-7guis-temperature/meta.json similarity index 100% rename from site/content/examples/19-7guis/02-7guis-temperature/meta.json rename to site/content/examples/20-7guis/02-7guis-temperature/meta.json diff --git a/site/content/examples/19-7guis/03-7guis-flight-booker/App.svelte b/site/content/examples/20-7guis/03-7guis-flight-booker/App.svelte similarity index 100% rename from site/content/examples/19-7guis/03-7guis-flight-booker/App.svelte rename to site/content/examples/20-7guis/03-7guis-flight-booker/App.svelte diff --git a/site/content/examples/19-7guis/03-7guis-flight-booker/meta.json b/site/content/examples/20-7guis/03-7guis-flight-booker/meta.json similarity index 100% rename from site/content/examples/19-7guis/03-7guis-flight-booker/meta.json rename to site/content/examples/20-7guis/03-7guis-flight-booker/meta.json diff --git a/site/content/examples/19-7guis/04-7guis-timer/App.svelte b/site/content/examples/20-7guis/04-7guis-timer/App.svelte similarity index 100% rename from site/content/examples/19-7guis/04-7guis-timer/App.svelte rename to site/content/examples/20-7guis/04-7guis-timer/App.svelte diff --git a/site/content/examples/19-7guis/04-7guis-timer/meta.json b/site/content/examples/20-7guis/04-7guis-timer/meta.json similarity index 100% rename from site/content/examples/19-7guis/04-7guis-timer/meta.json rename to site/content/examples/20-7guis/04-7guis-timer/meta.json diff --git a/site/content/examples/19-7guis/05-7guis-crud/App.svelte b/site/content/examples/20-7guis/05-7guis-crud/App.svelte similarity index 73% rename from site/content/examples/19-7guis/05-7guis-crud/App.svelte rename to site/content/examples/20-7guis/05-7guis-crud/App.svelte index 1f39fe6642..aec623d2a4 100644 --- a/site/content/examples/19-7guis/05-7guis-crud/App.svelte +++ b/site/content/examples/20-7guis/05-7guis-crud/App.svelte @@ -2,18 +2,9 @@ <script> let people = [ - { - first: 'Hans', - last: 'Emil' - }, - { - first: 'Max', - last: 'Mustermann' - }, - { - first: 'Roman', - last: 'Tisch' - } + { first: 'Hans', last: 'Emil' }, + { first: 'Max', last: 'Mustermann' }, + { first: 'Roman', last: 'Tisch' } ]; let prefix = ''; @@ -30,10 +21,7 @@ $: selected = filteredPeople[i]; - $: { - first = selected ? selected.first : ''; - last = selected ? selected.last : ''; - } + $: reset_inputs(selected); function create() { people = people.concat({ first, last }); @@ -42,18 +30,23 @@ } function update() { - people[i] = { first, last }; + selected.first = first; + selected.last = last; + people = people; } function remove() { - people = [...people.slice(0, i), ...people.slice(i + 1)]; + // Remove selected person from the source array (people), not the filtered array + const index = people.indexOf(selected); + people = [...people.slice(0, index), ...people.slice(index + 1)]; first = last = ''; - i = Math.min(i, people.length - 1); + i = Math.min(i, filteredPeople.length - 2); } function reset_inputs(person) { - ({ first, last } = person); + first = person ? person.first : ''; + last = person ? person.last : ''; } </script> diff --git a/site/content/examples/19-7guis/05-7guis-crud/meta.json b/site/content/examples/20-7guis/05-7guis-crud/meta.json similarity index 100% rename from site/content/examples/19-7guis/05-7guis-crud/meta.json rename to site/content/examples/20-7guis/05-7guis-crud/meta.json diff --git a/site/content/examples/19-7guis/06-7guis-circles/App.svelte b/site/content/examples/20-7guis/06-7guis-circles/App.svelte similarity index 100% rename from site/content/examples/19-7guis/06-7guis-circles/App.svelte rename to site/content/examples/20-7guis/06-7guis-circles/App.svelte diff --git a/site/content/examples/19-7guis/06-7guis-circles/meta.json b/site/content/examples/20-7guis/06-7guis-circles/meta.json similarity index 100% rename from site/content/examples/19-7guis/06-7guis-circles/meta.json rename to site/content/examples/20-7guis/06-7guis-circles/meta.json diff --git a/site/content/examples/19-7guis/meta.json b/site/content/examples/20-7guis/meta.json similarity index 100% rename from site/content/examples/19-7guis/meta.json rename to site/content/examples/20-7guis/meta.json diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/flash.js b/site/content/examples/20-miscellaneous/02-immutable-data/flash.js deleted file mode 100644 index 8dff9cbe2f..0000000000 --- a/site/content/examples/20-miscellaneous/02-immutable-data/flash.js +++ /dev/null @@ -1,11 +0,0 @@ -export default function flash(element) { - element.style.transition = 'none'; - element.style.color = 'rgba(255,62,0,1)'; - element.style.backgroundColor = 'rgba(255,62,0,0.2)'; - - setTimeout(() => { - element.style.transition = 'color 1s, background 1s'; - element.style.color = ''; - element.style.backgroundColor = ''; - }); -} \ No newline at end of file diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/App.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/App.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/App.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/App.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/Comment.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/Comment.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/Comment.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/Comment.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/Item.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/Item.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/List.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/List.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/List.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/List.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/Summary.svelte b/site/content/examples/21-miscellaneous/01-hacker-news/Summary.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/Summary.svelte rename to site/content/examples/21-miscellaneous/01-hacker-news/Summary.svelte diff --git a/site/content/examples/20-miscellaneous/01-hacker-news/meta.json b/site/content/examples/21-miscellaneous/01-hacker-news/meta.json similarity index 100% rename from site/content/examples/20-miscellaneous/01-hacker-news/meta.json rename to site/content/examples/21-miscellaneous/01-hacker-news/meta.json diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/App.svelte b/site/content/examples/21-miscellaneous/02-immutable-data/App.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/App.svelte rename to site/content/examples/21-miscellaneous/02-immutable-data/App.svelte diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/ImmutableTodo.svelte b/site/content/examples/21-miscellaneous/02-immutable-data/ImmutableTodo.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/ImmutableTodo.svelte rename to site/content/examples/21-miscellaneous/02-immutable-data/ImmutableTodo.svelte diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/MutableTodo.svelte b/site/content/examples/21-miscellaneous/02-immutable-data/MutableTodo.svelte similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/MutableTodo.svelte rename to site/content/examples/21-miscellaneous/02-immutable-data/MutableTodo.svelte diff --git a/site/content/examples/21-miscellaneous/02-immutable-data/flash.js b/site/content/examples/21-miscellaneous/02-immutable-data/flash.js new file mode 100644 index 0000000000..c788cc6d35 --- /dev/null +++ b/site/content/examples/21-miscellaneous/02-immutable-data/flash.js @@ -0,0 +1,13 @@ +export default function flash(element) { + requestAnimationFrame(() => { + element.style.transition = 'none'; + element.style.color = 'rgba(255,62,0,1)'; + element.style.backgroundColor = 'rgba(255,62,0,0.2)'; + + setTimeout(() => { + element.style.transition = 'color 1s, background 1s'; + element.style.color = ''; + element.style.backgroundColor = ''; + }); + }); +} \ No newline at end of file diff --git a/site/content/examples/20-miscellaneous/02-immutable-data/meta.json b/site/content/examples/21-miscellaneous/02-immutable-data/meta.json similarity index 100% rename from site/content/examples/20-miscellaneous/02-immutable-data/meta.json rename to site/content/examples/21-miscellaneous/02-immutable-data/meta.json diff --git a/site/content/examples/20-miscellaneous/meta.json b/site/content/examples/21-miscellaneous/meta.json similarity index 100% rename from site/content/examples/20-miscellaneous/meta.json rename to site/content/examples/21-miscellaneous/meta.json diff --git a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/App.svelte b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/App.svelte new file mode 100644 index 0000000000..ccb1ad8834 --- /dev/null +++ b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/App.svelte @@ -0,0 +1,10 @@ +<script> + import { comicSans, link } from './styles.js'; + import Hero from './Hero.svelte'; +</script> + +<Hero/> + +<div class={comicSans}> + <p>Did you enjoy your lunch, mom? You drank it fast enough. I know, I just call her Annabelle cause she's shaped like a…she's the belle of the ball! YOU'RE the Chiclet! Not me. Caw ca caw, caw ca caw, caw ca caw! A Colombian cartel that WON'T kidnap and kill you. You go buy a tape recorder and record yourself for a whole day. <a class={link} href="https://bluthipsum.com/">I think you'll be surprised at some of your phrasing.</a></p> +</div> \ No newline at end of file diff --git a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/Hero.svelte b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/Hero.svelte new file mode 100644 index 0000000000..9f60c276ce --- /dev/null +++ b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/Hero.svelte @@ -0,0 +1,15 @@ +<script> + import { title, comicSans, box } from './styles.js'; +</script> + +<div class="{title} {comicSans}"> + <h1> + <div class={box}> + <div class={box}> + <div class={box}>CSS</div> + in JS + </div> + in HTML + </div> + </h1> +</div> \ No newline at end of file diff --git a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/meta.json b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/meta.json new file mode 100644 index 0000000000..eaa2a1da63 --- /dev/null +++ b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/meta.json @@ -0,0 +1,3 @@ +{ + "title": "-" +} diff --git a/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/styles.js b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/styles.js new file mode 100644 index 0000000000..a18491b271 --- /dev/null +++ b/site/content/examples/99-embeds/20181225-blog-svelte-css-in-js/styles.js @@ -0,0 +1,35 @@ +import emotion from 'emotion/dist/emotion.umd.min.js'; + +const { css } = emotion; + +const brand = '#74D900'; + +export const title = css` + color: ${brand}; + font-size: 1em; + white-space: nowrap; +`; + +export const comicSans = css` + font-family: 'Comic Sans MS', cursive; +`; + +export const box = css` + position: relative; + display: inline-block; + border: 2px solid ${brand}; + line-height: 1; + padding: 4px; + border-radius: 4px; +`; + +export const link = css` + color: inherit; + font-weight: bold; + text-decoration: none; + border-bottom: 1px solid ${brand}; + &:hover { + text-decoration: none; + background: ${brand}; + } +`; diff --git a/site/content/examples/99-embeds/20190420-blog-write-less-code/App.svelte b/site/content/examples/99-embeds/20190420-blog-write-less-code/App.svelte new file mode 100644 index 0000000000..46cf93b0fc --- /dev/null +++ b/site/content/examples/99-embeds/20190420-blog-write-less-code/App.svelte @@ -0,0 +1,9 @@ +<script> + let a = 1; + let b = 2; +</script> + +<input type="number" bind:value={a}> +<input type="number" bind:value={b}> + +<p>{a} + {b} = {a + b}</p> \ No newline at end of file diff --git a/site/content/examples/99-embeds/20190420-blog-write-less-code/meta.json b/site/content/examples/99-embeds/20190420-blog-write-less-code/meta.json new file mode 100644 index 0000000000..eaa2a1da63 --- /dev/null +++ b/site/content/examples/99-embeds/20190420-blog-write-less-code/meta.json @@ -0,0 +1,3 @@ +{ + "title": "-" +} diff --git a/site/content/examples/99-embeds/meta.json b/site/content/examples/99-embeds/meta.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/site/content/examples/99-embeds/meta.json @@ -0,0 +1 @@ +{} diff --git a/site/content/tutorial/01-introduction/01-basics/text.md b/site/content/tutorial/01-introduction/01-basics/text.md index 95375edb25..c0fa2f48a3 100644 --- a/site/content/tutorial/01-introduction/01-basics/text.md +++ b/site/content/tutorial/01-introduction/01-basics/text.md @@ -29,4 +29,4 @@ Each tutorial chapter will have a 'Show me' button that you can click if you get ## Understanding components -In Svelte, an application is composed from one or more *components*. A component is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written into a `.svelte` file. The 'hello world' example on the right is a simple component. \ No newline at end of file +In Svelte, an application is composed from one or more *components*. A component is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written into a `.svelte` file. The 'hello world' example in the code editor is a simple component. diff --git a/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte b/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte index 6a12752e1a..e61b4d48e0 100644 --- a/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte +++ b/site/content/tutorial/01-introduction/03-dynamic-attributes/app-b/App.svelte @@ -3,4 +3,4 @@ let name = 'Rick Astley'; </script> -<img {src} alt="{name} dancing"> \ No newline at end of file +<img {src} alt="{name} dances."> diff --git a/site/content/tutorial/01-introduction/03-dynamic-attributes/text.md b/site/content/tutorial/01-introduction/03-dynamic-attributes/text.md index 6deaad5837..c503b4f548 100644 --- a/site/content/tutorial/01-introduction/03-dynamic-attributes/text.md +++ b/site/content/tutorial/01-introduction/03-dynamic-attributes/text.md @@ -16,13 +16,13 @@ That's better. But Svelte is giving us a warning: When building web apps, it's important to make sure that they're *accessible* to the broadest possible userbase, including people with (for example) impaired vision or motion, or people without powerful hardware or good internet connections. Accessibility (shortened to a11y) isn't always easy to get right, but Svelte will help by warning you if you write inaccessible markup. -In this case, we're missing the `alt` tag that describes the image for people using screenreaders, or people with slow or flaky internet connections that can't download the image. Let's add one: +In this case, we're missing the `alt` attribute that describes the image for people using screenreaders, or people with slow or flaky internet connections that can't download the image. Let's add one: ```html -<img src={src} alt="A man dancing"> +<img src={src} alt="A man dances."> ``` -We can use curly braces *inside* attributes. Try changing it to `"{name} dancing"` — remember to declare a `name` variable in the `<script>` block. +We can use curly braces *inside* attributes. Try changing it to `"{name} dances."` — remember to declare a `name` variable in the `<script>` block. ## Shorthand attributes @@ -30,6 +30,6 @@ We can use curly braces *inside* attributes. Try changing it to `"{name} dancing It's not uncommon to have an attribute where the name and value are the same, like `src={src}`. Svelte gives us a convenient shorthand for these cases: ```html -<img {src} alt="A man dancing"> +<img {src} alt="A man dances."> ``` diff --git a/site/content/tutorial/01-introduction/04-styling/app-b/App.svelte b/site/content/tutorial/01-introduction/04-styling/app-b/App.svelte index ab87af83d8..5feb02e701 100644 --- a/site/content/tutorial/01-introduction/04-styling/app-b/App.svelte +++ b/site/content/tutorial/01-introduction/04-styling/app-b/App.svelte @@ -1,7 +1,7 @@ <style> p { color: purple; - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; } </style> diff --git a/site/content/tutorial/01-introduction/04-styling/text.md b/site/content/tutorial/01-introduction/04-styling/text.md index 9f285d2f51..71d031dcab 100644 --- a/site/content/tutorial/01-introduction/04-styling/text.md +++ b/site/content/tutorial/01-introduction/04-styling/text.md @@ -8,7 +8,7 @@ Just like in HTML, you can add a `<style>` tag to your component. Let's add some <style> p { color: purple; - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; } </style> diff --git a/site/content/tutorial/01-introduction/05-nested-components/app-a/App.svelte b/site/content/tutorial/01-introduction/05-nested-components/app-a/App.svelte index ab87af83d8..5feb02e701 100644 --- a/site/content/tutorial/01-introduction/05-nested-components/app-a/App.svelte +++ b/site/content/tutorial/01-introduction/05-nested-components/app-a/App.svelte @@ -1,7 +1,7 @@ <style> p { color: purple; - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; } </style> diff --git a/site/content/tutorial/01-introduction/05-nested-components/app-b/App.svelte b/site/content/tutorial/01-introduction/05-nested-components/app-b/App.svelte index 9ba76665bf..f553eed355 100644 --- a/site/content/tutorial/01-introduction/05-nested-components/app-b/App.svelte +++ b/site/content/tutorial/01-introduction/05-nested-components/app-b/App.svelte @@ -5,7 +5,7 @@ <style> p { color: purple; - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; } </style> diff --git a/site/content/tutorial/01-introduction/06-html-tags/text.md b/site/content/tutorial/01-introduction/06-html-tags/text.md index fdc8a576ff..ff547247e2 100644 --- a/site/content/tutorial/01-introduction/06-html-tags/text.md +++ b/site/content/tutorial/01-introduction/06-html-tags/text.md @@ -12,4 +12,4 @@ In Svelte, you do this with the special `{@html ...}` tag: <p>{@html string}</p> ``` -> Svelte doesn't perform any sanitization of the data before it gets inserted into the DOM. In other words, it's critical that you manually escape HTML that comes from sources you don't trust, otherwise you risk exposing your users to XSS attacks. \ No newline at end of file +> Svelte doesn't perform any sanitization of the expression inside `{@html ...}` before it gets inserted into the DOM. In other words, if you use this feature it's critical that you manually escape HTML that comes from sources you don't trust, otherwise you risk exposing your users to XSS attacks. diff --git a/site/content/tutorial/01-introduction/07-making-an-app/text.md b/site/content/tutorial/01-introduction/07-making-an-app/text.md index f8755ef532..4d044272b5 100644 --- a/site/content/tutorial/01-introduction/07-making-an-app/text.md +++ b/site/content/tutorial/01-introduction/07-making-an-app/text.md @@ -4,11 +4,12 @@ title: Making an app This tutorial is designed to get you familiar with the process of writing components. But at some point, you'll want to start writing components in the comfort of your own text editor. -First, you'll need to integrate Svelte with a build tool. Popular choices are: +First, you'll need to integrate Svelte with a build tool. There are officially maintained plugins for [Rollup](https://rollupjs.org) and [webpack](https://webpack.js.org/)... -* [Rollup](https://rollupjs.org) / [rollup-plugin-svelte](https://github.com/rollup/rollup-plugin-svelte) -* [webpack](https://webpack.js.org/) / [svelte-loader](https://github.com/sveltejs/svelte-loader) -* [Parcel](https://parceljs.org/) / [parcel-plugin-svelte](https://github.com/DeMoorJasper/parcel-plugin-svelte) +* [rollup-plugin-svelte](https://github.com/sveltejs/rollup-plugin-svelte) +* [svelte-loader](https://github.com/sveltejs/svelte-loader) + +...and a variety of [community-maintained ones](https://github.com/sveltejs/integrations#bundler-plugins). Don't worry if you're relatively new to web development and haven't used these tools before. We've prepared a simple step-by-step guide, [Svelte for new developers](blog/svelte-for-new-developers), which walks you through the process. diff --git a/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md b/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md index 365908cf22..027a91a44a 100644 --- a/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md +++ b/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md @@ -11,7 +11,7 @@ let count = 0; $: doubled = count * 2; ``` -> Don't worry if this looks a little alien. It's valid (if unconventional) JavaScript, which Svelte interprets to mean 're-run this code whenever any of the referenced values change'. Once you get used to it, there's no going back. +> Don't worry if this looks a little alien. It's [valid](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label) (if unconventional) JavaScript, which Svelte interprets to mean 're-run this code whenever any of the referenced values change'. Once you get used to it, there's no going back. Let's use `doubled` in our markup: @@ -19,4 +19,4 @@ Let's use `doubled` in our markup: <p>{count} doubled is {doubled}</p> ``` -Of course, you could just write `{count * 2}` in the markup instead — you don't have to use reactive values. Reactive values become particularly valuable when you need to reference them multiple times, or you have values that depend on *other* reactive values. \ No newline at end of file +Of course, you could just write `{count * 2}` in the markup instead — you don't have to use reactive values. Reactive values become particularly valuable when you need to reference them multiple times, or you have values that depend on *other* reactive values. diff --git a/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md b/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md index 0a78c7ca32..82e4c91d35 100644 --- a/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md +++ b/site/content/tutorial/02-reactivity/04-updating-arrays-and-objects/text.md @@ -13,7 +13,7 @@ function addNumber() { } ``` -But there's a more *idiomatic* solution: +But there's a more idiomatic solution: ```js function addNumber() { @@ -23,4 +23,19 @@ function addNumber() { You can use similar patterns to replace `pop`, `shift`, `unshift` and `splice`. -> Assignments to *properties* of arrays and objects — e.g. `obj.foo += 1` or `array[i] = x` — work the same way as assignments to the values themselves. +Assignments to *properties* of arrays and objects — e.g. `obj.foo += 1` or `array[i] = x` — work the same way as assignments to the values themselves. + +```js +function addNumber() { + numbers[numbers.length] = numbers.length + 1; +} +``` + +A simple rule of thumb: the name of the updated variable must appear on the left hand side of the assignment. For example this... + +```js +const foo = obj.foo; +foo.bar = 'baz'; +``` + +...won't update references to `obj.foo.bar`, unless you follow it up with `obj = obj`. \ No newline at end of file diff --git a/site/content/tutorial/03-props/02-default-values/text.md b/site/content/tutorial/03-props/02-default-values/text.md index dda6a370fe..1532407380 100644 --- a/site/content/tutorial/03-props/02-default-values/text.md +++ b/site/content/tutorial/03-props/02-default-values/text.md @@ -10,9 +10,9 @@ We can easily specify default values for props: </script> ``` -If we now instantiate the component without an `answer` prop, it will fall back to the default: +If we now add a second component *without* an `answer` prop, it will fall back to the default: ```html <Nested answer={42}/> <Nested/> -``` \ No newline at end of file +``` diff --git a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/App.svelte b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/App.svelte index 3d4a2c801d..7cb18e2cda 100644 --- a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/App.svelte +++ b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/App.svelte @@ -2,11 +2,11 @@ import Thing from './Thing.svelte'; let things = [ - { id: 1, value: 'a' }, - { id: 2, value: 'b' }, - { id: 3, value: 'c' }, - { id: 4, value: 'd' }, - { id: 5, value: 'e' } + { id: 1, color: '#0d0887' }, + { id: 2, color: '#6a00a8' }, + { id: 3, color: '#b12a90' }, + { id: 4, color: '#e16462' }, + { id: 5, color: '#fca636' } ]; function handleClick() { @@ -19,5 +19,5 @@ </button> {#each things as thing} - <Thing value={thing.value}/> + <Thing current={thing.color}/> {/each} \ No newline at end of file diff --git a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte index 4e86d32109..28c3c65d05 100644 --- a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte +++ b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte @@ -1,9 +1,24 @@ <script> - // `value` is updated whenever the prop value changes... - export let value; + // `current` is updated whenever the prop value changes... + export let current; - // ...but `valueAtStart` is fixed upon initialisation - const valueAtStart = value; + // ...but `initial` is fixed upon initialisation + const initial = current; </script> -<p>{valueAtStart} / {value}</p> \ No newline at end of file +<p> + <span style="background-color: {initial}">initial</span> + <span style="background-color: {current}">current</span> +</p> + +<style> + span { + display: inline-block; + padding: 0.2em 0.5em; + margin: 0 0.2em 0.2em 0; + width: 4em; + text-align: center; + border-radius: 0.2em; + color: white; + } +</style> \ No newline at end of file diff --git a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/App.svelte b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/App.svelte index 73a2dcc609..48a2151875 100644 --- a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/App.svelte +++ b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/App.svelte @@ -2,11 +2,11 @@ import Thing from './Thing.svelte'; let things = [ - { id: 1, value: 'a' }, - { id: 2, value: 'b' }, - { id: 3, value: 'c' }, - { id: 4, value: 'd' }, - { id: 5, value: 'e' } + { id: 1, color: '#0d0887' }, + { id: 2, color: '#6a00a8' }, + { id: 3, color: '#b12a90' }, + { id: 4, color: '#e16462' }, + { id: 5, color: '#fca636' } ]; function handleClick() { @@ -19,5 +19,5 @@ </button> {#each things as thing (thing.id)} - <Thing value={thing.value}/> + <Thing current={thing.color}/> {/each} \ No newline at end of file diff --git a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte index 4e86d32109..28c3c65d05 100644 --- a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte +++ b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte @@ -1,9 +1,24 @@ <script> - // `value` is updated whenever the prop value changes... - export let value; + // `current` is updated whenever the prop value changes... + export let current; - // ...but `valueAtStart` is fixed upon initialisation - const valueAtStart = value; + // ...but `initial` is fixed upon initialisation + const initial = current; </script> -<p>{valueAtStart} / {value}</p> \ No newline at end of file +<p> + <span style="background-color: {initial}">initial</span> + <span style="background-color: {current}">current</span> +</p> + +<style> + span { + display: inline-block; + padding: 0.2em 0.5em; + margin: 0 0.2em 0.2em 0; + width: 4em; + text-align: center; + border-radius: 0.2em; + color: white; + } +</style> \ No newline at end of file diff --git a/site/content/tutorial/04-logic/05-keyed-each-blocks/text.md b/site/content/tutorial/04-logic/05-keyed-each-blocks/text.md index e8bac7d8df..4affb89cd6 100644 --- a/site/content/tutorial/04-logic/05-keyed-each-blocks/text.md +++ b/site/content/tutorial/04-logic/05-keyed-each-blocks/text.md @@ -4,16 +4,16 @@ title: Keyed each blocks By default, when you modify the value of an `each` block, it will add and remove items at the *end* of the block, and update any values that have changed. That might not be what you want. -It's easier to show why than to explain. Click the 'Remove first item' button a few times, and notice that it's removing `<Thing>` components from the end and updating the `value` for those that remain. Instead, we'd like to remove the first `<Thing>` component and leave the rest unaffected. +It's easier to show why than to explain. Click the 'Remove first thing' button a few times, and notice that it's removing `<Thing>` components from the end and updating the `color` for those that remain. Instead, we'd like to remove the first `<Thing>` component and leave the rest unaffected. To do that, we specify a unique identifier for the `each` block: ```html {#each things as thing (thing.id)} - <Thing value={thing.value}/> + <Thing current={thing.color}/> {/each} ``` The `(thing.id)` tells Svelte how to figure out what changed. -> You can use any object as the key, as Svelte uses a `Map` internally — in other words you could do `(thing)` instead of `(thing.id)`. Using a string or number is generally safer, however, since it means identity persists without referential equality, for example when updating with fresh data from an API server. \ No newline at end of file +> You can use any object as the key, as Svelte uses a `Map` internally — in other words you could do `(thing)` instead of `(thing.id)`. Using a string or number is generally safer, however, since it means identity persists without referential equality, for example when updating with fresh data from an API server. diff --git a/site/content/tutorial/05-events/03-event-modifiers/text.md b/site/content/tutorial/05-events/03-event-modifiers/text.md index 05a2d8c5fb..41154cafcd 100644 --- a/site/content/tutorial/05-events/03-event-modifiers/text.md +++ b/site/content/tutorial/05-events/03-event-modifiers/text.md @@ -18,10 +18,11 @@ DOM event handlers can have *modifiers* that alter their behaviour. For example, The full list of modifiers: -* `preventDefault` — calls `event.preventDefault()` before running the handler. Useful for e.g. client-side form handling +* `preventDefault` — calls `event.preventDefault()` before running the handler. Useful for client-side form handling, for example. * `stopPropagation` — calls `event.stopPropagation()`, preventing the event reaching the next element * `passive` — improves scrolling performance on touch/wheel events (Svelte will add it automatically where it's safe to do so) * `capture` — fires the handler during the *capture* phase instead of the *bubbling* phase ([MDN docs](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture)) * `once` — remove the handler after the first time it runs +* `self` — only trigger handler if event.target is the element itself -You can chain modifiers together, e.g. `on:click|once|capture={...}`. \ No newline at end of file +You can chain modifiers together, e.g. `on:click|once|capture={...}`. diff --git a/site/content/tutorial/05-events/06-dom-event-forwarding/app-a/FancyButton.svelte b/site/content/tutorial/05-events/06-dom-event-forwarding/app-a/FancyButton.svelte index 9c3ae75809..b75f19a1f2 100644 --- a/site/content/tutorial/05-events/06-dom-event-forwarding/app-a/FancyButton.svelte +++ b/site/content/tutorial/05-events/06-dom-event-forwarding/app-a/FancyButton.svelte @@ -1,6 +1,6 @@ <style> button { - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; padding: 0.5em 1em; color: royalblue; diff --git a/site/content/tutorial/05-events/06-dom-event-forwarding/app-b/FancyButton.svelte b/site/content/tutorial/05-events/06-dom-event-forwarding/app-b/FancyButton.svelte index 75630ea99c..68dcc68636 100644 --- a/site/content/tutorial/05-events/06-dom-event-forwarding/app-b/FancyButton.svelte +++ b/site/content/tutorial/05-events/06-dom-event-forwarding/app-b/FancyButton.svelte @@ -1,6 +1,6 @@ <style> button { - font-family: 'Comic Sans MS'; + font-family: 'Comic Sans MS', cursive; font-size: 2em; padding: 0.5em 1em; color: royalblue; diff --git a/site/content/tutorial/06-bindings/01-text-inputs/text.md b/site/content/tutorial/06-bindings/01-text-inputs/text.md index 0082586133..7bfe4bb86c 100644 --- a/site/content/tutorial/06-bindings/01-text-inputs/text.md +++ b/site/content/tutorial/06-bindings/01-text-inputs/text.md @@ -4,7 +4,7 @@ title: Text inputs As a general rule, data flow in Svelte is *top down* — a parent component can set props on a child component, and a component can set attributes on an element, but not the other way around. -Sometimes it's useful to break that rule. Take the case of the `<input>` element in this component — we *could* add an `on:input` event handler that set the value of `name` to `event.target.value`, but it's a bit... boilerplatey. It gets even worse with other kinds of form element, as we'll see. +Sometimes it's useful to break that rule. Take the case of the `<input>` element in this component — we *could* add an `on:input` event handler that sets the value of `name` to `event.target.value`, but it's a bit... boilerplatey. It gets even worse with other form elements, as we'll see. Instead, we can use the `bind:value` directive: @@ -12,4 +12,4 @@ Instead, we can use the `bind:value` directive: <input bind:value={name}> ``` -This means that not only will changes to the value of `name` update the input value, but changes to the input value will update `name`. \ No newline at end of file +This means that not only will changes to the value of `name` update the input value, but changes to the input value will update `name`. diff --git a/site/content/tutorial/06-bindings/08-contenteditable-bindings/app-a/App.svelte b/site/content/tutorial/06-bindings/08-contenteditable-bindings/app-a/App.svelte new file mode 100644 index 0000000000..55d699959c --- /dev/null +++ b/site/content/tutorial/06-bindings/08-contenteditable-bindings/app-a/App.svelte @@ -0,0 +1,15 @@ +<script> + let html = '<p>Write some text!</p>'; +</script> + +<div contenteditable="true"></div> + +<pre>{html}</pre> + +<style> + [contenteditable] { + padding: 0.5em; + border: 1px solid #eee; + border-radius: 4px; + } +</style> \ No newline at end of file diff --git a/site/content/tutorial/06-bindings/08-contenteditable-bindings/app-b/App.svelte b/site/content/tutorial/06-bindings/08-contenteditable-bindings/app-b/App.svelte new file mode 100644 index 0000000000..ee97cf19c0 --- /dev/null +++ b/site/content/tutorial/06-bindings/08-contenteditable-bindings/app-b/App.svelte @@ -0,0 +1,18 @@ +<script> + let html = '<p>Write some text!</p>'; +</script> + +<div + contenteditable="true" + bind:innerHTML={html} +></div> + +<pre>{html}</pre> + +<style> + [contenteditable] { + padding: 0.5em; + border: 1px solid #eee; + border-radius: 4px; + } +</style> \ No newline at end of file diff --git a/site/content/tutorial/06-bindings/08-contenteditable-bindings/text.md b/site/content/tutorial/06-bindings/08-contenteditable-bindings/text.md new file mode 100644 index 0000000000..a73b07c0ba --- /dev/null +++ b/site/content/tutorial/06-bindings/08-contenteditable-bindings/text.md @@ -0,0 +1,12 @@ +--- +title: Contenteditable bindings +--- + +Elements with a `contenteditable="true"` attribute support `textContent` and `innerHTML` bindings: + +```html +<div + contenteditable="true" + bind:innerHTML={html} +></div> +``` \ No newline at end of file diff --git a/site/content/tutorial/06-bindings/08-each-block-bindings/app-a/App.svelte b/site/content/tutorial/06-bindings/09-each-block-bindings/app-a/App.svelte similarity index 100% rename from site/content/tutorial/06-bindings/08-each-block-bindings/app-a/App.svelte rename to site/content/tutorial/06-bindings/09-each-block-bindings/app-a/App.svelte diff --git a/site/content/tutorial/06-bindings/08-each-block-bindings/app-b/App.svelte b/site/content/tutorial/06-bindings/09-each-block-bindings/app-b/App.svelte similarity index 100% rename from site/content/tutorial/06-bindings/08-each-block-bindings/app-b/App.svelte rename to site/content/tutorial/06-bindings/09-each-block-bindings/app-b/App.svelte diff --git a/site/content/tutorial/06-bindings/08-each-block-bindings/text.md b/site/content/tutorial/06-bindings/09-each-block-bindings/text.md similarity index 100% rename from site/content/tutorial/06-bindings/08-each-block-bindings/text.md rename to site/content/tutorial/06-bindings/09-each-block-bindings/text.md diff --git a/site/content/tutorial/06-bindings/09-media-elements/app-a/App.svelte b/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte similarity index 92% rename from site/content/tutorial/06-bindings/09-media-elements/app-a/App.svelte rename to site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte index ec01cd5476..40276110f4 100644 --- a/site/content/tutorial/06-bindings/09-media-elements/app-a/App.svelte +++ b/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte @@ -14,7 +14,7 @@ showControlsTimeout = setTimeout(() => showControls = false, 2500); showControls = true; - if (e.which !== 1) return; // mouse not down + if (!(e.buttons & 1)) return; // mouse not down if (!duration) return; // video not loaded yet const { left, right } = this.getBoundingClientRect(); @@ -109,8 +109,8 @@ <div> <video - poster="https://svelte-assets.surge.sh/caminandes-llamigos.jpg" - src="https://svelte-assets.surge.sh/caminandes-llamigos.mp4" + poster="https://sveltejs.github.io/assets/caminandes-llamigos.jpg" + src="https://sveltejs.github.io/assets/caminandes-llamigos.mp4" on:mousemove={handleMousemove} on:mousedown={handleMousedown} ></video> @@ -124,4 +124,4 @@ <span class="time">{format(duration)}</span> </div> </div> -</div> \ No newline at end of file +</div> diff --git a/site/content/tutorial/06-bindings/09-media-elements/app-b/App.svelte b/site/content/tutorial/06-bindings/10-media-elements/app-b/App.svelte similarity index 93% rename from site/content/tutorial/06-bindings/09-media-elements/app-b/App.svelte rename to site/content/tutorial/06-bindings/10-media-elements/app-b/App.svelte index c304581a77..8712d6718b 100644 --- a/site/content/tutorial/06-bindings/09-media-elements/app-b/App.svelte +++ b/site/content/tutorial/06-bindings/10-media-elements/app-b/App.svelte @@ -14,7 +14,7 @@ showControlsTimeout = setTimeout(() => showControls = false, 2500); showControls = true; - if (e.which !== 1) return; // mouse not down + if (!(e.buttons & 1)) return; // mouse not down if (!duration) return; // video not loaded yet const { left, right } = this.getBoundingClientRect(); @@ -109,8 +109,8 @@ <div> <video - poster="https://svelte-assets.surge.sh/caminandes-llamigos.jpg" - src="https://svelte-assets.surge.sh/caminandes-llamigos.mp4" + poster="https://sveltejs.github.io/assets/caminandes-llamigos.jpg" + src="https://sveltejs.github.io/assets/caminandes-llamigos.mp4" on:mousemove={handleMousemove} on:mousedown={handleMousedown} bind:currentTime={time} diff --git a/site/content/tutorial/06-bindings/09-media-elements/text.md b/site/content/tutorial/06-bindings/10-media-elements/text.md similarity index 78% rename from site/content/tutorial/06-bindings/09-media-elements/text.md rename to site/content/tutorial/06-bindings/10-media-elements/text.md index 32e7fa17b8..f08f3975d7 100644 --- a/site/content/tutorial/06-bindings/09-media-elements/text.md +++ b/site/content/tutorial/06-bindings/10-media-elements/text.md @@ -8,8 +8,8 @@ On line 116, add `currentTime={time}`, `duration` and `paused` bindings: ```html <video - poster="http://svelte-assets.surge.sh/caminandes-llamigos.jpg" - src="http://svelte-assets.surge.sh/caminandes-llamigos.mp4" + poster="https://sveltejs.github.io/assets/caminandes-llamigos.jpg" + src="https://sveltejs.github.io/assets/caminandes-llamigos.mp4" on:mousemove={handleMousemove} on:mousedown={handleMousedown} bind:currentTime={time} @@ -24,16 +24,20 @@ Now, when you click on the video, it will update `time`, `duration` and `paused` > Ordinarily on the web, you would track `currentTime` by listening for `timeupdate` events. But these events fire too infrequently, resulting in choppy UI. Svelte does better — it checks `currentTime` using `requestAnimationFrame`. -The complete set of bindings for `<audio>` and `<video>` is as follows — four *readonly* bindings... +The complete set of bindings for `<audio>` and `<video>` is as follows — six *readonly* bindings... * `duration` (readonly) — the total duration of the video, in seconds * `buffered` (readonly) — an array of `{start, end}` objects * `seekable` (readonly) — ditto * `played` (readonly) — ditto +* `seeking` (readonly) — boolean +* `ended` (readonly) — boolean ...and four *two-way* bindings: * `currentTime` — the current point in the video, in seconds * `playbackRate` — how fast to play the video, where `1` is 'normal' * `paused` — this one should be self-explanatory -* `volume` — a value between 0 and 1 \ No newline at end of file +* `volume` — a value between 0 and 1 + +Videos additionally have readonly `videoWidth` and `videoHeight` bindings. \ No newline at end of file diff --git a/site/content/tutorial/06-bindings/10-dimensions/app-a/App.svelte b/site/content/tutorial/06-bindings/11-dimensions/app-a/App.svelte similarity index 88% rename from site/content/tutorial/06-bindings/10-dimensions/app-a/App.svelte rename to site/content/tutorial/06-bindings/11-dimensions/app-a/App.svelte index 59e11c79f0..62e92cd536 100644 --- a/site/content/tutorial/06-bindings/10-dimensions/app-a/App.svelte +++ b/site/content/tutorial/06-bindings/11-dimensions/app-a/App.svelte @@ -8,6 +8,7 @@ <style> input { display: block; } div { display: inline-block; } + span { word-break: break-all; } </style> <input type=range bind:value={size}> diff --git a/site/content/tutorial/06-bindings/10-dimensions/app-b/App.svelte b/site/content/tutorial/06-bindings/11-dimensions/app-b/App.svelte similarity index 89% rename from site/content/tutorial/06-bindings/10-dimensions/app-b/App.svelte rename to site/content/tutorial/06-bindings/11-dimensions/app-b/App.svelte index ca992599c1..920c74d276 100644 --- a/site/content/tutorial/06-bindings/10-dimensions/app-b/App.svelte +++ b/site/content/tutorial/06-bindings/11-dimensions/app-b/App.svelte @@ -8,6 +8,7 @@ <style> input { display: block; } div { display: inline-block; } + span { word-break: break-all; } </style> <input type=range bind:value={size}> diff --git a/site/content/tutorial/06-bindings/10-dimensions/text.md b/site/content/tutorial/06-bindings/11-dimensions/text.md similarity index 100% rename from site/content/tutorial/06-bindings/10-dimensions/text.md rename to site/content/tutorial/06-bindings/11-dimensions/text.md diff --git a/site/content/tutorial/06-bindings/11-bind-this/app-a/App.svelte b/site/content/tutorial/06-bindings/12-bind-this/app-a/App.svelte similarity index 89% rename from site/content/tutorial/06-bindings/11-bind-this/app-a/App.svelte rename to site/content/tutorial/06-bindings/12-bind-this/app-a/App.svelte index c85cab9225..d40c45ef6c 100644 --- a/site/content/tutorial/06-bindings/11-bind-this/app-a/App.svelte +++ b/site/content/tutorial/06-bindings/12-bind-this/app-a/App.svelte @@ -43,8 +43,8 @@ width: 100%; height: 100%; background-color: #666; - -webkit-mask: url(logo-mask.svg) 50% 50% no-repeat; - mask: url(logo-mask.svg) 50% 50% no-repeat; + -webkit-mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; + mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; } </style> diff --git a/site/content/tutorial/06-bindings/11-bind-this/app-b/App.svelte b/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte similarity index 89% rename from site/content/tutorial/06-bindings/11-bind-this/app-b/App.svelte rename to site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte index 9a8fabc265..8e4b3c5bef 100644 --- a/site/content/tutorial/06-bindings/11-bind-this/app-b/App.svelte +++ b/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte @@ -43,8 +43,8 @@ width: 100%; height: 100%; background-color: #666; - -webkit-mask: url(logo-mask.svg) 50% 50% no-repeat; - mask: url(logo-mask.svg) 50% 50% no-repeat; + -webkit-mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; + mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; } </style> diff --git a/site/content/tutorial/06-bindings/11-bind-this/text.md b/site/content/tutorial/06-bindings/12-bind-this/text.md similarity index 71% rename from site/content/tutorial/06-bindings/11-bind-this/text.md rename to site/content/tutorial/06-bindings/12-bind-this/text.md index 25a7bc9169..4784b6b13f 100644 --- a/site/content/tutorial/06-bindings/11-bind-this/text.md +++ b/site/content/tutorial/06-bindings/12-bind-this/text.md @@ -2,14 +2,14 @@ title: This --- -The readonly `this` binding applies to every element (and component) and allows to you obtain a reference to rendered elements. For example, we can get a reference to a `<canvas>` element: +The readonly `this` binding applies to every element (and component) and allows you to obtain a reference to rendered elements. For example, we can get a reference to a `<canvas>` element: ```html <canvas bind:this={canvas} - width={256} - height={256} + width={32} + height={32} ></canvas> ``` -Note that the value of `canvas` will be `undefined` until the component has mounted, so we put the logic inside the `onMount` [lifecycle function](tutorial/onmount). \ No newline at end of file +Note that the value of `canvas` will be `undefined` until the component has mounted, so we put the logic inside the `onMount` [lifecycle function](tutorial/onmount). diff --git a/site/content/tutorial/06-bindings/12-component-bindings/app-a/App.svelte b/site/content/tutorial/06-bindings/13-component-bindings/app-a/App.svelte similarity index 100% rename from site/content/tutorial/06-bindings/12-component-bindings/app-a/App.svelte rename to site/content/tutorial/06-bindings/13-component-bindings/app-a/App.svelte diff --git a/site/content/tutorial/06-bindings/12-component-bindings/app-a/Keypad.svelte b/site/content/tutorial/06-bindings/13-component-bindings/app-a/Keypad.svelte similarity index 100% rename from site/content/tutorial/06-bindings/12-component-bindings/app-a/Keypad.svelte rename to site/content/tutorial/06-bindings/13-component-bindings/app-a/Keypad.svelte diff --git a/site/content/tutorial/06-bindings/12-component-bindings/app-b/App.svelte b/site/content/tutorial/06-bindings/13-component-bindings/app-b/App.svelte similarity index 100% rename from site/content/tutorial/06-bindings/12-component-bindings/app-b/App.svelte rename to site/content/tutorial/06-bindings/13-component-bindings/app-b/App.svelte diff --git a/site/content/tutorial/06-bindings/12-component-bindings/app-b/Keypad.svelte b/site/content/tutorial/06-bindings/13-component-bindings/app-b/Keypad.svelte similarity index 100% rename from site/content/tutorial/06-bindings/12-component-bindings/app-b/Keypad.svelte rename to site/content/tutorial/06-bindings/13-component-bindings/app-b/Keypad.svelte diff --git a/site/content/tutorial/06-bindings/12-component-bindings/text.md b/site/content/tutorial/06-bindings/13-component-bindings/text.md similarity index 100% rename from site/content/tutorial/06-bindings/12-component-bindings/text.md rename to site/content/tutorial/06-bindings/13-component-bindings/text.md diff --git a/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte b/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte index 2081b6ab8c..d8c4caabef 100644 --- a/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte +++ b/site/content/tutorial/07-lifecycle/03-update/app-a/App.svelte @@ -1,5 +1,5 @@ <script> - import Eliza from 'elizanode'; + import Eliza from 'elizabot'; import { beforeUpdate, afterUpdate } from 'svelte'; let div; @@ -88,6 +88,7 @@ background-color: #0074D9; color: white; border-radius: 1em 1em 0 1em; + word-break: break-all; } </style> diff --git a/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte b/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte index 373b6dcb6a..bdf42e28a9 100644 --- a/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte +++ b/site/content/tutorial/07-lifecycle/03-update/app-b/App.svelte @@ -1,5 +1,5 @@ <script> - import Eliza from 'elizanode'; + import Eliza from 'elizabot'; import { beforeUpdate, afterUpdate } from 'svelte'; let div; @@ -88,6 +88,7 @@ background-color: #0074D9; color: white; border-radius: 1em 1em 0 1em; + word-break: break-all; } </style> diff --git a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md index 87306f3354..af584261f4 100644 --- a/site/content/tutorial/08-stores/02-auto-subscriptions/text.md +++ b/site/content/tutorial/08-stores/02-auto-subscriptions/text.md @@ -39,6 +39,8 @@ It starts to get a bit boilerplatey though, especially if your component subscri <h1>The count is {$count}</h1> ``` +> Auto-subscription only works with store variables that are declared (or imported) at the top-level scope of a component. + You're not limited to using `$count` inside the markup, either — you can use it anywhere in the `<script>` as well, such as in event handlers or reactive declarations. > Any name beginning with `$` is assumed to refer to a store value. It's effectively a reserved character — Svelte will prevent you from declaring your own variables with a `$` prefix. \ No newline at end of file diff --git a/site/content/tutorial/09-motion/01-tweened/text.md b/site/content/tutorial/09-motion/01-tweened/text.md index def011c993..50cd0c2fba 100644 --- a/site/content/tutorial/09-motion/01-tweened/text.md +++ b/site/content/tutorial/09-motion/01-tweened/text.md @@ -28,7 +28,7 @@ Clicking the buttons causes the progress bar to animate to its new value. It's a </script> ``` -> The `svelte/easing` module contains the [Penner easing equations](http://robertpenner.com/easing/), or you can supply your own `p => t` function where `p` and `t` are both values between 0 and 1. +> The `svelte/easing` module contains the [Penner easing equations](https://web.archive.org/web/20190805215728/http://robertpenner.com/easing/), or you can supply your own `p => t` function where `p` and `t` are both values between 0 and 1. The full set of options available to `tweened`: @@ -37,4 +37,4 @@ The full set of options available to `tweened`: * `easing` — a `p => t` function * `interpolate` — a custom `(from, to) => t => value` function for interpolating between arbitrary values. By default, Svelte will interpolate between numbers, dates, and identically-shaped arrays and objects (as long as they only contain numbers and dates or other valid arrays and objects). If you want to interpolate (for example) colour strings or transformation matrices, supply a custom interpolator -You can also pass these options to `progress.set` and `progress.update` as a second argument, in which case they will override the defaults. The `set` and `update` methods both return a promise that resolves when the tween completes. \ No newline at end of file +You can also pass these options to `progress.set` and `progress.update` as a second argument, in which case they will override the defaults. The `set` and `update` methods both return a promise that resolves when the tween completes. diff --git a/site/content/tutorial/10-transitions/03-in-and-out/text.md b/site/content/tutorial/10-transitions/03-in-and-out/text.md index 21cb221342..1f1ac2c80b 100644 --- a/site/content/tutorial/10-transitions/03-in-and-out/text.md +++ b/site/content/tutorial/10-transitions/03-in-and-out/text.md @@ -2,7 +2,13 @@ title: In and out --- -Instead of the `transition` directive, an element can have an `in` or an `out` directive, or both together: +Instead of the `transition` directive, an element can have an `in` or an `out` directive, or both together. Import `fade` alongside `fly`... + +```js +import { fade, fly } from 'svelte/transition'; +``` + +...then replace the `transition` directive with separate `in` and `out` directives: ```html <p in:fly="{{ y: 200, duration: 2000 }}" out:fade> diff --git a/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md b/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md index 4bae964c4c..0745a5924d 100644 --- a/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md +++ b/site/content/tutorial/10-transitions/04-custom-css-transitions/text.md @@ -31,7 +31,7 @@ The `t` value is `0` at the beginning of an intro or the end of an outro, and `1 Most of the time you should return the `css` property and *not* the `tick` property, as CSS animations run off the main thread to prevent jank where possible. Svelte 'simulates' the transition and constructs a CSS animation, then lets it run. -For example the `fade` transition generates a CSS animation somewhat like this: +For example, the `fade` transition generates a CSS animation somewhat like this: ```css 0% { opacity: 0 } @@ -69,4 +69,4 @@ We can get a lot more creative though. Let's make something truly gratuitous: </script> ``` -Remember: with great power comes great responsibility. \ No newline at end of file +Remember: with great power comes great responsibility. diff --git a/site/content/tutorial/10-transitions/07-local-transitions/text.md b/site/content/tutorial/10-transitions/07-local-transitions/text.md index 7a22967ab0..400fbcaacb 100644 --- a/site/content/tutorial/10-transitions/07-local-transitions/text.md +++ b/site/content/tutorial/10-transitions/07-local-transitions/text.md @@ -4,7 +4,7 @@ title: Local transitions Ordinarily, transitions will play on elements when any container block is added or destroyed. In the example here, toggling the visibility of the entire list also applies transitions to individual list elements. -Instead, we'd like transitions to play only when individual items are added and removed — on other words, when the user drags the slider. +Instead, we'd like transitions to play only when individual items are added and removed — in other words, when the user drags the slider. We can achieve this with a *local* transition, which only plays when the immediate parent block is added or removed: @@ -12,4 +12,4 @@ We can achieve this with a *local* transition, which only plays when the immedia <div transition:slide|local> {item} </div> -``` \ No newline at end of file +``` diff --git a/site/content/tutorial/12-actions/01-actions/text.md b/site/content/tutorial/12-actions/01-actions/text.md index 279dc3123f..3706b31e7c 100644 --- a/site/content/tutorial/12-actions/01-actions/text.md +++ b/site/content/tutorial/12-actions/01-actions/text.md @@ -23,11 +23,13 @@ import { pannable } from './pannable.js'; on:panstart={handlePanStart} on:panmove={handlePanMove} on:panend={handlePanEnd} - style="transform: translate({$coords.x}px,{$coords.y}px)" + style="transform: + translate({$coords.x}px,{$coords.y}px) + rotate({$coords.x * 0.2}deg)" ></div> ``` -Open the `pannable.js` file. Like transition functions, an action function receives a `node` and some optional parameters, and returns an action object. That object must have a `destroy` function, which is called when the element is unmounted. +Open the `pannable.js` file. Like transition functions, an action function receives a `node` and some optional parameters, and returns an action object. That object can have a `destroy` function, which is called when the element is unmounted. We want to fire `panstart` event when the user mouses down on the element, `panmove` events (with `dx` and `dy` properties showing how far the mouse moved) when they drag it, and `panend` events when they mouse up. One possible implementation looks like this: @@ -84,4 +86,3 @@ export function pannable(node) { Update the `pannable` function and try moving the box around. > This implementation is for demonstration purposes — a more complete one would also consider touch events. - diff --git a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-a/App.svelte b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-a/App.svelte index 0bd9d56113..8ed286b574 100644 --- a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-a/App.svelte +++ b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-a/App.svelte @@ -1,70 +1,20 @@ <script> - let language = "english"; + import { longpress } from './longpress.js'; - const translations = { - english: { - tooltip: "Switch Languages", - }, - latin: { - tooltip: "Itchsway Anguageslay", - } - }; - - function tooltip(node, text) { - const tooltip = document.createElement('div'); - tooltip.textContent = text; - - Object.assign(tooltip.style, { - position: 'absolute', - background: 'black', - color: 'white', - padding: '0.5em 1em', - fontSize: '12px', - pointerEvents: 'none', - transform: 'translate(5px, -50%)', - borderRadius: '2px', - transition: 'opacity 0.4s' - }); - - function position() { - const { top, right, bottom } = node.getBoundingClientRect(); - tooltip.style.top = `${(top + bottom) / 2}px`; - tooltip.style.left = `${right}px`; - } - - function append() { - document.body.appendChild(tooltip); - tooltip.style.opacity = 0; - setTimeout(() => tooltip.style.opacity = 1); - position(); - } - - function remove() { - tooltip.remove(); - } - - node.addEventListener('mouseenter', append); - node.addEventListener('mouseleave', remove); - - return { - update(text) { - tooltip.textContent = text; - position(); - }, + let pressed = false; + let duration = 2000; +</script> - destroy() { - tooltip.remove(); - node.removeEventListener('mouseenter', append); - node.removeEventListener('mouseleave', remove); - } - }; - } +<label> + <input type=range bind:value={duration} max={2000} step={100}> + {duration}ms +</label> - function toggleLanguage() { - language = language === 'english' ? 'latin' : 'english' - } -</script> +<button use:longpress + on:longpress="{() => pressed = true}" + on:mouseenter="{() => pressed = false}" +>press and hold</button> -<button on:click={toggleLanguage} use:tooltip={translations[language].tooltip}> - {language} -</button> \ No newline at end of file +{#if pressed} + <p>congratulations, you pressed and held for {duration}ms</p> +{/if} \ No newline at end of file diff --git a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-a/longpress.js b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-a/longpress.js new file mode 100644 index 0000000000..00bb9d05c8 --- /dev/null +++ b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-a/longpress.js @@ -0,0 +1,25 @@ +export function longpress(node, duration) { + let timer; + + const handleMousedown = () => { + timer = setTimeout(() => { + node.dispatchEvent( + new CustomEvent('longpress') + ); + }, 500); + }; + + const handleMouseup = () => { + clearTimeout(timer) + }; + + node.addEventListener('mousedown', handleMousedown); + node.addEventListener('mouseup', handleMouseup); + + return { + destroy() { + node.removeEventListener('mousedown', handleMousedown); + node.removeEventListener('mouseup', handleMouseup); + } + }; +} \ No newline at end of file diff --git a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-b/App.svelte b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-b/App.svelte index 0bd9d56113..d6eaa0ff12 100644 --- a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-b/App.svelte +++ b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-b/App.svelte @@ -1,70 +1,20 @@ <script> - let language = "english"; + import { longpress } from './longpress.js'; - const translations = { - english: { - tooltip: "Switch Languages", - }, - latin: { - tooltip: "Itchsway Anguageslay", - } - }; - - function tooltip(node, text) { - const tooltip = document.createElement('div'); - tooltip.textContent = text; - - Object.assign(tooltip.style, { - position: 'absolute', - background: 'black', - color: 'white', - padding: '0.5em 1em', - fontSize: '12px', - pointerEvents: 'none', - transform: 'translate(5px, -50%)', - borderRadius: '2px', - transition: 'opacity 0.4s' - }); - - function position() { - const { top, right, bottom } = node.getBoundingClientRect(); - tooltip.style.top = `${(top + bottom) / 2}px`; - tooltip.style.left = `${right}px`; - } - - function append() { - document.body.appendChild(tooltip); - tooltip.style.opacity = 0; - setTimeout(() => tooltip.style.opacity = 1); - position(); - } - - function remove() { - tooltip.remove(); - } - - node.addEventListener('mouseenter', append); - node.addEventListener('mouseleave', remove); - - return { - update(text) { - tooltip.textContent = text; - position(); - }, + let pressed = false; + let duration = 2000; +</script> - destroy() { - tooltip.remove(); - node.removeEventListener('mouseenter', append); - node.removeEventListener('mouseleave', remove); - } - }; - } +<label> + <input type=range bind:value={duration} max={2000} step={100}> + {duration}ms +</label> - function toggleLanguage() { - language = language === 'english' ? 'latin' : 'english' - } -</script> +<button use:longpress={duration} + on:longpress="{() => pressed = true}" + on:mouseenter="{() => pressed = false}" +>press and hold</button> -<button on:click={toggleLanguage} use:tooltip={translations[language].tooltip}> - {language} -</button> \ No newline at end of file +{#if pressed} + <p>congratulations, you pressed and held for {duration}ms</p> +{/if} \ No newline at end of file diff --git a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-b/longpress.js b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-b/longpress.js new file mode 100644 index 0000000000..9d807cb13a --- /dev/null +++ b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/app-b/longpress.js @@ -0,0 +1,28 @@ +export function longpress(node, duration) { + let timer; + + const handleMousedown = () => { + timer = setTimeout(() => { + node.dispatchEvent( + new CustomEvent('longpress') + ); + }, duration); + }; + + const handleMouseup = () => { + clearTimeout(timer) + }; + + node.addEventListener('mousedown', handleMousedown); + node.addEventListener('mouseup', handleMouseup); + + return { + update(newDuration) { + duration = newDuration; + }, + destroy() { + node.removeEventListener('mousedown', handleMousedown); + node.removeEventListener('mouseup', handleMouseup); + } + }; +} \ No newline at end of file diff --git a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/text.md b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/text.md index e6262b2f6c..0cb3b7aeca 100644 --- a/site/content/tutorial/12-actions/02-adding-parameters-to-actions/text.md +++ b/site/content/tutorial/12-actions/02-adding-parameters-to-actions/text.md @@ -2,4 +2,45 @@ title: Adding parameters --- -TODO come up with a better example \ No newline at end of file +Like transitions and animations, an action can take an argument, which the action function will be called with alongside the element it belongs to. + +Here, we're using a `longpress` action that fires an event with the same name whenever the user presses and holds the button for a given duration. Right now, if you switch over to the `longpress.js` file, you'll see it's hardcoded to 500ms. + +We can change the action function to accept a `duration` as a second argument, and pass that `duration` to the `setTimeout` call: + +```js +export function longpress(node, duration) { + // ... + + const handleMousedown = () => { + timer = setTimeout(() => { + node.dispatchEvent( + new CustomEvent('longpress') + ); + }, duration); + }; + + // ... +} +``` + +Back in `App.svelte`, we can pass the `duration` value to the action: + +```html +<button use:longpress={duration} +``` + +This *almost* works — the event now only fires after 2 seconds. But if you slide the duration down, it will still take two seconds. + +To change that, we can add an `update` method in `longpress.js`. This will be called whenever the argument changes: + +```js +return { + update(newDuration) { + duration = newDuration; + }, + // ... +}; +``` + +> If you need to pass multiple arguments to an action, combine them into a single object, as in `use:longpress={{duration, spiciness}}` \ No newline at end of file diff --git a/site/content/tutorial/14-composition/04-slot-props/text.md b/site/content/tutorial/14-composition/04-slot-props/text.md index 53f4e84590..a4d7c4911b 100644 --- a/site/content/tutorial/14-composition/04-slot-props/text.md +++ b/site/content/tutorial/14-composition/04-slot-props/text.md @@ -42,6 +42,6 @@ You can rename the variable, if you want — let's call it `active` in the paren </Hoverable> ``` -You can have as many of these components you like, and the slotted props will remain local to the component where they're declared. +You can have as many of these components as you like, and the slotted props will remain local to the component where they're declared. -> Named slots can also have props; use the `let` directive on an element with a `slot="..."` attribute, instead of on the component itself. \ No newline at end of file +> Named slots can also have props; use the `let` directive on an element with a `slot="..."` attribute, instead of on the component itself. diff --git a/site/content/tutorial/15-context/01-context-api/text.md b/site/content/tutorial/15-context/01-context-api/text.md index 3d095dd679..96a716dfb0 100644 --- a/site/content/tutorial/15-context/01-context-api/text.md +++ b/site/content/tutorial/15-context/01-context-api/text.md @@ -35,7 +35,6 @@ The markers can now add themselves to the map. > A more finished version of `<MapMarker>` would also handle removal and prop changes, but we're only demonstrating context here. - ## Context keys In `mapbox.js` you'll see this line: @@ -44,4 +43,14 @@ In `mapbox.js` you'll see this line: const key = {}; ``` -We can use anything as a key — we could do `setContext('mapbox', ...)` for example. The downside of using a string is that different component libraries might accidentally use the same one; using an object literal means the keys are guaranteed not to conflict in any circumstance, even when you have multiple different contexts operating across many component layers. \ No newline at end of file +We can use anything as a key — we could do `setContext('mapbox', ...)` for example. The downside of using a string is that different component libraries might accidentally use the same one; using an object literal means the keys are guaranteed not to conflict in any circumstance (since an object only has referential equality to itself, i.e. `{} !== {}` whereas `"x" === "x"`), even when you have multiple different contexts operating across many component layers. + +## Contexts vs. stores + +Contexts and stores seem similar. They differ in that stores are available to *any* part of an app, while a context is only available to *a component and its descendants*. This can be helpful if you want to use several instances of a component without the state of one interfering with the state of the others. + +In fact, you might use the two together. Since context is not reactive, values that change over time should be represented as stores: + +```js +const { these, are, stores } = getContext(...); +``` diff --git a/site/content/tutorial/16-special-elements/03-svelte-window/text.md b/site/content/tutorial/16-special-elements/03-svelte-window/text.md index 2715da7260..b581b3ada4 100644 --- a/site/content/tutorial/16-special-elements/03-svelte-window/text.md +++ b/site/content/tutorial/16-special-elements/03-svelte-window/text.md @@ -8,4 +8,6 @@ On line 33, add the `keydown` listener: ```html <svelte:window on:keydown={handleKeydown}/> -``` \ No newline at end of file +``` + +> As with DOM elements, you can add [event modifiers](tutorial/event-modifiers) like `preventDefault`. diff --git a/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte b/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte index fc6725e894..04b4de5cf2 100644 --- a/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte +++ b/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-a/App.svelte @@ -7,7 +7,7 @@ <svelte:window/> <a class="parallax-container" href="https://www.firewatchgame.com"> - {#each [0, 1, 2, 3, 4, 5, 6, 7, 8] as layer} + {#each layers as layer} <img style="transform: translate(0,{-y * layer / (layers.length - 1)}px)" src="https://www.firewatchgame.com/images/parallax/parallax{layer}.png" diff --git a/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-b/App.svelte b/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-b/App.svelte index 3dbfd43f21..15c2aa0ebc 100644 --- a/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-b/App.svelte +++ b/site/content/tutorial/16-special-elements/04-svelte-window-bindings/app-b/App.svelte @@ -7,7 +7,7 @@ <svelte:window bind:scrollY={y}/> <a class="parallax-container" href="https://www.firewatchgame.com"> - {#each [0, 1, 2, 3, 4, 5, 6, 7, 8] as layer} + {#each layers as layer} <img style="transform: translate(0,{-y * layer / (layers.length - 1)}px)" src="https://www.firewatchgame.com/images/parallax/parallax{layer}.png" diff --git a/site/content/tutorial/16-special-elements/07-svelte-options/app-a/Todo.svelte b/site/content/tutorial/16-special-elements/07-svelte-options/app-a/Todo.svelte index dae595e7d0..5e0dbca300 100644 --- a/site/content/tutorial/16-special-elements/07-svelte-options/app-a/Todo.svelte +++ b/site/content/tutorial/16-special-elements/07-svelte-options/app-a/Todo.svelte @@ -3,7 +3,6 @@ import flash from './flash.js'; export let todo; - export let toggle; let div; diff --git a/site/content/tutorial/16-special-elements/07-svelte-options/app-a/flash.js b/site/content/tutorial/16-special-elements/07-svelte-options/app-a/flash.js index 8dff9cbe2f..c788cc6d35 100644 --- a/site/content/tutorial/16-special-elements/07-svelte-options/app-a/flash.js +++ b/site/content/tutorial/16-special-elements/07-svelte-options/app-a/flash.js @@ -1,11 +1,13 @@ export default function flash(element) { - element.style.transition = 'none'; - element.style.color = 'rgba(255,62,0,1)'; - element.style.backgroundColor = 'rgba(255,62,0,0.2)'; + requestAnimationFrame(() => { + element.style.transition = 'none'; + element.style.color = 'rgba(255,62,0,1)'; + element.style.backgroundColor = 'rgba(255,62,0,0.2)'; - setTimeout(() => { - element.style.transition = 'color 1s, background 1s'; - element.style.color = ''; - element.style.backgroundColor = ''; + setTimeout(() => { + element.style.transition = 'color 1s, background 1s'; + element.style.color = ''; + element.style.backgroundColor = ''; + }); }); } \ No newline at end of file diff --git a/site/content/tutorial/16-special-elements/07-svelte-options/app-b/Todo.svelte b/site/content/tutorial/16-special-elements/07-svelte-options/app-b/Todo.svelte index 447ddc601c..e7ddcedc47 100644 --- a/site/content/tutorial/16-special-elements/07-svelte-options/app-b/Todo.svelte +++ b/site/content/tutorial/16-special-elements/07-svelte-options/app-b/Todo.svelte @@ -5,7 +5,6 @@ import flash from './flash.js'; export let todo; - export let toggle; let div; diff --git a/site/content/tutorial/16-special-elements/07-svelte-options/app-b/flash.js b/site/content/tutorial/16-special-elements/07-svelte-options/app-b/flash.js index 8dff9cbe2f..c788cc6d35 100644 --- a/site/content/tutorial/16-special-elements/07-svelte-options/app-b/flash.js +++ b/site/content/tutorial/16-special-elements/07-svelte-options/app-b/flash.js @@ -1,11 +1,13 @@ export default function flash(element) { - element.style.transition = 'none'; - element.style.color = 'rgba(255,62,0,1)'; - element.style.backgroundColor = 'rgba(255,62,0,0.2)'; + requestAnimationFrame(() => { + element.style.transition = 'none'; + element.style.color = 'rgba(255,62,0,1)'; + element.style.backgroundColor = 'rgba(255,62,0,0.2)'; - setTimeout(() => { - element.style.transition = 'color 1s, background 1s'; - element.style.color = ''; - element.style.backgroundColor = ''; + setTimeout(() => { + element.style.transition = 'color 1s, background 1s'; + element.style.color = ''; + element.style.backgroundColor = ''; + }); }); } \ No newline at end of file diff --git a/site/content/tutorial/17-module-context/01-sharing-code/app-a/App.svelte b/site/content/tutorial/17-module-context/01-sharing-code/app-a/App.svelte index 3c0133350a..f031b43fd5 100644 --- a/site/content/tutorial/17-module-context/01-sharing-code/app-a/App.svelte +++ b/site/content/tutorial/17-module-context/01-sharing-code/app-a/App.svelte @@ -4,7 +4,7 @@ <!-- https://musopen.org/music/9862-the-blue-danube-op-314/ --> <AudioPlayer - src="tutorial/music/strauss.mp3" + src="https://sveltejs.github.io/assets/music/strauss.mp3" title="The Blue Danube Waltz" composer="Johann Strauss" performer="European Archive" @@ -12,7 +12,7 @@ <!-- https://musopen.org/music/43775-the-planets-op-32/ --> <AudioPlayer - src="tutorial/music/holst.mp3" + src="https://sveltejs.github.io/assets/music/holst.mp3" title="Mars, the Bringer of War" composer="Gustav Holst" performer="USAF Heritage of America Band" @@ -20,7 +20,7 @@ <!-- https://musopen.org/music/8010-3-gymnopedies/ --> <AudioPlayer - src="tutorial/music/satie.mp3" + src="https://sveltejs.github.io/assets/music/satie.mp3" title="Gymnopédie no. 1" composer="Erik Satie" performer="Prodigal Procrastinator" @@ -28,7 +28,7 @@ <!-- https://musopen.org/music/2567-symphony-no-5-in-c-minor-op-67/ --> <AudioPlayer - src="tutorial/music/beethoven.mp3" + src="https://sveltejs.github.io/assets/music/beethoven.mp3" title="Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio" composer="Ludwig van Beethoven" performer="European Archive" @@ -36,7 +36,7 @@ <!-- https://musopen.org/music/43683-requiem-in-d-minor-k-626/ --> <AudioPlayer - src="tutorial/music/mozart.mp3" + src="https://sveltejs.github.io/assets/music/mozart.mp3" title="Requiem in D minor, K. 626 - III. Sequence - Lacrymosa" composer="Wolfgang Amadeus Mozart" performer="Markus Staab" diff --git a/site/content/tutorial/17-module-context/01-sharing-code/app-a/AudioPlayer.svelte b/site/content/tutorial/17-module-context/01-sharing-code/app-a/AudioPlayer.svelte index 321deb8773..12d3a78c41 100644 --- a/site/content/tutorial/17-module-context/01-sharing-code/app-a/AudioPlayer.svelte +++ b/site/content/tutorial/17-module-context/01-sharing-code/app-a/AudioPlayer.svelte @@ -1,6 +1,4 @@ <script> - import { onMount } from 'svelte'; - export let src; export let title; export let composer; @@ -9,10 +7,6 @@ let audio; let paused = true; - onMount(() => { - // TODO: register the audio element - }); - function stopOthers() { // TODO: implement stopOthers } diff --git a/site/content/tutorial/17-module-context/01-sharing-code/app-b/App.svelte b/site/content/tutorial/17-module-context/01-sharing-code/app-b/App.svelte index 3c0133350a..f031b43fd5 100644 --- a/site/content/tutorial/17-module-context/01-sharing-code/app-b/App.svelte +++ b/site/content/tutorial/17-module-context/01-sharing-code/app-b/App.svelte @@ -4,7 +4,7 @@ <!-- https://musopen.org/music/9862-the-blue-danube-op-314/ --> <AudioPlayer - src="tutorial/music/strauss.mp3" + src="https://sveltejs.github.io/assets/music/strauss.mp3" title="The Blue Danube Waltz" composer="Johann Strauss" performer="European Archive" @@ -12,7 +12,7 @@ <!-- https://musopen.org/music/43775-the-planets-op-32/ --> <AudioPlayer - src="tutorial/music/holst.mp3" + src="https://sveltejs.github.io/assets/music/holst.mp3" title="Mars, the Bringer of War" composer="Gustav Holst" performer="USAF Heritage of America Band" @@ -20,7 +20,7 @@ <!-- https://musopen.org/music/8010-3-gymnopedies/ --> <AudioPlayer - src="tutorial/music/satie.mp3" + src="https://sveltejs.github.io/assets/music/satie.mp3" title="Gymnopédie no. 1" composer="Erik Satie" performer="Prodigal Procrastinator" @@ -28,7 +28,7 @@ <!-- https://musopen.org/music/2567-symphony-no-5-in-c-minor-op-67/ --> <AudioPlayer - src="tutorial/music/beethoven.mp3" + src="https://sveltejs.github.io/assets/music/beethoven.mp3" title="Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio" composer="Ludwig van Beethoven" performer="European Archive" @@ -36,7 +36,7 @@ <!-- https://musopen.org/music/43683-requiem-in-d-minor-k-626/ --> <AudioPlayer - src="tutorial/music/mozart.mp3" + src="https://sveltejs.github.io/assets/music/mozart.mp3" title="Requiem in D minor, K. 626 - III. Sequence - Lacrymosa" composer="Wolfgang Amadeus Mozart" performer="Markus Staab" diff --git a/site/content/tutorial/17-module-context/01-sharing-code/app-b/AudioPlayer.svelte b/site/content/tutorial/17-module-context/01-sharing-code/app-b/AudioPlayer.svelte index 27dbe1993b..609f9f1af0 100644 --- a/site/content/tutorial/17-module-context/01-sharing-code/app-b/AudioPlayer.svelte +++ b/site/content/tutorial/17-module-context/01-sharing-code/app-b/AudioPlayer.svelte @@ -1,10 +1,8 @@ <script context="module"> - const elements = new Set(); + let current; </script> <script> - import { onMount } from 'svelte'; - export let src; export let title; export let composer; @@ -13,15 +11,9 @@ let audio; let paused = true; - onMount(() => { - elements.add(audio); - return () => elements.delete(audio); - }); - function stopOthers() { - elements.forEach(element => { - if (element !== audio) element.pause(); - }); + if (current && current !== audio) current.pause(); + current = audio; } </script> diff --git a/site/content/tutorial/17-module-context/01-sharing-code/text.md b/site/content/tutorial/17-module-context/01-sharing-code/text.md index 9081b18dce..3529544fed 100644 --- a/site/content/tutorial/17-module-context/01-sharing-code/text.md +++ b/site/content/tutorial/17-module-context/01-sharing-code/text.md @@ -10,21 +10,15 @@ We can do that by declaring a `<script context="module">` block. Code contained ```html <script context="module"> - const elements = new Set(); + let current; </script> ``` It's now possible for the components to 'talk' to each other without any state management: ```js -onMount(() => { - elements.add(audio); - return () => elements.delete(audio); -}); - function stopOthers() { - elements.forEach(element => { - if (element !== audio) element.pause(); - }); + if (current && current !== audio) current.pause(); + current = audio; } -``` \ No newline at end of file +``` diff --git a/site/content/tutorial/17-module-context/02-module-exports/app-a/App.svelte b/site/content/tutorial/17-module-context/02-module-exports/app-a/App.svelte index 2d7d23412d..1550db6a09 100644 --- a/site/content/tutorial/17-module-context/02-module-exports/app-a/App.svelte +++ b/site/content/tutorial/17-module-context/02-module-exports/app-a/App.svelte @@ -8,7 +8,7 @@ <!-- https://musopen.org/music/9862-the-blue-danube-op-314/ --> <AudioPlayer - src="tutorial/music/strauss.mp3" + src="https://sveltejs.github.io/assets/music/strauss.mp3" title="The Blue Danube Waltz" composer="Johann Strauss" performer="European Archive" @@ -16,7 +16,7 @@ <!-- https://musopen.org/music/43775-the-planets-op-32/ --> <AudioPlayer - src="tutorial/music/holst.mp3" + src="https://sveltejs.github.io/assets/music/holst.mp3" title="Mars, the Bringer of War" composer="Gustav Holst" performer="USAF Heritage of America Band" @@ -24,7 +24,7 @@ <!-- https://musopen.org/music/8010-3-gymnopedies/ --> <AudioPlayer - src="tutorial/music/satie.mp3" + src="https://sveltejs.github.io/assets/music/satie.mp3" title="Gymnopédie no. 1" composer="Erik Satie" performer="Prodigal Procrastinator" @@ -32,7 +32,7 @@ <!-- https://musopen.org/music/2567-symphony-no-5-in-c-minor-op-67/ --> <AudioPlayer - src="tutorial/music/beethoven.mp3" + src="https://sveltejs.github.io/assets/music/beethoven.mp3" title="Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio" composer="Ludwig van Beethoven" performer="European Archive" @@ -40,7 +40,7 @@ <!-- https://musopen.org/music/43683-requiem-in-d-minor-k-626/ --> <AudioPlayer - src="tutorial/music/mozart.mp3" + src="https://sveltejs.github.io/assets/music/mozart.mp3" title="Requiem in D minor, K. 626 - III. Sequence - Lacrymosa" composer="Wolfgang Amadeus Mozart" performer="Markus Staab" diff --git a/site/content/tutorial/17-module-context/02-module-exports/app-b/App.svelte b/site/content/tutorial/17-module-context/02-module-exports/app-b/App.svelte index cd5ab44b21..1d5d94b5d1 100644 --- a/site/content/tutorial/17-module-context/02-module-exports/app-b/App.svelte +++ b/site/content/tutorial/17-module-context/02-module-exports/app-b/App.svelte @@ -8,7 +8,7 @@ <!-- https://musopen.org/music/9862-the-blue-danube-op-314/ --> <AudioPlayer - src="tutorial/music/strauss.mp3" + src="https://sveltejs.github.io/assets/music/strauss.mp3" title="The Blue Danube Waltz" composer="Johann Strauss" performer="European Archive" @@ -16,7 +16,7 @@ <!-- https://musopen.org/music/43775-the-planets-op-32/ --> <AudioPlayer - src="tutorial/music/holst.mp3" + src="https://sveltejs.github.io/assets/music/holst.mp3" title="Mars, the Bringer of War" composer="Gustav Holst" performer="USAF Heritage of America Band" @@ -24,7 +24,7 @@ <!-- https://musopen.org/music/8010-3-gymnopedies/ --> <AudioPlayer - src="tutorial/music/satie.mp3" + src="https://sveltejs.github.io/assets/music/satie.mp3" title="Gymnopédie no. 1" composer="Erik Satie" performer="Prodigal Procrastinator" @@ -32,7 +32,7 @@ <!-- https://musopen.org/music/2567-symphony-no-5-in-c-minor-op-67/ --> <AudioPlayer - src="tutorial/music/beethoven.mp3" + src="https://sveltejs.github.io/assets/music/beethoven.mp3" title="Symphony no. 5 in Cm, Op. 67 - I. Allegro con brio" composer="Ludwig van Beethoven" performer="European Archive" @@ -40,7 +40,7 @@ <!-- https://musopen.org/music/43683-requiem-in-d-minor-k-626/ --> <AudioPlayer - src="tutorial/music/mozart.mp3" + src="https://sveltejs.github.io/assets/music/mozart.mp3" title="Requiem in D minor, K. 626 - III. Sequence - Lacrymosa" composer="Wolfgang Amadeus Mozart" performer="Markus Staab" diff --git a/site/content/tutorial/18-debugging/01-debug/text.md b/site/content/tutorial/18-debugging/01-debug/text.md index 8c9f59d082..76fa77805e 100644 --- a/site/content/tutorial/18-debugging/01-debug/text.md +++ b/site/content/tutorial/18-debugging/01-debug/text.md @@ -2,7 +2,7 @@ title: The @debug tag --- -Occasionally it's useful to inspect a piece of data as it flows through your app. +Occasionally, it's useful to inspect a piece of data as it flows through your app. One approach is to use `console.log(...)` inside your markup. If you want to pause execution, though, you can use the `{@debug ...}` tag with a comma-separated list of values you want to inspect: @@ -12,4 +12,4 @@ One approach is to use `console.log(...)` inside your markup. If you want to pau <h1>Hello {user.firstname}!</h1> ``` -If you now open your devtools and start interacting with the `<input>` elements, you'll trigger the debugger as the value of `user` changes. \ No newline at end of file +If you now open your devtools and start interacting with the `<input>` elements, you'll trigger the debugger as the value of `user` changes. diff --git a/site/content/tutorial/19-next-steps/01-congratulations/text.md b/site/content/tutorial/19-next-steps/01-congratulations/text.md index 70b192e62f..c4436113bc 100644 --- a/site/content/tutorial/19-next-steps/01-congratulations/text.md +++ b/site/content/tutorial/19-next-steps/01-congratulations/text.md @@ -6,6 +6,6 @@ You've now finished the Svelte tutorial and are ready to start building apps. Yo To get set up in your local development environment, check out [the quickstart guide](blog/the-easiest-way-to-get-started). -If you're looking for a more expansive framework that includes routing, server-side rendering and everything else, take a look at [Sapper](https://sapper.svelte.technology). +If you're looking for a more expansive framework that includes routing, server-side rendering and everything else, take a look at [Sapper](https://sapper.svelte.dev). -Most importantly: since you're now a member of the Svelte community, you should [join our friendly Discord chatroom](https://discord.gg/yy75DKs). That's where you'll find fellow Svelte users, and it's where we plan the future of the framework. \ No newline at end of file +Most importantly: since you're now a member of the Svelte community, you should [join our friendly Discord chatroom](chat). That's where you'll find fellow Svelte users, and it's where we plan the future of the framework. \ No newline at end of file diff --git a/site/cypress/fixtures/example.json b/site/cypress/fixtures/example.json deleted file mode 100644 index da18d9352a..0000000000 --- a/site/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} \ No newline at end of file diff --git a/site/cypress/integration/spec.js b/site/cypress/integration/spec.js deleted file mode 100644 index 9a7140ddae..0000000000 --- a/site/cypress/integration/spec.js +++ /dev/null @@ -1,19 +0,0 @@ -describe('Sapper template app', () => { - beforeEach(() => { - cy.visit('/') - }); - - it('has the correct <h1>', () => { - cy.contains('h1', 'Great success!') - }); - - it('navigates to /about', () => { - cy.get('nav a').contains('about').click(); - cy.url().should('include', '/about'); - }); - - it('navigates to /blog', () => { - cy.get('nav a').contains('blog').click(); - cy.url().should('include', '/blog'); - }); -}); \ No newline at end of file diff --git a/site/cypress/plugins/index.js b/site/cypress/plugins/index.js deleted file mode 100644 index fd170fba69..0000000000 --- a/site/cypress/plugins/index.js +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/site/cypress/support/commands.js b/site/cypress/support/commands.js deleted file mode 100644 index c1f5a772e2..0000000000 --- a/site/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add("login", (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/site/cypress/support/index.js b/site/cypress/support/index.js deleted file mode 100644 index d68db96df2..0000000000 --- a/site/cypress/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/site/migrations/000-create-users.js b/site/migrations/000-create-users.js new file mode 100644 index 0000000000..76dde745a2 --- /dev/null +++ b/site/migrations/000-create-users.js @@ -0,0 +1,25 @@ +exports.up = DB => { + DB.sql(` + create table if not exists users ( + id serial primary key, + uid character varying(255) not null unique, + name character varying(255), + username character varying(255) not null, + avatar text, + github_token character varying(255), + created_at timestamp with time zone NOT NULL DEFAULT now(), + updated_at timestamp with time zone + ); + + create unique index if not exists users_pkey ON users(id int4_ops); + create unique index if not exists users_uid_key ON users(uid text_ops); + `); +}; + +exports.down = DB => { + DB.sql(` + drop table if exists users cascade; + drop index if exists users_uid_key; + drop index if exists users_pkey; + `); +}; diff --git a/site/migrations/001-create-gists.js b/site/migrations/001-create-gists.js new file mode 100644 index 0000000000..22293f5737 --- /dev/null +++ b/site/migrations/001-create-gists.js @@ -0,0 +1,24 @@ +exports.up = DB => { + DB.sql(` + create table if not exists gists ( + id serial primary key, + uid uuid NOT NULL DEFAULT gen_random_uuid(), + user_id integer REFERENCES users(id) not null, + name character varying(255) not null, + files json not null, + created_at timestamp with time zone NOT NULL DEFAULT now(), + updated_at timestamp with time zone + ); + + create unique index if not exists gists_pkey ON gists(id int4_ops); + create index if not exists gists_user_id_key ON gists(user_id int4_ops); + `); +}; + +exports.down = DB => { + DB.sql(` + drop table if exists gists cascade; + drop index if exists gists_user_id_key; + drop index if exists gists_pkey; + `); +}; diff --git a/site/migrations/002-create-sessions.js b/site/migrations/002-create-sessions.js new file mode 100644 index 0000000000..c24fc69115 --- /dev/null +++ b/site/migrations/002-create-sessions.js @@ -0,0 +1,15 @@ +exports.up = DB => { + DB.sql(` + create table if not exists sessions ( + uid uuid NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(), + user_id integer REFERENCES users(id) not null, + expiry timestamp without time zone DEFAULT now() + interval '1 year' + ); + `); +}; + +exports.down = DB => { + DB.sql(` + drop table if exists sessions; + `); +}; diff --git a/site/package-lock.json b/site/package-lock.json index bffc2628b7..646ca0ce53 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -14,55 +14,73 @@ } }, "@babel/core": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", - "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helpers": "^7.4.3", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.0.tgz", + "integrity": "sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.6.0", + "@babel/helpers": "^7.6.0", + "@babel/parser": "^7.6.0", + "@babel/template": "^7.6.0", + "@babel/traverse": "^7.6.0", + "@babel/types": "^7.6.0", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", - "lodash": "^4.17.11", + "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", "dev": true, "requires": { - "ms": "^2.1.1" + "@babel/highlight": "^7.0.0" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } } } }, "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.0.tgz", + "integrity": "sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==", "dev": true, "requires": { - "@babel/types": "^7.4.0", + "@babel/types": "^7.6.0", "jsesc": "^2.5.1", - "lodash": "^4.17.11", + "lodash": "^4.17.13", "source-map": "^0.5.0", "trim-right": "^1.0.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-annotate-as-pure": { @@ -85,25 +103,38 @@ } }, "@babel/helper-call-delegate": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.0.tgz", - "integrity": "sha512-SdqDfbVdNQCBp3WhK2mNdDvHd3BD6qbmIc43CAyjnsfCmgHMeqgDcM3BzY2lchi7HBJGJ2CVdynLWbezaE4mmQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", + "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.4.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" } }, "@babel/helper-define-map": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz", - "integrity": "sha512-wAhQ9HdnLIywERVcSvX40CEJwKdAa1ID4neI9NXQPDOHwwA+57DqwLiPEVy2AIyWzAk0CQ8qx4awO0VUURwLtA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz", + "integrity": "sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.4.0", - "lodash": "^4.17.11" + "@babel/types": "^7.5.5", + "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-explode-assignable-expression": { @@ -137,21 +168,34 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz", - "integrity": "sha512-/NErCuoe/et17IlAQFKWM24qtyYYie7sFIrW/tIQXpck6vAu2hhtYYsKLBWQV+BQZMbcIYPU/QMYuTufrY4aQw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", + "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", "dev": true, "requires": { - "@babel/types": "^7.4.0" + "@babel/types": "^7.4.4" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", - "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz", + "integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.5.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-module-imports": { @@ -164,17 +208,30 @@ } }, "@babel/helper-module-transforms": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz", - "integrity": "sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz", + "integrity": "sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/template": "^7.2.2", - "@babel/types": "^7.2.2", - "lodash": "^4.17.11" + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/types": "^7.5.5", + "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-optimise-call-expression": { @@ -193,12 +250,12 @@ "dev": true }, "@babel/helper-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.3.tgz", - "integrity": "sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz", + "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==", "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.13" } }, "@babel/helper-remap-async-to-generator": { @@ -215,15 +272,28 @@ } }, "@babel/helper-replace-supers": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz", - "integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz", + "integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.0.0", + "@babel/helper-member-expression-to-functions": "^7.5.5", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" + "@babel/traverse": "^7.5.5", + "@babel/types": "^7.5.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-simple-access": { @@ -237,12 +307,12 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", - "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", "dev": true, "requires": { - "@babel/types": "^7.4.0" + "@babel/types": "^7.4.4" } }, "@babel/helper-wrap-function": { @@ -258,20 +328,33 @@ } }, "@babel/helpers": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", - "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.6.0.tgz", + "integrity": "sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ==", "dev": true, "requires": { - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0" + "@babel/template": "^7.6.0", + "@babel/traverse": "^7.6.0", + "@babel/types": "^7.6.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", "dev": true, "requires": { "chalk": "^2.0.0", @@ -280,9 +363,9 @@ } }, "@babel/parser": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", - "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.0.tgz", + "integrity": "sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -296,6 +379,16 @@ "@babel/plugin-syntax-async-generators": "^7.2.0" } }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz", + "integrity": "sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0" + } + }, "@babel/plugin-proposal-json-strings": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", @@ -307,9 +400,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz", - "integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", + "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -327,13 +420,13 @@ } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.0.tgz", - "integrity": "sha512-h/KjEZ3nK9wv1P1FSNb9G079jXrNYR0Ko+7XkOx85+gM24iZbPn0rh4vCftk+5QKY7y1uByFataBTmX7irEF1w==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz", + "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0", + "@babel/helper-regex": "^7.4.4", "regexpu-core": "^4.5.4" } }, @@ -392,9 +485,9 @@ } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz", - "integrity": "sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz", + "integrity": "sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -412,28 +505,28 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz", - "integrity": "sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.0.tgz", + "integrity": "sha512-tIt4E23+kw6TgL/edACZwP1OUKrjOTyMrFMLoT5IOFrfMRabCgekjqFd5o6PaAMildBu46oFkekIdMuGkkPEpA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "lodash": "^4.17.11" + "lodash": "^4.17.13" } }, "@babel/plugin-transform-classes": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz", - "integrity": "sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz", + "integrity": "sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.4.0", + "@babel/helper-define-map": "^7.5.5", "@babel/helper-function-name": "^7.1.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.0", - "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/helper-replace-supers": "^7.5.5", + "@babel/helper-split-export-declaration": "^7.4.4", "globals": "^11.1.0" } }, @@ -447,29 +540,29 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz", - "integrity": "sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz", + "integrity": "sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.3.tgz", - "integrity": "sha512-9Arc2I0AGynzXRR/oPdSALv3k0rM38IMFyto7kOCwb5F9sLUt2Ykdo3V9yUPR+Bgr4kb6bVEyLkPEiBhzcTeoA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz", + "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.3", + "@babel/helper-regex": "^7.4.4", "regexpu-core": "^4.5.4" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", - "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz", + "integrity": "sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" @@ -486,18 +579,18 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz", - "integrity": "sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", + "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-function-name": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.3.tgz", - "integrity": "sha512-uT5J/3qI/8vACBR9I1GlAuU/JqBtWdfCrynuOkrWG6nCDieZd5przB1vfP59FRHBZQ9DC2IUfqr/xKqzOD5x0A==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", + "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", @@ -523,34 +616,37 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", - "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz", + "integrity": "sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz", - "integrity": "sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz", + "integrity": "sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.4.3", + "@babel/helper-module-transforms": "^7.4.4", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0" + "@babel/helper-simple-access": "^7.1.0", + "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.0.tgz", - "integrity": "sha512-gjPdHmqiNhVoBqus5qK60mWPp1CmYWp/tkh11mvb0rrys01HycEGD7NvvSoKXlWEfSM9TcL36CpsK8ElsADptQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz", + "integrity": "sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.4.0", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/helper-plugin-utils": "^7.0.0", + "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-umd": { @@ -564,40 +660,40 @@ } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.2.tgz", - "integrity": "sha512-NsAuliSwkL3WO2dzWTOL1oZJHm0TM8ZY8ZSxk2ANyKkt5SQlToGA4pzctmq1BEjoacurdwZ3xp2dCQWJkME0gQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.0.tgz", + "integrity": "sha512-jem7uytlmrRl3iCAuQyw8BpB4c4LWvSpvIeXKpMb+7j84lkx4m4mYr5ErAcmN5KM7B6BqrAvRGjBIbbzqCczew==", "dev": true, "requires": { - "regexp-tree": "^0.1.0" + "regexp-tree": "^0.1.13" } }, "@babel/plugin-transform-new-target": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.0.tgz", - "integrity": "sha512-6ZKNgMQmQmrEX/ncuCwnnw1yVGoaOW5KpxNhoWI7pCQdA0uZ0HqHGqenCUIENAnxRjy2WwNQ30gfGdIgqJXXqw==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", + "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-object-super": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", - "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz", + "integrity": "sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0" + "@babel/helper-replace-supers": "^7.5.5" } }, "@babel/plugin-transform-parameters": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz", - "integrity": "sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", + "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.4.0", + "@babel/helper-call-delegate": "^7.4.4", "@babel/helper-get-function-arity": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0" } @@ -612,12 +708,12 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz", - "integrity": "sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz", + "integrity": "sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA==", "dev": true, "requires": { - "regenerator-transform": "^0.13.4" + "regenerator-transform": "^0.14.0" } }, "@babel/plugin-transform-reserved-words": { @@ -630,9 +726,9 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz", - "integrity": "sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.0.tgz", + "integrity": "sha512-Da8tMf7uClzwUm/pnJ1S93m/aRXmoYNDD7TkHua8xBDdaAs54uZpTWvEt6NGwmoVMb9mZbntfTqmG2oSzN/7Vg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -670,9 +766,9 @@ } }, "@babel/plugin-transform-template-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz", - "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", + "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", @@ -689,148 +785,163 @@ } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz", - "integrity": "sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", + "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.3", + "@babel/helper-regex": "^7.4.4", "regexpu-core": "^4.5.4" } }, - "@babel/polyfill": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.3.tgz", - "integrity": "sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==", - "dev": true, - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.2" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } - } - }, "@babel/preset-env": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.3.tgz", - "integrity": "sha512-FYbZdV12yHdJU5Z70cEg0f6lvtpZ8jFSDakTm7WXeJbLXh4R0ztGEu/SW7G1nJ2ZvKwDhz8YrbA84eYyprmGqw==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.0.tgz", + "integrity": "sha512-1efzxFv/TcPsNXlRhMzRnkBFMeIqBBgzwmZwlFDw5Ubj0AGLeufxugirwZmkkX/ayi3owsSqoQ4fw8LkfK9SYg==", "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-dynamic-import": "^7.5.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.4.3", + "@babel/plugin-proposal-object-rest-spread": "^7.5.5", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-dynamic-import": "^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", - "@babel/plugin-transform-async-to-generator": "^7.4.0", + "@babel/plugin-transform-async-to-generator": "^7.5.0", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.4.0", - "@babel/plugin-transform-classes": "^7.4.3", + "@babel/plugin-transform-block-scoping": "^7.6.0", + "@babel/plugin-transform-classes": "^7.5.5", "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.4.3", - "@babel/plugin-transform-dotall-regex": "^7.4.3", - "@babel/plugin-transform-duplicate-keys": "^7.2.0", + "@babel/plugin-transform-destructuring": "^7.6.0", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/plugin-transform-duplicate-keys": "^7.5.0", "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.4.3", - "@babel/plugin-transform-function-name": "^7.4.3", + "@babel/plugin-transform-for-of": "^7.4.4", + "@babel/plugin-transform-function-name": "^7.4.4", "@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-member-expression-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.4.3", - "@babel/plugin-transform-modules-systemjs": "^7.4.0", + "@babel/plugin-transform-modules-amd": "^7.5.0", + "@babel/plugin-transform-modules-commonjs": "^7.6.0", + "@babel/plugin-transform-modules-systemjs": "^7.5.0", "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.2", - "@babel/plugin-transform-new-target": "^7.4.0", - "@babel/plugin-transform-object-super": "^7.2.0", - "@babel/plugin-transform-parameters": "^7.4.3", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.6.0", + "@babel/plugin-transform-new-target": "^7.4.4", + "@babel/plugin-transform-object-super": "^7.5.5", + "@babel/plugin-transform-parameters": "^7.4.4", "@babel/plugin-transform-property-literals": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.4.3", + "@babel/plugin-transform-regenerator": "^7.4.5", "@babel/plugin-transform-reserved-words": "^7.2.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.0", "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.2.0", + "@babel/plugin-transform-template-literals": "^7.4.4", "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.4.3", - "@babel/types": "^7.4.0", - "browserslist": "^4.5.2", - "core-js-compat": "^3.0.0", + "@babel/plugin-transform-unicode-regex": "^7.4.4", + "@babel/types": "^7.6.0", + "browserslist": "^4.6.0", + "core-js-compat": "^3.1.1", "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.5.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", - "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.0.tgz", + "integrity": "sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==", "dev": true, "requires": { "regenerator-runtime": "^0.13.2" } }, "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", + "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0" + "@babel/parser": "^7.6.0", + "@babel/types": "^7.6.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/traverse": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", - "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.0.tgz", + "integrity": "sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.6.0", "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/types": "^7.4.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.6.0", + "@babel/types": "^7.6.0", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.11" + "lodash": "^4.17.13" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", "dev": true, "requires": { - "ms": "^2.1.1" + "@babel/highlight": "^7.0.0" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "@babel/types": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } } } }, "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.0.tgz", + "integrity": "sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -839,31 +950,23 @@ } }, "@jimp/bmp": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.6.0.tgz", - "integrity": "sha512-zZOcVT1zK/1QL5a7qirkzPPgDKB1ianER7pBdpR2J71vx/g8MnrPbL3h/jEVPxjdci2Hph/VWhc/oLBtTbqO8w==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.8.0.tgz", + "integrity": "sha512-SBM1VzoFpN0kHotXU8Tg2XqxwZEg7IiUCr+W0CQ4Vc1/Weh6pXha8XexaOjjBF1jb9WX5p7AsQcaPjIVpOnR2Q==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "bmp-js": "^0.1.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.6.0.tgz", - "integrity": "sha512-ngAkyCLtX7buc2QyFy0ql/j4R2wGYQVsVhW2G3Y0GVAAklRIFIUYpyNKrqs228xA8f2O6XStbDStFlYkt7uNeg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.8.0.tgz", + "integrity": "sha512-6fDLRpBzWqq78IuxoWs5Du89qb27P4LS9hSVgPWyZAzkPCH7K4wvcE8cgrMJgbUgvJqelMY1jgBT2qUlululow==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "any-base": "^1.1.0", "buffer": "^5.2.0", "core-js": "^2.5.7", @@ -874,505 +977,344 @@ "phin": "^2.9.1", "pixelmatch": "^4.0.2", "tinycolor2": "^1.4.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/custom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.6.0.tgz", - "integrity": "sha512-+YZIWhf03Rfbi+VPbHomKInu3tcntF/aij/JrIJd1QZq13f8m3mRNxakXupiL18KH0C8BPNDk8RiwFX+HaOw3A==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.8.0.tgz", + "integrity": "sha512-dv4fO4qFtmdZOdwMTrkVYssgy25fpoOv5Vp5n6kgQUjTRVP5Im0afwzLnzvyOKpgEbUvKHNJ2coOwHmF/G8PZw==", "dev": true, "requires": { - "@jimp/core": "^0.6.0", + "@jimp/core": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/gif": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.6.0.tgz", - "integrity": "sha512-aWQ02P0ymTN1eh0BVsY+84wMdb/QeiVpCNQZl9y50cRnpuMM8TTmF/ZdCEBDiTRFcwXzHsqBXcLwEcYp3X2lTw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.8.0.tgz", + "integrity": "sha512-uQczNNzkL0CqI3zzZ7A0NTeYTHNFkLcMG9vXHqxTYZtPnK4r7qmbNgyak1DbHgYwP2xwBEEyhcZjnL9fHO4egQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7", "omggif": "^1.0.9" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/jpeg": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.6.0.tgz", - "integrity": "sha512-quYb+lM4h57jQvr2q9dEIkc0laTljws4dunIdFhJRfa5UlNL5mHInk8h5MxyALo0mZdT07TAcxiDHw5QXZ28JQ==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.8.0.tgz", + "integrity": "sha512-LVP1dcx85rMRdZSFEW2ytQdSy2s6evgi60Jdffy5xRyLCw8xu+KpZu6lGnXekgqrEg0F2pV0l5zJQwzPCgEHaA==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7", "jpeg-js": "^0.3.4" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-blit": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.6.0.tgz", - "integrity": "sha512-LjiCa+8OT2fgmvBpZt0ogurg/eu5kB8ZFWDRwHPcf8i+058sZC20dar/qrjVd5Knssq4ynjb5oAHsGuJq16Rqw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.8.0.tgz", + "integrity": "sha512-0fDnkJ/tmvL1PLpO+zvBfKjyMx5h/a7rV3UkbovbmhAd7P+gv0Gaui7uqTdP/Cseh9QZugqV+opDCBN8SviRdw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-blur": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.6.0.tgz", - "integrity": "sha512-/vjGcEiHda6OLTCYqXPFkfSTbL+RatZoGcp1vewcWqChUccn9QVINTlxB7nEI/3Nb/i7KdhOPNEQh1k6q6QXsw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.8.0.tgz", + "integrity": "sha512-Ctn13ICOeKGVDSxXykTEqrjjtigcKAYj0Loe5+dDvOmc9+BF6haW8okcJ3zA73uY3rxfcOOsqRT89f1awJB4ew==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-color": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.6.0.tgz", - "integrity": "sha512-mvDeAwN8ZpDkOaABMJ0w9zUzo9OOtu1qvvPkSirXDTMiXt1nsbfz8BoeoD7nU2MFhQj5MiGjH65UDnsH5ZzYuw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.8.0.tgz", + "integrity": "sha512-2MqafmTW556DhtHQ87Z4QHlTXuwjxkiqPemJi1Vyi+K8us2SYephNcOPySzunBvnx/x0iutlnQ878/9EZWvjGQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7", "tinycolor2": "^1.4.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-contain": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.6.0.tgz", - "integrity": "sha512-gPHnoQkDztMbvnTVo01BaMoM/hhDJdeJ7FRToD4p4Qvdor4V0I6NXtjOeUPXfD94miTgh/UTyJDqeG4GZzi4sA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.8.0.tgz", + "integrity": "sha512-0z8XnUJ2aBAbbE0hUUUhv5F+ZlWOB63IARhoRk0nTcJOCgPMM6+IBL7rE3o5d4TGrmeN8eCJbuevq0J9QFgsig==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-cover": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.6.1.tgz", - "integrity": "sha512-mYDchAeP9gcBCgi7vX2cYBNygY1s/YaEKEUvSh2H5+DJfxtp/eynW+bInypCfbQJArZZX+26F5GufWnkB8BOnw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.8.0.tgz", + "integrity": "sha512-tXydocsy6azQ9BuDpJIoDJnMOTTGMwau6TxD58b98f39FzMUhIBZNoKFlX9tazAYu7YronxPEYUT5M0Jx/mBMw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-crop": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.6.1.tgz", - "integrity": "sha512-rnxkgLvm1oC7yCg8mOIUqLNjAzzRC0eVTD3hfYq3LzDMe2LfpU208WhtVw0IjSJ2N7OSrRztJcw+jkVF8nUJJg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.8.0.tgz", + "integrity": "sha512-dhJV08CuGoG0Dg3dzLrM05HhjahLdVpCNRVv6kXmxEpS3infJ4tIO24mjxmynllSPPBitVgSK1dDixgyZE0FFw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-displace": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.6.0.tgz", - "integrity": "sha512-kkva5Fy3r7J7QmiqYQ5c9NeUKKkN7+KSfCGsZ6tkRHK4REMIXhQO/OnJN8XG6RReV29O6QykdyeTXDiHUDiROw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.8.0.tgz", + "integrity": "sha512-MdLFx5VosTtitD99jSiuzXR2NVMdK8m/CImz+orrAl+rbe3zXT866hlinoUINuQKwBc8rCNULbTClHsOjvRECw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-dither": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.6.0.tgz", - "integrity": "sha512-ILSG7bl3SOqmcIa9C4nBvs0h0E0ObnMbeKWUZiNuz6i0OAlbxryiIfU4j0UVQD5XqT9ksC5mviVNrvOMw4SZLw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.8.0.tgz", + "integrity": "sha512-zQ9EhR5mRP90n0+UA4UUpGVgRu6S+jtxMqEocwD2bLE1cB3ZAtvO3TrvjCvBz3NrnsEtGY84giHu14/+VblCcg==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-flip": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.6.0.tgz", - "integrity": "sha512-MXGGwABjERvfqVadEzJuVAmbsEQfjxXD0O/mMBegU1Qh7/JmnKAVplQCnojsMPxUdao/FKZjQqOnB/j4LLJtOQ==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.8.0.tgz", + "integrity": "sha512-X7bS/FsE3VM3w6AJRxUNcvtxwUdDBF+gOrw89HuMuwdg8nRT+ULUVAqOO8qw06H9ilscUbccfW6pzHjkKsdjlQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-gaussian": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.6.0.tgz", - "integrity": "sha512-RUsBCyj6Ukxgn/TU8v6c6WRbSFqKM0iknLVqDkKIuiOyJB7ougv66fqomh/i/h3ihIkEnf50BuO0c3ovrczfvw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.8.0.tgz", + "integrity": "sha512-GfAwu065NcmOZ5joqWlDln8SCPHkuGmdXWt453KjicsnDbeo+BRNFtR7Qy+RY9TujI6mSGML7BImYOYtRM6Pqw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-invert": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.6.0.tgz", - "integrity": "sha512-zTCqK8el6eqcNKAxw0y57gHBFgxygI5iM8dQDPyqsvVWO71i8XII7ubnJhEvPPN7vhIKlOSnS9XXglezvJoX4Q==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.8.0.tgz", + "integrity": "sha512-CiJkxXFkeFcv6n2NTFawDZKbflyt3TpQVJpB29yhagL6MXqt+cQu5FPQuFZJ2vtGGkthy73XAGWe3frbDnR17A==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-mask": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.6.0.tgz", - "integrity": "sha512-zkZVqAA7lxWhkn5EbPjBQ6tPluYIGfLMSX4kD1gksj+MVJJnVAd459AVuEXCvkUvv4wG5AlH8m6ve5NZj9vvxw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.8.0.tgz", + "integrity": "sha512-ySBzw7LVWtdLH82nYWKOZvreYpWXfT+AxlYrn6NK8OdsP6A/eS82EJ8Hm3UYfBUFMajcMgsGpknLtoxSTeQesw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-normalize": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.6.0.tgz", - "integrity": "sha512-7bNGT+S0rw9gvmxpkNsA19JSqBZYFrAn9QhEmoN4HIimdKtJaoLJh/GnxrPuOBLuv1IPJntoTOOWvOmfrQ6/ww==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.8.0.tgz", + "integrity": "sha512-XIuusnK9OVYZ5gl4MGh3J7pgzZVGzjjrBpoKP5dexsbwtDBn+L9TVKp2Kih8Fut/DYI8Vl9AslnaRG293coOXA==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-print": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.6.1.tgz", - "integrity": "sha512-gZOrYEOFtohRYsGJNh9fQkBgpiKjDfNXpiXmwdolqBF39pPxRvo9ivTIJ7sHCLpDL+SnQRdR0EHiJ08BFt5Yow==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.8.0.tgz", + "integrity": "sha512-cyKUFQRWISS0feLK4yqdCk/tZ/Cli2gOMiqIiX66pkI7fbNao/b/I1/y7WaHjcBQcv74Tcjq8TlsIvBQuUKKwg==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7", "load-bmfont": "^1.4.0" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-resize": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.6.0.tgz", - "integrity": "sha512-m0AA/mPkJG++RuftBFDUMRenqgIN/uSh88Kqs33VURYaabApni4ML3QslE1TCJtl2Lnu1eosxYlbzODjHx49eg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.8.0.tgz", + "integrity": "sha512-F1eEA45kusPxSH1VhbUBU4mFmW4JImN7V5Jin2kvC1q2AVvGXsRx5rrA8hw1pnve2/JGf+km2OcVKbb4XAz1lQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-rotate": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.6.1.tgz", - "integrity": "sha512-+YYjO4Y664k0IfsPJVz4Er3pX+C8vYDWD9L2am01Jls4LT7GtUZbgIKuqwl8qXX0ENc/aF9UssuWIYVVzEoapw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.8.0.tgz", + "integrity": "sha512-2YlebGHLY0jnkL7UT9Ht2OIkAvO8L7xIacjPbbcK8bBA5WwTXIRVShVjztMLQH7iFBh7qgl21+uMX97cbX6BSw==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugin-scale": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.6.0.tgz", - "integrity": "sha512-le/ttYwYioNPRoMlMaoJMCTv+m8d1v0peo/3J8E6Rf9ok7Bw3agkvjL9ILnsmr8jXj1YLrBSPKRs5nJ6ziM/qA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.8.0.tgz", + "integrity": "sha512-NXw+rl1pJb1g4EWPdT3U+jnPb9S8kr1/DLbBpTYkc34GoTNvEBHcaOmvgqdGpUpO4tAbweHbqMME//ZTEKF7XQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/plugins": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.6.1.tgz", - "integrity": "sha512-gCgYxsQn3z5qifM8G4RfP6vQFKfwK/waVIE3I/mUY9QHZrf94sLuhcws+72hTLQ3It3m3QKaA1kSXrD9nkRdUw==", - "dev": true, - "requires": { - "@jimp/plugin-blit": "^0.6.0", - "@jimp/plugin-blur": "^0.6.0", - "@jimp/plugin-color": "^0.6.0", - "@jimp/plugin-contain": "^0.6.0", - "@jimp/plugin-cover": "^0.6.1", - "@jimp/plugin-crop": "^0.6.1", - "@jimp/plugin-displace": "^0.6.0", - "@jimp/plugin-dither": "^0.6.0", - "@jimp/plugin-flip": "^0.6.0", - "@jimp/plugin-gaussian": "^0.6.0", - "@jimp/plugin-invert": "^0.6.0", - "@jimp/plugin-mask": "^0.6.0", - "@jimp/plugin-normalize": "^0.6.0", - "@jimp/plugin-print": "^0.6.1", - "@jimp/plugin-resize": "^0.6.0", - "@jimp/plugin-rotate": "^0.6.1", - "@jimp/plugin-scale": "^0.6.0", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.8.0.tgz", + "integrity": "sha512-auAyw8nXfhXH6cBejDLdTAMruRUel+zfgWPjILIdDI3FRrAvkyNtnES1yP2iRLF3nluEcO2WvHIlbQ4rdaOqVw==", + "dev": true, + "requires": { + "@jimp/plugin-blit": "^0.8.0", + "@jimp/plugin-blur": "^0.8.0", + "@jimp/plugin-color": "^0.8.0", + "@jimp/plugin-contain": "^0.8.0", + "@jimp/plugin-cover": "^0.8.0", + "@jimp/plugin-crop": "^0.8.0", + "@jimp/plugin-displace": "^0.8.0", + "@jimp/plugin-dither": "^0.8.0", + "@jimp/plugin-flip": "^0.8.0", + "@jimp/plugin-gaussian": "^0.8.0", + "@jimp/plugin-invert": "^0.8.0", + "@jimp/plugin-mask": "^0.8.0", + "@jimp/plugin-normalize": "^0.8.0", + "@jimp/plugin-print": "^0.8.0", + "@jimp/plugin-resize": "^0.8.0", + "@jimp/plugin-rotate": "^0.8.0", + "@jimp/plugin-scale": "^0.8.0", "core-js": "^2.5.7", "timm": "^1.6.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/png": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.6.0.tgz", - "integrity": "sha512-DBtMyQyrJxuKI7/1dVqLek+rCMM8U6BSOTHgo05wU7lhJKTB6fn2tbYfsnHQKzd9ld1M2qKuC+O1GTVdB2yl6w==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.8.0.tgz", + "integrity": "sha512-dnV219zYzqLHlj4kIFSWgI1p6o6jNI1zUxD6KqKXkubKUOwdyb5/EjlzRmPPAIvLz6Oy5ELG4rc0BRcaHAZcbQ==", "dev": true, "requires": { - "@jimp/utils": "^0.6.0", + "@jimp/utils": "^0.8.0", "core-js": "^2.5.7", "pngjs": "^3.3.3" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/tiff": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.6.0.tgz", - "integrity": "sha512-PV95CquEsolFziq0zZrAEJIzZSKwMK89TvkOXTPDi/xesgdXGC2rtG1IZFpC9L4UX5hi/M5GaeJa49xULX6Nqw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.8.0.tgz", + "integrity": "sha512-mwCExUukFgtx4PVD8okNXpsWpbbwJPciMCz3UpAg692/zXQMWJOcWWDnMz5rfW7yEo1FnYNfXUs6cZhz6u1v9g==", "dev": true, "requires": { "core-js": "^2.5.7", "utif": "^2.0.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/types": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.6.0.tgz", - "integrity": "sha512-j4tm82huEWpLrwave/2NYnMTY6us/6K9Js6Vd/CHoM/ki8M71tMXEVzc8tly92wtnEzQ9+FEk0Ue6pYo68m/5A==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.8.0.tgz", + "integrity": "sha512-/7xBLhBNLYq2Gldz66w3c8O19k85tbH2uFxKCkrVcOzDYY3/1c+wS86JRxoaIMz3UG2YUAOwxqWxWsga3A5sQA==", "dev": true, "requires": { - "@jimp/bmp": "^0.6.0", - "@jimp/gif": "^0.6.0", - "@jimp/jpeg": "^0.6.0", - "@jimp/png": "^0.6.0", - "@jimp/tiff": "^0.6.0", + "@jimp/bmp": "^0.8.0", + "@jimp/gif": "^0.8.0", + "@jimp/jpeg": "^0.8.0", + "@jimp/png": "^0.8.0", + "@jimp/tiff": "^0.8.0", "core-js": "^2.5.7", "timm": "^1.6.1" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, "@jimp/utils": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.6.0.tgz", - "integrity": "sha512-z5iYEfqc45vlYweROneNkjv32en6jS7lPL/eMLIvaEcQAHaoza20Dw8fUoJ0Ht9S92kR74xeTunAZq+gK2w67Q==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.8.0.tgz", + "integrity": "sha512-mkn1obBJjL8rPXtPc8Rnm+7kuzrhiioARvZTEgXXH8kRh5LzT+2FVPNkebLlHLVGDumTVPKOaQLPtctx5dEsgA==", "dev": true, "requires": { "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } } }, + "@polka/redirect": { + "version": "1.0.0-next.7", + "resolved": "https://registry.npmjs.org/@polka/redirect/-/redirect-1.0.0-next.7.tgz", + "integrity": "sha512-sHh1oVy9VBVhn41fOlrUdlxFkcbKrYdBcqePTSxvf2NqKu7UcMPZse/wDeQZk17A8cqDArKsR4m0MXd+3/Q83g==" + }, + "@polka/send": { + "version": "1.0.0-next.7", + "resolved": "https://registry.npmjs.org/@polka/send/-/send-1.0.0-next.7.tgz", + "integrity": "sha512-X/7sxWMfzuHuMXSls3SuOgfwcoNakuaNWciVS/KX3RML8NIPKQYgbhpqYPCujtXK9Z/KvW3/gzr2TUpabIJRMg==" + }, "@polka/url": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", - "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" + "version": "1.0.0-next.9", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.9.tgz", + "integrity": "sha512-VZqSaulg2kVQYMulmuZcvapPwH5/y81YHANiFIKz1GNZoG/F4o1JSeLlrvXJ8tC+RPUjxdrebfT3Qn+bnMi0bA==" + }, + "@sindresorhus/slugify": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-0.9.1.tgz", + "integrity": "sha512-b6heYM9dzZD13t2GOiEQTDE0qX+I1GyOotMwKh9VQqzuNiVdPVT8dM43fe9HNb/3ul+Qwd5oKSEDrDIfhq3bnQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "lodash.deburr": "^4.1.0" + } + }, + "@sveltejs/site-kit": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@sveltejs/site-kit/-/site-kit-1.1.4.tgz", + "integrity": "sha512-PsFUX1C/fhV0ODdCJaEQ8OwzgmaPJVmdefiSYA+i6zttBeV19d/ow+l7SPMXxBkux+vUIl5can4BwValCukCsw==", + "dev": true, + "requires": { + "@sindresorhus/slugify": "^0.9.1", + "golden-fleece": "^1.0.9" + } }, "@sveltejs/svelte-repl": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.0.10.tgz", - "integrity": "sha512-PYXCN8OC2q3WzwtMcbFinLGzFI7RlD3cHqjkUuQWDaIMHriKYuALun4H/FxP8w3B3hNe9OBprgGmBzlkPuGEJw==", + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/@sveltejs/svelte-repl/-/svelte-repl-0.1.17.tgz", + "integrity": "sha512-rM0DC+pZnqwH6PiuxXUmFRwYZ9XNkexxTNt+prR91Qs7ssxGgf0QkH6kGivSNLbrOtOvcgJbt1nUDybWra5HKA==", "dev": true, "requires": { - "codemirror": "^5.45.0", - "sourcemap-codec": "^1.4.4" + "codemirror": "^5.49.2", + "estree-walker": "^0.9.0", + "sourcemap-codec": "^1.4.6", + "svelte-json-tree": "0.0.5", + "yootils": "0.0.16" + }, + "dependencies": { + "estree-walker": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.9.0.tgz", + "integrity": "sha512-12U47o7XHUX329+x3FzNVjCx3SHEzMF0nkDv7r/HnBzX/xNTKxajBk6gyygaxrAFtLj39219oMfbtxv4KpaOiA==", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", + "dev": true + } } }, "@types/estree": { @@ -1382,33 +1324,43 @@ "dev": true }, "@types/node": { - "version": "11.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.4.tgz", - "integrity": "sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ==", + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.2.tgz", + "integrity": "sha512-gojym4tX0FWeV2gsW4Xmzo5wxGjXGm550oVUII7f7G5o4BV6c7DBdiG1RRQd+y1bvqRyYtPfMK85UM95vsapqQ==", "dev": true }, - "@types/resolve": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", - "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "@types/pg": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.11.1.tgz", + "integrity": "sha512-ayO8XV0xuJV3cEY4wySyD/7MA1HL75UpvJ5JAme00kNWA5pddlGtN4BRG97xgGe2NHgwxN8AkdjTQUEDypM8Uw==", "dev": true, "requires": { - "@types/node": "*" + "@types/node": "*", + "@types/pg-types": "*" } }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "@types/pg-types": { + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.4.tgz", + "integrity": "sha512-WdIiQmE347LGc1Vq3Ki8sk3iyCuLgnccqVzgxek6gEHp2H0p3MQ3jniIHt+bRODXKju4kNQ+mp53lmP5+/9moQ==", + "dev": true, "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" + "moment": ">=2.14.0" } }, - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "acorn": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz", + "integrity": "sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==", "dev": true }, "ansi-colors": { @@ -1438,27 +1390,6 @@ "integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==", "dev": true }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "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" - } - } - } - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -1468,35 +1399,12 @@ "sprintf-js": "~1.0.2" } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, "array-filter": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", "dev": true }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, "array-map": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", @@ -1509,110 +1417,25 @@ "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", "dev": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async-each": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.2.tgz", - "integrity": "sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "bagpipe": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/bagpipe/-/bagpipe-0.3.5.tgz", - "integrity": "sha1-40HRZPyyTN8E6n4Ft2XsEMiupqE=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "babel-plugin-dynamic-import-node": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", + "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } + "object.assign": "^4.1.0" } }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", "dev": true }, "bmp-js": { @@ -1621,61 +1444,16 @@ "integrity": "sha1-4Fpj95amwf8l9Hcex62twUjAcjM=", "dev": true }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - } - }, "brace-expansion": { "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" } }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1683,20 +1461,20 @@ "dev": true }, "browserslist": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.4.tgz", - "integrity": "sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz", + "integrity": "sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000955", - "electron-to-chromium": "^1.3.122", - "node-releases": "^1.1.13" + "caniuse-lite": "^1.0.30000989", + "electron-to-chromium": "^1.3.247", + "node-releases": "^1.1.29" } }, "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.2.tgz", + "integrity": "sha512-iy9koArjAFCzGnx3ZvNA6Z0clIbbFgbdWQ0mKD3hO0krOrZh8UgA6qMKcZvwLJxS+D6iVR76+5/pV56yMNYTag==", "dev": true, "requires": { "base64-js": "^1.0.2", @@ -1709,45 +1487,28 @@ "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=", "dev": true }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" + }, "builtin-modules": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, - "bulk-replace": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/bulk-replace/-/bulk-replace-0.0.1.tgz", - "integrity": "sha1-8JVoKolqvUs9ngjeQJzCIuIT+d0=" - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "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" - } - }, "camel-case": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", @@ -1765,9 +1526,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000958", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000958.tgz", - "integrity": "sha512-+KfdlJj6IOOrYmX723ZymUttwietVOGQfVKPAkjn+hxWg6FyPVaaIq+euUDu5mK1lblkRcF4Nlw949Lrac72sA==", + "version": "1.0.30000989", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz", + "integrity": "sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw==", "dev": true }, "chalk": { @@ -1781,55 +1542,12 @@ "supports-color": "^5.3.0" } }, - "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz", + "integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==", "dev": true }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, "clean-css": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", @@ -1876,19 +1594,10 @@ "dev": true }, "codemirror": { - "version": "5.45.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.45.0.tgz", - "integrity": "sha512-c19j644usCE8gQaXa0jqn2B/HN9MnB2u6qPIrrhrMkB+QAP42y8G4QnTwuwbVSoUS1jEl7JU9HZMGhCDL0nsAw==" - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } + "version": "5.49.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.49.2.tgz", + "integrity": "sha512-dwJ2HRPHm8w51WB5YTF9J7m6Z5dtkqbU9ntMZ1dqXyFB9IpjoUFDj80ahRVEoVanfIp6pfASJbOlbWdEf8FOzQ==", + "dev": true }, "color-convert": { "version": "1.9.3", @@ -1911,26 +1620,33 @@ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", "dev": true }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "config": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/config/-/config-3.2.2.tgz", + "integrity": "sha512-rOsfIOAcG82AWouK4/vBS/OKz3UPl2T/kP0irExmXJJOoWg2CmdfPLdx56bCoMUMFNh+7soQkQWCUC8DyemiwQ==", + "dev": true, + "optional": true, + "requires": { + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "optional": true, + "requires": { + "minimist": "^1.2.0" + } + } + } }, "convert-source-map": { "version": "1.6.0", @@ -1942,53 +1658,34 @@ } }, "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" }, "core-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz", - "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==", "dev": true }, "core-js-compat": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.1.tgz", - "integrity": "sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.2.1.tgz", + "integrity": "sha512-MwPZle5CF9dEaMYdDeWm73ao/IflDH+FjeJCWEADcEgFSE9TLimFKwJsfmkwzI8eC0Aj0mgvMDjeQjrElkz4/A==", "dev": true, "requires": { - "browserslist": "^4.5.4", - "core-js": "3.0.1", - "core-js-pure": "3.0.1", - "semver": "^6.0.0" + "browserslist": "^4.6.6", + "semver": "^6.3.0" }, "dependencies": { "semver": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", - "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, - "core-js-pure": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.1.tgz", - "integrity": "sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g==", - "dev": true - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -2009,11 +1706,12 @@ } }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "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.0.0" + "ms": "^2.1.1" } }, "decamelize": { @@ -2022,12 +1720,6 @@ "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", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2037,58 +1729,17 @@ "object-keys": "^1.0.12" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "degit": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/degit/-/degit-2.1.3.tgz", - "integrity": "sha512-/An4FFyxq7yody1DMeFeftv+YmyZ7ESYEwtGtkbe3ovZpoEhIV2gy7+2z7dc8UqqC0b1AHJwfWj2nPnDhiTtuQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/degit/-/degit-2.1.4.tgz", + "integrity": "sha512-jshBiyZtnIYljRQf9M6QQB7qcEMs0V6QbEHouufeapFUgFfpkdLB7Mx1mO9d/QYR9DPjV93P4qFhBQZUIczhSg==", "dev": true, "requires": { - "chalk": "^2.0.1", - "home-or-tmp": "^3.0.0", - "mri": "^1.1.0", - "sander": "^0.6.0", - "tar": "^4.0.2" + "chalk": "2.4.2", + "home-or-tmp": "3.0.0", + "mri": "1.1.4", + "sander": "0.6.0", + "tar": "4.4.10" } }, "delegate": { @@ -2097,20 +1748,10 @@ "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", "optional": true }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, "devalue": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-1.1.0.tgz", - "integrity": "sha512-mKj+DaZuxevfmjI78VdlkBr+NDmwaDAKQz0t5RDSmhwBn6m5z82KDnVRKVFeUvlMOmI1fzkAUx4USdqGGhas6g==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.0.tgz", + "integrity": "sha512-6H2FBD5DPnQS75UWJtQjoVeKZlmXoa765UgYS5RQnx6Ay9LUhUld0w1/D6cYdrY+wnu6XQNlpEBfnJUZK0YyPQ==" }, "diff": { "version": "3.5.0", @@ -2130,20 +1771,23 @@ "dev": true }, "dotenv": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", - "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.1.0.tgz", + "integrity": "sha512-GUE3gqcDCaMltj2++g6bRQ5rBJWtkWTmqmD0fo1RnnMuUqHNCt2oTPeDnS9n6fKYvlhn7AeBkb38lymBtWBQdA==", "dev": true }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } }, "electron-to-chromium": { - "version": "1.3.124", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", - "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==", + "version": "1.3.252", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.252.tgz", + "integrity": "sha512-NWJ5TztDnjExFISZHFwpoJjMbLUifsNBnx7u2JI0gCw6SbKyQYYWWtBHasO/jPtHym69F4EZuTpRNGN11MT/jg==", "dev": true }, "emoji-regex": { @@ -2152,11 +1796,6 @@ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "encodeurl": { - "version": "1.0.2", - "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", @@ -2200,27 +1839,16 @@ "is-symbol": "^1.0.2" } }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "eslint-plugin-svelte3": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte3/-/eslint-plugin-svelte3-0.4.7.tgz", - "integrity": "sha512-d7u+vVNOk8gPFEZ/CL8R7dkppN6P2DKlBoO9lhqgbmU3h8onV0CPkL8hoNZhpo8hsXwQ4tgSUrbUVvDTn97YCw==", - "dev": true - }, "esm": { - "version": "3.2.22", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.22.tgz", - "integrity": "sha512-z8YG7U44L82j1XrdEJcqZOLUnjxco8pO453gKOlaMD1/md1n/5QrscAmYG+oKUspsmDLuBFZrpbxI6aQ67yRxA==", + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", "dev": true }, "esprima": { @@ -2230,9 +1858,9 @@ "dev": true }, "estree-walker": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz", - "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", "dev": true }, "esutils": { @@ -2241,11 +1869,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "etag": { - "version": "1.8.1", - "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", @@ -2267,908 +1890,59 @@ "integrity": "sha1-WKnS1ywCwfbwKg70qRZicrd2CSI=", "dev": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "file-type": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", + "integrity": "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==", + "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": { - "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": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "locate-path": "^3.0.0" } }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "express-session": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.16.1.tgz", - "integrity": "sha512-pWvUL8Tl5jUy1MLH7DhgUlpoKeVPUTe+y6WQD9YhcN0C5qAhsh4a8feVjiUXo3TFhIy191YGZ4tewW9edbl2xQ==", - "requires": { - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-headers": "~1.0.2", - "parseurl": "~1.3.2", - "safe-buffer": "5.1.2", - "uid-safe": "~2.1.5" - }, - "dependencies": { - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - } + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" } }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "flru": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flru/-/flru-1.0.2.tgz", + "integrity": "sha512-kWyh8ADvHBFz6ua5xYOPnUroZTT/bwWfrCeL0Wj1dzG4/YOmOcfJ99W8dOVyyynJN35rZ9aCOtHChqQovV7yog==" + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } + "is-callable": "^1.1.3" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "file-type": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", - "integrity": "sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "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" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", - "dev": true - } - } - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", - "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "brace-expansion": { - "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" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true, - "optional": true - }, - "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 - }, - "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 - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "optional": 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" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true, - "optional": 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" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": 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": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.4.tgz", - "integrity": "sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA==", - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz", - "integrity": "sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A==", - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", - "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==", - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.2.0.tgz", - "integrity": "sha512-7Mni4Z8Xkx0/oegoqlcao/JpPCPEMtUvsmB0q7mgvlMinykJLSRTYuFqoQLYgGY8biuxIeiHO+QNJKbCfljewQ==", - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~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 - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true, - "optional": true - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true, - "optional": 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, - "optional": 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, - "optional": true - }, - "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" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.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" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "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 - } + "fs-minipass": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", + "integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==", + "dev": true, + "requires": { + "minipass": "^2.2.1" } }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3190,16 +1964,11 @@ "pump": "^3.0.0" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3209,27 +1978,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", @@ -3241,15 +1989,16 @@ } }, "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "golden-fleece": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/golden-fleece/-/golden-fleece-1.0.9.tgz", - "integrity": "sha512-YSwLaGMOgSBx9roJlNLL12c+FRiw7VECphinc6mGucphc/ZxTHgdEz6gmJqH6NOzYEd/yr64hwjom5pZ+tJVpg==" + "integrity": "sha512-YSwLaGMOgSBx9roJlNLL12c+FRiw7VECphinc6mGucphc/ZxTHgdEz6gmJqH6NOzYEd/yr64hwjom5pZ+tJVpg==", + "dev": true }, "good-listener": { "version": "1.2.2", @@ -3263,7 +2012,8 @@ "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true }, "growl": { "version": "1.10.5", @@ -3292,52 +2042,12 @@ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "hepburn": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/hepburn/-/hepburn-1.1.1.tgz", - "integrity": "sha512-Ok3ZmMJN3ek4WFAL4f5t8k+BmrDRlS5qGjI4um+3cHH0SrYVzJgUTYwIfGvU8s/eWqOEY+gsINwjJSoaBG3A9g==", - "requires": { - "bulk-replace": "0.0.1" - } - }, "home-or-tmp": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-3.0.0.tgz", @@ -3351,37 +2061,18 @@ "dev": true }, "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", - "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - }, - "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 - } - } - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", + "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", + "dev": true, "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "camel-case": "^3.0.0", + "clean-css": "^4.2.1", + "commander": "^2.19.0", + "he": "^1.2.0", + "param-case": "^2.1.1", + "relateurl": "^0.2.7", + "uglify-js": "^3.5.1" } }, "http-link-header": { @@ -3390,13 +2081,10 @@ "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", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } + "httpie": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/httpie/-/httpie-1.1.2.tgz", + "integrity": "sha512-VQ82oXG95oY1fQw/XecHuvcFBA+lZQ9Vwj1RfLcO8a7HpDd4cc2ukwpJt+TUlFaLUAzZErylxWu6wclJ1rUhUQ==" }, "ieee754": { "version": "1.1.13", @@ -3404,15 +2092,11 @@ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", "dev": true }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, "inflight": { "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" @@ -3421,12 +2105,14 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true }, "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true }, "invariant": { "version": "2.2.4", @@ -3443,50 +2129,16 @@ "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", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", "dev": true }, "is-callable": { @@ -3495,63 +2147,12 @@ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "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", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "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", @@ -3564,48 +2165,19 @@ "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=", "dev": true }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "is-reference": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.3.tgz", + "integrity": "sha512-W1iHHv/oyBb2pPxkBxtaewxa1BC58Pn5J0hogyCdefwUIvb6R+TGbAcIa4qPNYLqLhb3EnOgUf2MQkkF76BcKw==", "dev": true, "requires": { - "isobject": "^3.0.1" + "@types/estree": "0.0.39" } }, "is-regex": { @@ -3632,12 +2204,6 @@ "has-symbols": "^1.0.0" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -3650,12 +2216,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "jest-worker": { "version": "24.6.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz", @@ -3678,30 +2238,22 @@ } }, "jimp": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.6.1.tgz", - "integrity": "sha512-R46NBV0mbdC+1DwP/xbTmXULfxxAok5KA+XtZTPVku1S0mXvsaxZ65cQz1MhiPjxcIIQYidI3ZFIf2F+th3wMQ==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.8.0.tgz", + "integrity": "sha512-LrZMRVEgOIlw2Gv9ZsD6uuD3+uB6Idc3xF35UUeEqsO13kOs0GYUKDHXKyI/1n16kNFAze+vEzBzpjyewdp86g==", "dev": true, "requires": { - "@babel/polyfill": "^7.0.0", - "@jimp/custom": "^0.6.0", - "@jimp/plugins": "^0.6.1", - "@jimp/types": "^0.6.0", - "core-js": "^2.5.7" - }, - "dependencies": { - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", - "dev": true - } + "@jimp/custom": "^0.8.0", + "@jimp/plugins": "^0.8.0", + "@jimp/types": "^0.8.0", + "core-js": "^2.5.7", + "regenerator-runtime": "^0.13.3" } }, "jpeg-js": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.4.tgz", - "integrity": "sha512-6IzjQxvnlT8UlklNmDXIJMWxijULjqGrzgqc0OG7YadZdvm7KPQ1j0ehmQQHckgEWOfgpptzcnWgESovxudpTA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.6.tgz", + "integrity": "sha512-MUj2XlMB8kpe+8DJUGH/3UJm4XpI8XEgZQ+CiHDeyrGoKPdW/8FJv6ku+3UiYm5Fz3CWaL+iXmD8Q4Ap6aC1Jw==", "dev": true }, "js-levenshtein": { @@ -3717,9 +2269,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", - "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -3747,30 +2299,47 @@ "minimist": "^1.2.0" } }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true }, - "keypress": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz", - "integrity": "sha1-SjGI1CkbZrT2XtuZ+AaqmuKTWSo=" + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + } }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } }, "lcid": { "version": "2.0.0", @@ -3781,16 +2350,6 @@ "invert-kv": "^2.0.0" } }, - "limax": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/limax/-/limax-1.7.0.tgz", - "integrity": "sha512-ibcGylOXT5vry2JKfKwLWx2tZudRYWm4SzG9AE/cc5zqwW+3nQy/uPLUvfAUChRdmqxVrK6SNepmO7ZY8RoKfA==", - "requires": { - "hepburn": "^1.1.0", - "pinyin": "^2.8.3", - "speakingurl": "^14.0.1" - } - }, "load-bmfont": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.4.0.tgz", @@ -3805,6 +2364,14 @@ "phin": "^2.9.1", "xhr": "^2.0.1", "xtend": "^4.0.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } } }, "load-json-file": { @@ -3830,11 +2397,52 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "lodash.deburr": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", + "integrity": "sha1-3bG7s+8HRYwBd7oH3hRCLLAz/5s=", "dev": true }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -3877,30 +2485,10 @@ "p-defer": "^1.0.0" } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, "marked": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.2.tgz", - "integrity": "sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA==" - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==" }, "mem": { "version": "4.3.0", @@ -3919,11 +2507,6 @@ "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", "dev": true }, - "merge-descriptors": { - "version": "1.0.1", - "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", @@ -3933,49 +2516,10 @@ "readable-stream": "^2.0.1" } }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "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" - } - }, "mime": { - "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.38.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" - }, - "mime-types": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", - "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", - "requires": { - "mime-db": "~1.38.0" - } + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" }, "mimic-fn": { "version": "2.1.0", @@ -3996,6 +2540,7 @@ "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" } @@ -4007,9 +2552,9 @@ "dev": true }, "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.5.0.tgz", + "integrity": "sha512-9FwMVYhn6ERvMR8XFdOavRz4QK/VJV8elU1x50vYexf9lslDcWe/f4HBRxCPd185ekRSjU6CfYyJCECa/CQy7Q==", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -4025,27 +2570,6 @@ "minipass": "^2.2.1" } }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -4064,9 +2588,9 @@ } }, "mocha": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.3.tgz", - "integrity": "sha512-QdE/w//EPHrqgT5PNRUjRVHy6IJAzAf1R8n2O8W8K2RZ+NbPfOD5cBDp+PGa2Gptep37C/TdBiaNwakppEzEbg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", + "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -4078,7 +2602,7 @@ "glob": "7.1.3", "growl": "1.10.5", "he": "1.2.0", - "js-yaml": "3.13.0", + "js-yaml": "3.13.1", "log-symbols": "2.2.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", @@ -4103,11 +2627,19 @@ "ms": "^2.1.1" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "glob": { + "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", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } }, "supports-color": { "version": "6.0.0", @@ -4120,6 +2652,12 @@ } } }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", + "dev": true + }, "mri": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", @@ -4127,40 +2665,9 @@ "dev": true }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "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-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" - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, "nice-try": { "version": "1.0.5", @@ -4188,36 +2695,112 @@ } }, "node-fetch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz", - "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "dev": true }, - "node-releases": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.14.tgz", - "integrity": "sha512-d58EpVZRhQE60kWiWUaaPlK9dyC4zg3ZoMcHcky2d4hDksyQj0rUozwInOl0C66mBsqo01Tuns8AvxnL5S7PKg==", + "node-pg-migrate": { + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-3.22.0.tgz", + "integrity": "sha512-dg/noZOSh3WI6qFgbq69DCA/K1kAplBgnnkO6LkuI14xs74Y2URM9BgxBfKBDfBQwXoUBbcJglTmF8F7P8rRdQ==", "dev": true, "requires": { - "semver": "^5.3.0" - } - }, - "nodejieba": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/nodejieba/-/nodejieba-2.3.0.tgz", - "integrity": "sha512-ZzLsVuNDlrmcBQa/b8G/yegdXje2iFmktYmPksk6qLha1brKEANYqg4XPiBspF1D0y7Npho91KTmvKFcDr0UdA==", - "optional": true, - "requires": { - "nan": "~2.10.0" + "@types/pg": "^7.4.0", + "config": ">=1.0.0", + "dotenv": ">=1.0.0", + "lodash": "~4.17.0", + "mkdirp": "~0.5.0", + "yargs": "~13.3.0" }, "dependencies": { - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "optional": true + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, + "node-releases": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.29.tgz", + "integrity": "sha512-R5bDhzh6I+tpi/9i2hrrvGJ3yKPYzlVOORDkXhnZuwi5D3q1I5w4vYy24PJXTcLk9Q0kws9TO77T75bcK8/ysQ==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -4230,12 +2813,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, "npm-run-all": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", @@ -4268,62 +2845,12 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, - "oauth": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", - "integrity": "sha1-vR/vr2hslrdUda7VGWQS/2DPucE=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "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", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, "object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", @@ -4346,38 +2873,17 @@ "es-abstract": "^1.5.1" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "omggif": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.9.tgz", - "integrity": "sha1-3LcCTazVDFK00wPwSALJHAV8dl8=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", + "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==", "dev": true }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -4435,6 +2941,11 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "pako": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", @@ -4492,57 +3003,6 @@ "json-parse-better-errors": "^1.0.1" } }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "passport": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.0.tgz", - "integrity": "sha1-xQlWkTR71a07XhgCOMORTRbwWBE=", - "requires": { - "passport-strategy": "1.x.x", - "pause": "0.0.1" - } - }, - "passport-github": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/passport-github/-/passport-github-1.1.0.tgz", - "integrity": "sha1-jOHj/NYa11eOsd9ZWDnkrqEjVdQ=", - "requires": { - "passport-oauth2": "1.x.x" - } - }, - "passport-oauth2": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.5.0.tgz", - "integrity": "sha512-kqBt6vR/5VlCK8iCx1/KpY42kQ+NEHZwsSyt4Y6STiNjU+wWICG1i8ucc1FapXDGO15C5O5VZz7+7vRzrDPXXQ==", - "requires": { - "base64url": "3.x.x", - "oauth": "0.9.x", - "passport-strategy": "1.x.x", - "uid2": "0.0.x", - "utils-merge": "1.x.x" - } - }, - "passport-strategy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", - "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -4552,7 +3012,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "2.0.1", @@ -4563,12 +3024,8 @@ "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==" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true }, "path-type": { "version": "3.0.0", @@ -4579,10 +3036,61 @@ "pify": "^3.0.0" } }, - "pause": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", - "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" + "pg": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-7.12.1.tgz", + "integrity": "sha512-l1UuyfEvoswYfcUe6k+JaxiN+5vkOgYcVSbSuw3FvdLqDbaoa2RJo1zfJKfPsSYPFVERd4GHvX3s2PjG1asSDA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "0.1.3", + "pg-pool": "^2.0.4", + "pg-types": "^2.1.0", + "pgpass": "1.x", + "semver": "4.3.2" + }, + "dependencies": { + "semver": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.2.tgz", + "integrity": "sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c=" + } + } + }, + "pg-connection-string": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-0.1.3.tgz", + "integrity": "sha1-2hhHsglA5C7hSSvq9l1J2RskXfc=" + }, + "pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" + }, + "pg-pool": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.7.tgz", + "integrity": "sha512-UiJyO5B9zZpu32GSlP0tXy8J2NsJ9EFGFfz5v6PSbdz/1hBLX1rNiiy5+mAm5iJJYwfCv4A0EBcQLGWwjbpzZw==" + }, + "pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "requires": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + } + }, + "pgpass": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.2.tgz", + "integrity": "sha1-Knu0G2BltnkH6R2hsHwYR8h3swY=", + "requires": { + "split": "^1.0.0" + } }, "phin": { "version": "2.9.3", @@ -4602,26 +3110,6 @@ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "pinyin": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/pinyin/-/pinyin-2.8.3.tgz", - "integrity": "sha1-MBzLQ1jM/oAlI8S9ZAphK+5NfEs=", - "requires": { - "commander": "~1.1.1", - "nodejieba": "^2.2.1", - "object-assign": "^4.0.1" - }, - "dependencies": { - "commander": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-1.1.1.tgz", - "integrity": "sha1-UNFlGGiuYOzP8KLZ80WVN2vGsEE=", - "requires": { - "keypress": "0.1.x" - } - } - } - }, "pixelmatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", @@ -4637,16 +3125,42 @@ "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", "dev": true }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true + "polka": { + "version": "1.0.0-next.9", + "resolved": "https://registry.npmjs.org/polka/-/polka-1.0.0-next.9.tgz", + "integrity": "sha512-oAWH5O3CIPTzPKNx9KF9NDfy3KRyy9NtUhDEJGmMRCDT6s3CZaGDm7xafcKtm0uK6g0CBiNtoeGWpPFSLUXeaw==", + "requires": { + "@polka/url": "^1.0.0-next.9", + "trouter": "^3.1.0" + } + }, + "postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.4.tgz", + "integrity": "sha512-bESRvKVuTrjoBluEcpv2346+6kgB7UlnqWZsnbnCccTNq/pqfj1j6oBaN5+b/NrDXepYUT/HKadqv3iS9lJuVA==" + }, + "postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "requires": { + "xtend": "^4.0.0" + } }, "prismjs": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.16.0.tgz", - "integrity": "sha512-OA4MKxjFZHSvZcisLGe14THYsug/nF6O1f0pAJc0KN0wTyAcLqmsbE+lTGKSpyh+9pEW57+k6pg2AfYR+coyHA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz", + "integrity": "sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==", "requires": { "clipboard": "^2.0.0" } @@ -4664,54 +3178,19 @@ "dev": true }, "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "requires": { - "forwarded": "~0.1.2", - "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", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "random-bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", - "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=" - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "read-pkg": { @@ -4740,21 +3219,11 @@ "util-deprecate": "~1.0.1" } }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, "requires": { "resolve": "^1.1.6" } @@ -4766,53 +3235,48 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz", - "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", + "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", "dev": true, "requires": { "regenerate": "^1.4.0" } }, "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==", + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", "dev": true }, "regenerator-transform": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", - "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", + "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", "dev": true, "requires": { "private": "^0.1.6" } }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, "regexp-tree": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.5.tgz", - "integrity": "sha512-nUmxvfJyAODw+0B13hj8CFVAxhe7fDEAgJgaotBu3nnR+IgGgZq59YedJP5VYTlkEfqjuK6TuRpnymKdatLZfQ==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.13.tgz", + "integrity": "sha512-hwdV/GQY5F8ReLZWO+W1SRoN5YfpOKY6852+tBFcma72DKBIcHjPRIlIvQN35bCOljuAfP2G2iB0FC/w236mUw==", "dev": true }, + "regexparam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-1.3.0.tgz", + "integrity": "sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==" + }, "regexpu-core": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", - "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.5.tgz", + "integrity": "sha512-FpI67+ky9J+cDizQUJlIlNZFKual/lUkFr1AG6zOCpwZ9cLrg8UUVakyUQJD7fCDIe9Z2nwTQJNPyonatNmDFQ==", "dev": true, "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.0.2", + "regenerate-unicode-properties": "^8.1.0", "regjsgen": "^0.5.0", "regjsparser": "^0.6.0", "unicode-match-property-ecmascript": "^1.0.4", @@ -4848,24 +3312,6 @@ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", "dev": true }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "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", @@ -4885,91 +3331,96 @@ "dev": true }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", + "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "dev": true, "requires": { "path-parse": "^1.0.6" } }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" - }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { "glob": "^7.1.3" } }, "rollup": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.10.0.tgz", - "integrity": "sha512-U9t/JaKtO0+X0pSmLVKMrAZEixrbVzITf193TiEhfoVKCnd7pDimIFo94IxUCgbn6+v5VmduHkubx2VV1s0Ftw==", + "version": "1.21.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.21.2.tgz", + "integrity": "sha512-sCAHlcQ/PExU5t/kRwkEWHdhGmQrZ2IgdQzbjPVNfhWbKHMMZGYqkASVTpQqRPLtQKg15xzEscc+BnIK/TE7/Q==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "^11.13.4", - "acorn": "^6.1.1" + "@types/node": "^12.7.4", + "acorn": "^7.0.0" + }, + "dependencies": { + "@types/node": { + "version": "12.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.4.tgz", + "integrity": "sha512-W0+n1Y+gK/8G2P/piTkBBN38Qc5Q1ZSO6B5H3QmPCUewaiXOo2GCAWZ4ElZCcNhjJuBSUSLGFUJnmlCn5+nxOQ==", + "dev": true + } } }, "rollup-plugin-babel": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz", - "integrity": "sha512-KfnizE258L/4enADKX61ozfwGHoqYauvoofghFJBhFnpH9Sb9dNPpWg8QHOaAfVASUYV8w0mCx430i9z0LJoJg==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.3.tgz", + "integrity": "sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", - "rollup-pluginutils": "^2.3.0" + "rollup-pluginutils": "^2.8.1" } }, "rollup-plugin-commonjs": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz", - "integrity": "sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz", + "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==", "dev": true, "requires": { - "estree-walker": "^0.6.0", + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", "magic-string": "^0.25.2", - "resolve": "^1.10.0", - "rollup-pluginutils": "^2.6.0" + "resolve": "^1.11.0", + "rollup-pluginutils": "^2.8.1" } }, "rollup-plugin-json": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz", - "integrity": "sha512-BlYk5VspvGpjz7lAwArVzBXR60JK+4EKtPkCHouAWg39obk9S61hZYJDBfMK+oitPdoe11i69TlxKlMQNFC/Uw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz", + "integrity": "sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow==", "dev": true, "requires": { - "rollup-pluginutils": "^2.3.1" + "rollup-pluginutils": "^2.5.0" } }, "rollup-plugin-node-resolve": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.3.tgz", - "integrity": "sha512-r+WaesPzdGEynpLZLALFEDugA4ACa5zn7bc/+LVX4vAXQQ8IgDHv0xfsSvJ8tDXUtprfBtrDtRFg27ifKjcJTg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", "dev": true, "requires": { "@types/resolve": "0.0.8", "builtin-modules": "^3.1.0", "is-module": "^1.0.0", - "resolve": "^1.10.0" + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + }, + "dependencies": { + "resolve": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } } }, "rollup-plugin-replace": { @@ -4983,9 +3434,9 @@ } }, "rollup-plugin-svelte": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.0.3.tgz", - "integrity": "sha512-3W/jbtBcsxohKQMI1Po2ZsUHRGUy3vEtgXLHvBin1+ms3wl2eomSyYBV7pwrkh6tWok9BVzdxGQgd7IqibG+Ew==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.1.0.tgz", + "integrity": "sha512-4MRZG29dAWDpoxEs5uIHzDnYafQEOLaKIJAuDYUtFIzEm1F1IGSTlFyjd8/qk4wltlHdu6V7YfZY53+CKryhMg==", "dev": true, "requires": { "require-relative": "^0.8.7", @@ -4994,25 +3445,25 @@ } }, "rollup-plugin-terser": { - "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==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.1.1.tgz", + "integrity": "sha512-McIMCDEY8EU6Y839C09UopeRR56wXHGdvKKjlfiZG/GrP6wvZQ62u2ko/Xh1MNH2M9WDL+obAAHySljIZYCuPQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "jest-worker": "^24.0.0", - "serialize-javascript": "^1.6.1", - "terser": "^3.14.1" + "jest-worker": "^24.6.0", + "rollup-pluginutils": "^2.8.1", + "serialize-javascript": "^1.7.0", + "terser": "^4.1.0" } }, "rollup-pluginutils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz", - "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", "dev": true, "requires": { - "estree-walker": "^0.6.0", - "micromatch": "^3.1.10" + "estree-walker": "^0.6.1" } }, "safe-buffer": { @@ -5020,20 +3471,6 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, "sander": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/sander/-/sander-0.6.0.tgz", @@ -5046,22 +3483,22 @@ } }, "sapper": { - "version": "0.26.0-alpha.12", - "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.26.0-alpha.12.tgz", - "integrity": "sha512-NEXr6Eu5jawY76N5IEQhKMKhcZW6+42E2alH4J8DxFMmOI7Gi2nlwCQ2jcZv7q/S+zMP+OSuqE44c94A5u1H8Q==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/sapper/-/sapper-0.27.8.tgz", + "integrity": "sha512-78K+56yu9nGOEU0B0XjBvNchRuPEv4aHbAKK4D874S4aoapMAkHCT0bHtPK12S3P7JPxvvT8GzHaq/8NetMmbg==", "dev": true, "requires": { - "html-minifier": "^3.5.21", + "html-minifier": "^4.0.0", "http-link-header": "^1.0.2", - "shimport": "0.0.14", - "sourcemap-codec": "^1.4.4", + "shimport": "^1.0.1", + "sourcemap-codec": "^1.4.6", "string-hash": "^1.1.3" }, "dependencies": { - "shimport": { - "version": "0.0.14", - "resolved": "https://registry.npmjs.org/shimport/-/shimport-0.0.14.tgz", - "integrity": "sha512-JfzpHhyZ6CYuPYUSitFNw2/IxWEABLN1chs9xDHnn4tPXXCmfIn1METCmIl8Vwvm2FZGW7b8WB4zMCKaJEhY6A==", + "sourcemap-codec": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", "dev": true } } @@ -5081,92 +3518,20 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - } + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "serialize-javascript": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", - "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", + "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", "dev": true }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "session-file-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/session-file-store/-/session-file-store-1.2.0.tgz", - "integrity": "sha512-DkYLYFkkK6u9xyraVHemulhlUuuufLukf7SQxOZSx8SPwkswcaIrls882PaQZ72zRKsyhUVNxOUl9w0lQubUFw==", - "requires": { - "bagpipe": "^0.3.5", - "fs-extra": "^4.0.0", - "object-assign": "^4.1.1", - "retry": "^0.10.0", - "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", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -5198,6 +3563,7 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "dev": true, "requires": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -5205,9 +3571,9 @@ } }, "shimport": { - "version": "0.0.16", - "resolved": "https://registry.npmjs.org/shimport/-/shimport-0.0.16.tgz", - "integrity": "sha512-CvIeFZUtTEMFE5R7ARIMXdpcEr7Y1DujDXoTd0xvNLH4arn+wUBLCtkSk8KyuVo9SgAcemMswO+DCOjWPCFqrw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/shimport/-/shimport-1.0.1.tgz", + "integrity": "sha512-Imf4gH+8WQmT1GvxS/x79qpmfnE6m50hyN1ucatX+7oMCgmaF8obZWCPIzSUe6+P+YmXM46lkP2pxiV2/lt9Og==", "dev": true }, "signal-exit": { @@ -5217,131 +3583,13 @@ "dev": true }, "sirv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-0.3.1.tgz", - "integrity": "sha512-03p4fuXPfhlNrDjUBw5bGF//4i0Rjwf7hVm8XhuKgeguHGQPr4pV+lgAJZKSP9BaJKn+QG9QvTxLX1wSYshccg==", - "requires": { - "@polka/url": "^0.5.0", - "mime": "^2.3.1" - }, - "dependencies": { - "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==" - } - } - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "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": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, + "version": "1.0.0-next.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.0-next.2.tgz", + "integrity": "sha512-hWp0todr4jSb1BFBiANRmqYRXzX02l36/X4tyHPYKqMZ+e1hrDZKUjIIXrAOBRWlAE/G5cGImUciMrUcU8DeOg==", "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "@polka/url": "^1.0.0-next.9", + "mime": "^2.3.1", + "totalist": "^1.0.0" } }, "source-map": { @@ -5350,19 +3598,6 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "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-support": { "version": "0.5.12", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", @@ -5381,12 +3616,6 @@ } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, "sourcemap-codec": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", @@ -5425,18 +3654,12 @@ "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", "dev": true }, - "speakingurl": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", - "integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==" - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "requires": { - "extend-shallow": "^3.0.0" + "through": "2" } }, "sprintf-js": { @@ -5445,32 +3668,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, "string-hash": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", @@ -5499,14 +3696,14 @@ } }, "string.prototype.trim": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", - "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.0.tgz", + "integrity": "sha512-9EIjYD/WdlvLpn987+ctkLf0FfvBefOCuiEr2henD8X+7jfwPnyvTdmW8OJhj5p+M0/96mBdynLWkxUr+rHlpg==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.0", - "function-bind": "^1.0.2" + "define-properties": "^1.1.3", + "es-abstract": "^1.13.0", + "function-bind": "^1.1.1" } }, "string_decoder": { @@ -5555,35 +3752,41 @@ } }, "svelte": { - "version": "3.0.0-beta.28", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.0.0-beta.28.tgz", - "integrity": "sha512-CUHT2l7vmukmutfoyALIed+prGRIe9PzGrGfY5ZTUq9NhB3sfYuZ5GctceYQze/e9rV8EEkrmJamWQldvn7l3A==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.12.0.tgz", + "integrity": "sha512-9/broj3bjShrsk3FuVDH0Bho2BchPKT8ubAqRcTqwkqrO9npOS3Vi98Yb5mBaa4bYV+ELTuvPvaQZbCJYMFRdg==", + "dev": true + }, + "svelte-json-tree": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/svelte-json-tree/-/svelte-json-tree-0.0.5.tgz", + "integrity": "sha512-kTcOVlsldI2neszYNQAfFCt+u62OWWAZgpeoW9RN3hjtJCWI5bkVj0gtljZWUlyEWTfgpmag5L5AHDKg8w8ZmQ==", "dev": true }, "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz", + "integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==", "dev": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "terser": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", - "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.1.2.tgz", + "integrity": "sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw==", "dev": true, "requires": { - "commander": "^2.19.0", + "commander": "^2.20.0", "source-map": "~0.6.1", - "source-map-support": "~0.5.10" + "source-map-support": "~0.5.12" }, "dependencies": { "source-map": { @@ -5594,10 +3797,15 @@ } } }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, "timm": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/timm/-/timm-1.6.1.tgz", - "integrity": "sha512-hqDTYi/bWuDxL2i6T3v6nrvkAQ/1Bc060GSkVEQZp02zTSTB4CHSKsOkliequCftQaNRcjRqUZmpGWs5FfhrNg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/timm/-/timm-1.6.2.tgz", + "integrity": "sha512-IH3DYDL1wMUwmIlVmMrmesw5lZD6N+ZOAFWEyLrtpoL9Bcrs9u7M/vyOnHzDD2SMs4irLkVjqxZbHrXStS/Nmw==", "dev": true }, "tiny-emitter": { @@ -5618,47 +3826,10 @@ "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", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "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", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } + "totalist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.0.1.tgz", + "integrity": "sha512-HuAt9bWDCdLkebrIQr+i63NgQSvjeD2VTNUIEBqof/4pG4Gb6omuBOMUX0vF371cbfImXQzmb4Ue/0c9MUWGew==" }, "trim-right": { "version": "1.0.1", @@ -5666,31 +3837,24 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "trouter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/trouter/-/trouter-3.1.0.tgz", + "integrity": "sha512-3Swwu638QQWOefHLss9cdyLi5/9BKYmXZEXpH0KOFfB9YZwUAwHbDAcoYxaHfqAeFvbi/LqAK7rGkhCr1v1BJA==", "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" + "regexparam": "^1.3.0" } }, "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", - "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", "dev": true, "requires": { - "commander": "~2.19.0", + "commander": "~2.20.0", "source-map": "~0.6.1" }, "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5699,19 +3863,6 @@ } } }, - "uid-safe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", - "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", - "requires": { - "random-bytes": "~1.0.0" - } - }, - "uid2": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", - "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=" - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -5740,115 +3891,12 @@ "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", "dev": true }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "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", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "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" - } - } - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", - "dev": true - }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", "dev": true }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, "utif": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/utif/-/utif-2.0.1.tgz", @@ -5864,10 +3912,15 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } }, "validate-npm-package-license": { "version": "3.0.4", @@ -5879,11 +3932,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -5958,17 +4006,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write-file-atomic": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.1.tgz", - "integrity": "sha1-fUW6MjFjKN0ex9kPYOvA2EW7dZo=", - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "xhr": { "version": "2.5.0", @@ -5989,26 +4028,26 @@ "dev": true }, "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "version": "0.4.22", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.22.tgz", + "integrity": "sha512-MWTbxAQqclRSTnehWWe5nMKzI3VmJ8ltiJEco8akcC6j3miOhjjfzKum5sId+CWhfxdOs/1xauYr8/ZDBtQiRw==", "dev": true, "requires": { "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" + "util.promisify": "~1.0.0", + "xmlbuilder": "~11.0.0" } }, "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", "dev": true }, "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { "version": "4.0.0", @@ -6135,9 +4174,9 @@ } }, "yootils": { - "version": "0.0.14", - "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.14.tgz", - "integrity": "sha512-yWoA/a/4aVUp5nqfqdjbTdyXcR8d0OAbRQ8Ktu3ZsfQnArwLpS81oqZl3adIszX3p8NEhT0aNHARPsaTwBH/Qw==" + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/yootils/-/yootils-0.0.16.tgz", + "integrity": "sha512-aIVecm5ucOzwhtKbl0zkfg0ZSOUR9c2da0k8cIc9umjjzkvVCWUUX/UHZ1CLPsv4wmJLqt0aWeLB7p9n9JDwYQ==" } } } diff --git a/site/package.json b/site/package.json index 0249fd6c8d..a94d264217 100644 --- a/site/package.json +++ b/site/package.json @@ -3,60 +3,59 @@ "version": "1.0.0", "description": "Docs and examples for Svelte", "scripts": { - "dev": "sapper dev", - "sapper": "sapper build --legacy && npm run update_shimport", - "update_shimport": "cp node_modules/shimport/index.js __sapper__/build/client/shimport@0.0.14.js", - "update": "node scripts/update_template.js && node scripts/get-contributors.js", + "dev": "npm run copy-workers && sapper dev", + "copy-workers": "rm -rf static/workers && cp -r node_modules/@sveltejs/svelte-repl/workers static", + "migrate": "node-pg-migrate -r dotenv/config", + "sapper": "npm run copy-workers && sapper build --legacy", + "update": "node scripts/update_template.js && node scripts/get-contributors.js && node scripts/update_whos_using.js", "start": "node __sapper__/build", - "cy:run": "cypress run", - "cy:open": "cypress open", - "test": "run-p --race dev cy:run", - "testsrc": "mocha -r esm test/**" + "test": "mocha -r esm test/**", + "deploy": "make deploy" }, "dependencies": { - "codemirror": "^5.44.0", - "devalue": "^1.1.0", + "@polka/redirect": "^1.0.0-next.7", + "@polka/send": "^1.0.0-next.7", + "cookie": "^0.4.0", + "devalue": "^2.0.0", "do-not-zip": "^1.0.0", - "express": "^4.16.4", - "express-session": "^1.15.6", - "golden-fleece": "^1.0.9", - "limax": "^1.7.0", - "marked": "^0.6.1", - "node-fetch": "^2.3.0", - "passport": "^0.4.0", - "passport-github": "^1.1.0", - "prismjs": "^1.15.0", - "session-file-store": "^1.2.0", - "shelljs": "^0.8.3", - "sirv": "^0.3.1", - "yootils": "0.0.14" + "flru": "^1.0.2", + "httpie": "^1.1.2", + "jsonwebtoken": "^8.5.1", + "marked": "^0.7.0", + "pg": "^7.12.1", + "polka": "^1.0.0-next.9", + "prismjs": "^1.17.1", + "sirv": "^1.0.0-next.2", + "yootils": "0.0.16" }, "devDependencies": { - "@babel/core": "^7.3.3", + "@babel/core": "^7.6.0", "@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", - "@sveltejs/svelte-repl": "0.0.10", - "chokidar": "^2.1.2", - "degit": "^2.1.3", - "dotenv": "^7.0.0", - "eslint-plugin-svelte3": "^0.4.4", - "esm": "^3.2.22", - "jimp": "^0.6.0", - "mocha": "^6.1.3", + "@babel/plugin-transform-runtime": "^7.6.0", + "@babel/preset-env": "^7.6.0", + "@babel/runtime": "^7.6.0", + "@sindresorhus/slugify": "^0.9.1", + "@sveltejs/site-kit": "^1.1.4", + "@sveltejs/svelte-repl": "^0.1.17", + "degit": "^2.1.4", + "dotenv": "^8.1.0", + "esm": "^3.2.25", + "jimp": "^0.8.0", + "mocha": "^6.2.0", + "node-fetch": "^2.6.0", + "node-pg-migrate": "^3.22.0", "npm-run-all": "^4.1.5", - "rollup": "^1.2.2", - "rollup-plugin-babel": "^4.3.2", - "rollup-plugin-commonjs": "^9.2.0", - "rollup-plugin-json": "^3.1.0", - "rollup-plugin-node-resolve": "^4.0.1", - "rollup-plugin-replace": "^2.1.0", - "rollup-plugin-svelte": "^5.0.3", - "rollup-plugin-terser": "^4.0.4", - "sapper": "^0.26.0-alpha.12", - "shimport": "0.0.16", - "svelte": "^3.0.0-beta.28" + "rollup": "^1.21.2", + "rollup-plugin-babel": "^4.3.3", + "rollup-plugin-commonjs": "^10.1.0", + "rollup-plugin-json": "^4.0.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-replace": "^2.2.0", + "rollup-plugin-svelte": "^5.1.0", + "rollup-plugin-terser": "^5.1.1", + "sapper": "^0.27.8", + "shelljs": "^0.8.3", + "svelte": "^3.12.0" }, "engines": { "node": ">=10.0.0" diff --git a/site/rollup.config.js b/site/rollup.config.js index d39db86c0c..9cb963a87d 100644 --- a/site/rollup.config.js +++ b/site/rollup.config.js @@ -13,6 +13,9 @@ const mode = process.env.NODE_ENV; const dev = mode === 'development'; const legacy = !!process.env.SAPPER_LEGACY_BUILD; +const onwarn = (warning, onwarn) => (warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) || onwarn(warning); +const dedupe = importee => importee === 'svelte' || importee.startsWith('svelte/'); + export default { client: { input: config.client.input(), @@ -28,7 +31,10 @@ export default { hydratable: true, emitCss: true }), - resolve(), + resolve({ + browser: true, + dedupe + }), commonjs(), json(), @@ -53,9 +59,7 @@ export default { module: true }) ], - - // temporary, pending Rollup 1.0 - experimentalCodeSplitting: true + onwarn }, server: { @@ -70,16 +74,20 @@ export default { generate: 'ssr', dev }), - resolve(), + resolve({ + dedupe + }), commonjs(), json() ], - external: Object.keys(pkg.dependencies).concat( - require('module').builtinModules || Object.keys(process.binding('natives')) - ), - - // temporary, pending Rollup 1.0 - experimentalCodeSplitting: true + external: [ + 'yootils', + 'codemirror', + ...Object.keys(pkg.dependencies || {}).concat( + require('module').builtinModules || Object.keys(process.binding('natives')) + ) + ], + onwarn }, serviceworker: { @@ -95,4 +103,4 @@ export default { !dev && terser() ] } -}; \ No newline at end of file +}; diff --git a/site/scripts/build-svelte-app-json.js b/site/scripts/build-svelte-app-json.js deleted file mode 100644 index 59a4b4a07b..0000000000 --- a/site/scripts/build-svelte-app-json.js +++ /dev/null @@ -1,11 +0,0 @@ -const fs = require('fs'); - -const files = []; - -for (const path of process.argv.slice(2)) { - if (!path.includes('/.')) { - files.push({ path: path.slice(19), data: fs.readFileSync(path).toString() }); - } -} - -fs.writeFileSync('static/svelte-app.json', JSON.stringify(files)); diff --git a/site/scripts/get-contributors.js b/site/scripts/get-contributors.js index a17f4e4055..cb1facb874 100644 --- a/site/scripts/get-contributors.js +++ b/site/scripts/get-contributors.js @@ -5,15 +5,26 @@ const Jimp = require('jimp'); process.chdir(__dirname); +const base = `https://api.github.com/repos/sveltejs/svelte/contributors`; +const { GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET } = process.env; + const SIZE = 64; async function main() { - const res = await fetch(`https://api.github.com/repos/sveltejs/svelte/stats/contributors?client_id=${process.env.GITHUB_CLIENT_ID}&client_secret=${process.env.GITHUB_CLIENT_SECRET}`); - const contributors = await res.json(); + const contributors = []; + let page = 1; + + while (true) { + const res = await fetch(`${base}?client_id=${GITHUB_CLIENT_ID}&client_secret=${GITHUB_CLIENT_SECRET}&per_page=100&page=${page++}`); + const list = await res.json(); + + if (list.length === 0) break; + + contributors.push(...list); + } const authors = contributors - .sort((a, b) => b.total - a.total) - .map(({ author }) => author); + .sort((a, b) => b.contributions - a.contributions); const sprite = new Jimp(SIZE * authors.length, SIZE); @@ -31,6 +42,8 @@ async function main() { } await sprite.quality(80).write(`../static/contributors.jpg`); + // TODO: Optimizing the static/contributors.jpg image should probably get automated as well + console.log('remember to additionally optimize the resulting /static/contributors.jpg image file via e.g. https://squoosh.app '); const str = `[\n\t${authors.map(a => `'${a.login}'`).join(',\n\t')}\n]`; diff --git a/site/scripts/update_template.js b/site/scripts/update_template.js index 814d402f5e..9d897c064f 100644 --- a/site/scripts/update_template.js +++ b/site/scripts/update_template.js @@ -1,7 +1,7 @@ const sh = require('shelljs'); const fs = require('fs'); -sh.cd(__dirname+'/../'); +sh.cd(__dirname + '/../'); // fetch svelte app sh.rm('-rf','scripts/svelte-app'); @@ -16,7 +16,10 @@ const appPath = 'scripts/svelte-app'; const 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() }); + const bytes = fs.readFileSync(path); + const string = bytes.toString(); + const data = bytes.compare(Buffer.from(string)) === 0 ? string : [...bytes]; + files.push({ path: path.slice(appPath.length + 1), data }); } fs.writeFileSync('static/svelte-app.json', JSON.stringify(files)); \ No newline at end of file diff --git a/site/scripts/update_whos_using.js b/site/scripts/update_whos_using.js new file mode 100644 index 0000000000..131a162359 --- /dev/null +++ b/site/scripts/update_whos_using.js @@ -0,0 +1,12 @@ +const sh = require('shelljs'); + +sh.cd(__dirname + '/../'); + +// fetch community repo +sh.rm('-rf','scripts/community'); +sh.exec('npx degit sveltejs/community scripts/community'); + +// copy over relevant files +sh.cp('scripts/community/whos-using-svelte/WhosUsingSvelte.svelte', 'src/routes/_components/WhosUsingSvelte.svelte'); +sh.rm('-rf', 'static/organisations'); +sh.cp('-r', 'scripts/community/whos-using-svelte/organisations', 'static'); diff --git a/site/src/client.js b/site/src/client.js index cec91725f0..bda299367b 100644 --- a/site/src/client.js +++ b/site/src/client.js @@ -1,3 +1,4 @@ +import '@sveltejs/site-kit/base.css'; import * as sapper from '@sapper/app'; sapper.start({ diff --git a/site/src/components/Icon.svelte b/site/src/components/Icon.svelte deleted file mode 100644 index 366b923911..0000000000 --- a/site/src/components/Icon.svelte +++ /dev/null @@ -1,39 +0,0 @@ -<!-- ------------------------------------------------ - svg icon - - https://github.com/jacobmischka/svelte-feather-icon - - https://feathericons.com/ ------------------------------------------------ ---> - -<script> - export let clas = ''; - export let name; - export let size = 20; -</script> - -<!-- style="--color: {color ? color : 'currentColor'}" --> -<svg class="{'icon ' + clas}" width={size} height={size}> - <use xlink:href='#{name}' /> -</svg> - -<style> - .icon { - position: relative; - /* width: 1.2em; - height: 1.2em; - top: -0.123em; */ - overflow: hidden; - vertical-align: middle; - -o-object-fit: contain; - object-fit: contain; - -webkit-transform-origin: center center; - transform-origin: center center; - - stroke: currentColor; - stroke-width: 2; - stroke-linecap: round; - stroke-linejoin: round; - fill: none; - } -</style> diff --git a/site/src/components/InlineSvg.svelte b/site/src/components/InlineSvg.svelte deleted file mode 100644 index e29810ae97..0000000000 --- a/site/src/components/InlineSvg.svelte +++ /dev/null @@ -1,115 +0,0 @@ -<!-- ------------------------------------------------ - inline-svg sprite - - common used svg-stuff (feather-icons) - - advantage of css-styling - - https://github.com/jacobmischka/svelte-feather-icon - - https://feathericons.com/ - - if requred we can split out app-controls to REPL only ------------------------------------------------ ---> - -<svg style='display:none'> - <symbol id='arrow-left' class='icon' viewBox='0 0 24 24'> - <line x1='19' y1='12' x2='5' y2='12' /> - <polyline points='12 19 5 12 12 5' /> - </symbol> - - <symbol id='arrow-right' class='icon' viewBox='0 0 24 24'> - <line x1='5' y1='12' x2='19' y2='12' /> - <polyline points='12 5 19 12 12 19' /> - </symbol> - - <symbol id='arrow-up' class='icon' viewBox='0 0 24 24'> - <line x1='12' y1='19' x2='12' y2='5' /> - <polyline points='5 12 12 5 19 12' /> - </symbol> - - <symbol id='arrow-down' class='icon' viewBox='0 0 24 24'> - <line x1='12' y1='5' x2='12' y2='19' /> - <polyline points='19 12 12 19 5 12' /> - </symbol> - - <symbol id='check' class='icon' viewBox='0 0 24 24'> - <polyline points='20 6 9 17 4 12' /> - </symbol> - - <symbol id='close' class='icon' viewBox='0 0 24 24'> - <line x1='18' y1='6' x2='6' y2='18' /> - <line x1='6' y1='6' x2='18' y2='18' /> - </symbol> - - <symbol id='download' class='icon' viewBox='0 0 24 24'> - <path d='M21 15V19A2 2 0 0 1 19 21H5A2 2 0 0 1 3 19V15' /> - <polyline points='7 10 12 15 17 10' /> - <line x1='12' y1='15' x2='12' y2='3' /> - </symbol> - - <symbol id='edit' class='icon' viewBox='0 0 24 24'> - <path d='M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34' /> - <polygon points='18 2 22 6 12 16 8 16 8 12 18 2' /> - </symbol> - - <symbol id='github' class='icon' viewBox='0 0 24 24'> - <path d='M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22' /> - </symbol> - - <symbol id='git-branch' class='icon' viewBox='0 0 24 24'> - <line x1='6' y1='3' x2='6' y2='15' /> - <circle cx='18' cy='6' r='3' /> - <circle cx='6' cy='18' r='3' /> - <path d='M18 9a9 9 0 0 1-9 9' /> - </symbol> - - <symbol id='log-in' class='icon' viewBox='0 0 24 24'> - <path d='M15 3H19A2 2 0 0 1 21 5V19A2 2 0 0 1 19 21H15' /> - <polyline points='10 17 15 12 10 7' /> - <line x1='15' y1='12' x2='3' y2='12' /> - </symbol> - - <symbol id='maximize' class='icon' viewBox='0 0 24 24'> - <path d='M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3' /> - </symbol> - - <symbol id='maximize-2' class='icon' viewBox='0 0 24 24'> - <polyline points='15 3 21 3 21 9' /> - <polyline points='9 21 3 21 3 15' /> - <line x1='21' y1='3' x2='14' y2='10' /> - <line x1='3' y1='21' x2='10' y2='14' /> - </symbol> - - <symbol id='menu' class='icon' viewBox='0 0 24 24'> - <line x1='3' y1='12' x2='21' y2='12' /> - <line x1='3' y1='6' x2='21' y2='6' /> - <line x1='3' y1='18' x2='21' y2='18' /> - </symbol> - - <symbol id='message-square' class='icon' viewBox='0 0 24 24'> - <path d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z' /> - </symbol> - - <symbol id='minus' class='icon' viewBox='0 0 24 24'> - <line x1='5' y1='12' x2='19' y2='12' /> - </symbol> - - <symbol id='plus' class='icon' viewBox='0 0 24 24'> - <line x1='12' y1='5' x2='12' y2='19' /> - <line x1='5' y1='12' x2='19' y2='12' /> - </symbol> - - <symbol id='save' class='icon' viewBox='0 0 24 24'> - <path d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z' /> - <polyline points='17 21 17 13 7 13 7 21' /> - <polyline points='7 3 7 8 15 8' /> - </symbol> - - <symbol id="link" class="icon" viewBox="0 0 24 24"> - <path d="M9,7L6,7A2 2 0 0 0 6,17L9,17"/> - <path d="M15,7L18,7A2 2 0 0 1 18,17L15,17"/> - <path d="M7,12L17,12"/> - </symbol> - - <symbol id="chevron" class="icon" viewBox="0 0 24 24"> - <path d="M2,7 L12,17 L20,7"/> - </symbol> -</svg> \ No newline at end of file diff --git a/site/src/components/PreloadingIndicator.svelte b/site/src/components/PreloadingIndicator.svelte index 43bcf3ab5a..8b88029abb 100644 --- a/site/src/components/PreloadingIndicator.svelte +++ b/site/src/components/PreloadingIndicator.svelte @@ -4,11 +4,7 @@ let p = 0; let visible = false; - const sleep = ms => new Promise(f => setTimeout(f, ms)); - onMount(() => { - let running = true; - function next() { visible = true; p += 0.1; @@ -18,10 +14,6 @@ } setTimeout(next, 250); - - return () => { - running = false; - }; }); </script> diff --git a/site/src/components/Repl/ReplWidget.svelte b/site/src/components/Repl/ReplWidget.svelte index e785c697f8..9d06fb7868 100644 --- a/site/src/components/Repl/ReplWidget.svelte +++ b/site/src/components/Repl/ReplWidget.svelte @@ -28,8 +28,8 @@ } if (gist) { - fetch(`gist/${gist}`).then(r => r.json()).then(data => { - const { id, description, files } = data; + fetch(`repl/${gist}.json`).then(r => r.json()).then(data => { + const { description, files } = data; name = description; @@ -116,6 +116,7 @@ {#if process.browser} <Repl bind:this={repl} + workersUrl="workers" fixed={mobile} {svelteUrl} {rollupUrl} diff --git a/site/src/components/ScreenToggle.svelte b/site/src/components/ScreenToggle.svelte index 8dbebe9c74..a59b685263 100644 --- a/site/src/components/ScreenToggle.svelte +++ b/site/src/components/ScreenToggle.svelte @@ -38,7 +38,7 @@ {#each labels as label, index} <button class:selected={offset === index} - on:click={() => {offset = index}} + on:click={() => offset = index} > {label} </button> diff --git a/site/src/components/TopNav.svelte b/site/src/components/TopNav.svelte deleted file mode 100644 index 4254e99152..0000000000 --- a/site/src/components/TopNav.svelte +++ /dev/null @@ -1,268 +0,0 @@ -<script> - import { onMount } from 'svelte'; - import Icon from './Icon.svelte'; - import { page } from '@sapper/app'; - - export let segment; - - let open = false; - let visible = true; - - // hide nav whenever we navigate - page.subscribe(() => { - open = false; - }); - - // TODO remove this post-https://github.com/sveltejs/svelte/issues/1914 - let ul; - onMount(() => { - function handler(event) { - if (!open) { - event.preventDefault(); - event.stopPropagation(); - open = true; - } - } - - ul.addEventListener('touchstart', handler, { - capture: true - }); - - return () => { - ul.removeEventListener('touchstart', handler, { - capture: true - }); - }; - }); - - let last_scroll = 0; - function handle_scroll() { - const scroll = window.pageYOffset; - visible = (scroll < 50 || scroll < last_scroll); - - last_scroll = scroll; - } -</script> - -<style> - header { - position: fixed; - display: flex; - align-items: center; - justify-content: space-between; - width: 100vw; - height: var(--nav-h); - padding: 0 var(--side-nav); - margin: 0 auto; - background-color: white; - box-shadow: 0 -0.4rem 0.9rem 0.2rem rgba(0,0,0,.5); - font-family: var(--font); - z-index: 100; - user-select: none; - transform: translate(0,calc(-100% - 1rem)); - transition: transform 0.2s; - } - - header.visible { - transform: none; - } - - nav { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: var(--nav-h); - padding: 0 var(--side-nav) 0 var(--side-nav); - display: flex; - align-items: center; - justify-content: space-between; - background-color: transparent; - transform: none; - transition: none; - box-shadow: none; - } - - .primary { - list-style: none; - font-family: var(--font); - margin: 0; - line-height: 1; - } - - li { - display: block; - display: none; - } - - li.active { - display: block; - } - - ul { - position: relative; - padding: 0 3rem 0 0; - background: url(/icons/chevron.svg) calc(100% - 1em) 0.05em no-repeat; - background-size: 1em 1em; - } - - ul::after { - /* prevent clicks from registering if nav is closed */ - position: absolute; - content: ''; - width: 100%; - height: 100%; - left: 0; - top: 0; - } - - ul.open { - padding: 0 0 1em 0; - background: white; - border-left: 1px solid #eee; - border-right: 1px solid #eee; - border-bottom: 1px solid #eee; - border-radius: 0 0 var(--border-r) var(--border-r); - align-self: start; - } - - ul.open li { - display: block; - text-align: right - } - - ul.open::after { - display: none; - } - - ul li a { - font-size: var(--h5); - padding: 0 .8rem; - } - - ul.open li a { - padding: 1.5rem 3.7rem 1.5rem 4rem; - display: block; - } - - ul.open li:first-child a { - padding-top: 2.3rem; - } - - .primary :global(svg) { - width: 2rem; - height: 2rem; - } - - .home { - position: relative; - top: -.1rem; - width: 18rem; - height: 4.2rem; - -webkit-tap-highlight-color: transparent; - -webkit-touch-callout: none; - background: url(/svelte-logo-horizontal.svg) 0 50% no-repeat; - background-size: auto 100%; - /* z-index: 11; */ - } - - .active { - color: var(--prime) - } - - .modal-background { - position: fixed; - width: 100%; - height: 100%; - left: 0; - top: 0; - background-color: rgba(255, 255, 255, 0.9); - } - - a { - color: inherit; - border-bottom: none; - transition: none; - } - - li:not(.active) a:hover { - color: var(--flash); - } - - @media (min-width: 840px) { - ul { - padding: 0; - background: none; - } - - ul.open { - padding: 0; - background: white; - border: none; - align-self: initial; - } - - ul.open li { - display: inline; - text-align: left; - } - - ul.open li a { - font-size: var(--h5); - padding: 0 .8rem; - display: inline; - } - - ul::after { - display: none; - } - - li { - display: inline !important; - } - - .hide-if-desktop { - display: none !important; - } - } -</style> - -<svelte:window on:scroll={handle_scroll}/> - -<header class:visible="{visible || open}"> - <nav> - <a rel="prefetch" href='.' class="home" title='Homepage'></a> - - {#if open} - <div class="modal-background hide-if-desktop" on:click="{() => open = false}"></div> - {/if} - - <ul - bind:this={ul} - class="primary" - class:open - on:mouseenter="{() => open = true}" - on:mouseleave="{() => open = false}" - > - <li class="hide-if-desktop" class:active="{!segment}"><a rel="prefetch" href=".">Home</a></li> - <li class:active="{segment === 'tutorial'}"><a rel="prefetch" href="tutorial">Tutorial</a></li> - <li class:active="{segment === 'docs'}"><a rel="prefetch" href="docs">API Docs</a></li> - <li class:active="{segment === 'examples'}"><a rel="prefetch" href="examples">Examples</a></li> - <li class:active="{segment === 'repl'}"><a rel="prefetch" href="repl">REPL</a></li> - <li class:active="{segment === 'blog'}"><a rel="prefetch" href="blog">Blog</a></li> - <li><a href="https://sapper.svelte.technology">Sapper</a></li> - - <li> - <a href="https://discord.gg/yy75DKs" title="Discord Chat"> - <Icon name="message-square" /> - </a> - </li> - - <li> - <a href="https://github.com/sveltejs/svelte" title="Github Repo"> - <Icon name="github" /> - </a> - </li> - </ul> - </nav> -</header> diff --git a/site/src/components/unused/Logo.svelte b/site/src/components/unused/Logo.svelte deleted file mode 100644 index 811e5b9442..0000000000 --- a/site/src/components/unused/Logo.svelte +++ /dev/null @@ -1,28 +0,0 @@ -<!-- ------------------------------------------------ - svg svelte-logo 1.0 - - style doesn't like var(--xxx)??? ------------------------------------------------ ---> - -<script> - export let outer = ''; - export let inner = ''; - export let size; -</script> - -<svg class='logo' viewBox='0 0 103 124' width={size} height={size}> - <path style='{outer === "none" ? "fill:none; stroke:none;" : outer || "fill:var(--prime)"}' d='M96.33,20.61C85.38,4.93,63.74.28,48.09,10.25L20.61,27.77A31.46,31.46,0,0,0,6.37,48.88,33.22,33.22,0,0,0,9.64,70.2,31.52,31.52,0,0,0,4.93,82a33.61,33.61,0,0,0,5.73,25.41c11,15.68,32.6,20.33,48.25,10.36l27.48-17.52a31.48,31.48,0,0,0,14.24-21.11A33.22,33.22,0,0,0,97.36,57.8,31.52,31.52,0,0,0,102.07,46a33.57,33.57,0,0,0-5.74-25.41' /> - <path style='{(inner === "none") ? "fill:none; stroke:none;" : inner || "fill:white"}' d='M45.41,108.86A21.81,21.81,0,0,1,22,100.18,20.2,20.2,0,0,1,18.53,84.9a19,19,0,0,1,.65-2.57l.52-1.58,1.41,1a35.32,35.32,0,0,0,10.75,5.37l1,.31-.1,1a6.2,6.2,0,0,0,1.11,4.08A6.57,6.57,0,0,0,41,95.19a6,6,0,0,0,1.68-.74L70.11,76.94a5.76,5.76,0,0,0,2.59-3.83,6.09,6.09,0,0,0-1-4.6,6.58,6.58,0,0,0-7.06-2.62,6.21,6.21,0,0,0-1.69.74L52.43,73.31a19.88,19.88,0,0,1-5.58,2.45,21.82,21.82,0,0,1-23.43-8.68A20.2,20.2,0,0,1,20,51.8a19,19,0,0,1,8.56-12.7L56,21.59a19.88,19.88,0,0,1,5.58-2.45A21.81,21.81,0,0,1,85,27.82,20.2,20.2,0,0,1,88.47,43.1a19,19,0,0,1-.65,2.57l-.52,1.58-1.41-1a35.32,35.32,0,0,0-10.75-5.37l-1-.31.1-1a6.2,6.2,0,0,0-1.11-4.08,6.57,6.57,0,0,0-7.06-2.62,6,6,0,0,0-1.68.74L36.89,51.06a5.71,5.71,0,0,0-2.58,3.83,6,6,0,0,0,1,4.6,6.58,6.58,0,0,0,7.06,2.62,6.21,6.21,0,0,0,1.69-.74l10.48-6.68a19.88,19.88,0,0,1,5.58-2.45,21.82,21.82,0,0,1,23.43,8.68A20.2,20.2,0,0,1,87,76.2a19,19,0,0,1-8.56,12.7L51,106.41a19.88,19.88,0,0,1-5.58,2.45' /> -</svg> - -<style> - .logo { - position: relative; - vertical-align: middle; - stroke-miterlimit: 10; - stroke-width: 3.5; - stroke-linecap: round; - stroke-linejoin: round; - } -</style> \ No newline at end of file diff --git a/site/src/components/unused/debug-css.html b/site/src/components/unused/debug-css.html deleted file mode 100644 index 745d7a11b1..0000000000 --- a/site/src/components/unused/debug-css.html +++ /dev/null @@ -1,68 +0,0 @@ -<script> - export let style; - let show = false; - - $: if (typeof document !== 'undefined') { - if (show) document.body.classList.add('css-debug') - else document.body.classList.remove('css-debug') - } -</script> - -<!-- ------------------------------------------------ - simple css-debug ------------------------------------------------ ---> - -<label {style}> - <input type="checkbox" bind:checked={show}> grid -</label> - -{#if show} -<div class='guide horizontal' style='top: calc(var(--nav-h) + var(--top-offset))' /> -<div class='guide vertical' style='left: var(--side-page)' /> -<div class='guide vertical' style='right: var(--side-page)' /> -<div class='guide vertical' style='left: var(--side-nav)' /> -<div class='guide vertical' style='right: var(--side-nav)' /> -{/if} - -<style> - label { - position: fixed; - padding: 0.3rem 1rem; - font-size: 1.2rem; - cursor: pointer; - user-select: none; - opacity: 0.5; - font: 300 1rem/1.7 var(--font-ui); - z-index: 30; - } - - label:hover { - opacity: 1 - } - - input { - display: none - } - - .guide { - position: fixed; - opacity: .5; - z-index: 30 - } - - .horizontal { - width: 100%; - height: 0 - } - - .vertical { - width: 0; - height: 100vh - } - - :global(.css-debug *) { - outline: 1px solid rgba(73, 177, 238, 0.25); - } -</style> \ No newline at end of file diff --git a/site/src/components/unused/isometry.html b/site/src/components/unused/isometry.html deleted file mode 100644 index 6c2260ae50..0000000000 --- a/site/src/components/unused/isometry.html +++ /dev/null @@ -1,28 +0,0 @@ -<!-- ------------------------------------------------ - svg svelte-isometry 1.0 - - first simple try to simplify iso-grafics ------------------------------------------------ ---> - -<script> - export let style = ''; - export let size = ''; -</script> - -<svg class='svelte-iso' viewBox='0 0 128 128' width={size} height={size}> - <polygon {style} points="107.94 92 107.94 36 64.01 8 20.06 35.99 20.06 92.01 64 120 107.94 92" /> - <polyline {style} points="107.94 36 64.01 64 64 120" /> - <line {style} x1="64.01" y1="64" x2="20.06" y2="35.99" /> -</svg> - -<style> - .svelte-iso { - position: relative; - vertical-align: middle; - stroke-miterlimit: 10; - stroke-width: 2; - stroke-linecap: round; - stroke-linejoin: round; - } -</style> \ No newline at end of file diff --git a/site/src/components/unused/theme-input.html b/site/src/components/unused/theme-input.html deleted file mode 100644 index 8465cd8890..0000000000 --- a/site/src/components/unused/theme-input.html +++ /dev/null @@ -1,81 +0,0 @@ -<!-- - NOTE - from time to time <input type="color"> is crashing on chrome! - no idea why? - even with all extensions off ---> -{#if color} -<input ref:prop class="color" on:input="change(this)" type="color" name={color} /> {/if} - -{#if text} -<input ref:prop on:input="change(this)" type="text" name={text} /> -{/if} - - -<style> - input, - input:active, - input:focus { - border: none; - outline: none; - cursor: pointer; - } - - input[type=text] { - border: .1rem solid var(--text); - padding: .8rem 1.4rem; - font: 300 var(--code-fs)/1.7 var(--font-mono); - color: var(--second); - text-indent: 0; - transition: all .2s var(--out-back); - } - - input[type=text]:focus { - border-color: var(--flash); - color: var(--flash); - text-indent: .8rem; - } - - .color { - position: relative; - top: 0; - width: 100%; - height: 100%; - } - - /* input-color-reset */ - ::-webkit-color-swatch { - border: none - } - - ::-webkit-color-swatch-wrapper { - padding: 0 - } - - ::-moz-color-swatch, - ::-moz-focus-inner { - border: none - } - - ::-moz-focus-inner { - padding: 0 - } -</style> - -<script> - import CustomProps from '../utils/css-custom-properties.js'; - - export default { - oncreate() { - this.cssprop = new CustomProps(); - let prop = this.refs.prop; - prop.value = this.cssprop.get(prop.name); - }, - - methods: { - change(prop) { - return this.cssprop.set(prop.name, prop.value) - } - } - }; -</script> \ No newline at end of file diff --git a/site/src/components/unused/toaster.html b/site/src/components/unused/toaster.html deleted file mode 100644 index 6145efc568..0000000000 --- a/site/src/components/unused/toaster.html +++ /dev/null @@ -1,49 +0,0 @@ -<button class='toast' on:click='reload()'> - Site has been updated — tap to reload -</button> - -<style> - .toast { - position: fixed; - left: 0; - bottom: 0; - margin: 0; - border-radius: 0; - width: 100%; - background-color: var(--prime); - cursor: pointer; - color: white; - padding: 3.2rem 4rem; - text-align: left; - font: 300 var(--h6) var(--font-ui); - z-index: 99; - animation: slide-up 0.4s ease-out; - } - @keyframes slide-up { - 0% { - transform: translate(0, 100%); - } - 100% { - transform: translate(0, 0); - } - } -</style> - -<script> - export default { - methods: { - reload() { - window.location.reload(); - } - }, - setup(Toast) { - Toast.show = () => { - const target = document.createDocumentFragment(); - new Toast({ target }); - - document.body.appendChild(target); - Toast.show = () => {}; - }; - } - }; -</script> diff --git a/site/src/routes/_components/Blurb.svelte b/site/src/routes/_components/Blurb.svelte deleted file mode 100644 index f6feb6dd5a..0000000000 --- a/site/src/routes/_components/Blurb.svelte +++ /dev/null @@ -1,165 +0,0 @@ -<style> - .container { - position: relative; - display: grid; - margin: 10rem auto; - padding: 0 var(--side-nav); - max-width: 120rem; - grid-row-gap: 1em; - grid-template-areas: - "one" - "two" - "three" - "what" - "start"; - } - - .box { - padding: 1em; - display: flex; - flex-direction: column; - border-bottom: none; - } - - h2 { - padding: 0; - margin: 0 0 0.5em 0; - font-size: var(--h2); - color: white; - text-align: left; - } - - p { - font-size: var(--h5); - } - - .learn-more { - position: relative; - text-align: right; - margin-top: auto; - padding: 0 1.2em 0 0; - } - - .box:hover .learn-more { - color: white; - text-decoration: underline; - } - - .learn-more::after, .cta a::after { - content: ''; - position: absolute; - display: block; - right: 0; - top: 0.35em; - width: 1em; - height: 1em; - background: url(/icons/arrow-right.svg); - } - - .cta a { - display: inline-block; - text-align: right; - background-color: var(--prime); - padding: 0.5em 1.8em 0.5em 1em; - border-radius: var(--border-r); - color: white; - position: relative; - } - - .cta a::after { - right: 0.5em; - top: 0.75em; - } - - .description { - margin: 2em 0 0 0; - } - - .cta { - margin: 0; - } - - @media (min-width: 900px) { - .container { - grid-column-gap: 1em; - grid-row-gap: 1em; - grid-template-columns: repeat(2, 1fr); - grid-template-areas: - "one two" - "three start" - "what what"; - } - - .box { - padding: 2em; - } - - .cta { - text-align: right; - } - } - - @media (min-width: 1200px) { - .container { - grid-column-gap: 1em; - grid-row-gap: 5em; - grid-template-columns: repeat(6, 1fr); - grid-template-areas: - "one one two two three three" - "what what what start start start"; - } - - .description { - margin: 0; - } - - .cta { - text-align: left; - } - } -</style> - -<section class='container'> - <a href="blog/write-less-code" class='box bg-prime white' style="grid-area: one"> - <h2>Write less code</h2> - <p>Build boilerplate-free components using languages you already know — HTML, CSS and JavaScript</p> - - <span class="learn-more">learn more</span> - </a> - - <a href="blog/virtual-dom-is-pure-overhead" class='box bg-flash white' style="grid-area: two"> - <h2>No virtual DOM</h2> - <p>Svelte compiles your code to tiny, framework-less vanilla JS — your app starts fast and stays fast</p> - - <span class="learn-more">learn more</span> - </a> - - <a href="blog/svelte-3-rethinking-reactivity" class='box bg-second white' style="grid-area: three"> - <h2>Truly reactive</h2> - <p>No more complex state management libraries — Svelte brings reactivity to JavaScript itself</p> - - <span class="learn-more">learn more</span> - </a> - - <div class="description" style="grid-area: what;"> - <p>Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the <em>browser</em>, Svelte shifts that work into a <em>compile step</em> that happens when you build your app.</p> - - <p>Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.</p> - - <p><a href="blog/svelte-3-rethinking-reactivity">Read the introductory blog post</a> to learn more.</p> - </div> - - <div style="grid-area: start; display: flex; flex-direction: column; min-width: 0"> - <pre class="language-bash" style="margin: 0 0 1em 0; min-width: 0; min-height: 0"> -npx degit sveltejs/template my-svelte-project -cd my-svelte-project - -npm install -npm run dev & open http://localhost:5000 - </pre> - - <p style="flex: 1">See the <a href="blog/the-easiest-way-to-get-started">quickstart guide</a> for more information.</p> - - <p class="cta"><a rel="prefetch" href="tutorial">Learn Svelte</a></p> - </div> -</section> \ No newline at end of file diff --git a/site/src/routes/_components/Contributors.svelte b/site/src/routes/_components/Contributors.svelte new file mode 100644 index 0000000000..74eb3fa50f --- /dev/null +++ b/site/src/routes/_components/Contributors.svelte @@ -0,0 +1,26 @@ +<script> + import contributors from '../_contributors.js'; +</script> + +<style> + .contributor { + width: 2.4em; + height: 2.4em; + border-radius: 50%; + text-indent: -9999px; + display: inline-block; + background: no-repeat url(/contributors.jpg); + background-size: auto 102%; + margin: 0 0.5em 0.5em 0; + border: 2px solid var(--second); + } +</style> + +{#each contributors as contributor, i} + <a + class="contributor" + style="background-position: {(100 * i) / (contributors.length - 1)}% 0" + href="https://github.com/{contributor}"> + {contributor} + </a> +{/each} diff --git a/site/src/routes/_components/Example.svelte b/site/src/routes/_components/Example.svelte new file mode 100644 index 0000000000..c07b4be0b5 --- /dev/null +++ b/site/src/routes/_components/Example.svelte @@ -0,0 +1,52 @@ +<script> + import { Section } from '@sveltejs/site-kit'; + import IntersectionObserver from '../../components/IntersectionObserver.svelte'; + import ReplWidget from '../../components/Repl/ReplWidget.svelte'; + + export let id; +</script> + +<style> + .example { + width: 100%; + } + + .example :global(a) { + color: inherit; + } + + .example > :global(p) { + margin: 4.4rem 2.4rem 2.4rem 0; + } + + .repl-container { + width: 100%; + height: 420px; + border-radius: var(--border-r); + overflow: hidden; + } + + @media (min-width: 920px) { + .example { + display: grid; + grid-template-columns: 1fr 3fr; + grid-gap: 0.5em; + align-items: start; + } + } +</style> + +<Section> + <div class="example"> + <slot></slot> + + <div class="repl-container"> + <IntersectionObserver once let:intersecting top={400}> + {#if intersecting} + <!-- <Lazy this={loadReplWidget} example={id}/> --> + <ReplWidget example={id}/> + {/if} + </IntersectionObserver> + </div> + </div> +</Section> \ No newline at end of file diff --git a/site/src/routes/_components/WhosUsingSvelte.svelte b/site/src/routes/_components/WhosUsingSvelte.svelte deleted file mode 100644 index a7d4fec78e..0000000000 --- a/site/src/routes/_components/WhosUsingSvelte.svelte +++ /dev/null @@ -1,57 +0,0 @@ -<!-- - Instructions for adding new logos: - - * Fork this repo, and clone your fork - * Create a branch called e.g. `add-myorganisation-logo` - * Add the logo to the `static/organisations` directory (preferably SVG) - * Add a new <a> tag in this component, in alphabetical order - * Create a pull request. Thanks! ---> - -<style> - .logos { - margin: 1em 0 0 0; - display: flex; - flex-wrap: wrap; - } - - a { - height: 40px; - margin: 0 0.5em 0.5em 0; - border: 2px solid var(--second); - padding: 5px 10px; - border-radius: 20px; - } - - .add-yourself { - display: flex; - align-items: center; - border: 2px solid var(--second); - } - - img { - height: 100%; - } - - @media (min-width: 540px) { - a { - height: 60px; - padding: 10px 20px; - border-radius: 30px; - } - } -</style> - -<div class="logos"> - <a target="_blank" rel="noopener" href="https://beyonk.com"><img src="organisations/beyonk.svg" alt="Beyonk logo"></a> - <a target="_blank" rel="noopener" href="https://chess.com" style="background-color: rgb(49,46,43);"><img src="organisations/chess.svg" alt="Chess.com logo"></a> - <a target="_blank" rel="noopener" href="https://datawrapper.de"><img src="organisations/datawrapper.svg" alt="Datawrapper logo"></a> - <a target="_blank" rel="noopener" href="https://db.nomics.world" style="background-color: rgb(15,39,47);"><img src="organisations/dbnomics.png" alt="DBNomics logo"></a> - <a target="_blank" rel="noopener" href="https://from-now-on.com"><img src="organisations/from-now-on.png" alt="From-Now-On logo"></a> - <a target="_blank" rel="noopener" href="https://itslearning.com"><img src="organisations/itslearning.svg" alt="itslearning logo"></a> - <a target="_blank" rel="noopener" href="http://mustlab.ru"><img src="organisations/mustlab.png" alt="Mustlab logo"></a> - <a target="_blank" rel="noopener" href="https://www.nesta.org.uk"><img src="organisations/nesta.svg" alt="Nesta logo"></a> - <a target="_blank" rel="noopener" href="https://nytimes.com"><img src="organisations/nyt.svg" alt="The New York Times logo"></a> - <a target="_blank" rel="noopener" href="https://www.stone.co"><img src="organisations/stone.svg" alt="Stone Payments logo"></a> - <a target="_blank" rel="noopener" href="https://github.com/sveltejs/svelte/blob/master/site/src/routes/_components/WhosUsingSvelte.svelte" class="add-yourself"><span>+ your company?</span></a> -</div> diff --git a/site/src/routes/_error.svelte b/site/src/routes/_error.svelte index 0071e3cea7..c23805166b 100644 --- a/site/src/routes/_error.svelte +++ b/site/src/routes/_error.svelte @@ -7,7 +7,7 @@ // we don't want to use <svelte:window bind:online> here, // because we only care about the online state when // the page first loads - let online = typeof navigator !== 'undefined' + const online = typeof navigator !== 'undefined' ? navigator.onLine : true; </script> @@ -61,7 +61,7 @@ <p>Please try reloading the page.</p> {/if} - <p>If the error persists, please drop by <a href="https://discord.gg/yy75DKs">Discord chatroom</a> and let us know, or raise an issue on <a href="https://github.com/sveltejs/svelte">GitHub</a>. Thanks!</p> + <p>If the error persists, please drop by <a href="chat">Discord chatroom</a> and let us know, or raise an issue on <a href="https://github.com/sveltejs/svelte">GitHub</a>. Thanks!</p> {/if} {:else} <h1>It looks like you're offline</h1> diff --git a/site/src/routes/_layout.svelte b/site/src/routes/_layout.svelte index 5482ea4d46..55f4861880 100644 --- a/site/src/routes/_layout.svelte +++ b/site/src/routes/_layout.svelte @@ -1,19 +1,59 @@ <script> - import { page, preloading } from '@sapper/app'; - import InlineSvg from '../components/InlineSvg.svelte'; + import { setContext } from 'svelte'; + import { stores } from '@sapper/app'; + import { Icon, Icons, Nav, NavItem } from '@sveltejs/site-kit'; import PreloadingIndicator from '../components/PreloadingIndicator.svelte'; - import Nav from '../components/TopNav.svelte'; export let segment; + + const { page, preloading, session } = stores(); + + setContext('app', { + login: () => { + const login_window = window.open(`${window.location.origin}/auth/login`, 'login', 'width=600,height=400'); + + window.addEventListener('message', function handler(event) { + login_window.close(); + window.removeEventListener('message', handler); + $session.user = event.data.user; + }); + }, + + logout: async () => { + const r = await fetch(`/auth/logout`, { + credentials: 'include' + }); + + if (r.ok) $session.user = null; + } + }); </script> +<Icons/> + {#if $preloading} <PreloadingIndicator/> {/if} -<InlineSvg /> {#if $page.path !== '/repl/embed'} - <Nav {segment}/> + <Nav {segment} {page} logo="svelte-logo-horizontal.svg"> + <NavItem segment="tutorial">Tutorial</NavItem> + <NavItem segment="docs">API</NavItem> + <NavItem segment="examples">Examples</NavItem> + <NavItem segment="repl">REPL</NavItem> + <NavItem segment="blog">Blog</NavItem> + <NavItem segment="faq">FAQ</NavItem> + + <NavItem external="https://sapper.svelte.dev">Sapper</NavItem> + + <NavItem external="chat" title="Discord Chat"> + <Icon name="message-square"/> + </NavItem> + + <NavItem external="https://github.com/sveltejs/svelte" title="GitHub Repo"> + <Icon name="github"/> + </NavItem> + </Nav> {/if} <main> @@ -28,4 +68,4 @@ padding: var(--nav-h) 0 0 0; overflow-x: hidden; } -</style> \ No newline at end of file +</style> diff --git a/site/src/routes/apps/index.json.js b/site/src/routes/apps/index.json.js new file mode 100644 index 0000000000..e6a09d52c5 --- /dev/null +++ b/site/src/routes/apps/index.json.js @@ -0,0 +1,26 @@ +import send from '@polka/send'; +import { query } from '../../utils/db'; + +export async function get(req, res) { + if (req.user) { + const page_size = 100; + const offset = req.query.offset ? parseInt(req.query.offset) : 0; + const rows = await query(` + select g.uid, g.name, coalesce(g.updated_at, g.created_at) as updated_at + from gists g + where g.user_id = $1 + order by id desc + limit ${page_size + 1} + offset $2 + `, [req.user.id, offset]); + + rows.forEach(row => { + row.uid = row.uid.replace(/-/g, ''); + }); + + const more = rows.length > page_size; + send(res, 200, { apps: rows.slice(0, page_size), offset: more ? offset + page_size : null }); + } else { + send(res, 401); + } +} diff --git a/site/src/routes/apps/index.svelte b/site/src/routes/apps/index.svelte new file mode 100644 index 0000000000..36cd1a904c --- /dev/null +++ b/site/src/routes/apps/index.svelte @@ -0,0 +1,140 @@ +<script context="module"> + export async function preload(page, { user }) { + let apps = []; + let offset = null; + + if (user) { + let url = 'apps.json'; + if (page.query.offset) { + url += `?offset=${encodeURIComponent(page.query.offset)}`; + } + const r = await this.fetch(url, { + credentials: 'include' + }); + if (!r.ok) return this.error(r.status, await r.text()); + + ({ apps, offset } = await r.json()); + } + + return { user, apps, offset }; + } +</script> + +<script> + import { getContext } from 'svelte'; + + export let user; + export let apps; + export let offset; + + const { login, logout } = getContext('app'); + + const formatter = new Intl.DateTimeFormat(undefined, { + year: 'numeric', + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: '2-digit' + }); + + const format = str => formatter.format(new Date(str)); +</script> + +<svelte:head> + <title>Your apps • Svelte + + +
+ {#if user} +
+

Your apps

+ +
+ {user.name || user.username} avatar + + {user.name || user.username} + (log out) + +
+
+ + + + {#if offset !== null} +
Next page...
+ {/if} + {:else} +

Please log in to see your saved apps.

+ {/if} +
+ + diff --git a/site/src/routes/auth/_config.js b/site/src/routes/auth/_config.js new file mode 100644 index 0000000000..7d1669cd72 --- /dev/null +++ b/site/src/routes/auth/_config.js @@ -0,0 +1,6 @@ +export const oauth = 'https://github.com/login/oauth'; +export const baseurl = process.env.BASEURL; +export const secure = baseurl && baseurl.startsWith('https:'); + +export const client_id = process.env.GITHUB_CLIENT_ID; +export const client_secret = process.env.GITHUB_CLIENT_SECRET; \ No newline at end of file diff --git a/site/src/routes/auth/callback.js b/site/src/routes/auth/callback.js new file mode 100644 index 0000000000..7979b1c21f --- /dev/null +++ b/site/src/routes/auth/callback.js @@ -0,0 +1,54 @@ +import send from '@polka/send'; +import devalue from 'devalue'; +import * as cookie from 'cookie'; +import * as httpie from 'httpie'; +import { parse, stringify } from 'querystring'; +import { sanitize_user, create_user, create_session } from '../../utils/auth'; +import { oauth, secure, client_id, client_secret } from './_config.js'; + +export async function get(req, res) { + try { + // Trade "code" for "access_token" + const r1 = await httpie.post(`${oauth}/access_token?` + stringify({ + code: req.query.code, + client_id, + client_secret, + })); + + // Now fetch User details + const { access_token } = parse(r1.data); + const r2 = await httpie.get('https://api.github.com/user', { + headers: { + 'User-Agent': 'svelte.dev', + Authorization: `token ${access_token}` + } + }); + + const user = await create_user(r2.data, access_token); + const session = await create_session(user); + + res.writeHead(200, { + 'Set-Cookie': cookie.serialize('sid', session.uid, { + maxAge: 31536000, + path: '/', + httpOnly: true, + secure + }), + 'Content-Type': 'text/html; charset=utf-8' + }); + + res.end(` + + `); + } catch (err) { + console.error('GET /auth/callback', err); + send(res, 500, err.data, { + 'Content-Type': err.headers['content-type'], + 'Content-Length': err.headers['content-length'] + }); + } +} \ No newline at end of file diff --git a/site/src/routes/auth/login.js b/site/src/routes/auth/login.js new file mode 100644 index 0000000000..7240498418 --- /dev/null +++ b/site/src/routes/auth/login.js @@ -0,0 +1,27 @@ +import send from '@polka/send'; +import { stringify } from 'querystring'; +import { oauth, baseurl, client_id } from './_config.js'; + +export const get = client_id + ? (req, res) => { + const Location = `${oauth}/authorize?` + stringify({ + scope: 'read:user', + client_id, + redirect_uri: `${baseurl}/auth/callback`, + }); + + send(res, 302, Location, { Location }); + } + : (req, res) => { + send(res, 500, ` + +

Missing .env file

+

In order to use GitHub authentication, you will need to register an OAuth application and create a local .env file:

+
GITHUB_CLIENT_ID=[YOUR_APP_ID]\nGITHUB_CLIENT_SECRET=[YOUR_APP_SECRET]\nBASEURL=http://localhost:3000
+

The BASEURL variable should match the callback URL specified for your app.

+

See also here

+ + `, { + 'Content-Type': 'text/html; charset=utf-8' + }); + }; \ No newline at end of file diff --git a/site/src/routes/auth/logout.js b/site/src/routes/auth/logout.js new file mode 100644 index 0000000000..7e132f0a41 --- /dev/null +++ b/site/src/routes/auth/logout.js @@ -0,0 +1,17 @@ +import send from '@polka/send'; +import * as cookie from 'cookie'; +import { secure } from './_config.js'; +import { delete_session } from '../../utils/auth.js'; + +export async function get(req, res) { + await delete_session(req.cookies.sid); + + send(res, 200, '', { + 'Set-Cookie': cookie.serialize('sid', '', { + maxAge: -1, + path: '/', + httpOnly: true, + secure + }) + }); +} \ No newline at end of file diff --git a/site/src/routes/auth/me.json.js b/site/src/routes/auth/me.json.js deleted file mode 100644 index 2c9cebe765..0000000000 --- a/site/src/routes/auth/me.json.js +++ /dev/null @@ -1,9 +0,0 @@ -export function get(req, res) { - if (!req.session || !req.session.passport || !req.session.passport.user) { - res.send('null'); - return; - } - - const { id, username, displayName, photo } = req.session.passport && req.session.passport.user; - res.send({ id, username, displayName, photo }); -} \ No newline at end of file diff --git a/site/src/routes/blog/[slug].json.js b/site/src/routes/blog/[slug].json.js index ebc191f2da..ee41d5826d 100644 --- a/site/src/routes/blog/[slug].json.js +++ b/site/src/routes/blog/[slug].json.js @@ -1,3 +1,4 @@ +import send from '@polka/send'; import get_posts from './_posts.js'; let lookup; @@ -6,18 +7,16 @@ export function get(req, res) { if (!lookup || process.env.NODE_ENV !== 'production') { lookup = new Map(); get_posts().forEach(post => { - lookup.set(post.slug, JSON.stringify(post)); + lookup.set(post.slug, post); }); } - if (lookup.has(req.params.slug)) { - res.set({ - 'Content-Type': 'application/json', - 'Cache-Control': `max-age=${5 * 60 * 1e3}` // 5 minutes - }); - res.end(lookup.get(req.params.slug)); + const post = lookup.get(req.params.slug); + + if (post) { + res.setHeader('Cache-Control', `max-age=${5 * 60 * 1e3}`); // 5 minutes + send(res, 200, post); } else { - res.statusCode = 404; - res.end(JSON.stringify({ message: 'not found' })); + send(res, 404, { message: 'not found' }); } -} \ No newline at end of file +} diff --git a/site/src/routes/blog/[slug].svelte b/site/src/routes/blog/[slug].svelte index c64130efe5..610fb6506b 100644 --- a/site/src/routes/blog/[slug].svelte +++ b/site/src/routes/blog/[slug].svelte @@ -133,6 +133,48 @@ border: 0.8rem solid var(--second); } + /* headers anchors */ + + .post :global(.offset-anchor) { + position: relative; + display: block; + top: calc(-1 * (var(--nav-h) + var(--top-offset) - 1rem)); + width: 0; + height: 0; + } + + .post :global(.anchor) { + position: absolute; + display: block; + background: url(/icons/link.svg) 0 50% no-repeat; + background-size: 1em 1em; + width: 1.4em; + height: 1em; + top: calc((var(--h3) - 24px) / 2); + left: -1.4em; + opacity: 0; + transition: opacity 0.2s; + border: none !important; /* TODO get rid of linkify */ + } + + .post :global(h2):hover :global(.anchor), + .post :global(h3):hover :global(.anchor), + .post :global(h4):hover :global(.anchor), + .post :global(h5):hover :global(.anchor), + .post :global(h6):hover :global(.anchor) { + opacity: 1; + } + + + @media (max-width: 768px) { + .post :global(.anchor) { + transform: scale(0.6); + opacity: 1; + top: calc((1em - 0.6 * 24px) / 2); + left: -1.0em; + } + } + @media (min-width: 910px) { .post :global(.max) { width: calc(100vw - 2 * var(--side-nav)); @@ -164,4 +206,4 @@ height: 640px; } } */ - \ No newline at end of file + diff --git a/site/src/routes/blog/_posts.js b/site/src/routes/blog/_posts.js index 7a99011c95..2c86e13656 100644 --- a/site/src/routes/blog/_posts.js +++ b/site/src/routes/blog/_posts.js @@ -1,9 +1,12 @@ import fs from 'fs'; import path from 'path'; -import { extract_frontmatter, langs, link_renderer } from '../../utils/markdown.js'; +import { extract_frontmatter, link_renderer } from '@sveltejs/site-kit/utils/markdown.js'; import marked from 'marked'; -import PrismJS from 'prismjs'; -import 'prismjs/components/prism-bash'; +import { makeSlugProcessor } from '../../utils/slug'; +import { highlight } from '../../utils/highlight'; +import { SLUG_PRESERVE_UNICODE } from '../../../config'; + +const makeSlug = makeSlugProcessor(SLUG_PRESERVE_UNICODE); export default function get_posts() { return fs @@ -28,15 +31,17 @@ export default function get_posts() { renderer.link = link_renderer; - renderer.code = (source, lang) => { - const plang = langs[lang]; - const highlighted = PrismJS.highlight( - source, - PrismJS.languages[plang], - lang, - ); + renderer.code = highlight; + + renderer.heading = (text, level, rawtext) => { + const fragment = makeSlug(rawtext); - return `
${highlighted}
`; + return ` + + + + ${text} + `; }; const html = marked( diff --git a/site/src/routes/blog/index.json.js b/site/src/routes/blog/index.json.js index b2609505a4..75180e6e87 100644 --- a/site/src/routes/blog/index.json.js +++ b/site/src/routes/blog/index.json.js @@ -1,3 +1,4 @@ +import send from '@polka/send'; import get_posts from './_posts.js'; let json; @@ -16,9 +17,8 @@ export function get(req, res) { json = JSON.stringify(posts); } - res.set({ + send(res, 200, json, { 'Content-Type': 'application/json', 'Cache-Control': `max-age=${5 * 60 * 1e3}` // 5 minutes }); - res.end(json); -} \ No newline at end of file +} diff --git a/site/src/routes/blog/index.svelte b/site/src/routes/blog/index.svelte index 6f96731af0..92fc5ce96d 100644 --- a/site/src/routes/blog/index.svelte +++ b/site/src/routes/blog/index.svelte @@ -11,7 +11,7 @@ Blog • Svelte - + diff --git a/site/src/routes/blog/rss.xml.js b/site/src/routes/blog/rss.xml.js index e41e1131f0..974806ad44 100644 --- a/site/src/routes/blog/rss.xml.js +++ b/site/src/routes/blog/rss.xml.js @@ -1,3 +1,4 @@ +import send from '@polka/send'; import get_posts from '../blog/_posts.js'; const months = ',Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','); @@ -34,9 +35,8 @@ const rss = ` `.replace(/>[^\S]+/gm, '>').replace(/[^\S]+ - import { onMount, afterUpdate } from 'svelte'; - import Icon from '../../components/Icon.svelte'; - - export let sections = []; - export let active_section = null; - export let show_contents; - export let prevent_sidebar_scroll = false; - - let ul; - - afterUpdate(() => { - // bit of a hack — prevent sidebar scrolling if - // TOC is open on mobile, or scroll came from within sidebar - if (prevent_sidebar_scroll || show_contents && window.innerWidth < 832) return; - - const active = ul.querySelector('.active'); - - if (active) { - const { top, bottom } = active.getBoundingClientRect(); - - const min = 200; - const max = window.innerHeight - 200; - - if (top > max) { - ul.parentNode.scrollBy({ - top: top - max, - left: 0, - behavior: 'smooth' - }); - } else if (bottom < min) { - ul.parentNode.scrollBy({ - top: bottom - min, - left: 0, - behavior: 'smooth' - }); - } - } - }); - - - - - diff --git a/site/src/routes/docs/_sections.js b/site/src/routes/docs/_sections.js index ec23a65087..bb081a050b 100644 --- a/site/src/routes/docs/_sections.js +++ b/site/src/routes/docs/_sections.js @@ -1,28 +1,10 @@ import fs from 'fs'; import path from 'path'; -import { SLUG_PRESERVE_UNICODE } from '../../../config'; -import { extract_frontmatter, extract_metadata, langs, link_renderer } from '../../utils/markdown.js'; -import { makeSessionSlugProcessor } from '../../utils/slug'; +import { SLUG_PRESERVE_UNICODE, SLUG_SEPARATOR } from '../../../config'; +import { extract_frontmatter, extract_metadata, link_renderer } from '@sveltejs/site-kit/utils/markdown.js'; +import { make_session_slug_processor } from '@sveltejs/site-kit/utils/slug'; +import { highlight } from '../../utils/highlight'; import marked from 'marked'; -import PrismJS from 'prismjs'; -import 'prismjs/components/prism-bash'; - -const escaped = { - '"': '"', - "'": ''', - '&': '&', - '<': '<', - '>': '>', -}; - -const unescaped = Object.keys(escaped).reduce( - (unescaped, key) => ((unescaped[escaped[key]] = key), unescaped), - {} -); - -function unescape(str) { - return String(str).replace(/&.+?;/g, match => unescaped[match] || match); -} const blockTypes = [ 'blockquote', @@ -38,7 +20,10 @@ const blockTypes = [ ]; export default function() { - const makeSlug = makeSessionSlugProcessor(SLUG_PRESERVE_UNICODE); + const make_slug = make_session_slug_processor({ + preserve_unicode: SLUG_PRESERVE_UNICODE, + separator: SLUG_SEPARATOR + }); return fs .readdirSync(`content/docs`) @@ -48,7 +33,7 @@ export default function() { const { content, metadata } = extract_frontmatter(markdown); - const sectionSlug = makeSlug(metadata.title); + const section_slug = make_slug(metadata.title); const subsections = []; @@ -58,7 +43,7 @@ export default function() { renderer.link = link_renderer; - renderer.hr = (...args) => { + renderer.hr = () => { block_open = true; return '
'; @@ -87,14 +72,7 @@ export default function() { if (meta && meta.hidden) return ''; - const plang = langs[lang]; - const highlighted = PrismJS.highlight( - source, - PrismJS.languages[plang], - lang - ); - - let html = `
${prefix}
${highlighted}
`; + const html = `
${prefix}${highlight(source, lang)}
`; if (block_open) { block_open = false; @@ -105,18 +83,24 @@ export default function() { }; renderer.heading = (text, level, rawtext) => { - const slug = makeSlug(rawtext); + let slug; + + const match = /(.+)<\/a>/.exec(text); + if (match) { + slug = match[1]; + text = match[2]; + } else { + slug = make_slug(rawtext); + } if (level === 3 || level === 4) { - const title = unescape( - text - .replace(/<\/?code>/g, '') - .replace(/\.(\w+)(\((.+)?\))?/, (m, $1, $2, $3) => { - if ($3) return `.${$1}(...)`; - if ($2) return `.${$1}()`; - return `.${$1}`; - }) - ); + const title = text + .replace(/<\/?code>/g, '') + .replace(/\.(\w+)(\((.+)?\))?/, (m, $1, $2, $3) => { + if ($3) return `.${$1}(...)`; + if ($2) return `.${$1}()`; + return `.${$1}`; + }); subsections.push({ slug, title, level }); } @@ -144,7 +128,7 @@ export default function() { html: html.replace(/@@(\d+)/g, (m, id) => hashes[id] || m), metadata, subsections, - slug: sectionSlug, + slug: section_slug, file, }; }); diff --git a/site/src/routes/docs/index.json.js b/site/src/routes/docs/index.json.js index e2b74e82a7..66d588a949 100644 --- a/site/src/routes/docs/index.json.js +++ b/site/src/routes/docs/index.json.js @@ -1,15 +1,12 @@ +import send from '@polka/send'; import get_sections from './_sections.js'; let json; export function get(req, res) { if (!json || process.env.NODE_ENV !== 'production') { - json = JSON.stringify(get_sections()); + json = get_sections(); } - res.set({ - 'Content-Type': 'application/json' - }); - - res.end(json); -} \ No newline at end of file + send(res, 200, json); +} diff --git a/site/src/routes/docs/index.svelte b/site/src/routes/docs/index.svelte index 07cd1fa191..7f6fad92d3 100644 --- a/site/src/routes/docs/index.svelte +++ b/site/src/routes/docs/index.svelte @@ -6,359 +6,11 @@ - - API Docs • Svelte @@ -367,31 +19,4 @@ -
- {#each sections as section} -
-

- - - - {section.metadata.title} - - - - -

- - {@html section.html} -
- {/each} -
- - + diff --git a/site/src/routes/examples/[slug].json.js b/site/src/routes/examples/[slug].json.js index 818a038cb1..705a4e7e89 100644 --- a/site/src/routes/examples/[slug].json.js +++ b/site/src/routes/examples/[slug].json.js @@ -1,3 +1,4 @@ +import send from '@polka/send'; import { get_example } from './_examples.js'; const cache = new Map(); @@ -5,21 +6,18 @@ const cache = new Map(); export function get(req, res) { const { slug } = req.params; - try { - if (!cache.has(slug) || process.env.NODE_ENV !== 'production') { - cache.set(slug, JSON.stringify(get_example(slug))); - } + let example = cache.get(slug); - res.writeHead(200, { - 'Content-Type': 'application/json' - }); + if (!example || process.env.NODE_ENV !== 'production') { + example = get_example(slug); + if (example) cache.set(slug, example); + } - res.end(cache.get(slug)); - } catch (err) { - res.writeHead(404, { - 'Content-Type': 'application/json' + if (example) { + send(res, 200, example); + } else { + send(res, 404, { + error: 'not found' }); - - res.end(JSON.stringify({ error: 'not found' })); } } diff --git a/site/src/routes/examples/_TableOfContents.svelte b/site/src/routes/examples/_TableOfContents.svelte index ec7310c5fa..d5a8b7240f 100644 --- a/site/src/routes/examples/_TableOfContents.svelte +++ b/site/src/routes/examples/_TableOfContents.svelte @@ -1,6 +1,7 @@ @@ -64,24 +87,29 @@
{/each} {/each} diff --git a/site/src/routes/examples/_examples.js b/site/src/routes/examples/_examples.js index 75c0aab08f..e4580d7fda 100644 --- a/site/src/routes/examples/_examples.js +++ b/site/src/routes/examples/_examples.js @@ -1,5 +1,4 @@ import fs from 'fs'; -import path from 'path'; let lookup; const titles = new Map(); @@ -36,7 +35,7 @@ export function get_example(slug) { const dir = lookup.get(slug); const title = titles.get(slug); - if (!dir || !title) throw { status: 404, message: 'not found' }; + if (!dir || !title) return null; const files = fs.readdirSync(`content/examples/${dir}`) .filter(name => name[0] !== '.' && name !== 'meta.json') @@ -48,4 +47,4 @@ export function get_example(slug) { }); return { title, files }; -} \ No newline at end of file +} diff --git a/site/src/routes/examples/index.json.js b/site/src/routes/examples/index.json.js index 4cb4d9c554..09876e1993 100644 --- a/site/src/routes/examples/index.json.js +++ b/site/src/routes/examples/index.json.js @@ -1,3 +1,4 @@ +import send from '@polka/send'; import { get_examples } from './_examples.js'; let cached; @@ -5,19 +6,13 @@ let cached; export function get(req, res) { try { if (!cached || process.env.NODE_ENV !== 'production') { - cached = JSON.stringify(get_examples()); + cached = get_examples().filter(section => section.title); } - res.writeHead(200, { - 'Content-Type': 'application/json' - }); - - res.end(cached); + send(res, 200, cached); } catch (e) { - res.writeHead(e.status || 500, { - 'Content-Type': 'application/json' + send(res, e.status || 500, { + message: e.message }); - - res.end(JSON.stringify({ message: e.message })); } -} \ No newline at end of file +} diff --git a/site/src/routes/examples/index.svelte b/site/src/routes/examples/index.svelte index bc5ef2010d..9fd783f950 100644 --- a/site/src/routes/examples/index.svelte +++ b/site/src/routes/examples/index.svelte @@ -21,12 +21,12 @@ import ScreenToggle from '../../components/ScreenToggle.svelte'; import { - mapbox_setup, // needed for context API example + mapbox_setup, // see site/content/examples/15-context/00-context-api rollupUrl, svelteUrl } from '../../config'; import { process_example } from '../../utils/examples'; - import { getFragment } from '../../utils/navigation'; + import { getFragment } from '@sveltejs/site-kit/utils/navigation'; import TableOfContents from './_TableOfContents.svelte'; export let sections; @@ -36,32 +36,51 @@ let width; let offset = 1; let repl; + let isLoading = false; + const cache = {}; + + function showExampleCodeOnChange() { + offset = 1; + } $: title = title_by_slug[active_slug] || ''; $: first_slug = sections[0].examples[0].slug; - $: if (repl) { - fetch(`examples/${active_slug}.json`) - .then(async response => { - if (response.ok) { - const data = await response.json(); - - repl.set({ - components: process_example(data.files) + $: mobile = width < 768; // note: same as per media query below + $: replOrientation = (mobile || width > 1080) ? 'columns' : 'rows'; + $: if (repl && active_slug) { + if (active_slug in cache) { + repl.set({ components: cache[active_slug] }); + showExampleCodeOnChange(); + } else { + isLoading = true; + fetch(`examples/${active_slug}.json`) + .then(async response => { + if (response.ok) { + const {files} = await response.json(); + return process_example(files); + } + }) + .then(components => { + cache[active_slug] = components; + repl.set({components}); + showExampleCodeOnChange(); + isLoading = false; + }) + .catch(() => { + isLoading = false; }); - } - }); + } } - $: mobile = width < 768; // note: same as per media query below onMount(() => { const onhashchange = () => { active_slug = getFragment(); - offset = 1; }; window.addEventListener('hashchange', onhashchange, false); - if (getFragment()) { - active_slug = getFragment(); + const fragment = getFragment(); + if (fragment) { + active_slug = fragment; } else { active_slug = first_slug; goto(`examples#${active_slug}`); @@ -83,16 +102,19 @@
- - + +
+ +
{#if mobile} @@ -117,6 +139,24 @@ grid-auto-rows: 100%; } + .repl-container.loading { + opacity: 0.6; + } + + /* temp fix for #2499 and #2550 while waiting for a fix for https://github.com/sveltejs/svelte-repl/issues/8 */ + + .repl-container :global(.tab-content), + .repl-container :global(.tab-content.visible) { + pointer-events: all; + opacity: 1; + } + .repl-container :global(.tab-content) { + visibility: hidden; + } + .repl-container :global(.tab-content.visible) { + visibility: visible; + } + .offset-1 { transform: translate(-33.333%, 0); } .offset-2 { transform: translate(-66.666%, 0); } diff --git a/site/src/routes/faq.js b/site/src/routes/faq.js new file mode 100644 index 0000000000..6263494a4c --- /dev/null +++ b/site/src/routes/faq.js @@ -0,0 +1,4 @@ +export function get(req, res) { + res.writeHead(302, { Location: 'https://github.com/sveltejs/svelte/wiki/FAQ' }); + res.end(); +} \ No newline at end of file diff --git a/site/src/routes/gist/[id].js b/site/src/routes/gist/[id].js deleted file mode 100644 index a03302fb8d..0000000000 --- a/site/src/routes/gist/[id].js +++ /dev/null @@ -1,81 +0,0 @@ -import fetch from 'node-fetch'; -import { body } from './_utils.js'; - -export async function get(req, res) { - const { id } = req.params; - - const headers = {}; - const user = req.session && req.session.passport && req.session.passport.user; - if (user) { - headers.Authorization = `token ${user.token}`; - } - - const r = await fetch(`https://api.github.com/gists/${id}`, { - headers - }); - - res.writeHead(r.status, { - 'Content-Type': 'application/json' - }); - - const result = await r.json(); - - if (r.status === 200) { - res.end(JSON.stringify({ - id: result.id, - description: result.description, - owner: result.owner, - html_url: result.html_url, - files: result.files - })); - } else { - res.end(JSON.stringify(result)); - } -} - -export async function patch(req, res) { - const user = req.session && req.session.passport && req.session.passport.user; - - if (!user) { - res.writeHead(403, { - 'Content-Type': 'application/json' - }); - res.end(JSON.stringify({ error: 'unauthorized' })); - return; - } - - try { - const { description, files } = await body(req); - - const r = await fetch(`https://api.github.com/gists/${req.params.id}`, { - method: 'PATCH', - headers: { - Authorization: `token ${user.token}` - }, - body: JSON.stringify({ - description, - files - }) - }); - - res.writeHead(r.status, { - 'Content-Type': 'application/json' - }); - - if (r.status === 200) { - res.end(JSON.stringify({ - ok: true - })); - } else { - res.end(await r.text()); - } - } catch (err) { - res.writeHead(500, { - 'Content-Type': 'application/json' - }); - - res.end(JSON.stringify({ - error: err.message - })); - } -} \ No newline at end of file diff --git a/site/src/routes/gist/create.js b/site/src/routes/gist/create.js deleted file mode 100644 index d93a067316..0000000000 --- a/site/src/routes/gist/create.js +++ /dev/null @@ -1,70 +0,0 @@ -import fetch from 'node-fetch'; -import { body } from './_utils.js'; - -export async function post(req, res) { - const user = req.session.passport && req.session.passport.user; - - if (!user) { - res.writeHead(403, { - 'Content-Type': 'application/json' - }); - res.end(JSON.stringify({ error: 'unauthorized' })); - return; - } - - try { - const { name, components } = await body(req); - - const files = { - 'meta.json': { - content: JSON.stringify({ - svelte: true - }, null, ' ') - }, - 'README.md': { - content: `Created with [svelte.dev/repl](https://svelte.dev/repl)` - } - }; - components.forEach(component => { - const file = `${component.name}.${component.type}`; - if (!component.source.trim()) { - throw new Error(`GitHub does not allow saving gists with empty files - ${file}`); - } - files[file] = { content: component.source }; - }); - - const r = await fetch(`https://api.github.com/gists`, { - method: 'POST', - headers: { - Authorization: `token ${user.token}` - }, - body: JSON.stringify({ - description: name, - files, - public: false - }) - }); - - res.writeHead(r.status, { - 'Content-Type': 'application/json' - }); - - const gist = await r.json(); - - res.end(JSON.stringify({ - id: gist.id, - description: gist.description, - owner: gist.owner, - html_url: gist.html_url, - files: gist.files - })); - } catch (err) { - res.writeHead(500, { - 'Content-Type': 'application/json' - }); - - res.end(JSON.stringify({ - error: err.message - })); - } -} diff --git a/site/src/routes/index.svelte b/site/src/routes/index.svelte index dc31a14df2..73fbffbc6a 100644 --- a/site/src/routes/index.svelte +++ b/site/src/routes/index.svelte @@ -1,12 +1,9 @@ - .example { - width: 100%; - } - - .example a { - color: inherit; - } - - .example > p { - margin: 4.4rem 2.4rem 2.4rem 0; - } + + Svelte • Cybernetically enhanced web apps - .repl-container { - width: 100%; - height: 420px; - border-radius: var(--border-r); - overflow: hidden; - } + + + + - .contributor { - width: 2.4em; - height: 2.4em; - border-radius: 50%; - text-indent: -9999px; - display: inline-block; - background: no-repeat url(/contributors.jpg); - background-size: auto 102%; - margin: 0 0.5em 0.5em 0; - border: 2px solid var(--second); - } + - @media (min-width: 640px) { - .logotype { - height: 6rem; - } + + +

Write less code

+

Build boilerplate-free components using languages you already know — HTML, CSS and JavaScript

- .hero h3 { - font-size: var(--h3); - } - } + learn more +
- @media (min-width: 800px) { - .logo { - display: block; - } + +

No virtual DOM

+

Svelte compiles your code to tiny, framework-less vanilla JS — your app starts fast and stays fast

- .hero { - margin: 15rem auto; - } + learn more +
- .hero h3, .logotype { - left: 3rem; - } - } + +

Truly reactive

+

No more complex state management libraries — Svelte brings reactivity to JavaScript itself

- @media (min-width: 920px) { - .example { - display: grid; - grid-template-columns: 1fr 3fr; - grid-gap: 0.5em; - align-items: start; - } - } + learn more +
- @media (min-width: 1200px) { - .logo { - right: calc(50vw - 60rem); - } - } - +
+

Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app.

- - Svelte • Cybernetically enhanced web apps +

Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.

- - - -
+

Read the introductory blog post to learn more.

+
- +
+
+npx degit sveltejs/template my-svelte-project
+# or download and extract this .zip file
+cd my-svelte-project
 
-
+npm install
+npm run dev
+		
-
- Svelte logotype -

Cybernetically enhanced web apps

-
+

See the quickstart guide for more information.

- +

Learn Svelte

+
+
-
+

Svelte components are built on top of HTML. Just add data.

+
-
- - {#if intersecting} - - - {/if} - -
-
- -
+

CSS is component-scoped by default — no more style collisions or specificity wars. Or you can use your favourite CSS-in-JS library.

+
-
- - {#if intersecting} - - - {/if} - -
-
- -
+

Trigger efficient, granular updates by assigning to local variables. The compiler does the rest.

+
-
- - {#if intersecting} - - - {/if} - -
-
- -
+

Build beautiful UIs with a powerful, performant transition engine built right into the framework.

- -
- - {#if intersecting} - - - {/if} - -
-
+
-
+

Who's using Svelte?

-
+
-
+

Contributors

Svelte is free and open source software, made possible by the work of dozens of volunteers. Join us!

- {#each contributors as contributor, i} - {contributor} - {/each} -
+ +
diff --git a/site/src/routes/repl/_components/AppControls/UserMenu.svelte b/site/src/routes/repl/[id]/_components/AppControls/UserMenu.svelte similarity index 72% rename from site/src/routes/repl/_components/AppControls/UserMenu.svelte rename to site/src/routes/repl/[id]/_components/AppControls/UserMenu.svelte index bb86371ed6..de400cbf29 100644 --- a/site/src/routes/repl/_components/AppControls/UserMenu.svelte +++ b/site/src/routes/repl/[id]/_components/AppControls/UserMenu.svelte @@ -1,18 +1,23 @@
{name} - {name} avatar + {name} avatar {#if showMenu} {/if} @@ -64,7 +69,7 @@ .menu { position: absolute; width: calc(100% + 1.6rem); - min-width: 6em; + min-width: 10em; top: 3rem; right: -1.6rem; background-color: var(--second); @@ -72,17 +77,25 @@ z-index: 99; text-align: left; border-radius: 0.4rem; + display: flex; + flex-direction: column; } - .menu button { + .menu button, .menu a { background-color: transparent; font-family: var(--font); font-size: 1.6rem; - /* opacity: 0.7; */ + opacity: 0.7; + padding: 0.4rem 0; + text-decoration: none; + text-align: left; + border: none; + color: inherit; } - .menu button:hover { + .menu button:hover, .menu a:hover { opacity: 1; + color: inherit; } @media (min-width: 600px) { @@ -99,4 +112,4 @@ display: inline-block; } } - \ No newline at end of file + diff --git a/site/src/routes/repl/_components/AppControls/index.svelte b/site/src/routes/repl/[id]/_components/AppControls/index.svelte similarity index 65% rename from site/src/routes/repl/_components/AppControls/index.svelte rename to site/src/routes/repl/[id]/_components/AppControls/index.svelte index 179a8e4470..007dba3461 100644 --- a/site/src/routes/repl/_components/AppControls/index.svelte +++ b/site/src/routes/repl/[id]/_components/AppControls/index.svelte @@ -1,13 +1,16 @@ + + + + + + + {name} • REPL • Svelte + + + + + + + + +
+ + + {#if process.browser} +
+ +
+ + {#if mobile} + + {/if} + {/if} +
diff --git a/site/src/routes/gist/_utils.js b/site/src/routes/repl/_utils/body.js similarity index 87% rename from site/src/routes/gist/_utils.js rename to site/src/routes/repl/_utils/body.js index 8417031001..950208ab56 100644 --- a/site/src/routes/gist/_utils.js +++ b/site/src/routes/repl/_utils/body.js @@ -1,4 +1,4 @@ -export function body(req) { +export default function body(req) { return new Promise((fulfil, reject) => { let str = ''; diff --git a/site/src/routes/repl/create.json.js b/site/src/routes/repl/create.json.js new file mode 100644 index 0000000000..7bb809bd5f --- /dev/null +++ b/site/src/routes/repl/create.json.js @@ -0,0 +1,27 @@ +import send from '@polka/send'; +import body from './_utils/body.js'; +import { query } from '../../utils/db'; + +export async function post(req, res) { + const { user } = req; + if (!user) return; // response already sent + + try { + const { name, files } = await body(req); + + const [row] = await query(` + insert into gists(user_id, name, files) + values ($1, $2, $3) returning *`, [user.id, name, JSON.stringify(files)]); + + send(res, 201, { + uid: row.uid.replace(/-/g, ''), + name: row.name, + files: row.files, + owner: user.uid, + }); + } catch (err) { + send(res, 500, { + error: err.message + }); + } +} diff --git a/site/src/routes/repl/index.svelte b/site/src/routes/repl/index.svelte index 8a71e00d36..0c7acfc9dc 100644 --- a/site/src/routes/repl/index.svelte +++ b/site/src/routes/repl/index.svelte @@ -1,224 +1,16 @@ - - - - - - - REPL • Svelte - - - - - - - - -
- - - {#if process.browser} -
- -
- - {#if mobile} - - {/if} - {/if} -
+ \ No newline at end of file diff --git a/site/src/routes/repl/local/[file].js b/site/src/routes/repl/local/[...file].js similarity index 63% rename from site/src/routes/repl/local/[file].js rename to site/src/routes/repl/local/[...file].js index 20d9f509cb..7bd1c6a82c 100644 --- a/site/src/routes/repl/local/[file].js +++ b/site/src/routes/repl/local/[...file].js @@ -1,12 +1,13 @@ import { createReadStream } from 'fs'; export function get(req, res) { - if (process.env.NODE_ENV !== 'development' || !/^[a-z.]+$/.test(req.params.file)) { + const path = req.params.file.join('/'); + if (process.env.NODE_ENV !== 'development' || ('/' + path).includes('/.')) { res.writeHead(403); res.end(); return; } - createReadStream('../' + req.params.file) + createReadStream('../' + path) .on('error', () => { res.writeHead(403); res.end(); diff --git a/site/src/routes/tutorial/[slug]/_TableOfContents.svelte b/site/src/routes/tutorial/[slug]/_TableOfContents.svelte index 4796a71587..7b0d4b5de0 100644 --- a/site/src/routes/tutorial/[slug]/_TableOfContents.svelte +++ b/site/src/routes/tutorial/[slug]/_TableOfContents.svelte @@ -1,6 +1,6 @@ - `); - }); -} else { - app.get('/auth/login', (req, res) => { - res.writeHead(500); - res.end(` - -

Missing .env file

-

In order to use GitHub authentication, you will need to register an OAuth application with gist and read:user scopes, and create a .env file:

- -
GITHUB_CLIENT_ID=[YOUR_APP_ID]\nGITHUB_CLIENT_SECRET=[YOUR_APP_SECRET]\nBASEURL=http://localhost:3000
- -

The BASEURL variable should match the callback URL specified for your app.

- - `); - }); +if (process.env.PGHOST) { + app.use(authenticate()); } app.use( sirv('static', { + dev: process.env.NODE_ENV === 'development', setHeaders(res) { res.setHeader('Access-Control-Allow-Origin', '*'); res.hasHeader('Cache-Control') || res.setHeader('Cache-Control', 'max-age=600'); // 10min default } }), - sapper.middleware({ - // TODO update Sapper so that we can pass props to the client - props: req => { - const user = req.session && req.session.passport && req.session.passport.user; - return { - user: user && { - // strip access token - id: user.id, - username: user.username, - displayName: user.displayName, - photo: user.photo - } - }; - } + sapper.middleware({ + session: req => ({ + user: sanitize_user(req.user) + }) }) -).listen(process.env.PORT); +); + +app.listen(PORT); diff --git a/site/src/service-worker.js b/site/src/service-worker.js index e226670753..f7a76df99a 100644 --- a/site/src/service-worker.js +++ b/site/src/service-worker.js @@ -1,4 +1,4 @@ -import { timestamp, files, shell, routes } from '@sapper/service-worker'; +import { timestamp, files, shell } from '@sapper/service-worker'; const ASSETS = `cache${timestamp}`; @@ -76,7 +76,7 @@ self.addEventListener('fetch', event => { const response = await fetch(event.request); cache.put(event.request, response.clone()); return response; - } catch(err) { + } catch (err) { const response = await cache.match(event.request); if (response) return response; diff --git a/site/src/template.html b/site/src/template.html index 5d9739cde3..344684d766 100644 --- a/site/src/template.html +++ b/site/src/template.html @@ -2,12 +2,11 @@ - + %sapper.base% - @@ -16,6 +15,7 @@ + ')) { - return fleece.evaluate(line.slice(4, -3).trim()); - } - - if ( - lang === 'js' || - (lang === 'json' && line.startsWith('/*') && line.endsWith('*/')) - ) { - return fleece.evaluate(line.slice(2, -2).trim()); - } - } catch (err) { - // TODO report these errors, don't just squelch them - return null; - } -} - -// map lang to prism-language-attr -export const langs = { - bash: 'bash', - html: 'markup', - sv: 'markup', - js: 'javascript', - css: 'css' -}; - - -// links renderer -export function link_renderer (href, title, text) { - let target_attr = ''; - let title_attr = ''; - - if(href.startsWith("http")) { - target_attr = ' target="_blank"'; - } - - if(title !== null) { - title_attr = ` title="${title}"`; - } - - return `${text}`; -}; diff --git a/site/src/utils/navigation.js b/site/src/utils/navigation.js deleted file mode 100644 index 5ee85b0285..0000000000 --- a/site/src/utils/navigation.js +++ /dev/null @@ -1 +0,0 @@ -export const getFragment = () => window.location.hash.slice(1); diff --git a/site/src/utils/slug.js b/site/src/utils/slug.js index 4ad7b96b2a..05ec5512ca 100644 --- a/site/src/utils/slug.js +++ b/site/src/utils/slug.js @@ -1,14 +1,20 @@ -import limax from 'limax'; -import {SLUG_LANG, SLUG_SEPARATOR} from '../../config'; +import slugify from '@sindresorhus/slugify'; +import {SLUG_SEPARATOR} from '../../config'; -/* latinizer processor */ +/* url-safe processor */ -export const limaxProcessor = (string, lang = SLUG_LANG) => limax(string, { - custom: ['$'], - separator: SLUG_SEPARATOR, - maintainCase: true, - lang -}); +export const urlsafeSlugProcessor = string => + slugify(string, { + customReplacements: [ // runs before any other transformations + ['$', 'DOLLAR'], // `$destroy` & co + ['-', 'DASH'], // conflicts with `separator` + ], + separator: SLUG_SEPARATOR, + decamelize: false, + lowercase: false + }) + .replace(/DOLLAR/g, '$') + .replace(/DASH/g, '-'); /* unicode-preserver processor */ @@ -19,40 +25,46 @@ const isNonAlphaNumUnicode = export const unicodeSafeProcessor = string => string.split('') - .reduce((accum, char, index, array) => { - const type = isNonAlphaNumUnicode(char) ? 'pass' : 'process'; - - if (index === 0) { - accum.current = {type, string: char}; - } else if (type === accum.current.type) { - accum.current.string += char; - } else { - accum.chunks.push(accum.current); - accum.current = {type, string: char} - } - - if (index === array.length - 1) { - accum.chunks.push(accum.current); - } - - return accum; - }, {chunks: [], current: {type: '', string: ''}}) - .chunks - .reduce((accum, chunk) => { - const processed = chunk.type === 'process' - ? limaxProcessor(chunk.string) - : chunk.string; - - processed.length > 0 && accum.push(processed); - - return accum; - }, []) - .join(SLUG_SEPARATOR); + .reduce((accum, char, index, array) => { + const type = isNonAlphaNumUnicode(char) ? 'pass' : 'process'; + + if (index === 0) { + accum.current = {type, string: char}; + } else if (type === accum.current.type) { + accum.current.string += char; + } else { + accum.chunks.push(accum.current); + accum.current = {type, string: char}; + } + + if (index === array.length - 1) { + accum.chunks.push(accum.current); + } + + return accum; + }, {chunks: [], current: {type: '', string: ''}}) + .chunks + .reduce((accum, chunk) => { + const processed = chunk.type === 'process' + ? urlsafeSlugProcessor(chunk.string) + : chunk.string; + + processed.length > 0 && accum.push(processed); + + return accum; + }, []) + .join(SLUG_SEPARATOR); + +/* processor */ + +export const makeSlugProcessor = (preserveUnicode = false) => preserveUnicode + ? unicodeSafeProcessor + : urlsafeSlugProcessor; /* session processor */ export const makeSessionSlugProcessor = (preserveUnicode = false) => { - const processor = preserveUnicode ? unicodeSafeProcessor : limaxProcessor; + const processor = makeSlugProcessor(preserveUnicode); const seen = new Set(); return string => { @@ -62,5 +74,5 @@ export const makeSessionSlugProcessor = (preserveUnicode = false) => { seen.add(slug); return slug; - } -} + }; +}; diff --git a/site/static/curl.js b/site/static/curl.js deleted file mode 100644 index b0ddc51a71..0000000000 --- a/site/static/curl.js +++ /dev/null @@ -1,22 +0,0 @@ -/* version: 0.8.13 */ -(function(){/* - MIT License (c) copyright 2010-2013 B Cavalier & J Hann */ - (function(m){function U(){}function u(a,b){return 0==aa.call(a).indexOf("[object "+b)}function I(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function V(a,b){var d,c,e,f;d=1;c=a;"."==c.charAt(0)&&(e=!0,c=c.replace(ba,function(a,b,c,e){c&&d++;return e||""}));if(e){e=b.split("/");f=e.length-d;if(0>f)return a;e.splice(f,d);return e.concat(c||[]).join("/")}return c}function J(a){var b=a.indexOf("!");return{h:a.substr(b+1),f:0<=b&&a.substr(0,b)}}function P(){}function v(a,b){P.prototype= - a||Q;var d=new P;P.prototype=Q;for(var c in b)d[c]=b[c];return d}function K(){function a(a,b,d){c.push([a,b,d])}function b(a,b){for(var d,e=0;d=c[e++];)(d=d[a])&&d(b)}var d,c,e;d=this;c=[];e=function(d,g){a=d?function(a){a&&a(g)}:function(a,b){b&&b(g)};e=U;b(d?0:1,g);b=U;c=k};this.then=function(b,c,e){a(b,c,e);return d};this.resolve=function(a){d.va=a;e(!0,a)};this.reject=function(a){d.ua=a;e(!1,a)};this.D=function(a){b(2,a)}}function L(a){return a instanceof K||a instanceof B}function w(a,b,d,c){L(a)? - a.then(b,d,c):b(a)}function C(a,b,d){var c;return function(){0<=--a&&b&&(c=b.apply(k,arguments));0==a&&d&&d(c);return c}}function A(){var a,b;D="";a=[].slice.call(arguments);u(a[0],"Object")&&(b=a.shift(),b=M(b));return new B(a[0],a[1],a[2],b)}function M(a,b,d){var c;D="";if(a&&(h.V(a),x=h.a(a),"preloads"in a&&(c=new B(a.preloads,k,d,E,!0),h.m(function(){E=c})),a=a.main))return new B(a,b,d)}function B(a,b,d,c,e){var f;f=h.j(x,k,[].concat(a),e);this.then=this.then=a=function(a,b){w(f,function(b){a&& - a.apply(k,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(a,b,c){return new B(a,b,c,f)};this.config=M;(b||d)&&a(b,d);h.m(function(){w(e||E,function(){w(c,function(){h.w(f)},d)})})}function W(a){var b,d;b=a.id;b==k&&(F!==k?F={L:"Multiple anonymous defines encountered"}:(b=h.ha())||(F=a));if(b!=k){d=l[b];b in l||(d=h.i(b,x),d=h.I(d.a,b),l[b]=d);if(!L(d))throw Error("duplicate define: "+b);d.ja=!1;h.J(d,a)}}function R(){var a=h.ea(arguments);W(a)}var D,x,y,G,z=m.document,S= - z&&(z.head||z.getElementsByTagName("head")[0]),ca=S&&S.getElementsByTagName("base")[0]||null,X={},Y={},N={},da="addEventListener"in m?{}:{loaded:1,complete:1},Q={},aa=Q.toString,k,l={},O={},E=!1,F,Z=/^\/|^[^:]+:\/\/|^[A-Za-z]:[\\/]/,ba=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,ea=/\/\*[\s\S]*?\*\/|\/\/.*?[\n\r]/g,fa=/require\s*\(\s*(["'])(.*?[^\\])\1\s*\)|[^\\]?(["'])/g,ga=/\s*,\s*/,T,h;h={o:function(a,b,d){var c;a=V(a,b);if("."==a.charAt(0))return a;c=J(a);a=(b=c.f)||c.h;a in d.c&&(a=d.c[a].R||a);b&&(0> - b.indexOf("/")&&!(b in d.c)&&(a=I(d.T)+"/"+b),a=a+"!"+c.h);return a},j:function(a,b,d,c){function e(b,c){var d,f;d=h.o(b,g.id,a);if(!c)return d;f=J(d);if(!f.f)return d;d=l[f.f];f.h="normalize"in d?d.normalize(f.h,e,g.a)||"":e(f.h);return f.f+"!"+f.h}function f(b,d,f){var p;p=d&&function(a){d.apply(k,a)};if(u(b,"String")){if(p)throw Error("require(id, callback) not allowed");f=e(b,!0);b=l[f];if(!(f in l))throw Error("Module not resolved: "+f);return(f=L(b)&&b.b)||b}w(h.w(h.j(a,g.id,b,c)),p,f)}var g; - g=new K;g.id=b||"";g.ia=c;g.K=d;g.a=a;g.F=f;f.toUrl=function(b){return h.i(e(b,!0),a).url};g.o=e;return g},I:function(a,b,d){var c,e,f;c=h.j(a,b,k,d);e=c.resolve;f=C(1,function(a){c.v=a;try{return h.Z(c)}catch(b){c.reject(b)}});c.resolve=function(a){w(d||E,function(){e(l[c.id]=O[c.url]=f(a))})};c.M=function(a){w(d||E,function(){c.b&&(f(a),c.D(Y))})};return c},Y:function(a,b,d,c){return h.j(a,d,k,c)},ga:function(a){return a.F},N:function(a){return a.b||(a.b={})},fa:function(a){var b=a.A;b||(b=a.A= - {id:a.id,uri:h.O(a),exports:h.N(a),config:function(){return a.a}},b.b=b.exports);return b},O:function(a){return a.url||(a.url=h.H(a.F.toUrl(a.id),a.a))},V:function(a){var b,d,c,e,f;b="curl";d="define";c=e=m;if(a&&(f=a.overwriteApi||a.sa,b=a.apiName||a.la||b,c=a.apiContext||a.ka||c,d=a.defineName||a.na||d,e=a.defineContext||a.ma||e,y&&u(y,"Function")&&(m.curl=y),y=null,G&&u(G,"Function")&&(m.define=G),G=null,!f)){if(c[b]&&c[b]!=A)throw Error(b+" already exists");if(e[d]&&e[d]!=R)throw Error(d+" already exists"); - }c[b]=A;e[d]=R},a:function(a){function b(a,b){var d,c,g,n,q;for(q in a){g=a[q];u(g,"String")&&(g={path:a[q]});g.name=g.name||q;n=e;c=J(I(g.name));d=c.h;if(c=c.f)n=f[c],n||(n=f[c]=v(e),n.c=v(e.c),n.g=[]),delete a[q];c=g;var l=b,H=void 0;c.path=I(c.path||c.location||"");l&&(H=c.main||"./main","."==H.charAt(0)||(H="./"+H),c.R=V(H,c.name+"/"));c.a=c.config;c.a&&(c.a=v(e,c.a));c.W=d.split("/").length;d?(n.c[d]=c,n.g.push(d)):n.s=h.U(g.path,e)}}function d(a){var b=a.c;a.S=new RegExp("^("+a.g.sort(function(a, - c){return b[c].W-b[a].W}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.g}var c,e,f,g;"baseUrl"in a&&(a.s=a.baseUrl);"main"in a&&(a.R=a.main);"preloads"in a&&(a.ta=a.preloads);"pluginPath"in a&&(a.T=a.pluginPath);if("dontAddFileExt"in a||a.l)a.l=new RegExp(a.dontAddFileExt||a.l);c=x;e=v(c,a);e.c=v(c.c);f=a.plugins||{};e.plugins=v(c.plugins);e.C=v(c.C,a.C);e.B=v(c.B,a.B);e.g=[];b(a.packages,!0);b(a.paths,!1);for(g in f)a=h.o(g+"!","",e),e.plugins[a.substr(0,a.length-1)]=f[g];f=e.plugins; - for(g in f)if(f[g]=v(e,f[g]),a=f[g].g)f[g].g=a.concat(e.g),d(f[g]);for(g in c.c)e.c.hasOwnProperty(g)||e.g.push(g);d(e);return e},i:function(a,b){var d,c,e,f;d=b.c;e=Z.test(a)?a:a.replace(b.S,function(a){c=d[a]||{};f=c.a;return c.path||""});return{a:f||x,url:h.U(e,b)}},U:function(a,b){var d=b.s;return d&&!Z.test(a)?I(d)+"/"+a:a},H:function(a,b){return a+((b||x).l.test(a)?"":".js")},P:function(a,b,d){var c=z.createElement("script");c.onload=c.onreadystatechange=function(d){d=d||m.event;if("load"== - d.type||da[c.readyState])delete N[a.id],c.onload=c.onreadystatechange=c.onerror="",b()};c.onerror=function(){d(Error("Syntax or http error: "+a.url))};c.type=a.pa||"text/javascript";c.charset="utf-8";c.async=!a.ra;c.src=a.url;N[a.id]=c;S.insertBefore(c,ca);return c},$:function(a){var b=[],d;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(ea,"").replace(fa,function(a,e,f,g){g?d=d==g?k:d:d||b.push(f);return""});return b},ea:function(a){var b,d,c,e,f,g;f=a.length;c=a[f-1];e=u(c,"Function")? - c.length:-1;2==f?u(a[0],"Array")?d=a[0]:b=a[0]:3==f&&(b=a[0],d=a[1]);!d&&0 + + + + + diff --git a/site/static/images/twitter-card.png b/site/static/images/twitter-card.png index 5e0a55e570..1e8271f655 100644 Binary files a/site/static/images/twitter-card.png and b/site/static/images/twitter-card.png differ diff --git a/site/static/logo-mask.svg b/site/static/logo-mask.svg deleted file mode 100644 index d7919a61ab..0000000000 --- a/site/static/logo-mask.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/site/static/organisations/beyonk.svg b/site/static/organisations/beyonk.svg deleted file mode 100644 index 57d15142a8..0000000000 --- a/site/static/organisations/beyonk.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/chess.svg b/site/static/organisations/chess.svg deleted file mode 100644 index 752954f6e8..0000000000 --- a/site/static/organisations/chess.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/datawrapper.svg b/site/static/organisations/datawrapper.svg deleted file mode 100644 index b623876e01..0000000000 --- a/site/static/organisations/datawrapper.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/dbnomics.png b/site/static/organisations/dbnomics.png deleted file mode 100644 index 27c59f5e17..0000000000 Binary files a/site/static/organisations/dbnomics.png and /dev/null differ diff --git a/site/static/organisations/from-now-on.png b/site/static/organisations/from-now-on.png deleted file mode 100644 index 7da931dc34..0000000000 Binary files a/site/static/organisations/from-now-on.png and /dev/null differ diff --git a/site/static/organisations/itslearning.svg b/site/static/organisations/itslearning.svg deleted file mode 100644 index 1d5fe6fcf4..0000000000 --- a/site/static/organisations/itslearning.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/mustlab.png b/site/static/organisations/mustlab.png deleted file mode 100644 index 4f3a29488b..0000000000 Binary files a/site/static/organisations/mustlab.png and /dev/null differ diff --git a/site/static/organisations/nesta.svg b/site/static/organisations/nesta.svg deleted file mode 100644 index 331bcdb765..0000000000 --- a/site/static/organisations/nesta.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/nyt.svg b/site/static/organisations/nyt.svg deleted file mode 100644 index 8735e53059..0000000000 --- a/site/static/organisations/nyt.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/organisations/stone.svg b/site/static/organisations/stone.svg deleted file mode 100644 index 920626ba49..0000000000 --- a/site/static/organisations/stone.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/static/repl-runner.js b/site/static/repl-runner.js deleted file mode 100644 index 513e1d91e9..0000000000 --- a/site/static/repl-runner.js +++ /dev/null @@ -1,105 +0,0 @@ - -(function() { - const import_cache = {}; - - function fetch_import(id) { - return new Promise((fulfil, reject) => { - curl([`https://bundle.run/${id}`]).then(module => { - import_cache[id] = module; - fulfil(module); - }, err => { - console.error(err.stack); - reject(new Error(`Error loading ${id} from bundle.run`)); - }); - }); - } - - function fetch_imports(imports, progress_func) { - const missing_imports = imports.filter(x => !import_cache[x]); - let pending_imports = missing_imports.length; - - if (missing_imports.length) { - let promise = Promise.all( - missing_imports.map(id => fetch_import(id).then(() => { - pending_imports -= 1; - if (progress_func) progress_func(pending_imports); - })) - ); - - return promise; - } else { - return Promise.resolve(); - } - } - - function handle_message(ev) { - let { action, cmd_id } = ev.data; - const send_message = (payload) => parent.postMessage( { ...payload }, ev.origin); - const send_reply = (payload) => send_message({ ...payload, cmd_id }); - const send_ok = () => send_reply({ action: 'cmd_ok' }); - const send_error = (message, stack) => send_reply({ action: 'cmd_error', message, stack }); - - if (action === 'eval') { - try { - const { script } = ev.data.args; - eval(script); - send_ok(); - } catch (e) { - send_error(e.message, e.stack); - } - } - - if (action === 'catch_clicks') { - try { - const top_origin = ev.origin; - document.body.addEventListener('click', event => { - if (event.which !== 1) return; - if (event.metaKey || event.ctrlKey || event.shiftKey) return; - if (event.defaultPrevented) return; - - // ensure target is a link - let el = event.target; - while (el && el.nodeName !== 'A') el = el.parentNode; - if (!el || el.nodeName !== 'A') return; - - if (el.hasAttribute('download') || el.getAttribute('rel') === 'external' || el.target) return; - - event.preventDefault(); - - if (el.href.startsWith(top_origin)) { - const url = new URL(el.href); - if (url.hash[0] === '#') { - window.location.hash = url.hash; - return; - } - } - - window.open(el.href, '_blank'); - }); - send_ok(); - } catch(e) { - send_error(e.message, e.stack); - } - } - - if (action === 'fetch_imports') { - const { imports, import_map } = ev.data.args; - fetch_imports(imports, (remaining) => { - send_message({action: 'fetch_progress', args: { remaining }}); - }) - .then(() => { - imports.forEach(x=> { - const module = import_cache[x]; - const name = import_map.get(x); - window[name] = module; - }); - send_ok(); - }) - .catch(e => { - send_error(e.message, e.stack); - }); - } - } - - window.addEventListener('message', handle_message, false); -})(); diff --git a/site/static/svelte-logo-mask.svg b/site/static/svelte-logo-mask.svg index 2b78ccad07..9e5b40598f 100644 --- a/site/static/svelte-logo-mask.svg +++ b/site/static/svelte-logo-mask.svg @@ -1,5 +1,16 @@ - - + + + diff --git a/site/static/svelte-logo-outline.svg b/site/static/svelte-logo-outline.svg index 2257055638..9aac72c957 100644 --- a/site/static/svelte-logo-outline.svg +++ b/site/static/svelte-logo-outline.svg @@ -1,5 +1,20 @@ - - - + + + + + diff --git a/site/static/svelte-logo.svg b/site/static/svelte-logo.svg index 1e7460c036..4bf279659a 100644 --- a/site/static/svelte-logo.svg +++ b/site/static/svelte-logo.svg @@ -1,5 +1,20 @@ - - - + + + + + diff --git a/site/static/tutorial/kitten.png b/site/static/tutorial/kitten.png index 6ef37691bc..6b0cedc945 100644 Binary files a/site/static/tutorial/kitten.png and b/site/static/tutorial/kitten.png differ diff --git a/site/static/tutorial/music/beethoven.mp3 b/site/static/tutorial/music/beethoven.mp3 deleted file mode 100644 index 3bda3ae676..0000000000 Binary files a/site/static/tutorial/music/beethoven.mp3 and /dev/null differ diff --git a/site/static/tutorial/music/holst.mp3 b/site/static/tutorial/music/holst.mp3 deleted file mode 100644 index b1ba89f486..0000000000 Binary files a/site/static/tutorial/music/holst.mp3 and /dev/null differ diff --git a/site/static/tutorial/music/mozart.mp3 b/site/static/tutorial/music/mozart.mp3 deleted file mode 100644 index d9a2d2781f..0000000000 Binary files a/site/static/tutorial/music/mozart.mp3 and /dev/null differ diff --git a/site/static/tutorial/music/satie.mp3 b/site/static/tutorial/music/satie.mp3 deleted file mode 100644 index c2488d7bb4..0000000000 Binary files a/site/static/tutorial/music/satie.mp3 and /dev/null differ diff --git a/site/static/tutorial/music/strauss.mp3 b/site/static/tutorial/music/strauss.mp3 deleted file mode 100644 index db433dd35f..0000000000 Binary files a/site/static/tutorial/music/strauss.mp3 and /dev/null differ diff --git a/site/test/utils/slug.js b/site/test/utils/slug.js index c6d6c96685..17262c5e83 100644 --- a/site/test/utils/slug.js +++ b/site/test/utils/slug.js @@ -1,61 +1,61 @@ import {strict as assert} from 'assert'; -import {limaxProcessor, unicodeSafeProcessor} from '../../src/utils/slug'; -import {SLUG_SEPARATOR as _, SLUG_LANG} from '../../config'; +import {urlsafeSlugProcessor, unicodeSafeProcessor} from '../../src/utils/slug'; +import {SLUG_SEPARATOR as _} from '../../config'; describe('slug', () => { - describe('limaxProcessor (latinize unicode)', () => { + describe('urlsafeSlugProcessor', () => { describe('ascii', () => { it('space separated words', () => { assert.equal( - limaxProcessor('Text expressions'), - `text${_}expressions` + urlsafeSlugProcessor('Text expressions'), + `Text${_}expressions` ); }); it('numbered text', () => { assert.equal( - limaxProcessor('1. export creates'), + urlsafeSlugProcessor('1. export creates'), `1${_}export${_}creates` ); }); it('punctuated text', () => { assert.equal( - limaxProcessor('svelte.VERSION'), - `svelte${_}version` + urlsafeSlugProcessor('svelte.VERSION'), + `svelte${_}VERSION` ); }); it('text starting with the dollar sign', () => { assert.equal( - limaxProcessor('$destroy method'), + urlsafeSlugProcessor('$destroy method'), `$destroy${_}method` ); }); it('numbered text containing the dollar sign', () => { assert.equal( - limaxProcessor('1. export $destroy'), + urlsafeSlugProcessor('1. export $destroy'), `1${_}export${_}$destroy` ); }); it('text containing the equal char', () => { assert.equal( - limaxProcessor('script context=module'), + urlsafeSlugProcessor('script context=module'), `script${_}context${_}module` ); }); it('text containing the colon char', () => { assert.equal( - limaxProcessor('svelte:body'), + urlsafeSlugProcessor('svelte:body'), `svelte${_}body` ); }); it('text containing the slash char', () => { assert.equal( - limaxProcessor('svelte/motion'), + urlsafeSlugProcessor('svelte/motion'), `svelte${_}motion` ); }); it('text containing the comma char', () => { assert.equal( - limaxProcessor('svelte, motion'), + urlsafeSlugProcessor('svelte, motion'), `svelte${_}motion` ); }); @@ -63,156 +63,150 @@ describe('slug', () => { describe('unicode', () => { it('should translate symbols to English', () => { assert.equal( - limaxProcessor('Ich ♥ Deutsch'), - `ich${_}love${_}deutsch` + urlsafeSlugProcessor('Ich ♥ Deutsch'), + `Ich${_}love${_}Deutsch` ); }); it('should remove emoji', () => { assert.equal( - limaxProcessor('Ich 😍 Deutsch'), - `ich${_}deutsch` - ); - }); - it('should translate symbols to the given language (German)', () => { - assert.equal( - limaxProcessor('Ich ♥ Deutsch', 'de'), - `ich${_}liebe${_}deutsch` + urlsafeSlugProcessor('Ich 😍 Deutsch'), + `Ich${_}Deutsch` ); }); }); describe('cyricllic', () => { it('space separated words', () => { assert.equal( - limaxProcessor('Всплытие и перехват событий'), - `vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие и перехват событий'), + `Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('numbered text', () => { assert.equal( - limaxProcessor('1 Всплытие и перехват событий'), - `1${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('1 Всплытие и перехват событий'), + `1${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('punctuated text', () => { assert.equal( - limaxProcessor('.Всплытие.и.перехват событий'), - `vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('.Всплытие.и.перехват событий'), + `Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text starting with the dollar sign', () => { assert.equal( - limaxProcessor('$Всплытие $ перехват событий'), - `$vsplytie${_}$${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('$Всплытие $ перехват событий'), + `$Vsplytie${_}$${_}perehvat${_}sobytij` ); }); it('text containing the dollar sign', () => { assert.equal( - limaxProcessor('Всплытие$перехват'), - `vsplytie$perekhvat` + urlsafeSlugProcessor('Всплытие$перехват'), + `Vsplytie$perehvat` ); }); it('text containing the equal char', () => { assert.equal( - limaxProcessor('Всплытие = перехват=событий'), - `vsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие = перехват=событий'), + `Vsplytie${_}perehvat${_}sobytij` ); }); it('text containing the colon char', () => { assert.equal( - limaxProcessor('Всплытие : перехват:событий'), - `vsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие : перехват:событий'), + `Vsplytie${_}perehvat${_}sobytij` ); }); it('text containing the slash char', () => { assert.equal( - limaxProcessor('Всплытие / перехват/событий'), - `vsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие / перехват/событий'), + `Vsplytie${_}perehvat${_}sobytij` ); }); it('text containing the comma char', () => { assert.equal( - limaxProcessor('Всплытие, перехват'), - `vsplytie${_}perekhvat` + urlsafeSlugProcessor('Всплытие, перехват'), + `Vsplytie${_}perehvat` ); }); }); describe('ascii + cyricllic', () => { it('space separated words', () => { assert.equal( - limaxProcessor('Всплытие и export перехват событий'), - `vsplytie${_}i${_}export${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие и export перехват событий'), + `Vsplytie${_}i${_}export${_}perehvat${_}sobytij` ); }); it('ascii word concatenated to a cyricllic word', () => { assert.equal( - limaxProcessor('exportВсплытие'), - 'exportvsplytie' + urlsafeSlugProcessor('exportВсплытие'), + 'exportVsplytie' ); }); it('cyricllic word concatenated to an ascii word', () => { assert.equal( - limaxProcessor('Всплытиеexport'), - `vsplytieexport` + urlsafeSlugProcessor('Всплытиеexport'), + `Vsplytieexport` ); }); it('numbered text', () => { assert.equal( - limaxProcessor('1 export Всплытие и перехват событий'), - `1${_}export${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('1 export Всплытие и перехват событий'), + `1${_}export${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('punctuated text', () => { assert.equal( - limaxProcessor('.Всплытие.export.и.перехват событий'), - `vsplytie${_}export${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('.Всплытие.export.и.перехват событий'), + `Vsplytie${_}export${_}i${_}perehvat${_}sobytij` ); }); it('text starting with the dollar sign, followed by ascii char', () => { assert.equal( - limaxProcessor('$exportВсплытие перехват событий'), - `$exportvsplytie${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('$exportВсплытие перехват событий'), + `$exportVsplytie${_}perehvat${_}sobytij` ); }); it('text starting with the dollar sign, followed by unicode char', () => { assert.equal( - limaxProcessor('$Всплытие export перехват событий'), - `$vsplytie${_}export${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('$Всплытие export перехват событий'), + `$Vsplytie${_}export${_}perehvat${_}sobytij` ); }); it('text containing the dollar sign, followed by ascii char', () => { assert.equal( - limaxProcessor('export $destroy a component prop Всплытие и перехват событий'), - `export${_}$destroy${_}a${_}component${_}prop${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('export $destroy a component prop Всплытие и перехват событий'), + `export${_}$destroy${_}a${_}component${_}prop${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the dollar sign, followed by unicode char', () => { assert.equal( - limaxProcessor('Всплытие export $Всплытие a component prop Всплытие и перехват событий'), - `vsplytie${_}export${_}$vsplytie${_}a${_}component${_}prop${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('Всплытие export $Всплытие a component prop Всплытие и перехват событий'), + `Vsplytie${_}export${_}$Vsplytie${_}a${_}component${_}prop${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the equal char', () => { assert.equal( - limaxProcessor('script context=module Всплытие=и перехват событий'), - `script${_}context${_}module${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('script context=module Всплытие=и перехват событий'), + `script${_}context${_}module${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the colon char', () => { assert.equal( - limaxProcessor('svelte:body Всплытие и:перехват событий'), - `svelte${_}body${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('svelte:body Всплытие и:перехват событий'), + `svelte${_}body${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the slash char', () => { assert.equal( - limaxProcessor('svelte/motion Всплытие и / перехват/событий'), - `svelte${_}motion${_}vsplytie${_}i${_}perekhvat${_}sobytii` + urlsafeSlugProcessor('svelte/motion Всплытие и / перехват/событий'), + `svelte${_}motion${_}Vsplytie${_}i${_}perehvat${_}sobytij` ); }); it('text containing the comma char', () => { assert.equal( - limaxProcessor('Всплытие, export'), - `vsplytie${_}export` + urlsafeSlugProcessor('Всплытие, export'), + `Vsplytie${_}export` ); }); }); @@ -223,7 +217,7 @@ describe('slug', () => { it('space separated words', () => { assert.equal( unicodeSafeProcessor('Text expressions'), - `text${_}expressions` + `Text${_}expressions` ); }); it('numbered text', () => { @@ -235,7 +229,7 @@ describe('slug', () => { it('punctuated text', () => { assert.equal( unicodeSafeProcessor('svelte.VERSION'), - `svelte${_}version` + `svelte${_}VERSION` ); }); it('text starting with the dollar sign', () => { @@ -279,13 +273,13 @@ describe('slug', () => { it('should preserve symbols', () => { assert.equal( unicodeSafeProcessor('Ich ♥ Deutsch'), - `ich${_}love${_}deutsch` + `Ich${_}love${_}Deutsch` ); }); it('should remove emoji', () => { assert.equal( unicodeSafeProcessor('Ich 😍 Deutsch'), - `ich${_}deutsch` + `Ich${_}Deutsch` ); }); }); diff --git a/src/compile/Component.ts b/src/compile/Component.ts deleted file mode 100644 index bf2fdf9a5a..0000000000 --- a/src/compile/Component.ts +++ /dev/null @@ -1,1302 +0,0 @@ -import MagicString, { Bundle } from 'magic-string'; -import { walk, childKeys } from 'estree-walker'; -import { getLocator } from 'locate-character'; -import Stats from '../Stats'; -import { globals, reserved } from '../utils/names'; -import { namespaces, valid_namespaces } from '../utils/namespaces'; -import create_module from './create_module'; -import { create_scopes, extract_names, Scope, extract_identifiers } from './utils/scope'; -import Stylesheet from './css/Stylesheet'; -import { test } from '../config'; -import Fragment from './nodes/Fragment'; -import internal_exports from './internal-exports'; -import { Node, Ast, CompileOptions, Var, Warning } from '../interfaces'; -import error from '../utils/error'; -import get_code_frame from '../utils/get_code_frame'; -import flatten_reference from './utils/flatten_reference'; -import is_reference from 'is-reference'; -import TemplateScope from './nodes/shared/TemplateScope'; -import fuzzymatch from '../utils/fuzzymatch'; -import { remove_indentation, add_indentation } from '../utils/indentation'; -import get_object from './utils/get_object'; -import unwrap_parens from './utils/unwrap_parens'; -import Slot from './nodes/Slot'; - -type ComponentOptions = { - namespace?: string; - tag?: string; - immutable?: boolean; - accessors?: boolean; - preserveWhitespace?: boolean; -}; - -// We need to tell estree-walker that it should always -// look for an `else` block, otherwise it might get -// the wrong idea about the shape of each/if blocks -childKeys.EachBlock = childKeys.IfBlock = ['children', 'else']; -childKeys.Attribute = ['value']; -childKeys.ExportNamedDeclaration = ['declaration', 'specifiers']; - -function remove_node(code: MagicString, start: number, end: number, body: Node, node: Node) { - const i = body.indexOf(node); - if (i === -1) throw new Error('node not in list'); - - let a; - let b; - - if (body.length === 1) { - // remove everything, leave {} - a = start; - b = end; - } else if (i === 0) { - // remove everything before second node, including comments - a = start; - while (/\s/.test(code.original[a])) a += 1; - - b = body[i].end; - while (/[\s,]/.test(code.original[b])) b += 1; - } else { - // remove the end of the previous node to the end of this one - a = body[i - 1].end; - b = node.end; - } - - code.remove(a, b); - return; -} - -export default class Component { - stats: Stats; - warnings: Warning[]; - - ast: Ast; - source: string; - code: MagicString; - name: string; - compile_options: CompileOptions; - fragment: Fragment; - module_scope: Scope; - instance_scope: Scope; - instance_scope_map: WeakMap; - - component_options: ComponentOptions; - namespace: string; - tag: string; - accessors: boolean; - - vars: Var[] = []; - var_lookup: Map = new Map(); - - imports: Node[] = []; - module_javascript: string; - javascript: string; - - hoistable_nodes: Set = new Set(); - node_for_declaration: Map = new Map(); - partly_hoisted: string[] = []; - fully_hoisted: string[] = []; - reactive_declarations: Array<{ assignees: Set, dependencies: Set, node: Node, declaration: Node }> = []; - reactive_declaration_nodes: Set = new Set(); - has_reactive_assignments = false; - injected_reactive_declaration_vars: Set = new Set(); - helpers: Set = new Set(); - - indirect_dependencies: Map> = new Map(); - - file: string; - locate: (c: number) => { line: number, column: number }; - - // TODO this does the same as component.locate! remove one or the other - locator: (search: number, startIndex?: number) => { - line: number, - column: number - }; - - stylesheet: Stylesheet; - - aliases: Map = new Map(); - used_names: Set = new Set(); - globally_used_names: Set = new Set(); - - slots: Map = new Map(); - slot_outlets: Set = new Set(); - - constructor( - ast: Ast, - source: string, - name: string, - compile_options: CompileOptions, - stats: Stats, - warnings: Warning[] - ) { - this.name = name; - - this.stats = stats; - this.warnings = warnings; - this.ast = ast; - this.source = source; - this.compile_options = compile_options; - - this.file = compile_options.filename && ( - typeof process !== 'undefined' ? compile_options.filename.replace(process.cwd(), '').replace(/^[\/\\]/, '') : compile_options.filename - ); - this.locate = getLocator(this.source); - - this.code = new MagicString(source); - - // styles - this.stylesheet = new Stylesheet(source, ast, compile_options.filename, compile_options.dev); - this.stylesheet.validate(this); - - this.component_options = process_component_options(this, this.ast.html.children); - this.namespace = namespaces[this.component_options.namespace] || this.component_options.namespace; - - if (compile_options.customElement) { - this.tag = this.component_options.tag || compile_options.tag; - if (!this.tag) { - throw new Error(`Cannot compile to a custom element without specifying a tag name via options.tag or `); - } - } else { - this.tag = this.name; - } - - this.walk_module_js(); - this.walk_instance_js_pre_template(); - - this.fragment = new Fragment(this, ast.html); - this.name = this.get_unique_name(name); - - this.walk_instance_js_post_template(); - - if (!compile_options.customElement) this.stylesheet.reify(); - - this.stylesheet.warn_on_unused_selectors(this); - } - - add_var(variable: Var) { - this.vars.push(variable); - this.var_lookup.set(variable.name, variable); - } - - add_reference(name: string) { - const variable = this.var_lookup.get(name); - - if (variable) { - variable.referenced = true; - } else if (name === '$$props') { - this.add_var({ - name, - injected: true, - referenced: true - }); - } else if (name[0] === '$') { - this.add_var({ - name, - injected: true, - referenced: true, - mutated: true, - writable: true - }); - - const subscribable_name = name.slice(1); - this.add_reference(subscribable_name); - - const variable = this.var_lookup.get(subscribable_name); - if (variable) variable.subscribable = true; - } else { - this.used_names.add(name); - } - } - - add_sourcemap_locations(node: Node) { - walk(node, { - enter: (node: Node) => { - this.code.addSourcemapLocation(node.start); - this.code.addSourcemapLocation(node.end); - }, - }); - } - - alias(name: string) { - if (!this.aliases.has(name)) { - this.aliases.set(name, this.get_unique_name(name)); - } - - return this.aliases.get(name); - } - - helper(name: string) { - this.helpers.add(name); - return this.alias(name); - } - - generate(result: string) { - let js = null; - let css = null; - - if (result) { - const { compile_options, name } = this; - const { format = 'esm' } = compile_options; - - const banner = `/* ${this.file ? `${this.file} ` : ``}generated by Svelte v${"__VERSION__"} */`; - - result = result - .replace(/__svelte:self__/g, this.name) - .replace(compile_options.generate === 'ssr' ? /(@+|#+)(\w*(?:-\w*)?)/g : /(@+)(\w*(?:-\w*)?)/g, (match: string, sigil: string, name: string) => { - if (sigil === '@') { - if (internal_exports.has(name)) { - if (compile_options.dev && internal_exports.has(`${name}Dev`)) name = `${name}Dev`; - this.helpers.add(name); - } - - return this.alias(name); - } - - return sigil.slice(1) + name; - }); - - const imported_helpers = Array.from(this.helpers) - .sort() - .map(name => { - const alias = this.alias(name); - return { name, alias }; - }); - - const module = create_module( - result, - format, - name, - banner, - compile_options.sveltePath, - imported_helpers, - this.imports, - this.vars.filter(variable => variable.module && variable.export_name).map(variable => ({ - name: variable.name, - as: variable.export_name - })), - this.source - ); - - const parts = module.split('✂]'); - const final_chunk = parts.pop(); - - const compiled = new Bundle({ separator: '' }); - - function add_string(str: string) { - compiled.addSource({ - content: new MagicString(str), - }); - } - - const { filename } = compile_options; - - // special case — the source file doesn't actually get used anywhere. we need - // to add an empty file to populate map.sources and map.sourcesContent - if (!parts.length) { - compiled.addSource({ - filename, - content: new MagicString(this.source).remove(0, this.source.length), - }); - } - - const pattern = /\[✂(\d+)-(\d+)$/; - - parts.forEach((str: string) => { - const chunk = str.replace(pattern, ''); - if (chunk) add_string(chunk); - - const match = pattern.exec(str); - - const snippet = this.code.snip(+match[1], +match[2]); - - compiled.addSource({ - filename, - content: snippet, - }); - }); - - add_string(final_chunk); - - css = compile_options.customElement ? - { code: null, map: null } : - this.stylesheet.render(compile_options.cssOutputFilename, true); - - js = { - code: compiled.toString(), - map: compiled.generateMap({ - includeContent: true, - file: compile_options.outputFilename, - }) - }; - } - - return { - js, - css, - ast: this.ast, - warnings: this.warnings, - vars: this.vars.filter(v => !v.global && !v.internal).map(v => ({ - name: v.name, - export_name: v.export_name || null, - injected: v.injected || false, - module: v.module || false, - mutated: v.mutated || false, - reassigned: v.reassigned || false, - referenced: v.referenced || false, - writable: v.writable || false - })), - stats: this.stats.render() - }; - } - - get_unique_name(name: string) { - if (test) name = `${name}$`; - let alias = name; - for ( - let i = 1; - reserved.has(alias) || - this.var_lookup.has(alias) || - this.used_names.has(alias) || - this.globally_used_names.has(alias); - alias = `${name}_${i++}` - ); - this.used_names.add(alias); - return alias; - } - - get_unique_name_maker() { - const local_used_names = new Set(); - - function add(name: string) { - local_used_names.add(name); - } - - reserved.forEach(add); - internal_exports.forEach(add); - this.var_lookup.forEach((value, key) => add(key)); - - return (name: string) => { - if (test) name = `${name}$`; - let alias = name; - for ( - let i = 1; - this.used_names.has(alias) || - local_used_names.has(alias); - alias = `${name}_${i++}` - ); - local_used_names.add(alias); - this.globally_used_names.add(alias); - return alias; - }; - } - - error( - pos: { - start: number, - end: number - }, - e : { - code: string, - message: string - } - ) { - error(e.message, { - name: 'ValidationError', - code: e.code, - source: this.source, - start: pos.start, - end: pos.end, - filename: this.compile_options.filename - }); - } - - warn( - pos: { - start: number, - end: number - }, - warning: { - code: string, - message: string - } - ) { - if (!this.locator) { - this.locator = getLocator(this.source, { offsetLine: 1 }); - } - - const start = this.locator(pos.start); - const end = this.locator(pos.end); - - const frame = get_code_frame(this.source, start.line - 1, start.column); - - this.warnings.push({ - code: warning.code, - message: warning.message, - frame, - start, - end, - pos: pos.start, - filename: this.compile_options.filename, - toString: () => `${warning.message} (${start.line + 1}:${start.column})\n${frame}`, - }); - } - - extract_imports(content) { - const { code } = this; - - content.body.forEach(node => { - if (node.type === 'ImportDeclaration') { - // imports need to be hoisted out of the IIFE - remove_node(code, content.start, content.end, content.body, node); - this.imports.push(node); - } - }); - } - - extract_exports(content) { - const { code } = this; - - content.body.forEach(node => { - if (node.type === 'ExportDefaultDeclaration') { - this.error(node, { - code: `default-export`, - message: `A component cannot have a default export` - }); - } - - if (node.type === 'ExportNamedDeclaration') { - if (node.source) { - this.error(node, { - code: `not-implemented`, - message: `A component currently cannot have an export ... from` - }); - } - if (node.declaration) { - if (node.declaration.type === 'VariableDeclaration') { - node.declaration.declarations.forEach(declarator => { - extract_names(declarator.id).forEach(name => { - const variable = this.var_lookup.get(name); - variable.export_name = name; - }); - }); - } else { - const { name } = node.declaration.id; - - const variable = this.var_lookup.get(name); - variable.export_name = name; - } - - code.remove(node.start, node.declaration.start); - } else { - remove_node(code, content.start, content.end, content.body, node); - node.specifiers.forEach(specifier => { - const variable = this.var_lookup.get(specifier.local.name); - - if (variable) { - variable.export_name = specifier.exported.name; - } else { - // TODO what happens with `export { Math }` or some other global? - } - }); - } - } - }); - } - - extract_javascript(script) { - const nodes_to_include = script.content.body.filter(node => { - if (this.hoistable_nodes.has(node)) return false; - if (this.reactive_declaration_nodes.has(node)) return false; - if (node.type === 'ImportDeclaration') return false; - if (node.type === 'ExportDeclaration' && node.specifiers.length > 0) return false; - return true; - }); - - if (nodes_to_include.length === 0) return null; - - let a = script.content.start; - while (/\s/.test(this.source[a])) a += 1; - - let b = a; - - let result = ''; - - script.content.body.forEach((node, i) => { - if (this.hoistable_nodes.has(node) || this.reactive_declaration_nodes.has(node)) { - if (a !== b) result += `[✂${a}-${b}✂]`; - a = node.end; - } - - b = node.end; - }); - - // while (/\s/.test(this.source[a - 1])) a -= 1; - - b = script.content.end; - while (/\s/.test(this.source[b - 1])) b -= 1; - - if (a < b) result += `[✂${a}-${b}✂]`; - - return result || null; - } - - walk_module_js() { - const script = this.ast.module; - if (!script) return; - - this.add_sourcemap_locations(script.content); - - let { scope, globals } = create_scopes(script.content); - this.module_scope = scope; - - scope.declarations.forEach((node, name) => { - if (name[0] === '$') { - this.error(node, { - code: 'illegal-declaration', - message: `The $ prefix is reserved, and cannot be used for variable and import names` - }); - } - - this.add_var({ - name, - module: true, - hoistable: true, - writable: node.kind === 'var' || node.kind === 'let' - }); - }); - - globals.forEach((node, name) => { - if (name[0] === '$') { - this.error(node, { - code: 'illegal-subscription', - message: `Cannot reference store value inside

{foo = 1}

` - } - - if (node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression') { - function_expression = node; - dependencies = new Set(); - contextual_dependencies = new Set(); - } - } - }, - - leave(node: Node, parent: Node) { - if (map.has(node)) scope = scope.parent; - - if (node === function_expression) { - if (pending_assignments.size > 0) { - if (node.type !== 'ArrowFunctionExpression') { - // this should never happen! - throw new Error(`Well that's odd`); - } - - // TOOD optimisation — if this is an event handler, - // the return value doesn't matter - } - - const name = component.get_unique_name( - sanitize(get_function_name(node, owner)) - ); - - const args = contextual_dependencies.size > 0 - ? [`{ ${Array.from(contextual_dependencies).join(', ')} }`] - : []; - - let original_params; - - if (node.params.length > 0) { - original_params = code.slice(node.params[0].start, node.params[node.params.length - 1].end); - args.push(original_params); - } - - let body = code.slice(node.body.start, node.body.end).trim(); - if (node.body.type !== 'BlockStatement') { - if (pending_assignments.size > 0) { - const dependencies = new Set(); - pending_assignments.forEach(name => { - if (template_scope.names.has(name)) { - template_scope.dependencies_for_name.get(name).forEach(dependency => { - dependencies.add(dependency); - }); - } else { - dependencies.add(name); - } - }); - - const insert = Array.from(dependencies).map(name => component.invalidate(name)).join('; '); - pending_assignments = new Set(); - - component.has_reactive_assignments = true; - - body = deindent` - { - const $$result = ${body}; - ${insert}; - return $$result; - } - `; - } else { - body = `{\n\treturn ${body};\n}`; - } - } - - const fn = deindent` - function ${name}(${args.join(', ')}) ${body} - `; - - if (dependencies.size === 0 && contextual_dependencies.size === 0) { - // we can hoist this out of the component completely - component.fully_hoisted.push(fn); - code.overwrite(node.start, node.end, name); - - component.add_var({ - name, - internal: true, - hoistable: true, - referenced: true - }); - } - - else if (contextual_dependencies.size === 0) { - // function can be hoisted inside the component init - component.partly_hoisted.push(fn); - code.overwrite(node.start, node.end, `ctx.${name}`); - - component.add_var({ - name, - internal: true, - referenced: true - }); - } - - else { - // we need a combo block/init recipe - component.partly_hoisted.push(fn); - code.overwrite(node.start, node.end, name); - - component.add_var({ - name, - internal: true, - referenced: true - }); - - declarations.push(deindent` - function ${name}(${original_params ? '...args' : ''}) { - return ctx.${name}(ctx${original_params ? ', ...args' : ''}); - } - `); - } - - function_expression = null; - dependencies = null; - contextual_dependencies = null; - } - - if (/Statement/.test(node.type)) { - if (pending_assignments.size > 0) { - const has_semi = code.original[node.end - 1] === ';'; - - const insert = ( - (has_semi ? ' ' : '; ') + - Array.from(pending_assignments).map(name => component.invalidate(name)).join('; ') - ); - - if (/^(Break|Continue|Return)Statement/.test(node.type)) { - if (node.argument) { - code.overwrite(node.start, node.argument.start, `var $$result = `); - code.appendLeft(node.argument.end, `${insert}; return $$result`); - } else { - code.prependRight(node.start, `${insert}; `); - } - } else if (parent && /(If|For(In|Of)?|While)Statement/.test(parent.type) && node.type !== 'BlockStatement') { - code.prependRight(node.start, '{ '); - code.appendLeft(node.end, `${insert}; }`); - } else { - code.appendLeft(node.end, `${insert};`); - } - - component.has_reactive_assignments = true; - pending_assignments = new Set(); - } - } - } - }); - - if (declarations.length > 0) { - block.maintain_context = true; - declarations.forEach(declaration => { - block.builders.init.add_block(declaration); - }); - } - - return this.rendered = `[✂${this.node.start}-${this.node.end}✂]`; - } -} - -function get_function_name(node, parent) { - if (parent.type === 'EventHandler') { - return `${parent.name}_handler`; - } - - if (parent.type === 'Action') { - return `${parent.name}_function`; - } - - return 'func'; -} - -function is_contextual(component: Component, scope: TemplateScope, name: string) { - if (name === '$$props') return true; - - // if it's a name below root scope, it's contextual - if (!scope.is_top_level(name)) return true; - - const variable = component.var_lookup.get(name); - - // hoistables, module declarations, and imports are non-contextual - if (!variable || variable.hoistable) return false; - - // assume contextual - return true; -} \ No newline at end of file diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts deleted file mode 100644 index e40b3ceb55..0000000000 --- a/src/compile/render-dom/Block.ts +++ /dev/null @@ -1,415 +0,0 @@ -import CodeBuilder from '../utils/CodeBuilder'; -import deindent from '../utils/deindent'; -import Renderer from './Renderer'; -import Wrapper from './wrappers/shared/Wrapper'; - -export interface BlockOptions { - parent?: Block; - name: string; - renderer?: Renderer; - comment?: string; - key?: string; - bindings?: Map { object: string, property: string, snippet: string }>; - dependencies?: Set; -} - -export default class Block { - parent?: Block; - renderer: Renderer; - name: string; - comment?: string; - - wrappers: Wrapper[]; - - key: string; - first: string; - - dependencies: Set; - - bindings: Map; - - builders: { - init: CodeBuilder; - create: CodeBuilder; - claim: CodeBuilder; - hydrate: CodeBuilder; - mount: CodeBuilder; - measure: CodeBuilder; - fix: CodeBuilder; - animate: CodeBuilder; - intro: CodeBuilder; - update: CodeBuilder; - outro: CodeBuilder; - destroy: CodeBuilder; - }; - - event_listeners: string[] = []; - - maintain_context: boolean; - has_animation: boolean; - has_intros: boolean; - has_outros: boolean; - has_intro_method: boolean; // could have the method without the transition, due to siblings - has_outro_method: boolean; - outros: number; - - aliases: Map; - variables: Map; - get_unique_name: (name: string) => string; - - has_update_method = false; - autofocus: string; - - constructor(options: BlockOptions) { - this.parent = options.parent; - this.renderer = options.renderer; - this.name = options.name; - this.comment = options.comment; - - this.wrappers = []; - - // for keyed each blocks - this.key = options.key; - this.first = null; - - this.dependencies = new Set(); - - this.bindings = options.bindings; - - this.builders = { - init: new CodeBuilder(), - create: new CodeBuilder(), - claim: new CodeBuilder(), - hydrate: new CodeBuilder(), - mount: new CodeBuilder(), - measure: new CodeBuilder(), - fix: new CodeBuilder(), - animate: new CodeBuilder(), - intro: new CodeBuilder(), - update: new CodeBuilder(), - outro: new CodeBuilder(), - destroy: new CodeBuilder(), - }; - - this.has_animation = false; - this.has_intro_method = false; // a block could have an intro method but not intro transitions, e.g. if a sibling block has intros - this.has_outro_method = false; - this.outros = 0; - - this.get_unique_name = this.renderer.component.get_unique_name_maker(); - this.variables = new Map(); - - this.aliases = new Map().set('ctx', this.get_unique_name('ctx')); - if (this.key) this.aliases.set('key', this.get_unique_name('key')); - } - - assign_variable_names() { - const seen = new Set(); - const dupes = new Set(); - - let i = this.wrappers.length; - - while (i--) { - const wrapper = this.wrappers[i]; - - if (!wrapper.var) continue; - if (wrapper.parent && wrapper.parent.can_use_innerhtml) continue; - - if (seen.has(wrapper.var)) { - dupes.add(wrapper.var); - } - - seen.add(wrapper.var); - } - - const counts = new Map(); - i = this.wrappers.length; - - while (i--) { - const wrapper = this.wrappers[i]; - - if (!wrapper.var) continue; - - if (dupes.has(wrapper.var)) { - const i = counts.get(wrapper.var) || 0; - counts.set(wrapper.var, i + 1); - wrapper.var = this.get_unique_name(wrapper.var + i); - } else { - wrapper.var = this.get_unique_name(wrapper.var); - } - } - } - - add_dependencies(dependencies: Set) { - dependencies.forEach(dependency => { - this.dependencies.add(dependency); - }); - - this.has_update_method = true; - } - - add_element( - name: string, - render_statement: string, - claim_statement: string, - parent_node: string, - no_detach?: boolean - ) { - this.add_variable(name); - this.builders.create.add_line(`${name} = ${render_statement};`); - - if (this.renderer.options.hydratable) { - this.builders.claim.add_line(`${name} = ${claim_statement || render_statement};`); - } - - if (parent_node) { - this.builders.mount.add_line(`@append(${parent_node}, ${name});`); - if (parent_node === 'document.head') this.builders.destroy.add_line(`@detach(${name});`); - } else { - this.builders.mount.add_line(`@insert(#target, ${name}, anchor);`); - if (!no_detach) this.builders.destroy.add_conditional('detaching', `@detach(${name});`); - } - } - - add_intro(local?: boolean) { - this.has_intros = this.has_intro_method = true; - if (!local && this.parent) this.parent.add_intro(); - } - - add_outro(local?: boolean) { - this.has_outros = this.has_outro_method = true; - this.outros += 1; - if (!local && this.parent) this.parent.add_outro(); - } - - add_animation() { - this.has_animation = true; - } - - add_variable(name: string, init?: string) { - if (name[0] === '#') { - name = this.alias(name.slice(1)); - } - - if (this.variables.has(name) && this.variables.get(name) !== init) { - throw new Error( - `Variable '${name}' already initialised with a different value` - ); - } - - this.variables.set(name, init); - } - - alias(name: string) { - if (!this.aliases.has(name)) { - this.aliases.set(name, this.get_unique_name(name)); - } - - return this.aliases.get(name); - } - - child(options: BlockOptions) { - return new Block(Object.assign({}, this, { key: null }, options, { parent: this })); - } - - get_contents(local_key?: string) { - const { dev } = this.renderer.options; - - if (this.has_outros) { - this.add_variable('#current'); - - if (!this.builders.intro.is_empty()) { - this.builders.intro.add_line(`#current = true;`); - this.builders.mount.add_line(`#current = true;`); - } - - if (!this.builders.outro.is_empty()) { - this.builders.outro.add_line(`#current = false;`); - } - } - - if (this.autofocus) { - this.builders.mount.add_line(`${this.autofocus}.focus();`); - } - - this.render_listeners(); - - const properties = new CodeBuilder(); - - const method_name = (short: string, long: string) => dev ? `${short}: function ${this.get_unique_name(long)}` : short; - - if (local_key) { - properties.add_block(`key: ${local_key},`); - } - - if (this.first) { - properties.add_block(`first: null,`); - this.builders.hydrate.add_line(`this.first = ${this.first};`); - } - - if (this.builders.create.is_empty() && this.builders.hydrate.is_empty()) { - properties.add_line(`c: @noop,`); - } else { - const hydrate = !this.builders.hydrate.is_empty() && ( - this.renderer.options.hydratable - ? `this.h()` - : this.builders.hydrate - ); - - properties.add_block(deindent` - ${method_name('c', 'create')}() { - ${this.builders.create} - ${hydrate} - }, - `); - } - - if (this.renderer.options.hydratable || !this.builders.claim.is_empty()) { - if (this.builders.claim.is_empty() && this.builders.hydrate.is_empty()) { - properties.add_line(`l: @noop,`); - } else { - properties.add_block(deindent` - ${method_name('l', 'claim')}(nodes) { - ${this.builders.claim} - ${this.renderer.options.hydratable && !this.builders.hydrate.is_empty() && `this.h();`} - }, - `); - } - } - - if (this.renderer.options.hydratable && !this.builders.hydrate.is_empty()) { - properties.add_block(deindent` - ${method_name('h', 'hydrate')}() { - ${this.builders.hydrate} - }, - `); - } - - if (this.builders.mount.is_empty()) { - properties.add_line(`m: @noop,`); - } else { - properties.add_block(deindent` - ${method_name('m', 'mount')}(#target, anchor) { - ${this.builders.mount} - }, - `); - } - - if (this.has_update_method || this.maintain_context) { - if (this.builders.update.is_empty() && !this.maintain_context) { - properties.add_line(`p: @noop,`); - } else { - properties.add_block(deindent` - ${method_name('p', 'update')}(changed, ${this.maintain_context ? 'new_ctx' : 'ctx'}) { - ${this.maintain_context && `ctx = new_ctx;`} - ${this.builders.update} - }, - `); - } - } - - if (this.has_animation) { - properties.add_block(deindent` - ${method_name('r', 'measure')}() { - ${this.builders.measure} - }, - - ${method_name('f', 'fix')}() { - ${this.builders.fix} - }, - - ${method_name('a', 'animate')}() { - ${this.builders.animate} - }, - `); - } - - if (this.has_intro_method || this.has_outro_method) { - if (this.builders.intro.is_empty()) { - properties.add_line(`i: @noop,`); - } else { - properties.add_block(deindent` - ${method_name('i', 'intro')}(#local) { - ${this.has_outros && `if (#current) return;`} - ${this.builders.intro} - }, - `); - } - - if (this.builders.outro.is_empty()) { - properties.add_line(`o: @noop,`); - } else { - properties.add_block(deindent` - ${method_name('o', 'outro')}(#local) { - ${this.builders.outro} - }, - `); - } - } - - if (this.builders.destroy.is_empty()) { - properties.add_line(`d: @noop`); - } else { - properties.add_block(deindent` - ${method_name('d', 'destroy')}(detaching) { - ${this.builders.destroy} - } - `); - } - - return deindent` - ${this.variables.size > 0 && - `var ${Array.from(this.variables.keys()) - .map(key => { - const init = this.variables.get(key); - return init !== undefined ? `${key} = ${init}` : key; - }) - .join(', ')};`} - - ${!this.builders.init.is_empty() && this.builders.init} - - return { - ${properties} - }; - `.replace(/(#+)(\w*)/g, (match: string, sigil: string, name: string) => { - return sigil === '#' ? this.alias(name) : sigil.slice(1) + name; - }); - } - - render_listeners(chunk: string = '') { - if (this.event_listeners.length > 0) { - this.add_variable(`#dispose${chunk}`); - - if (this.event_listeners.length === 1) { - this.builders.hydrate.add_line( - `#dispose${chunk} = ${this.event_listeners[0]};` - ); - - this.builders.destroy.add_line( - `#dispose${chunk}();` - ) - } else { - this.builders.hydrate.add_block(deindent` - #dispose${chunk} = [ - ${this.event_listeners.join(',\n')} - ]; - `); - - this.builders.destroy.add_line( - `@run_all(#dispose${chunk});` - ); - } - } - } - - toString() { - const local_key = this.key && this.get_unique_name('key'); - - return deindent` - ${this.comment && `// ${this.comment}`} - function ${this.name}(${this.key ? `${local_key}, ` : ''}ctx) { - ${this.get_contents(local_key)} - } - `; - } -} diff --git a/src/compile/render-dom/Renderer.ts b/src/compile/render-dom/Renderer.ts deleted file mode 100644 index 1d766c6345..0000000000 --- a/src/compile/render-dom/Renderer.ts +++ /dev/null @@ -1,61 +0,0 @@ -import Block from './Block'; -import { CompileOptions } from '../../interfaces'; -import Component from '../Component'; -import FragmentWrapper from './wrappers/Fragment'; -import CodeBuilder from '../utils/CodeBuilder'; -import SlotWrapper from './wrappers/Slot'; - -export default class Renderer { - component: Component; // TODO Maybe Renderer shouldn't know about Component? - options: CompileOptions; - - blocks: (Block | string)[] = []; - readonly: Set = new Set(); - meta_bindings: CodeBuilder = new CodeBuilder(); // initial values for e.g. window.innerWidth, if there's a meta tag - binding_groups: string[] = []; - - block: Block; - fragment: FragmentWrapper; - - file_var: string; - - constructor(component: Component, options: CompileOptions) { - this.component = component; - this.options = options; - this.locate = component.locate; // TODO messy - - this.file_var = options.dev && this.component.get_unique_name('file'); - - // main block - this.block = new Block({ - renderer: this, - name: null, - key: null, - - bindings: new Map(), - - dependencies: new Set(), - }); - - this.block.has_update_method = true; - - this.fragment = new FragmentWrapper( - this, - this.block, - component.fragment.children, - null, - true, - null - ); - - this.blocks.forEach(block => { - if (typeof block !== 'string') { - block.assign_variable_names(); - } - }); - - this.block.assign_variable_names(); - - this.fragment.render(this.block, null, 'nodes'); - } -} \ No newline at end of file diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts deleted file mode 100644 index a6ef0ac69c..0000000000 --- a/src/compile/render-dom/index.ts +++ /dev/null @@ -1,496 +0,0 @@ -import deindent from '../utils/deindent'; -import { stringify, escape } from '../utils/stringify'; -import CodeBuilder from '../utils/CodeBuilder'; -import Component from '../Component'; -import Renderer from './Renderer'; -import { CompileOptions } from '../../interfaces'; -import { walk } from 'estree-walker'; -import { stringify_props } from '../utils/stringify_props'; -import add_to_set from '../utils/add_to_set'; -import get_object from '../utils/get_object'; -import { extract_names } from '../utils/scope'; -import { nodes_match } from '../../utils/nodes_match'; - -export default function dom( - component: Component, - options: CompileOptions -) { - const { name, code } = component; - - const renderer = new Renderer(component, options); - const { block } = renderer; - - block.has_outro_method = true; - - // prevent fragment being created twice (#1063) - if (options.customElement) block.builders.create.add_line(`this.c = @noop;`); - - const builder = new CodeBuilder(); - - if (component.compile_options.dev) { - builder.add_line(`const ${renderer.file_var} = ${JSON.stringify(component.file)};`); - } - - const css = component.stylesheet.render(options.filename, !options.customElement); - const styles = component.stylesheet.has_styles && stringify(options.dev ? - `${css.code}\n/*# sourceMappingURL=${css.map.toUrl()} */` : - css.code, { only_escape_at_symbol: true }); - - if (styles && component.compile_options.css !== false && !options.customElement) { - builder.add_block(deindent` - function @add_css() { - var style = @element("style"); - style.id = '${component.stylesheet.id}-style'; - style.textContent = ${styles}; - @append(document.head, style); - } - `); - } - - // fix order - // TODO the deconflicted names of blocks are reversed... should set them here - const blocks = renderer.blocks.slice().reverse(); - - blocks.forEach(block => { - builder.add_block(block.toString()); - }); - - if (options.dev && !options.hydratable) { - block.builders.claim.add_line( - 'throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");' - ); - } - - // TODO injecting CSS this way is kinda dirty. Maybe it should be an - // explicit opt-in, or something? - const should_add_css = ( - !options.customElement && - component.stylesheet.has_styles && - options.css !== false - ); - - const uses_props = component.var_lookup.has('$$props'); - const $$props = uses_props ? `$$new_props` : `$$props`; - const props = component.vars.filter(variable => !variable.module && variable.export_name); - const writable_props = props.filter(variable => variable.writable); - - const set = (uses_props || writable_props.length > 0 || component.slots.size > 0) - ? deindent` - ${$$props} => { - ${uses_props && component.invalidate('$$props', `$$props = @assign(@assign({}, $$props), $$new_props)`)} - ${writable_props.map(prop => - `if ('${prop.export_name}' in $$props) ${component.invalidate(prop.name, `${prop.name} = $$props.${prop.export_name}`)};` - )} - ${component.slots.size > 0 && - `if ('$$scope' in ${$$props}) ${component.invalidate('$$scope', `$$scope = ${$$props}.$$scope`)};`} - } - ` - : null; - - const body = []; - - const not_equal = component.component_options.immutable ? `@not_equal` : `@safe_not_equal`; - let dev_props_check; - - props.forEach(x => { - const variable = component.var_lookup.get(x.name); - - if (!variable.writable || component.component_options.accessors) { - body.push(deindent` - get ${x.export_name}() { - return ${x.hoistable ? x.name : 'this.$$.ctx.' + x.name}; - } - `); - } else if (component.compile_options.dev) { - body.push(deindent` - get ${x.export_name}() { - throw new Error("<${component.tag}>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - `); - } - - if (component.component_options.accessors) { - if (variable.writable && !renderer.readonly.has(x.name)) { - body.push(deindent` - set ${x.export_name}(${x.name}) { - this.$set({ ${x.name === x.export_name ? x.name : `${x.export_name}: ${x.name}`} }); - @flush(); - } - `); - } else if (component.compile_options.dev) { - body.push(deindent` - set ${x.export_name}(value) { - throw new Error("<${component.tag}>: Cannot set read-only property '${x.export_name}'"); - } - `); - } - } else if (component.compile_options.dev) { - body.push(deindent` - set ${x.export_name}(value) { - throw new Error("<${component.tag}>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - `); - } - }); - - if (component.compile_options.dev) { - // TODO check no uunexpected props were passed, as well as - // checking that expected ones were passed - const expected = props.filter(prop => !prop.initialised); - - if (expected.length) { - dev_props_check = deindent` - const { ctx } = this.$$; - const props = ${options.customElement ? `this.attributes` : `options.props || {}`}; - ${expected.map(prop => deindent` - if (ctx.${prop.name} === undefined && !('${prop.export_name}' in props)) { - console.warn("<${component.tag}> was created without expected prop '${prop.export_name}'"); - }`)} - `; - } - } - - // instrument assignments - if (component.ast.instance) { - let scope = component.instance_scope; - let map = component.instance_scope_map; - - let pending_assignments = new Set(); - - walk(component.ast.instance.content, { - enter: (node, parent) => { - if (map.has(node)) { - scope = map.get(node); - } - }, - - leave(node, parent) { - if (map.has(node)) { - scope = scope.parent; - } - - if (node.type === 'AssignmentExpression') { - let names = []; - - if (node.left.type === 'MemberExpression') { - const left_object_name = get_object(node.left).name; - left_object_name && (names = [left_object_name]); - } else { - names = extract_names(node.left); - } - - if (node.operator === '=' && nodes_match(node.left, node.right)) { - const dirty = names.filter(name => { - return scope.find_owner(name) === component.instance_scope; - }); - - if (dirty.length) component.has_reactive_assignments = true; - - code.overwrite(node.start, node.end, dirty.map(n => component.invalidate(n)).join('; ')); - } else { - const single = ( - node.left.type === 'Identifier' && - parent.type === 'ExpressionStatement' && - node.left.name[0] !== '$' - ); - - names.forEach(name => { - const owner = scope.find_owner(name); - if (owner && owner !== component.instance_scope) return; - - const variable = component.var_lookup.get(name); - if (variable && (variable.hoistable || variable.global || variable.module)) return; - - if (single) { - code.prependRight(node.start, `$$invalidate('${name}', `); - code.appendLeft(node.end, `)`); - } else { - pending_assignments.add(name); - } - - component.has_reactive_assignments = true; - }); - } - } - - else if (node.type === 'UpdateExpression') { - const { name } = get_object(node.argument); - - if (scope.find_owner(name) !== component.instance_scope) return; - - const variable = component.var_lookup.get(name); - if (variable && variable.hoistable) return; - - pending_assignments.add(name); - component.has_reactive_assignments = true; - } - - if (pending_assignments.size > 0) { - if (node.type === 'ArrowFunctionExpression') { - const insert = Array.from(pending_assignments).map(name => component.invalidate(name)).join('; '); - pending_assignments = new Set(); - - code.prependRight(node.body.start, `{ const $$result = `); - code.appendLeft(node.body.end, `; ${insert}; return $$result; }`); - - pending_assignments = new Set(); - } - - else if (/Statement/.test(node.type)) { - const insert = Array.from(pending_assignments).map(name => component.invalidate(name)).join('; '); - - if (/^(Break|Continue|Return)Statement/.test(node.type)) { - if (node.argument) { - code.overwrite(node.start, node.argument.start, `var $$result = `); - code.appendLeft(node.argument.end, `; ${insert}; return $$result`); - } else { - code.prependRight(node.start, `${insert}; `); - } - } else if (parent && /(If|For(In|Of)?|While)Statement/.test(parent.type) && node.type !== 'BlockStatement') { - code.prependRight(node.start, '{ '); - code.appendLeft(node.end, `${code.original[node.end - 1] === ';' ? '' : ';'} ${insert}; }`); - } else { - code.appendLeft(node.end, `${code.original[node.end - 1] === ';' ? '' : ';'} ${insert};`); - } - - pending_assignments = new Set(); - } - } - } - }); - - if (pending_assignments.size > 0) { - throw new Error(`TODO this should not happen!`); - } - - component.rewrite_props(({ name, reassigned }) => { - const value = `$${name}`; - - const callback = `$value => { ${value} = $$value; $$invalidate('${value}', ${value}) }`; - - if (reassigned) { - return `$$subscribe_${name}()`; - } - - const subscribe = component.helper('subscribe'); - - let insert = `${subscribe}($$self, ${name}, $${callback})`; - if (component.compile_options.dev) { - const validate_store = component.helper('validate_store'); - insert = `${validate_store}(${name}, '${name}'); ${insert}`; - } - - return insert; - }); - } - - const args = ['$$self']; - if (props.length > 0 || component.has_reactive_assignments || component.slots.size > 0) { - args.push('$$props', '$$invalidate'); - } - - builder.add_block(deindent` - function create_fragment(ctx) { - ${block.get_contents()} - } - - ${component.module_javascript} - - ${component.fully_hoisted.length > 0 && component.fully_hoisted.join('\n\n')} - `); - - const filtered_declarations = component.vars - .filter(v => ((v.referenced || v.export_name) && !v.hoistable)) - .map(v => v.name); - - if (uses_props) filtered_declarations.push(`$$props: $$props = ${component.helper('exclude_internal_props')}($$props)`); - - const filtered_props = props.filter(prop => { - const variable = component.var_lookup.get(prop.name); - - if (variable.hoistable) return false; - if (prop.name[0] === '$') return false; - return true; - }); - - const reactive_stores = component.vars.filter(variable => variable.name[0] === '$' && variable.name[1] !== '$'); - - if (component.slots.size > 0) { - filtered_declarations.push('$$slots', '$$scope'); - } - - if (renderer.binding_groups.length > 0) { - filtered_declarations.push(`$$binding_groups`); - } - - const has_definition = ( - component.javascript || - filtered_props.length > 0 || - uses_props || - component.partly_hoisted.length > 0 || - filtered_declarations.length > 0 || - component.reactive_declarations.length > 0 - ); - - const definition = has_definition - ? component.alias('instance') - : 'null'; - - const all_reactive_dependencies = new Set(); - component.reactive_declarations.forEach(d => { - add_to_set(all_reactive_dependencies, d.dependencies); - }); - - const reactive_store_subscriptions = reactive_stores - .filter(store => { - const variable = component.var_lookup.get(store.name.slice(1)); - return !variable || variable.hoistable; - }) - .map(({ name }) => deindent` - ${component.compile_options.dev && `@validate_store(${name.slice(1)}, '${name.slice(1)}');`} - @subscribe($$self, ${name.slice(1)}, $$value => { ${name} = $$value; $$invalidate('${name}', ${name}); }); - `); - - const resubscribable_reactive_store_unsubscribers = reactive_stores - .filter(store => { - const variable = component.var_lookup.get(store.name.slice(1)); - return variable && variable.reassigned; - }) - .map(({ name }) => `$$self.$$.on_destroy.push(() => $$unsubscribe_${name.slice(1)}());`); - - if (has_definition) { - const reactive_declarations = []; - const fixed_reactive_declarations = []; // not really 'reactive' but whatever - - component.reactive_declarations - .forEach(d => { - let uses_props; - - const condition = Array.from(d.dependencies) - .filter(n => { - if (n === '$$props') { - uses_props = true; - return false; - } - - const variable = component.var_lookup.get(n); - return variable && variable.writable; - }) - .map(n => `$$dirty.${n}`).join(' || '); - - let snippet = `[✂${d.node.body.start}-${d.node.end}✂]`; - if (condition) snippet = `if (${condition}) { ${snippet} }`; - - if (condition || uses_props) { - reactive_declarations.push(snippet); - } else { - fixed_reactive_declarations.push(snippet); - } - }); - - const injected = Array.from(component.injected_reactive_declaration_vars).filter(name => { - const variable = component.var_lookup.get(name); - return variable.injected && variable.name[0] !== '$'; - }); - - const reactive_store_declarations = reactive_stores.map(variable => { - const $name = variable.name; - const name = $name.slice(1); - - const store = component.var_lookup.get(name); - if (store && store.reassigned) { - return `${$name}, $$unsubscribe_${name} = @noop, $$subscribe_${name} = () => { $$unsubscribe_${name}(); $$unsubscribe_${name} = ${name}.subscribe($$value => { ${$name} = $$value; $$invalidate('${$name}', ${$name}); }) }` - } - - return $name; - }); - - builder.add_block(deindent` - function ${definition}(${args.join(', ')}) { - ${reactive_store_declarations.length > 0 && `let ${reactive_store_declarations.join(', ')};`} - - ${reactive_store_subscriptions} - - ${resubscribable_reactive_store_unsubscribers} - - ${component.javascript} - - ${component.slots.size && `let { $$slots = {}, $$scope } = $$props;`} - - ${renderer.binding_groups.length > 0 && `const $$binding_groups = [${renderer.binding_groups.map(_ => `[]`).join(', ')}];`} - - ${component.partly_hoisted.length > 0 && component.partly_hoisted.join('\n\n')} - - ${set && `$$self.$set = ${set};`} - - ${reactive_declarations.length > 0 && deindent` - ${injected.length && `let ${injected.join(', ')};`} - $$self.$$.update = ($$dirty = { ${Array.from(all_reactive_dependencies).map(n => `${n}: 1`).join(', ')} }) => { - ${reactive_declarations} - }; - - ${fixed_reactive_declarations} - `} - - return ${stringify_props(filtered_declarations)}; - } - `); - } - - const prop_names = `[${props.map(v => JSON.stringify(v.export_name)).join(', ')}]`; - - if (options.customElement) { - builder.add_block(deindent` - class ${name} extends @SvelteElement { - constructor(options) { - super(); - - ${css.code && `this.shadowRoot.innerHTML = \`\`;`} - - @init(this, { target: this.shadowRoot }, ${definition}, create_fragment, ${not_equal}, ${prop_names}); - - ${dev_props_check} - - if (options) { - if (options.target) { - @insert(options.target, this, options.anchor); - } - - ${(props.length > 0 || uses_props) && deindent` - if (options.props) { - this.$set(options.props); - @flush(); - }`} - } - } - - ${props.length > 0 && deindent` - static get observedAttributes() { - return ${JSON.stringify(props.map(x => x.export_name))}; - }`} - - ${body.length > 0 && body.join('\n\n')} - } - - customElements.define("${component.tag}", ${name}); - `); - } else { - const superclass = options.dev ? 'SvelteComponentDev' : 'SvelteComponent'; - - builder.add_block(deindent` - class ${name} extends @${superclass} { - constructor(options) { - super(${options.dev && `options`}); - ${should_add_css && `if (!document.getElementById("${component.stylesheet.id}-style")) @add_css();`} - @init(this, options, ${definition}, create_fragment, ${not_equal}, ${prop_names}); - - ${dev_props_check} - } - - ${body.length > 0 && body.join('\n\n')} - } - `); - } - - return builder.toString(); -} diff --git a/src/compile/render-dom/wrappers/Body.ts b/src/compile/render-dom/wrappers/Body.ts deleted file mode 100644 index ca6c9df43f..0000000000 --- a/src/compile/render-dom/wrappers/Body.ts +++ /dev/null @@ -1,22 +0,0 @@ -import Block from '../Block'; -import Wrapper from './shared/Wrapper'; -import deindent from '../../utils/deindent'; -import Body from '../../nodes/Body'; - -export default class BodyWrapper extends Wrapper { - node: Body; - - render(block: Block, parent_node: string, parent_nodes: string) { - this.node.handlers.forEach(handler => { - const snippet = handler.render(block); - - block.builders.init.add_block(deindent` - document.body.addEventListener("${handler.name}", ${snippet}); - `); - - block.builders.destroy.add_block(deindent` - document.body.removeEventListener("${handler.name}", ${snippet}); - `); - }); - } -} diff --git a/src/compile/render-dom/wrappers/DebugTag.ts b/src/compile/render-dom/wrappers/DebugTag.ts deleted file mode 100644 index 06fef90a62..0000000000 --- a/src/compile/render-dom/wrappers/DebugTag.ts +++ /dev/null @@ -1,72 +0,0 @@ -import Renderer from '../Renderer'; -import Wrapper from './shared/Wrapper'; -import Block from '../Block'; -import DebugTag from '../../nodes/DebugTag'; -import add_to_set from '../../utils/add_to_set'; -import deindent from '../../utils/deindent'; - -export default class DebugTagWrapper extends Wrapper { - node: DebugTag; - - constructor( - renderer: Renderer, - block: Block, - parent: Wrapper, - node: DebugTag, - strip_whitespace: boolean, - next_sibling: Wrapper - ) { - super(renderer, block, parent, node); - } - - render(block: Block, parent_node: string, parent_nodes: string) { - const { renderer } = this; - const { component } = renderer; - - if (!renderer.options.dev) return; - - const { code } = component; - - if (this.node.expressions.length === 0) { - // Debug all - code.overwrite(this.node.start + 1, this.node.start + 7, 'debugger', { - storeName: true - }); - const statement = `[✂${this.node.start + 1}-${this.node.start + 7}✂];`; - - block.builders.create.add_line(statement); - block.builders.update.add_line(statement); - } else { - const { code } = component; - code.overwrite(this.node.start + 1, this.node.start + 7, 'log', { - storeName: true - }); - const log = `[✂${this.node.start + 1}-${this.node.start + 7}✂]`; - - const dependencies = new Set(); - this.node.expressions.forEach(expression => { - add_to_set(dependencies, expression.dependencies); - }); - - const condition = Array.from(dependencies).map(d => `changed.${d}`).join(' || '); - - const identifiers = this.node.expressions.map(e => e.node.name).join(', '); - - block.builders.update.add_block(deindent` - if (${condition}) { - const { ${identifiers} } = ctx; - console.${log}({ ${identifiers} }); - debugger; - } - `); - - block.builders.create.add_block(deindent` - { - const { ${identifiers} } = ctx; - console.${log}({ ${identifiers} }); - debugger; - } - `); - } - } -} \ No newline at end of file diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts deleted file mode 100644 index 050107a573..0000000000 --- a/src/compile/render-dom/wrappers/EachBlock.ts +++ /dev/null @@ -1,513 +0,0 @@ -import Renderer from '../Renderer'; -import Block from '../Block'; -import Wrapper from './shared/Wrapper'; -import create_debugging_comment from './shared/create_debugging_comment'; -import EachBlock from '../../nodes/EachBlock'; -import FragmentWrapper from './Fragment'; -import deindent from '../../utils/deindent'; -import ElseBlock from '../../nodes/ElseBlock'; - -class ElseBlockWrapper extends Wrapper { - node: ElseBlock; - block: Block; - fragment: FragmentWrapper; - is_dynamic: boolean; - - var = null; - - constructor( - renderer: Renderer, - block: Block, - parent: Wrapper, - node: ElseBlock, - strip_whitespace: boolean, - next_sibling: Wrapper - ) { - super(renderer, block, parent, node); - - this.block = block.child({ - comment: create_debugging_comment(node, this.renderer.component), - name: this.renderer.component.get_unique_name(`create_else_block`) - }); - - this.fragment = new FragmentWrapper( - renderer, - this.block, - this.node.children, - parent, - strip_whitespace, - next_sibling - ); - - this.is_dynamic = this.block.dependencies.size > 0; - } -} - -export default class EachBlockWrapper extends Wrapper { - block: Block; - node: EachBlock; - fragment: FragmentWrapper; - else?: ElseBlockWrapper; - vars: { - anchor: string; - create_each_block: string; - each_block_value: string; - get_each_context: string; - iterations: string; - fixed_length: number; - data_length: string; - view_length: string; - length: string; - } - - context_props: string[]; - index_name: string; - - var = 'each'; - - constructor( - renderer: Renderer, - block: Block, - parent: Wrapper, - node: EachBlock, - strip_whitespace: boolean, - next_sibling: Wrapper - ) { - super(renderer, block, parent, node); - this.cannot_use_innerhtml(); - - const { dependencies } = node.expression; - block.add_dependencies(dependencies); - - this.block = block.child({ - comment: create_debugging_comment(this.node, this.renderer.component), - name: renderer.component.get_unique_name('create_each_block'), - key: node.key as string, - - bindings: new Map(block.bindings) - }); - - // TODO this seems messy - this.block.has_animation = this.node.has_animation; - - this.index_name = this.node.index || renderer.component.get_unique_name(`${this.node.context}_index`); - - const fixed_length = - node.expression.node.type === 'ArrayExpression' && - node.expression.node.elements.every(element => element.type !== 'SpreadElement') - ? node.expression.node.elements.length - : null; - - // hack the sourcemap, so that if data is missing the bug - // is easy to find - let c = this.node.start + 2; - while (renderer.component.source[c] !== 'e') c += 1; - renderer.component.code.overwrite(c, c + 4, 'length'); - - const each_block_value = renderer.component.get_unique_name(`${this.var}_value`); - const iterations = block.get_unique_name(`${this.var}_blocks`); - - this.vars = { - create_each_block: this.block.name, - each_block_value, - get_each_context: renderer.component.get_unique_name(`get_${this.var}_context`), - iterations, - length: `[✂${c}-${c+4}✂]`, - - // optimisation for array literal - fixed_length, - data_length: fixed_length === null ? `${each_block_value}.[✂${c}-${c+4}✂]` : fixed_length, - view_length: fixed_length === null ? `${iterations}.[✂${c}-${c+4}✂]` : fixed_length, - - // filled out later - anchor: null - }; - - node.contexts.forEach(prop => { - this.block.bindings.set(prop.key.name, { - object: this.vars.each_block_value, - property: this.index_name, - snippet: `${this.vars.each_block_value}[${this.index_name}]${prop.tail}` - }); - }); - - if (this.node.index) { - this.block.get_unique_name(this.node.index); // this prevents name collisions (#1254) - } - - renderer.blocks.push(this.block); - - this.fragment = new FragmentWrapper(renderer, this.block, node.children, this, strip_whitespace, next_sibling); - - if (this.node.else) { - this.else = new ElseBlockWrapper( - renderer, - block, - this, - this.node.else, - strip_whitespace, - next_sibling - ); - - renderer.blocks.push(this.else.block); - - if (this.else.is_dynamic) { - this.block.add_dependencies(this.else.block.dependencies); - } - } - - block.add_dependencies(this.block.dependencies); - - if (this.block.has_outros || (this.else && this.else.block.has_outros)) { - block.add_outro(); - } - } - - render(block: Block, parent_node: string, parent_nodes: string) { - if (this.fragment.nodes.length === 0) return; - - const { renderer } = this; - const { component } = renderer; - - const needs_anchor = this.next - ? !this.next.is_dom_node() : - !parent_node || !this.parent.is_dom_node(); - - this.vars.anchor = needs_anchor - ? block.get_unique_name(`${this.var}_anchor`) - : (this.next && this.next.var) || 'null'; - - this.context_props = this.node.contexts.map(prop => `child_ctx.${prop.key.name} = list[i]${prop.tail};`); - - if (this.node.has_binding) this.context_props.push(`child_ctx.${this.vars.each_block_value} = list;`); - if (this.node.has_binding || this.node.index) this.context_props.push(`child_ctx.${this.index_name} = i;`); - - const snippet = this.node.expression.render(block); - - block.builders.init.add_line(`var ${this.vars.each_block_value} = ${snippet};`); - - renderer.blocks.push(deindent` - function ${this.vars.get_each_context}(ctx, list, i) { - const child_ctx = Object.create(ctx); - ${this.context_props} - return child_ctx; - } - `); - - if (this.node.key) { - this.render_keyed(block, parent_node, parent_nodes, snippet); - } else { - this.render_unkeyed(block, parent_node, parent_nodes, snippet); - } - - if (this.block.has_intro_method || this.block.has_outro_method) { - block.builders.intro.add_block(deindent` - for (var #i = 0; #i < ${this.vars.data_length}; #i += 1) ${this.vars.iterations}[#i].i(); - `); - } - - if (needs_anchor) { - block.add_element( - this.vars.anchor, - `@empty()`, - parent_nodes && `@empty()`, - parent_node - ); - } - - if (this.else) { - const each_block_else = component.get_unique_name(`${this.var}_else`); - - block.builders.init.add_line(`var ${each_block_else} = null;`); - - // TODO neaten this up... will end up with an empty line in the block - block.builders.init.add_block(deindent` - if (!${this.vars.data_length}) { - ${each_block_else} = ${this.else.block.name}(ctx); - ${each_block_else}.c(); - } - `); - - block.builders.mount.add_block(deindent` - if (${each_block_else}) { - ${each_block_else}.m(${parent_node || '#target'}, null); - } - `); - - const initial_mount_node = parent_node || `${this.vars.anchor}.parentNode`; - - if (this.else.block.has_update_method) { - block.builders.update.add_block(deindent` - if (!${this.vars.data_length} && ${each_block_else}) { - ${each_block_else}.p(changed, ctx); - } else if (!${this.vars.data_length}) { - ${each_block_else} = ${this.else.block.name}(ctx); - ${each_block_else}.c(); - ${each_block_else}.m(${initial_mount_node}, ${this.vars.anchor}); - } else if (${each_block_else}) { - ${each_block_else}.d(1); - ${each_block_else} = null; - } - `); - } else { - block.builders.update.add_block(deindent` - if (${this.vars.data_length}) { - if (${each_block_else}) { - ${each_block_else}.d(1); - ${each_block_else} = null; - } - } else if (!${each_block_else}) { - ${each_block_else} = ${this.else.block.name}(ctx); - ${each_block_else}.c(); - ${each_block_else}.m(${initial_mount_node}, ${this.vars.anchor}); - } - `); - } - - block.builders.destroy.add_block(deindent` - if (${each_block_else}) ${each_block_else}.d(${parent_node ? '' : 'detaching'}); - `); - } - - this.fragment.render(this.block, null, 'nodes'); - - if (this.else) { - this.else.fragment.render(this.else.block, null, 'nodes'); - } - } - - render_keyed( - block: Block, - parent_node: string, - parent_nodes: string, - snippet: string - ) { - const { - create_each_block, - length, - anchor, - iterations, - view_length - } = this.vars; - - const get_key = block.get_unique_name('get_key'); - const lookup = block.get_unique_name(`${this.var}_lookup`); - - block.add_variable(iterations, '[]'); - block.add_variable(lookup, `new Map()`); - - if (this.fragment.nodes[0].is_dom_node()) { - this.block.first = this.fragment.nodes[0].var; - } else { - this.block.first = this.block.get_unique_name('first'); - this.block.add_element( - this.block.first, - `@empty()`, - parent_nodes && `@empty()`, - null - ); - } - - block.builders.init.add_block(deindent` - const ${get_key} = ctx => ${this.node.key.render()}; - - for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) { - let child_ctx = ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i); - let key = ${get_key}(child_ctx); - ${lookup}.set(key, ${iterations}[#i] = ${create_each_block}(key, child_ctx)); - } - `); - - const initial_mount_node = parent_node || '#target'; - const update_mount_node = this.get_update_mount_node(anchor); - const anchor_node = parent_node ? 'null' : 'anchor'; - - block.builders.create.add_block(deindent` - for (#i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].c(); - `); - - if (parent_nodes && this.renderer.options.hydratable) { - block.builders.claim.add_block(deindent` - for (#i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].l(${parent_nodes}); - `); - } - - block.builders.mount.add_block(deindent` - for (#i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].m(${initial_mount_node}, ${anchor_node}); - `); - - const dynamic = this.block.has_update_method; - - const destroy = this.node.has_animation - ? `@fix_and_outro_and_destroy_block` - : this.block.has_outros - ? `@outro_and_destroy_block` - : `@destroy_block`; - - block.builders.update.add_block(deindent` - const ${this.vars.each_block_value} = ${snippet}; - - ${this.block.has_outros && `@group_outros();`} - ${this.node.has_animation && `for (let #i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].r();`} - ${iterations} = @update_keyed_each(${iterations}, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${update_mount_node}, ${destroy}, ${create_each_block}, ${anchor}, ${this.vars.get_each_context}); - ${this.node.has_animation && `for (let #i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].a();`} - ${this.block.has_outros && `@check_outros();`} - `); - - if (this.block.has_outros) { - block.builders.outro.add_block(deindent` - for (#i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].o(); - `); - } - - block.builders.destroy.add_block(deindent` - for (#i = 0; #i < ${view_length}; #i += 1) ${iterations}[#i].d(${parent_node ? '' : 'detaching'}); - `); - } - - render_unkeyed( - block: Block, - parent_node: string, - parent_nodes: string, - snippet: string - ) { - const { - create_each_block, - length, - iterations, - fixed_length, - data_length, - view_length, - anchor - } = this.vars; - - block.builders.init.add_block(deindent` - var ${iterations} = []; - - for (var #i = 0; #i < ${data_length}; #i += 1) { - ${iterations}[#i] = ${create_each_block}(${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i)); - } - `); - - const initial_mount_node = parent_node || '#target'; - const update_mount_node = this.get_update_mount_node(anchor); - const anchor_node = parent_node ? 'null' : 'anchor'; - - block.builders.create.add_block(deindent` - for (var #i = 0; #i < ${view_length}; #i += 1) { - ${iterations}[#i].c(); - } - `); - - if (parent_nodes && this.renderer.options.hydratable) { - block.builders.claim.add_block(deindent` - for (var #i = 0; #i < ${view_length}; #i += 1) { - ${iterations}[#i].l(${parent_nodes}); - } - `); - } - - block.builders.mount.add_block(deindent` - for (var #i = 0; #i < ${view_length}; #i += 1) { - ${iterations}[#i].m(${initial_mount_node}, ${anchor_node}); - } - `); - - const all_dependencies = new Set(this.block.dependencies); - const { dependencies } = this.node.expression; - dependencies.forEach((dependency: string) => { - all_dependencies.add(dependency); - }); - - const outro_block = this.block.has_outros && block.get_unique_name('outro_block') - if (outro_block) { - block.builders.init.add_block(deindent` - function ${outro_block}(i, detaching, local) { - if (${iterations}[i]) { - if (detaching) { - @on_outro(() => { - ${iterations}[i].d(detaching); - ${iterations}[i] = null; - }); - } - - ${iterations}[i].o(local); - } - } - `); - } - - const condition = Array.from(all_dependencies) - .map(dependency => `changed.${dependency}`) - .join(' || '); - - const has_transitions = !!(this.block.has_intro_method || this.block.has_outro_method); - - if (condition !== '') { - const for_loop_body = this.block.has_update_method - ? deindent` - if (${iterations}[#i]) { - ${iterations}[#i].p(changed, child_ctx); - ${has_transitions && `${iterations}[#i].i(1);`} - } else { - ${iterations}[#i] = ${create_each_block}(child_ctx); - ${iterations}[#i].c(); - ${has_transitions && `${iterations}[#i].i(1);`} - ${iterations}[#i].m(${update_mount_node}, ${anchor}); - } - ` - : deindent` - ${iterations}[#i] = ${create_each_block}(child_ctx); - ${iterations}[#i].c(); - ${has_transitions && `${iterations}[#i].i(1);`} - ${iterations}[#i].m(${update_mount_node}, ${anchor}); - `; - - const start = this.block.has_update_method ? '0' : `${view_length}`; - - let remove_old_blocks; - - if (this.block.has_outros) { - remove_old_blocks = deindent` - @group_outros(); - for (; #i < ${view_length}; #i += 1) ${outro_block}(#i, 1, 1); - @check_outros(); - `; - } else { - remove_old_blocks = deindent` - for (${this.block.has_update_method ? `` : `#i = ${this.vars.each_block_value}.${length}`}; #i < ${view_length}; #i += 1) { - ${iterations}[#i].d(1); - } - ${!fixed_length && `${view_length} = ${this.vars.each_block_value}.${length};`} - `; - } - - const update = deindent` - ${this.vars.each_block_value} = ${snippet}; - - for (var #i = ${start}; #i < ${this.vars.each_block_value}.${length}; #i += 1) { - const child_ctx = ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i); - - ${for_loop_body} - } - - ${remove_old_blocks} - `; - - block.builders.update.add_block(deindent` - if (${condition}) { - ${update} - } - `); - } - - if (outro_block) { - block.builders.outro.add_block(deindent` - ${iterations} = ${iterations}.filter(Boolean); - for (let #i = 0; #i < ${view_length}; #i += 1) ${outro_block}(#i, 0);` - ); - } - - block.builders.destroy.add_block(`@destroy_each(${iterations}, detaching);`); - } -} diff --git a/src/compile/render-dom/wrappers/Element/Attribute.ts b/src/compile/render-dom/wrappers/Element/Attribute.ts deleted file mode 100644 index 680c50e992..0000000000 --- a/src/compile/render-dom/wrappers/Element/Attribute.ts +++ /dev/null @@ -1,458 +0,0 @@ -import Attribute from '../../../nodes/Attribute'; -import Block from '../../Block'; -import fix_attribute_casing from './fix_attribute_casing'; -import ElementWrapper from './index'; -import { stringify } from '../../../utils/stringify'; -import deindent from '../../../utils/deindent'; - -export default class AttributeWrapper { - node: Attribute; - parent: ElementWrapper; - - constructor(parent: ElementWrapper, block: Block, node: Attribute) { - this.node = node; - this.parent = parent; - - if (node.dependencies.size > 0) { - parent.cannot_use_innerhtml(); - - block.add_dependencies(node.dependencies); - - // special case —