From 912c16992c286b7289eb679147fbf3fda66a4ba7 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Wed, 29 Mar 2017 18:22:25 -0400 Subject: [PATCH 01/12] add UI for creating, renaming and removing components --- public/icons/flip.svg | 14 ++ shared/routes/Repl/CodeMirror.html | 3 + shared/routes/Repl/ModuleName.html | 143 ++++++++++++++++++ shared/routes/Repl/Viewer.html | 2 +- shared/routes/Repl/index.html | 224 ++++++++++++++++++++++++++--- 5 files changed, 364 insertions(+), 22 deletions(-) create mode 100644 public/icons/flip.svg create mode 100644 shared/routes/Repl/ModuleName.html diff --git a/public/icons/flip.svg b/public/icons/flip.svg new file mode 100644 index 000000000..c001239ba --- /dev/null +++ b/public/icons/flip.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/shared/routes/Repl/CodeMirror.html b/shared/routes/Repl/CodeMirror.html index 3c5cda9c0..7dc224b45 100644 --- a/shared/routes/Repl/CodeMirror.html +++ b/shared/routes/Repl/CodeMirror.html @@ -102,6 +102,9 @@ this.editor = window.CodeMirror.fromTextArea( this.refs.editor, { lineNumbers: true, lineWrapping: true, + indentWithTabs: true, + indentUnit: 2, + tabSize: 2, value: this.get( 'code' ), mode: this.get( 'mode' ), readOnly: this.get( 'readonly' ) diff --git a/shared/routes/Repl/ModuleName.html b/shared/routes/Repl/ModuleName.html new file mode 100644 index 000000000..258f94761 --- /dev/null +++ b/shared/routes/Repl/ModuleName.html @@ -0,0 +1,143 @@ +
+ + + + + +
+ + + + \ No newline at end of file diff --git a/shared/routes/Repl/Viewer.html b/shared/routes/Repl/Viewer.html index af03a71b6..c0df2ae23 100644 --- a/shared/routes/Repl/Viewer.html +++ b/shared/routes/Repl/Viewer.html @@ -21,13 +21,13 @@ \ No newline at end of file diff --git a/shared/routes/Repl/index.html b/shared/routes/Repl/index.html index 6bf3a917b..fbaf0a29c 100644 --- a/shared/routes/Repl/index.html +++ b/shared/routes/Repl/index.html @@ -2,13 +2,7 @@
- + @@ -16,7 +10,7 @@
{{#if selectedComponent}} - Rendered component From c8fe770b6122fa3b4d9b62a11d697eb86d27595a Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sun, 2 Apr 2017 12:47:11 -0400 Subject: [PATCH 09/12] chores --- .eslintignore | 3 + .eslintrc => .eslintrc.json | 0 client/service-worker.js | 2 +- package.json | 9 +- server/index.js | 13 +- yarn.lock | 480 +++++++++++++++++++++--------------- 6 files changed, 291 insertions(+), 216 deletions(-) create mode 100644 .eslintignore rename .eslintrc => .eslintrc.json (100%) diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..786cea1a0 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +server/components +server/routes +shared/routes/Repl/examples.js \ No newline at end of file diff --git a/.eslintrc b/.eslintrc.json similarity index 100% rename from .eslintrc rename to .eslintrc.json diff --git a/client/service-worker.js b/client/service-worker.js index 390f2e7d3..fa66b33f9 100644 --- a/client/service-worker.js +++ b/client/service-worker.js @@ -1,5 +1,5 @@ const CACHE_NAME = `cache-v__CACHEVERSION__`; -const urlsToCache = __MANIFEST__; +const urlsToCache = __MANIFEST__; // eslint-disable-line no-undef self.addEventListener( 'install', event => { event.waitUntil( diff --git a/package.json b/package.json index b51e7622f..bd1bcdc73 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "predeploy:ci": "npm run prep", "stage": "now", "deploy": "now && now alias", - "deploy:ci": "now --token $NOW_TOKEN && now alias --token $NOW_TOKEN" + "deploy:ci": "now --token $NOW_TOKEN && now alias --token $NOW_TOKEN", + "lint": "eslint server client shared" }, "repository": { "type": "git", @@ -47,7 +48,7 @@ "postcss-clearfix": "^1.0.0", "postcss-import": "^9.1.0", "postcss-nested": "^1.0.0", - "rollup": "^0.41.5", + "rollup": "^0.41.6", "rollup-plugin-buble": "^0.15.0", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-json": "^2.1.0", @@ -56,7 +57,7 @@ "rollup-plugin-svelte": "^1.6.0", "rollup-plugin-uglify": "^1.0.1", "rollup-watch": "^3.2.2", - "svelte": "^1.13.1", + "svelte": "^1.13.3", "uglify-js": "^2.8.12" }, "dependencies": { @@ -64,7 +65,7 @@ "curl-amd": "^0.8.12", "roadtrip": "^0.3.4", "rollup": "^0.41.6", - "svelte": "^1.11.2" + "svelte": "^1.13.3" }, "now": { "alias": "svelte.technology", diff --git a/server/index.js b/server/index.js index 7968a74b2..dac569783 100644 --- a/server/index.js +++ b/server/index.js @@ -1,4 +1,3 @@ -const fs = require( 'fs' ); const path = require( 'path' ); const express = require( 'express' ); const compression = require( 'compression' ); @@ -27,7 +26,7 @@ app.get( '/', ( req, res ) => { nav: Nav.render({ route: 'index' }), route: Index.render() }).catch( err => { - console.log( err.stack ); + console.log( err.stack ); // eslint-disable-line no-console }); }); @@ -50,7 +49,7 @@ app.get( '/blog', ( req, res ) => { nav: Nav.render({ route: 'blog' }), route: BlogIndex.render({ posts }) }).catch( err => { - console.log( err.stack ); + console.log( err.stack ); // eslint-disable-line no-console }); }); @@ -78,7 +77,7 @@ app.get( '/blog/:slug', ( req, res ) => { nav: Nav.render({ route: 'blog' }), route: BlogPost.render({ post }) }).catch( err => { - console.log( err.stack ); + console.log( err.stack ); // eslint-disable-line no-console }); }); @@ -93,7 +92,7 @@ app.get( '/guide', ( req, res ) => { nav: Nav.render({ route: 'guide' }), route: Guide.render({ sections }) }).catch( err => { - console.log( err.stack ); + console.log( err.stack ); // eslint-disable-line no-console }); }); @@ -106,10 +105,10 @@ app.get( '/repl', ( req, res ) => { nav: Nav.render({ route: 'repl' }), route: Repl.render() // TODO is there any point? just render an empty box instead? }).catch( err => { - console.log( err.stack ); + console.log( err.stack ); // eslint-disable-line no-console }); }); app.listen( 3000, () => { - console.log( 'listening on localhost:3000' ); + console.log( 'listening on localhost:3000' ); // eslint-disable-line no-console }); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 8df87b7cb..01a1bd2eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,22 +6,6 @@ version "0.3.1" resolved "https://registry.yarnpkg.com/@google/maps/-/maps-0.3.1.tgz#3f10303033e53d3fc7bb9d6268de2266803bf781" -"@types/fs-extra@0.0.37": - version "0.0.37" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-0.0.37.tgz#195f11bcd9a1b97d9e412c6b66899b545471a1f7" - dependencies: - "@types/node" "*" - -"@types/mz@0.0.30": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/mz/-/mz-0.0.30.tgz#58daa9f35811d607037bab1f9cc7d4a23e6aafae" - dependencies: - "@types/node" "*" - -"@types/node@*": - version "7.0.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.8.tgz#25e4dd804b630c916ae671233e6d71f6ce18124a" - accepts@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" @@ -41,14 +25,18 @@ acorn-object-spread@^1.0.0: dependencies: acorn "^3.1.0" -acorn@4.0.4, acorn@^4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" - acorn@^3.0.4, acorn@^3.1.0, acorn@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +acorn@^4.0.1: + version "4.0.11" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" + +acorn@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" @@ -278,9 +266,9 @@ bytes@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.3.0.tgz#d5b680a165b6201739acb611542aabc2d8ceb070" -bytes@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" +bytes@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.5.0.tgz#4c9423ea2d252c270c41b2bdefeff9bb6b62c06a" caller-path@^0.1.0: version "0.1.0" @@ -301,8 +289,8 @@ camelcase@^1.0.2: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" camelcase@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.0.0.tgz#8b0f90d44be5e281b903b9887349b92595ef07f2" + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" capture-stack-trace@^1.0.0: version "1.0.0" @@ -337,8 +325,8 @@ circular-json@^0.3.1: resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" clean-css@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.0.8.tgz#063dfd593404d3a3d1db494d4b6d0f378b0781b6" + version "4.0.10" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.0.10.tgz#6be448d6ba8c767654ebe11f158b97a887cb713f" dependencies: source-map "0.5.x" @@ -383,8 +371,8 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" codemirror@^5.24.2: - version "5.24.2" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.24.2.tgz#b55ca950fa009709c37df68eb133310ed89cf2fe" + version "5.25.0" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.25.0.tgz#78e06939c7bb41f65707b8aa9c5328111948b756" commander@~2.8.1: version "2.8.1" @@ -409,10 +397,10 @@ component-inherit@0.0.3: resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" compressible@~2.0.8: - version "2.0.9" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.9.tgz#6daab4e2b599c2770dd9e21e7a891b1c5a755425" + version "2.0.10" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.10.tgz#feda1c7f7617912732b29bf8cf26252a20b9eecd" dependencies: - mime-db ">= 1.24.0 < 2" + mime-db ">= 1.27.0 < 2" compression@^1.6.2: version "1.6.2" @@ -429,7 +417,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.6: +concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -516,11 +504,11 @@ curl-amd@^0.8.12: version "0.8.12" resolved "https://registry.yarnpkg.com/curl-amd/-/curl-amd-0.8.12.tgz#e3912ecf6bd83e782aef91610da05c89425ae7ed" -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" dependencies: - es5-ext "~0.10.2" + es5-ext "^0.10.9" debug@2.2.0, debug@^2.1.1, debug@^2.2.0, debug@~2.2.0: version "2.2.0" @@ -540,6 +528,12 @@ debug@2.6.1: dependencies: ms "0.7.2" +debug@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" + dependencies: + ms "0.7.2" + decamelize@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -624,13 +618,48 @@ docker-file-parser@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/docker-file-parser/-/docker-file-parser-1.0.1.tgz#7e20a221b721c0e4b7765d7a7882acbf250cffbe" -doctrine@1.5.0, doctrine@^1.2.2: +doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: esutils "^2.0.2" isarray "^1.0.0" +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1, domelementtype@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + dependencies: + domelementtype "1" + +domutils@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + dot-prop@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.1.1.tgz#a8493f0b7b5eeec82525b5c7587fa7de7ca859c1" @@ -683,10 +712,10 @@ encoding@^0.1.11: iconv-lite "~0.4.13" end-of-stream@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.2.0.tgz#bce82685eab6262e2a780ae740e6334027c01622" + version "1.4.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" dependencies: - once "~1.3.0" + once "^1.4.0" engine.io-client@1.8.3: version "1.8.3" @@ -716,57 +745,61 @@ engine.io-parser@1.3.2: has-binary "0.1.7" wtf-8 "1.0.0" -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" +entities@^1.1.1, entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.15" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" dependencies: es6-iterator "2" es6-symbol "~3.1" -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" -es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" + d "1" + es5-ext "~0.10.14" es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" escape-html@~1.0.3: version "1.0.3" @@ -800,6 +833,12 @@ eslint-module-utils@^2.0.0: debug "2.2.0" pkg-dir "^1.0.0" +eslint-plugin-html@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-html/-/eslint-plugin-html-2.0.1.tgz#3a829510e82522f1e2e44d55d7661a176121fce1" + dependencies: + htmlparser2 "^3.8.2" + eslint-plugin-import@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" @@ -816,16 +855,17 @@ eslint-plugin-import@^2.2.0: pkg-up "^1.0.0" eslint@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.17.1.tgz#b80ae12d9c406d858406fccda627afce33ea10ea" + version "3.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" - concat-stream "^1.4.6" + concat-stream "^1.5.2" debug "^2.1.1" - doctrine "^1.2.2" + doctrine "^2.0.0" escope "^3.6.0" espree "^3.4.0" + esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -855,16 +895,22 @@ eslint@^3.17.1: user-home "^2.0.0" espree@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.0.tgz#41656fa5628e042878025ef467e78f125cb86e1d" + version "3.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.1.tgz#28a83ab4aaed71ed8fe0f5efe61b76a05c13c4d2" dependencies: - acorn "4.0.4" + acorn "^5.0.1" acorn-jsx "^3.0.0" esprima@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + esrecurse@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" @@ -872,7 +918,7 @@ esrecurse@^4.1.0: estraverse "~4.1.0" object-assign "^4.0.1" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -896,12 +942,12 @@ etag@~1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: - d "~0.1.1" - es5-ext "~0.10.7" + d "1" + es5-ext "~0.10.14" execa@^0.4.0: version "0.4.0" @@ -1036,10 +1082,10 @@ fill-range@^2.1.0: repeat-string "^1.5.2" finalhandler@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.0.tgz#b5691c2c0912092f18ac23e9416bde5cd7dc6755" + version "1.0.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.1.tgz#bcd15d1689c0e5ed729b6f7f541a6df984117db8" dependencies: - debug "2.6.1" + debug "2.6.3" encodeurl "~1.0.1" escape-html "~1.0.3" on-finished "~2.3.0" @@ -1082,18 +1128,16 @@ fresh@0.5.0: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" fs-extra@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.0.0.tgz#337352bded4a0b714f3eb84de8cea765e9d37600" + version "2.1.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" dependencies: graceful-fs "^4.1.2" jsonfile "^2.1.0" -fs-promise@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fs-promise/-/fs-promise-2.0.0.tgz#d1c8bae6ab2bc2ea0cfad643d5fb1c07814d22b3" +fs-promise@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fs-promise/-/fs-promise-2.0.2.tgz#cfea45c80f46480a3fd176213fa22abc8c159521" dependencies: - "@types/fs-extra" "0.0.37" - "@types/mz" "0.0.30" any-promise "^1.3.0" fs-extra "^2.0.0" mz "^2.6.0" @@ -1151,7 +1195,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: +glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: @@ -1163,8 +1207,8 @@ glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: path-is-absolute "^1.0.0" globals@^9.14.0: - version "9.16.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" + version "9.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" globby@^5.0.0: version "5.0.0" @@ -1235,6 +1279,17 @@ html-entities@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.0.tgz#41948caf85ce82fed36e4e6a0ed371a6664379e2" +htmlparser2@^3.8.2: + version "3.9.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" + dependencies: + domelementtype "^1.3.0" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^2.0.2" + http-errors@~1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" @@ -1252,9 +1307,9 @@ ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" -ignore@3.2.4, ignore@^3.2.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.4.tgz#4055e03596729a8fabe45a43c100ad5ed815c4e8" +ignore@3.2.6, ignore@^3.2.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.6.tgz#26e8da0644be0bb4cb39516f6c79f0e0f4ffe48c" imurmurhash@^0.1.4: version "0.1.4" @@ -1271,7 +1326,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.3, inherits@~2.0.1: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1316,12 +1371,12 @@ inquirer@^0.12.0: through "^2.3.6" interpret@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + version "1.0.2" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.2.tgz#f4f623f0bb7122f15f5717c8e254b8161b5c5b2d" -ipaddr.js@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.2.0.tgz#8aba49c9192799585bdd643e0ccb50e8ae777ba4" +ipaddr.js@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.3.0.tgz#1e03a52fdad83a8bbb2b25cbf4998b4cffcd3dec" is-absolute@^0.1.5: version "0.1.7" @@ -1460,9 +1515,9 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -isexe@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" isobject@^2.0.0: version "2.1.0" @@ -1516,10 +1571,10 @@ kind-of@^3.0.2: is-buffer "^1.0.2" latest-version@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.0.0.tgz#3104f008c0c391084107f85a344bc61e38970649" + version "3.1.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" dependencies: - package-json "^3.0.0" + package-json "^4.0.0" lazy-cache@^1.0.3: version "1.0.4" @@ -1579,6 +1634,12 @@ magic-string@^0.14.0: dependencies: vlq "^0.2.1" +magic-string@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.15.2.tgz#0681d7388741bbc3addaa65060992624c6c09e9c" + dependencies: + vlq "^0.2.1" + magic-string@^0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.19.0.tgz#198948217254e3e0b93080e01146b7c73b2a06b2" @@ -1619,15 +1680,15 @@ micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" -"mime-db@>= 1.24.0 < 2", mime-db@~1.26.0: - version "1.26.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" +"mime-db@>= 1.27.0 < 2", mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" -mime-types@~2.1.11, mime-types@~2.1.13: - version "2.1.14" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" +mime-types@~2.1.11, mime-types@~2.1.15: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" dependencies: - mime-db "~1.26.0" + mime-db "~1.27.0" mime@1.3.4: version "1.3.4" @@ -1665,6 +1726,10 @@ ms@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" +ms@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-1.0.0.tgz#59adcd22edc543f7b5381862d31387b1f4bc9473" + mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" @@ -1701,12 +1766,14 @@ node-version@1.0.0: resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.0.0.tgz#1b9b9584a9a7f7a6123f215cd14a652bf21ab19e" normalize-path@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" now@^4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/now/-/now-4.7.1.tgz#14ccf1386e623fb6d0338fe7d6d69ab9796cae22" + version "4.10.3" + resolved "https://registry.yarnpkg.com/now/-/now-4.10.3.tgz#4625203927d7e42338c0462754aeca748e5d300c" dependencies: "@google/maps" "0.3.1" ansi-escapes "1.4.0" @@ -1715,7 +1782,7 @@ now@^4.7.1: array-unique "0.3.2" async-retry "0.3.0" async-to-gen "1.3.2" - bytes "2.4.0" + bytes "2.5.0" chalk "1.1.3" copy-paste "1.3.0" credit-card "3.0.1" @@ -1725,25 +1792,25 @@ now@^4.7.1: download "5.0.3" email-prompt "0.2.0" email-validator "1.0.7" - fs-promise "2.0.0" + fs-promise "2.0.2" glob "7.1.1" - ignore "3.2.4" + ignore "3.2.6" ini "1.3.4" inquirer "3.0.6" is-url "1.2.2" minimist "1.2.0" - ms "0.7.2" + ms "1.0.0" node-fetch "1.6.3" node-version "1.0.0" opn "4.0.2" - ora "1.1.0" + ora "1.2.0" progress "1.1.8" - psl "1.1.16" + psl "1.1.17" resumer "0.0.0" socket.io-client "1.7.3" split-array "1.0.1" strip-ansi "3.0.1" - stripe "4.15.0" + stripe "4.16.1" text-table "0.2.0" tmp-promise "1.0.3" update-notifier "2.1.0" @@ -1783,25 +1850,19 @@ on-headers@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" -once@^1.3.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" -once@~1.3.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" - dependencies: - wrappy "1" - onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" onetime@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.0.tgz#52aa8110e52fc5126ffc667bd8ec21c2ed209ce6" + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" dependencies: mimic-fn "^1.0.0" @@ -1827,9 +1888,9 @@ options@>=0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" -ora@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-1.1.0.tgz#69aaa4a209630e43b142c5f7ff41820da87e2faf" +ora@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-1.2.0.tgz#32fb3183500efe83f5ea89101785f0ee6060fec9" dependencies: chalk "^1.1.1" cli-cursor "^2.1.0" @@ -1844,9 +1905,9 @@ os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" -package-json@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-3.1.0.tgz#ce281900fe8052150cc6709c6c006c18fdb2f379" +package-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.0.tgz#f3c9dc8738f5b59304d54d2cfb3f91d08fdd7998" dependencies: got "^6.7.1" registry-auth-token "^3.0.1" @@ -2007,27 +2068,27 @@ promise-each@^2.2.0: any-promise "^0.1.0" proxy-addr@~1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.3.tgz#dc97502f5722e888467b3fa2297a7b1ff47df074" + version "1.1.4" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.4.tgz#27e545f6960a44a627d9b44467e35c1b6b4ce2f3" dependencies: forwarded "~0.1.0" - ipaddr.js "1.2.0" + ipaddr.js "1.3.0" pseudomap@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -psl@1.1.16: - version "1.1.16" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.16.tgz#dc88ca320b87ba79f6feefdf665a8d3113b499c1" +psl@1.1.17: + version "1.1.17" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.17.tgz#a849efbdf89c9d3d1356d771c68afe27b11f4d6f" qs@6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" -qs@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-2.4.2.tgz#f7ce788e5777df0b5010da7f7c4e73ba32470f5a" +qs@~6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.0.4.tgz#51019d84720c939b82737e84556a782338ecea7b" randomatic@^1.1.3: version "1.1.6" @@ -2041,8 +2102,8 @@ range-parser@~1.2.0: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" rc@^1.0.1, rc@^1.1.2, rc@^1.1.6: - version "1.1.7" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.7.tgz#c5ea564bb07aff9fd3a5b32e906c1d3a65940fea" + version "1.2.0" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.0.tgz#c7de973b7b46297c041366b2fd3d2363b1697c66" dependencies: deep-extend "~0.4.0" ini "~1.3.0" @@ -2059,9 +2120,9 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.3.tgz#9cf49463985df016c8ae8813097a9293a9b33729" +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.2.2: + version "2.2.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" dependencies: buffer-shims "^1.0.0" core-util-is "~1.0.0" @@ -2104,6 +2165,10 @@ registry-url@^3.0.3: dependencies: rc "^1.0.1" +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" @@ -2168,8 +2233,8 @@ right-align@^0.1.1: align-text "^0.1.1" rimraf@^2.2.8: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" @@ -2201,19 +2266,27 @@ rollup-plugin-json@^2.1.0: rollup-pluginutils "^1.5.2" rollup-plugin-node-resolve@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.0.0.tgz#07e0ae94ac002a3ea36e8f33ca121d9f836b1309" + version "2.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz#cbb783b0d15b02794d58915350b2f0d902b8ddc8" dependencies: browser-resolve "^1.11.0" builtin-modules "^1.1.0" resolve "^1.1.6" +rollup-plugin-replace@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-1.1.1.tgz#396315ded050a6ce43b9518a886a3f60efb1ea33" + dependencies: + magic-string "^0.15.2" + minimatch "^3.0.2" + rollup-pluginutils "^1.5.0" + rollup-plugin-svelte@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-svelte/-/rollup-plugin-svelte-1.6.0.tgz#9dd3a13f19f2832313170b0bc61d02ceb08da5a0" + version "1.6.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-svelte/-/rollup-plugin-svelte-1.6.1.tgz#19e1f602f601fbe8dd45ae8d4d5f4dcaf47dbbcb" dependencies: - rollup-pluginutils "^1.5.2" - svelte "^1.6.0" + rollup-pluginutils "^2.0.1" + svelte "^1.11.2" rollup-plugin-uglify@^1.0.1: version "1.0.1" @@ -2241,9 +2314,9 @@ rollup-watch@^3.2.2: dependencies: require-relative "0.8.7" -rollup@^0.41.5: - version "0.41.5" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.5.tgz#cdfaade5cd1c2c7314351566a50ef74df6e66e3d" +rollup@^0.41.6: + version "0.41.6" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.6.tgz#e0d05497877a398c104d816d2733a718a7a94e2a" dependencies: source-map-support "^0.4.0" @@ -2374,12 +2447,12 @@ socket.io-parser@2.3.1: json3 "3.3.2" source-map-support@^0.4.0: - version "0.4.11" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322" + version "0.4.14" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.14.tgz#9d4463772598b86271b4f523f6c1f4e02a7d6aef" dependencies: - source-map "^0.5.3" + source-map "^0.5.6" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: +source-map@0.5.x, source-map@^0.5.6, source-map@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" @@ -2449,14 +2522,14 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" -stripe@4.15.0: - version "4.15.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-4.15.0.tgz#b97beb4a2c33f7347b9563e2a197203e6e23db63" +stripe@4.16.1: + version "4.16.1" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-4.16.1.tgz#4f8cf9a60a0cc2d14c583fbd2bdb5a27edbdb9bd" dependencies: bluebird "^2.10.2" lodash.isplainobject "^4.0.6" object-assign "^4.1.0" - qs "^2.4.2" + qs "~6.0.4" sum-up@^1.0.1: version "1.0.3" @@ -2474,11 +2547,9 @@ supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -svelte@^1.11.2, svelte@^1.6.0: - version "1.11.2" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-1.11.2.tgz#6920d20ec528dc018dd136820faeeee4865af41d" - dependencies: - magic-string "^0.19.0" +svelte@^1.11.2, svelte@^1.13.3: + version "1.13.3" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-1.13.3.tgz#31ec9f494d795e5035defb2e2625752705763172" sync-exec@~0.6.x: version "0.6.2" @@ -2572,23 +2643,24 @@ type-check@~0.3.2: prelude-ls "~1.1.2" type-is@~1.6.14: - version "1.6.14" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.14.tgz#e219639c17ded1ca0789092dd54a03826b817cb2" + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" dependencies: media-typer "0.3.0" - mime-types "~2.1.13" + mime-types "~2.1.15" typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" uglify-js@^2.6.1, uglify-js@^2.8.12: - version "2.8.12" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.12.tgz#8a50f5d482243650b7108f6080aa3a6afe2a6c55" + version "2.8.21" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.21.tgz#1733f669ae6f82fc90c7b25ec0f5c783ee375314" dependencies: source-map "~0.5.1" - uglify-to-browserify "~1.0.0" yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" uglify-to-browserify@~1.0.0: version "1.0.2" @@ -2599,8 +2671,8 @@ ultron@1.0.x: resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" unbzip2-stream@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.0.10.tgz#b21f7555f9bb1055891f35a61b8af8c377ff51bc" + version "1.0.11" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.0.11.tgz#204f55549cd1dd800fdd835b86676830e7492d8f" dependencies: buffer "^3.0.1" through "^2.3.6" @@ -2653,18 +2725,18 @@ utils-merge@1.0.0: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" vary@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.0.tgz#e1e5affbbd16ae768dd2674394b9ad3022653140" + version "1.1.1" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" vlq@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.1.tgz#14439d711891e682535467f8587c5630e4222a6c" which@^1.2.8, which@^1.2.9: - version "1.2.12" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: - isexe "^1.1.1" + isexe "^2.0.0" widest-line@^1.0.0: version "1.0.0" @@ -2726,8 +2798,8 @@ xtend@^4.0.0: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" yallist@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.1.tgz#6c11279640abd6ed0a86dd32ed56b03caa9df4f1" + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" yargs@~3.10.0: version "3.10.0" From 34c87683a3f5ab0d0df6b0265d17485c24c690ca Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sun, 2 Apr 2017 12:50:39 -0400 Subject: [PATCH 10/12] remove unused magic-string from repo --- public/magic-string.umd.js | 1322 ------------------------------------ 1 file changed, 1322 deletions(-) delete mode 100644 public/magic-string.umd.js diff --git a/public/magic-string.umd.js b/public/magic-string.umd.js deleted file mode 100644 index 42f542ae5..000000000 --- a/public/magic-string.umd.js +++ /dev/null @@ -1,1322 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.MagicString = factory()); -}(this, (function () { 'use strict'; - -function Chunk ( start, end, content ) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - // we make these non-enumerable, for sanity while debugging - Object.defineProperties( this, { - previous: { writable: true, value: null }, - next: { writable: true, value: null } - }); -} - -Chunk.prototype = { - appendLeft: function appendLeft ( content ) { - this.outro += content; - }, - - appendRight: function appendRight ( content ) { - this.intro = this.intro + content; - }, - - clone: function clone () { - var chunk = new Chunk( this.start, this.end, this.original ); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; - }, - - contains: function contains ( index ) { - return this.start < index && index < this.end; - }, - - eachNext: function eachNext ( fn ) { - var chunk = this; - while ( chunk ) { - fn( chunk ); - chunk = chunk.next; - } - }, - - eachPrevious: function eachPrevious ( fn ) { - var chunk = this; - while ( chunk ) { - fn( chunk ); - chunk = chunk.previous; - } - }, - - edit: function edit ( content, storeName ) { - this.content = content; - this.intro = ''; - this.outro = ''; - this.storeName = storeName; - - this.edited = true; - - return this; - }, - - prependLeft: function prependLeft ( content ) { - this.outro = content + this.outro; - }, - - prependRight: function prependRight ( content ) { - this.intro = content + this.intro; - }, - - split: function split ( index ) { - var sliceIndex = index - this.start; - - var originalBefore = this.original.slice( 0, sliceIndex ); - var originalAfter = this.original.slice( sliceIndex ); - - this.original = originalBefore; - - var newChunk = new Chunk( index, this.end, originalAfter ); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if ( this.edited ) { - // TODO is this block necessary?... - newChunk.edit( '', false ); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if ( newChunk.next ) { newChunk.next.previous = newChunk; } - newChunk.previous = this; - this.next = newChunk; - - return newChunk; - }, - - toString: function toString () { - return this.intro + this.content + this.outro; - }, - - trimEnd: function trimEnd ( rx ) { - this.outro = this.outro.replace( rx, '' ); - if ( this.outro.length ) { return true; } - - var trimmed = this.content.replace( rx, '' ); - - if ( trimmed.length ) { - if ( trimmed !== this.content ) { - this.split( this.start + trimmed.length ).edit( '', false ); - } - - return true; - } else { - this.edit( '', false ); - - this.intro = this.intro.replace( rx, '' ); - if ( this.intro.length ) { return true; } - } - }, - - trimStart: function trimStart ( rx ) { - this.intro = this.intro.replace( rx, '' ); - if ( this.intro.length ) { return true; } - - var trimmed = this.content.replace( rx, '' ); - - if ( trimmed.length ) { - if ( trimmed !== this.content ) { - this.split( this.end - trimmed.length ); - this.edit( '', false ); - } - - return true; - } else { - this.edit( '', false ); - - this.outro = this.outro.replace( rx, '' ); - if ( this.outro.length ) { return true; } - } - } -}; - -var _btoa; - -if ( typeof window !== 'undefined' && typeof window.btoa === 'function' ) { - _btoa = window.btoa; -} else if ( typeof Buffer === 'function' ) { - _btoa = function (str) { return new Buffer( str ).toString( 'base64' ); }; -} else { - _btoa = function () { - throw new Error( 'Unsupported environment: `window.btoa` or `Buffer` should be supported.' ); - }; -} - -var btoa = _btoa; - -function SourceMap ( properties ) { - this.version = 3; - - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = properties.mappings; -} - -SourceMap.prototype = { - toString: function toString () { - return JSON.stringify( this ); - }, - - toUrl: function toUrl () { - return 'data:application/json;charset=utf-8;base64,' + btoa( this.toString() ); - } -}; - -function guessIndent ( code ) { - var lines = code.split( '\n' ); - - var tabbed = lines.filter( function (line) { return /^\t+/.test( line ); } ); - var spaced = lines.filter( function (line) { return /^ {2,}/.test( line ); } ); - - if ( tabbed.length === 0 && spaced.length === 0 ) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if ( tabbed.length >= spaced.length ) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - var min = spaced.reduce( function ( previous, current ) { - var numSpaces = /^ +/.exec( current )[0].length; - return Math.min( numSpaces, previous ); - }, Infinity ); - - return new Array( min + 1 ).join( ' ' ); -} - -function getRelativePath ( from, to ) { - var fromParts = from.split( /[\/\\]/ ); - var toParts = to.split( /[\/\\]/ ); - - fromParts.pop(); // get dirname - - while ( fromParts[0] === toParts[0] ) { - fromParts.shift(); - toParts.shift(); - } - - if ( fromParts.length ) { - var i = fromParts.length; - while ( i-- ) { fromParts[i] = '..'; } - } - - return fromParts.concat( toParts ).join( '/' ); -} - -var toString$1 = Object.prototype.toString; - -function isObject ( thing ) { - return toString$1.call( thing ) === '[object Object]'; -} - -function getLocator ( source ) { - var originalLines = source.split( '\n' ); - - var start = 0; - var lineRanges = originalLines.map( function ( line, i ) { - var end = start + line.length + 1; - var range = { start: start, end: end, line: i }; - - start = end; - return range; - }); - - var i = 0; - - function rangeContains ( range, index ) { - return range.start <= index && index < range.end; - } - - function getLocation ( range, index ) { - return { line: range.line, column: index - range.start }; - } - - return function locate ( index ) { - var range = lineRanges[i]; - - var d = index >= range.end ? 1 : -1; - - while ( range ) { - if ( rangeContains( range, index ) ) { return getLocation( range, index ); } - - i += d; - range = lineRanges[i]; - } - }; -} - -var charToInteger = {}; -var integerToChar = {}; - -'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split( '' ).forEach( function ( char, i ) { - charToInteger[ char ] = i; - integerToChar[ i ] = char; -}); - - - -function encode ( value ) { - var result, i; - - if ( typeof value === 'number' ) { - result = encodeInteger( value ); - } else { - result = ''; - for ( i = 0; i < value.length; i += 1 ) { - result += encodeInteger( value[i] ); - } - } - - return result; -} - -function encodeInteger ( num ) { - var result = '', clamped; - - if ( num < 0 ) { - num = ( -num << 1 ) | 1; - } else { - num <<= 1; - } - - do { - clamped = num & 31; - num >>= 5; - - if ( num > 0 ) { - clamped |= 32; - } - - result += integerToChar[ clamped ]; - } while ( num > 0 ); - - return result; -} - -function Mappings ( hires ) { - var this$1 = this; - - var offsets = { - generatedCodeColumn: 0, - sourceIndex: 0, - sourceCodeLine: 0, - sourceCodeColumn: 0, - sourceCodeName: 0 - }; - - var generatedCodeLine = 0; - var generatedCodeColumn = 0; - - this.raw = []; - var rawSegments = this.raw[ generatedCodeLine ] = []; - - var pending = null; - - this.addEdit = function ( sourceIndex, content, original, loc, nameIndex ) { - if ( content.length ) { - rawSegments.push([ - generatedCodeColumn, - sourceIndex, - loc.line, - loc.column, - nameIndex ]); - } else if ( pending ) { - rawSegments.push( pending ); - } - - this$1.advance( content ); - pending = null; - }; - - this.addUneditedChunk = function ( sourceIndex, chunk, original, loc, sourcemapLocations ) { - var originalCharIndex = chunk.start; - var first = true; - - while ( originalCharIndex < chunk.end ) { - if ( hires || first || sourcemapLocations[ originalCharIndex ] ) { - rawSegments.push([ - generatedCodeColumn, - sourceIndex, - loc.line, - loc.column, - -1 - ]); - } - - if ( original[ originalCharIndex ] === '\n' ) { - loc.line += 1; - loc.column = 0; - generatedCodeLine += 1; - this$1.raw[ generatedCodeLine ] = rawSegments = []; - generatedCodeColumn = 0; - } else { - loc.column += 1; - generatedCodeColumn += 1; - } - - originalCharIndex += 1; - first = false; - } - - pending = [ - generatedCodeColumn, - sourceIndex, - loc.line, - loc.column, - -1 ]; - }; - - this.advance = function (str) { - if ( !str ) { return; } - - var lines = str.split( '\n' ); - var lastLine = lines.pop(); - - if ( lines.length ) { - generatedCodeLine += lines.length; - this$1.raw[ generatedCodeLine ] = rawSegments = []; - generatedCodeColumn = lastLine.length; - } else { - generatedCodeColumn += lastLine.length; - } - }; - - this.encode = function () { - return this$1.raw.map( function (segments) { - var generatedCodeColumn = 0; - - return segments.map( function (segment) { - var arr = [ - segment[0] - generatedCodeColumn, - segment[1] - offsets.sourceIndex, - segment[2] - offsets.sourceCodeLine, - segment[3] - offsets.sourceCodeColumn - ]; - - generatedCodeColumn = segment[0]; - offsets.sourceIndex = segment[1]; - offsets.sourceCodeLine = segment[2]; - offsets.sourceCodeColumn = segment[3]; - - if ( ~segment[4] ) { - arr.push( segment[4] - offsets.sourceCodeName ); - offsets.sourceCodeName = segment[4]; - } - - return encode( arr ); - }).join( ',' ); - }).join( ';' ); - }; -} - -var Stats = function Stats () { - Object.defineProperties( this, { - startTimes: { value: {} } - }); -}; - -Stats.prototype.time = function time ( label ) { - this.startTimes[ label ] = process.hrtime(); -}; - -Stats.prototype.timeEnd = function timeEnd ( label ) { - var elapsed = process.hrtime( this.startTimes[ label ] ); - - if ( !this[ label ] ) { this[ label ] = 0; } - this[ label ] += elapsed[0] * 1e3 + elapsed[1] * 1e-6; -}; - -var warned = { - insertLeft: false, - insertRight: false -}; - -function MagicString$1 ( string, options ) { - if ( options === void 0 ) options = {}; - - var chunk = new Chunk( 0, string.length, string ); - - Object.defineProperties( this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: {} }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: guessIndent( string ) } - }); - - this.byStart[ 0 ] = chunk; - this.byEnd[ string.length ] = chunk; -} - -MagicString$1.prototype = { - addSourcemapLocation: function addSourcemapLocation ( char ) { - this.sourcemapLocations[ char ] = true; - }, - - append: function append ( content ) { - if ( typeof content !== 'string' ) { throw new TypeError( 'outro content must be a string' ); } - - this.outro += content; - return this; - }, - - appendLeft: function appendLeft ( index, content ) { - if ( typeof content !== 'string' ) { throw new TypeError( 'inserted content must be a string' ); } - - this._split( index ); - - var chunk = this.byEnd[ index ]; - - if ( chunk ) { - chunk.appendLeft( content ); - } else { - this.intro += content; - } - - return this; - }, - - appendRight: function appendRight ( index, content ) { - if ( typeof content !== 'string' ) { throw new TypeError( 'inserted content must be a string' ); } - - this._split( index ); - - var chunk = this.byStart[ index ]; - - if ( chunk ) { - chunk.appendRight( content ); - } else { - this.outro += content; - } - - return this; - }, - - clone: function clone () { - var cloned = new MagicString$1( this.original, { filename: this.filename }); - - var originalChunk = this.firstChunk; - var clonedChunk = cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone(); - - while ( originalChunk ) { - cloned.byStart[ clonedChunk.start ] = clonedChunk; - cloned.byEnd[ clonedChunk.end ] = clonedChunk; - - var nextOriginalChunk = originalChunk.next; - var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if ( nextClonedChunk ) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if ( this.indentExclusionRanges ) { - cloned.indentExclusionRanges = typeof this.indentExclusionRanges[0] === 'number' ? - [ this.indentExclusionRanges[0], this.indentExclusionRanges[1] ] : - this.indentExclusionRanges.map( function (range) { return [ range.start, range.end ]; } ); - } - - Object.keys( this.sourcemapLocations ).forEach( function (loc) { - cloned.sourcemapLocations[ loc ] = true; - }); - - return cloned; - }, - - generateMap: function generateMap ( options ) { - var this$1 = this; - - options = options || {}; - - var sourceIndex = 0; - var names = Object.keys( this.storedNames ); - var mappings = new Mappings( options.hires ); - - var locate = getLocator( this.original ); - - if ( this.intro ) { - mappings.advance( this.intro ); - } - - this.firstChunk.eachNext( function (chunk) { - var loc = locate( chunk.start ); - - if ( chunk.intro.length ) { mappings.advance( chunk.intro ); } - - if ( chunk.edited ) { - mappings.addEdit( sourceIndex, chunk.content, chunk.original, loc, chunk.storeName ? names.indexOf( chunk.original ) : -1 ); - } else { - mappings.addUneditedChunk( sourceIndex, chunk, this$1.original, loc, this$1.sourcemapLocations ); - } - - if ( chunk.outro.length ) { mappings.advance( chunk.outro ); } - }); - - var map = new SourceMap({ - file: ( options.file ? options.file.split( /[\/\\]/ ).pop() : null ), - sources: [ options.source ? getRelativePath( options.file || '', options.source ) : null ], - sourcesContent: options.includeContent ? [ this.original ] : [ null ], - names: names, - mappings: mappings.encode() - }); - return map; - }, - - getIndentString: function getIndentString () { - return this.indentStr === null ? '\t' : this.indentStr; - }, - - indent: function indent ( indentStr, options ) { - var this$1 = this; - - var pattern = /^[^\r\n]/gm; - - if ( isObject( indentStr ) ) { - options = indentStr; - indentStr = undefined; - } - - indentStr = indentStr !== undefined ? indentStr : ( this.indentStr || '\t' ); - - if ( indentStr === '' ) { return this; } // noop - - options = options || {}; - - // Process exclusion ranges - var isExcluded = {}; - - if ( options.exclude ) { - var exclusions = typeof options.exclude[0] === 'number' ? [ options.exclude ] : options.exclude; - exclusions.forEach( function (exclusion) { - for ( var i = exclusion[0]; i < exclusion[1]; i += 1 ) { - isExcluded[i] = true; - } - }); - } - - var shouldIndentNextCharacter = options.indentStart !== false; - var replacer = function (match) { - if ( shouldIndentNextCharacter ) { return ("" + indentStr + match); } - shouldIndentNextCharacter = true; - return match; - }; - - this.intro = this.intro.replace( pattern, replacer ); - - var charIndex = 0; - - var chunk = this.firstChunk; - - while ( chunk ) { - var end = chunk.end; - - if ( chunk.edited ) { - if ( !isExcluded[ charIndex ] ) { - chunk.content = chunk.content.replace( pattern, replacer ); - - if ( chunk.content.length ) { - shouldIndentNextCharacter = chunk.content[ chunk.content.length - 1 ] === '\n'; - } - } - } else { - charIndex = chunk.start; - - while ( charIndex < end ) { - if ( !isExcluded[ charIndex ] ) { - var char = this$1.original[ charIndex ]; - - if ( char === '\n' ) { - shouldIndentNextCharacter = true; - } else if ( char !== '\r' && shouldIndentNextCharacter ) { - shouldIndentNextCharacter = false; - - if ( charIndex === chunk.start ) { - chunk.prependRight( indentStr ); - } else { - var rhs = chunk.split( charIndex ); - rhs.prependRight( indentStr ); - - this$1.byStart[ charIndex ] = rhs; - this$1.byEnd[ charIndex ] = chunk; - - chunk = rhs; - } - } - } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace( pattern, replacer ); - - return this; - }, - - insert: function insert () { - throw new Error( 'magicString.insert(...) is deprecated. Use insertRight(...) or insertLeft(...)' ); - }, - - insertLeft: function insertLeft ( index, content ) { - if ( !warned.insertLeft ) { - console.warn( 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead' ); // eslint-disable-line no-console - warned.insertLeft = true; - } - - return this.appendLeft( index, content ); - }, - - insertRight: function insertRight ( index, content ) { - if ( !warned.insertRight ) { - console.warn( 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead' ); // eslint-disable-line no-console - warned.insertRight = true; - } - - return this.prependRight( index, content ); - }, - - move: function move ( start, end, index ) { - if ( index >= start && index <= end ) { throw new Error( 'Cannot move a selection inside itself' ); } - - this._split( start ); - this._split( end ); - this._split( index ); - - var first = this.byStart[ start ]; - var last = this.byEnd[ end ]; - - var oldLeft = first.previous; - var oldRight = last.next; - - var newRight = this.byStart[ index ]; - if ( !newRight && last === this.lastChunk ) { return this; } - var newLeft = newRight ? newRight.previous : this.lastChunk; - - if ( oldLeft ) { oldLeft.next = oldRight; } - if ( oldRight ) { oldRight.previous = oldLeft; } - - if ( newLeft ) { newLeft.next = first; } - if ( newRight ) { newRight.previous = last; } - - if ( !first.previous ) { this.firstChunk = last.next; } - if ( !last.next ) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight; - - if ( !newLeft ) { this.firstChunk = first; } - if ( !newRight ) { this.lastChunk = last; } - - return this; - }, - - overwrite: function overwrite ( start, end, content, storeName ) { - var this$1 = this; - - if ( typeof content !== 'string' ) { throw new TypeError( 'replacement content must be a string' ); } - - while ( start < 0 ) { start += this$1.original.length; } - while ( end < 0 ) { end += this$1.original.length; } - - if ( end > this.original.length ) { throw new Error( 'end is out of bounds' ); } - if ( start === end ) { throw new Error( 'Cannot overwrite a zero-length range – use insertLeft or insertRight instead' ); } - - this._split( start ); - this._split( end ); - - if ( storeName ) { - var original = this.original.slice( start, end ); - this.storedNames[ original ] = true; - } - - var first = this.byStart[ start ]; - var last = this.byEnd[ end ]; - - if ( first ) { - first.edit( content, storeName ); - - if ( last ) { - first.next = last.next; - } else { - first.next = null; - this.lastChunk = first; - } - - first.original = this.original.slice( start, end ); - first.end = end; - } - - else { - // must be inserting at the end - var newChunk = new Chunk( start, end, '' ).edit( content, storeName ); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - - return this; - }, - - prepend: function prepend ( content ) { - if ( typeof content !== 'string' ) { throw new TypeError( 'outro content must be a string' ); } - - this.intro = content + this.intro; - return this; - }, - - prependLeft: function prependLeft ( index, content ) { - if ( typeof content !== 'string' ) { throw new TypeError( 'inserted content must be a string' ); } - - this._split( index ); - - var chunk = this.byEnd[ index ]; - - if ( chunk ) { - chunk.prependLeft( content ); - } else { - this.intro = content + this.intro; - } - - return this; - }, - - prependRight: function prependRight ( index, content ) { - if ( typeof content !== 'string' ) { throw new TypeError( 'inserted content must be a string' ); } - - this._split( index ); - - var chunk = this.byStart[ index ]; - - if ( chunk ) { - chunk.prependRight( content ); - } else { - this.outro = content + this.outro; - } - - return this; - }, - - remove: function remove ( start, end ) { - var this$1 = this; - - while ( start < 0 ) { start += this$1.original.length; } - while ( end < 0 ) { end += this$1.original.length; } - - if ( start === end ) { return this; } - - if ( start < 0 || end > this.original.length ) { throw new Error( 'Character is out of bounds' ); } - if ( start > end ) { throw new Error( 'end must be greater than start' ); } - - return this.overwrite( start, end, '', false ); - }, - - slice: function slice ( start, end ) { - var this$1 = this; - if ( start === void 0 ) start = 0; - if ( end === void 0 ) end = this.original.length; - - while ( start < 0 ) { start += this$1.original.length; } - while ( end < 0 ) { end += this$1.original.length; } - - var result = ''; - - // find start chunk - var chunk = this.firstChunk; - while ( chunk && ( chunk.start > start || chunk.end <= start ) ) { - - // found end chunk before start - if ( chunk.start < end && chunk.end >= end ) { - return result; - } - - chunk = chunk.next; - } - - if ( chunk && chunk.edited && chunk.start !== start ) { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); } - - var startChunk = chunk; - while ( chunk ) { - if ( chunk.intro && ( startChunk !== chunk || chunk.start === start ) ) { - result += chunk.intro; - } - - var containsEnd = chunk.start < end && chunk.end >= end; - if ( containsEnd && chunk.edited && chunk.end !== end ) { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); } - - var sliceStart = startChunk === chunk ? start - chunk.start : 0; - var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice( sliceStart, sliceEnd ); - - if ( chunk.outro && ( !containsEnd || chunk.end === end ) ) { - result += chunk.outro; - } - - if ( containsEnd ) { - break; - } - - chunk = chunk.next; - } - - return result; - }, - - // TODO deprecate this? not really very useful - snip: function snip ( start, end ) { - var clone = this.clone(); - clone.remove( 0, start ); - clone.remove( end, clone.original.length ); - - return clone; - }, - - _split: function _split ( index ) { - var this$1 = this; - - if ( this.byStart[ index ] || this.byEnd[ index ] ) { return; } - - var chunk = this.lastSearchedChunk; - var searchForward = index > chunk.end; - - while ( true ) { - if ( chunk.contains( index ) ) { return this$1._splitChunk( chunk, index ); } - - chunk = searchForward ? - this$1.byStart[ chunk.end ] : - this$1.byEnd[ chunk.start ]; - } - }, - - _splitChunk: function _splitChunk ( chunk, index ) { - if ( chunk.edited && chunk.content.length ) { // zero-length edited chunks are a special case (overlapping replacements) - var loc = getLocator( this.original )( index ); - throw new Error( ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")") ); - } - - var newChunk = chunk.split( index ); - - this.byEnd[ index ] = chunk; - this.byStart[ index ] = newChunk; - this.byEnd[ newChunk.end ] = newChunk; - - if ( chunk === this.lastChunk ) { this.lastChunk = newChunk; } - - this.lastSearchedChunk = chunk; - return true; - }, - - toString: function toString () { - var str = this.intro; - - var chunk = this.firstChunk; - while ( chunk ) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; - }, - - trimLines: function trimLines () { - return this.trim('[\\r\\n]'); - }, - - trim: function trim ( charType ) { - return this.trimStart( charType ).trimEnd( charType ); - }, - - trimEnd: function trimEnd ( charType ) { - var this$1 = this; - - var rx = new RegExp( ( charType || '\\s' ) + '+$' ); - - this.outro = this.outro.replace( rx, '' ); - if ( this.outro.length ) { return this; } - - var chunk = this.lastChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimEnd( rx ); - - // if chunk was trimmed, we have a new lastChunk - if ( chunk.end !== end ) { - this$1.lastChunk = chunk.next; - - this$1.byEnd[ chunk.end ] = chunk; - this$1.byStart[ chunk.next.start ] = chunk.next; - } - - if ( aborted ) { return this$1; } - chunk = chunk.previous; - } while ( chunk ); - - return this; - }, - - trimStart: function trimStart ( charType ) { - var this$1 = this; - - var rx = new RegExp( '^' + ( charType || '\\s' ) + '+' ); - - this.intro = this.intro.replace( rx, '' ); - if ( this.intro.length ) { return this; } - - var chunk = this.firstChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimStart( rx ); - - if ( chunk.end !== end ) { - // special case... - if ( chunk === this$1.lastChunk ) { this$1.lastChunk = chunk.next; } - - this$1.byEnd[ chunk.end ] = chunk; - this$1.byStart[ chunk.next.start ] = chunk.next; - } - - if ( aborted ) { return this$1; } - chunk = chunk.next; - } while ( chunk ); - - return this; - } -}; - -var hasOwnProp = Object.prototype.hasOwnProperty; - -function Bundle ( options ) { - if ( options === void 0 ) options = {}; - - this.intro = options.intro || ''; - this.separator = options.separator !== undefined ? options.separator : '\n'; - - this.sources = []; - - this.uniqueSources = []; - this.uniqueSourceIndexByFilename = {}; -} - -Bundle.prototype = { - addSource: function addSource ( source ) { - if ( source instanceof MagicString$1 ) { - return this.addSource({ - content: source, - filename: source.filename, - separator: this.separator - }); - } - - if ( !isObject( source ) || !source.content ) { - throw new Error( 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' ); - } - - [ 'filename', 'indentExclusionRanges', 'separator' ].forEach( function (option) { - if ( !hasOwnProp.call( source, option ) ) { source[ option ] = source.content[ option ]; } - }); - - if ( source.separator === undefined ) { // TODO there's a bunch of this sort of thing, needs cleaning up - source.separator = this.separator; - } - - if ( source.filename ) { - if ( !hasOwnProp.call( this.uniqueSourceIndexByFilename, source.filename ) ) { - this.uniqueSourceIndexByFilename[ source.filename ] = this.uniqueSources.length; - this.uniqueSources.push({ filename: source.filename, content: source.content.original }); - } else { - var uniqueSource = this.uniqueSources[ this.uniqueSourceIndexByFilename[ source.filename ] ]; - if ( source.content.original !== uniqueSource.content ) { - throw new Error( ("Illegal source: same filename (" + (source.filename) + "), different contents") ); - } - } - } - - this.sources.push( source ); - return this; - }, - - append: function append ( str, options ) { - this.addSource({ - content: new MagicString$1( str ), - separator: ( options && options.separator ) || '' - }); - - return this; - }, - - clone: function clone () { - var bundle = new Bundle({ - intro: this.intro, - separator: this.separator - }); - - this.sources.forEach( function (source) { - bundle.addSource({ - filename: source.filename, - content: source.content.clone(), - separator: source.separator - }); - }); - - return bundle; - }, - - generateMap: function generateMap ( options ) { - var this$1 = this; - if ( options === void 0 ) options = {}; - - var names = []; - this.sources.forEach( function (source) { - Object.keys( source.content.storedNames ).forEach( function (name) { - if ( !~names.indexOf( name ) ) { names.push( name ); } - }); - }); - - var mappings = new Mappings( options.hires ); - - if ( this.intro ) { - mappings.advance( this.intro ); - } - - this.sources.forEach( function ( source, i ) { - if ( i > 0 ) { - mappings.advance( this$1.separator ); - } - - var sourceIndex = source.filename ? this$1.uniqueSourceIndexByFilename[ source.filename ] : -1; - var magicString = source.content; - var locate = getLocator( magicString.original ); - - if ( magicString.intro ) { - mappings.advance( magicString.intro ); - } - - magicString.firstChunk.eachNext( function (chunk) { - var loc = locate( chunk.start ); - - if ( chunk.intro.length ) { mappings.advance( chunk.intro ); } - - if ( source.filename ) { - if ( chunk.edited ) { - mappings.addEdit( sourceIndex, chunk.content, chunk.original, loc, chunk.storeName ? names.indexOf( chunk.original ) : -1 ); - } else { - mappings.addUneditedChunk( sourceIndex, chunk, magicString.original, loc, magicString.sourcemapLocations ); - } - } - - else { - mappings.advance( chunk.content ); - } - - if ( chunk.outro.length ) { mappings.advance( chunk.outro ); } - }); - - if ( magicString.outro ) { - mappings.advance( magicString.outro ); - } - }); - - return new SourceMap({ - file: ( options.file ? options.file.split( /[\/\\]/ ).pop() : null ), - sources: this.uniqueSources.map( function (source) { - return options.file ? getRelativePath( options.file, source.filename ) : source.filename; - }), - sourcesContent: this.uniqueSources.map( function (source) { - return options.includeContent ? source.content : null; - }), - names: names, - mappings: mappings.encode() - }); - }, - - getIndentString: function getIndentString () { - var indentStringCounts = {}; - - this.sources.forEach( function (source) { - var indentStr = source.content.indentStr; - - if ( indentStr === null ) { return; } - - if ( !indentStringCounts[ indentStr ] ) { indentStringCounts[ indentStr ] = 0; } - indentStringCounts[ indentStr ] += 1; - }); - - return ( Object.keys( indentStringCounts ).sort( function ( a, b ) { - return indentStringCounts[a] - indentStringCounts[b]; - })[0] ) || '\t'; - }, - - indent: function indent ( indentStr ) { - var this$1 = this; - - if ( !arguments.length ) { - indentStr = this.getIndentString(); - } - - if ( indentStr === '' ) { return this; } // noop - - var trailingNewline = !this.intro || this.intro.slice( -1 ) === '\n'; - - this.sources.forEach( function ( source, i ) { - var separator = source.separator !== undefined ? source.separator : this$1.separator; - var indentStart = trailingNewline || ( i > 0 && /\r?\n$/.test( separator ) ); - - source.content.indent( indentStr, { - exclude: source.indentExclusionRanges, - indentStart: indentStart//: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) - }); - - // TODO this is a very slow way to determine this - trailingNewline = source.content.toString().slice( 0, -1 ) === '\n'; - }); - - if ( this.intro ) { - this.intro = indentStr + this.intro.replace( /^[^\n]/gm, function ( match, index ) { - return index > 0 ? indentStr + match : match; - }); - } - - return this; - }, - - prepend: function prepend ( str ) { - this.intro = str + this.intro; - return this; - }, - - toString: function toString () { - var this$1 = this; - - var body = this.sources.map( function ( source, i ) { - var separator = source.separator !== undefined ? source.separator : this$1.separator; - var str = ( i > 0 ? separator : '' ) + source.content.toString(); - - return str; - }).join( '' ); - - return this.intro + body; - }, - - trimLines: function trimLines () { - return this.trim('[\\r\\n]'); - }, - - trim: function trim ( charType ) { - return this.trimStart( charType ).trimEnd( charType ); - }, - - trimStart: function trimStart ( charType ) { - var this$1 = this; - - var rx = new RegExp( '^' + ( charType || '\\s' ) + '+' ); - this.intro = this.intro.replace( rx, '' ); - - if ( !this.intro ) { - var source; - var i = 0; - - do { - source = this$1.sources[i]; - - if ( !source ) { - break; - } - - source.content.trimStart( charType ); - i += 1; - } while ( source.content.toString() === '' ); // TODO faster way to determine non-empty source? - } - - return this; - }, - - trimEnd: function trimEnd ( charType ) { - var this$1 = this; - - var rx = new RegExp( ( charType || '\\s' ) + '+$' ); - - var source; - var i = this.sources.length - 1; - - do { - source = this$1.sources[i]; - - if ( !source ) { - this$1.intro = this$1.intro.replace( rx, '' ); - break; - } - - source.content.trimEnd( charType ); - i -= 1; - } while ( source.content.toString() === '' ); // TODO faster way to determine non-empty source? - - return this; - } -}; - -MagicString$1.Bundle = Bundle; - -return MagicString$1; - -}))); -//# sourceMappingURL=magic-string.umd.js.map From 815dda1a50e7ecc406aa5c0d9aee079570b9d73e Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sun, 2 Apr 2017 13:26:06 -0400 Subject: [PATCH 11/12] update yarn.lock --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 01a1bd2eb..f8775b913 100644 --- a/yarn.lock +++ b/yarn.lock @@ -510,7 +510,7 @@ d@1: dependencies: es5-ext "^0.10.9" -debug@2.2.0, debug@^2.1.1, debug@^2.2.0, debug@~2.2.0: +debug@2.2.0, debug@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: @@ -522,13 +522,13 @@ debug@2.3.3: dependencies: ms "0.7.2" -debug@2.6.1: +debug@2.6.1, debug@^2.2.0: version "2.6.1" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" dependencies: ms "0.7.2" -debug@2.6.3: +debug@2.6.3, debug@^2.1.1: version "2.6.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" dependencies: From e8fc32dbf0bcc49fd0d9e60d27fe6d0a78d739fa Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sun, 2 Apr 2017 14:01:41 -0400 Subject: [PATCH 12/12] tweak service worker build config --- rollup/rollup.config.sw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup/rollup.config.sw.js b/rollup/rollup.config.sw.js index 9b7267ae1..d59fd71e6 100644 --- a/rollup/rollup.config.sw.js +++ b/rollup/rollup.config.sw.js @@ -39,7 +39,7 @@ export default { format: 'iife', plugins: [ replace({ - __CACHEVERSION__: dev ? 'dev' : Date.now(), + __CACHEVERSION__: Date.now(), __MANIFEST__: JSON.stringify( manifest ) }), buble(),