From a2ff93cb721b786f34e467b9bddfbf6eebcfde43 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 16 Dec 2018 19:49:42 -0500 Subject: [PATCH 1/8] glitch-free reactive stores --- store.js | 46 +++++++++++++++++++++++++++++---------------- test/store/index.js | 22 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/store.js b/store.js index ffef5c7ca8..d22afdedee 100644 --- a/store.js +++ b/store.js @@ -1,4 +1,4 @@ -import { run_all } from './internal.js'; +import { run_all, noop } from './internal.js'; export function readable(start, value) { const subscribers = []; @@ -7,20 +7,22 @@ export function readable(start, value) { function set(newValue) { if (newValue === value) return; value = newValue; - subscribers.forEach(fn => fn(value)); + subscribers.forEach(s => s[1]()); + subscribers.forEach(s => s[0](value)); } return { - subscribe(fn) { + subscribe(run, invalidate = noop) { if (subscribers.length === 0) { stop = start(set); } - subscribers.push(fn); - fn(value); + const subscriber = [run, invalidate]; + subscribers.push(subscriber); + run(value); return function() { - const index = subscribers.indexOf(fn); + const index = subscribers.indexOf(subscriber); if (index !== -1) subscribers.splice(index, 1); if (subscribers.length === 0) { @@ -38,19 +40,21 @@ export function writable(value) { function set(newValue) { if (newValue === value) return; value = newValue; - subscribers.forEach(fn => fn(value)); + subscribers.forEach(s => s[1]()); + subscribers.forEach(s => s[0](value)); } function update(fn) { set(fn(value)); } - function subscribe(fn) { - subscribers.push(fn); - fn(value); + function subscribe(run, invalidate = noop) { + const subscriber = [run, invalidate]; + subscribers.push(subscriber); + run(value); return () => { - const index = subscribers.indexOf(fn); + const index = subscribers.indexOf(subscriber); if (index !== -1) subscribers.splice(index, 1); }; } @@ -63,20 +67,30 @@ export function derive(stores, fn) { if (single) stores = [stores]; const auto = fn.length === 1; + let value = {}; return readable(set => { let inited = false; const values = []; + let pending = 0; + const sync = () => { + if (pending) return; const result = fn(single ? values[0] : values, set); - if (auto) set(result); + if (auto && (value !== (value = result))) set(result); } - const unsubscribers = stores.map((store, i) => store.subscribe(value => { - values[i] = value; - if (inited) sync(); - })); + const unsubscribers = stores.map((store, i) => store.subscribe( + value => { + values[i] = value; + pending &= ~(1 << i); + if (inited) sync(); + }, + () => { + pending |= (1 << i); + }) + ); inited = true; sync(); diff --git a/test/store/index.js b/test/store/index.js index 355cea4442..fb518cf24d 100644 --- a/test/store/index.js +++ b/test/store/index.js @@ -128,5 +128,27 @@ describe('store', () => { number.set(7); assert.deepEqual(values, [0, 2, 4]); }); + + it('prevents glitches', () => { + const lastname = writable('Jekyll'); + const firstname = derive(lastname, n => n === 'Jekyll' ? 'Henry' : 'Edward'); + + const fullname = derive([firstname, lastname], names => names.join(' ')); + + const values = []; + + const unsubscribe = fullname.subscribe(value => { + values.push(value); + }); + + lastname.set('Hyde'); + + assert.deepEqual(values, [ + 'Henry Jekyll', + 'Edward Hyde' + ]); + + unsubscribe(); + }); }); }); From 82c247ea3e3ef06fad5c62eebf469d5d1e65433a Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 22 Dec 2018 00:42:44 -0500 Subject: [PATCH 2/8] expose ESM and CJS versions of runtime code (#1886) --- .gitignore | 9 ++++----- index.js => index.mjs | 2 +- package.json | 7 ++++--- rollup.config.js | 40 ++++++++++++++++++++++++++++++++-------- store.js => store.mjs | 2 +- 5 files changed, 42 insertions(+), 18 deletions(-) rename index.js => index.mjs (77%) rename store.js => store.mjs (97%) diff --git a/.gitignore b/.gitignore index 930c8dc863..dbed468f15 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,10 @@ node_modules *.map /cli/ -/compiler/ -/ssr/ -/internal.js /compiler.js +/index.js +/internal.* +/store.js /scratch/ /coverage/ /coverage.lcov/ @@ -15,7 +15,6 @@ node_modules /test/sourcemaps/samples/*/output.js.map /test/sourcemaps/samples/*/output.css /test/sourcemaps/samples/*/output.css.map -/store.umd.js /yarn-error.log _actual*.* -_*/ \ No newline at end of file +_*/ diff --git a/index.js b/index.mjs similarity index 77% rename from index.js rename to index.mjs index 9fdeadb8fa..44031c35c8 100644 --- a/index.js +++ b/index.mjs @@ -4,4 +4,4 @@ export { beforeUpdate, afterUpdate, createEventDispatcher -} from './internal.js'; +} from './internal'; diff --git a/package.json b/package.json index 4844644834..f12c429aa9 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "svelte", "version": "3.0.0-alpha6", "description": "The magical disappearing UI framework", + "module": "index.mjs", "main": "index.js", "bin": { "svelte": "svelte" @@ -10,9 +11,9 @@ "cli", "compiler.js", "register.js", - "index.js", - "internal.js", - "store.js", + "index.*", + "internal.*", + "store.*", "svelte", "README.md" ], diff --git a/rollup.config.js b/rollup.config.js index 3229a2800f..1bb01c9282 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,14 +1,12 @@ -import path from 'path'; 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 typescript from 'rollup-plugin-typescript'; -import buble from 'rollup-plugin-buble'; import pkg from './package.json'; export default [ - /* compiler/svelte.js */ + /* compiler.js */ { input: 'src/index.ts', plugins: [ @@ -54,12 +52,38 @@ export default [ experimentalCodeSplitting: true }, - /* internal.js */ + /* index.js */ + { + input: 'index.mjs', + output: { + file: 'index.js', + format: 'cjs' + }, + external: name => name !== 'index.mjs' + }, + + /* internal.[m]js */ { input: 'src/internal/index.js', + output: [ + { + file: 'internal.mjs', + format: 'esm' + }, + { + file: 'internal.js', + format: 'cjs' + } + ] + }, + + /* store.js */ + { + input: 'store.mjs', output: { - file: 'internal.js', - format: 'es' - } - } + file: 'store.js', + format: 'cjs' + }, + external: name => name !== 'store.mjs' + }, ]; diff --git a/store.js b/store.mjs similarity index 97% rename from store.js rename to store.mjs index d22afdedee..ffdd90bf0e 100644 --- a/store.js +++ b/store.mjs @@ -1,4 +1,4 @@ -import { run_all, noop } from './internal.js'; +import { run_all, noop } from './internal'; export function readable(start, value) { const subscribers = []; From df57e508f8dd66fe18d394d18712f310f26a70be Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 22 Dec 2018 00:50:14 -0500 Subject: [PATCH 3/8] use extension-less import for svelte/internal --- src/compile/wrapModule.ts | 2 +- test/js/samples/action-custom-event-handler/expected.js | 2 +- test/js/samples/action/expected.js | 2 +- test/js/samples/bind-width-height/expected.js | 2 +- test/js/samples/collapses-text-around-comments/expected.js | 2 +- test/js/samples/component-static-array/expected.js | 2 +- test/js/samples/component-static-immutable/expected.js | 2 +- test/js/samples/component-static-immutable2/expected.js | 2 +- test/js/samples/component-static/expected.js | 2 +- test/js/samples/computed-collapsed-if/expected.js | 2 +- test/js/samples/css-media-query/expected.js | 2 +- test/js/samples/css-shadow-dom-keyframes/expected.js | 2 +- test/js/samples/debug-empty/expected.js | 2 +- test/js/samples/debug-foo-bar-baz-things/expected.js | 2 +- test/js/samples/debug-foo/expected.js | 2 +- test/js/samples/debug-ssr-foo/expected.js | 2 +- test/js/samples/deconflict-builtins/expected.js | 2 +- test/js/samples/deconflict-globals/expected.js | 2 +- test/js/samples/dev-warning-missing-data-computed/expected.js | 2 +- test/js/samples/do-use-dataset/expected.js | 2 +- test/js/samples/dont-use-dataset-in-legacy/expected.js | 2 +- test/js/samples/dont-use-dataset-in-svg/expected.js | 2 +- test/js/samples/dynamic-import/expected.js | 2 +- test/js/samples/each-block-changed-check/expected.js | 2 +- test/js/samples/each-block-keyed-animated/expected.js | 2 +- test/js/samples/each-block-keyed/expected.js | 2 +- test/js/samples/event-modifiers/expected.js | 2 +- test/js/samples/head-no-whitespace/expected.js | 2 +- test/js/samples/if-block-no-update/expected.js | 2 +- test/js/samples/if-block-simple/expected.js | 2 +- test/js/samples/inline-style-optimized-multiple/expected.js | 2 +- test/js/samples/inline-style-optimized-url/expected.js | 2 +- test/js/samples/inline-style-optimized/expected.js | 2 +- test/js/samples/inline-style-unoptimized/expected.js | 2 +- test/js/samples/input-files/expected.js | 2 +- test/js/samples/input-range/expected.js | 2 +- test/js/samples/input-without-blowback-guard/expected.js | 2 +- test/js/samples/instrumentation-script-if-no-block/expected.js | 2 +- test/js/samples/instrumentation-script-x-equals-x/expected.js | 2 +- .../js/samples/instrumentation-template-if-no-block/expected.js | 2 +- test/js/samples/instrumentation-template-x-equals-x/expected.js | 2 +- test/js/samples/legacy-input-type/expected.js | 2 +- test/js/samples/media-bindings/expected.js | 2 +- test/js/samples/non-imported-component/expected.js | 2 +- test/js/samples/select-dynamic-value/expected.js | 2 +- test/js/samples/setup-method/expected.js | 2 +- test/js/samples/ssr-no-oncreate-etc/expected.js | 2 +- test/js/samples/ssr-preserve-comments/expected.js | 2 +- test/js/samples/svg-title/expected.js | 2 +- test/js/samples/title/expected.js | 2 +- test/js/samples/use-elements-as-anchors/expected.js | 2 +- test/js/samples/window-binding-scroll/expected.js | 2 +- 52 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/compile/wrapModule.ts b/src/compile/wrapModule.ts index 003c4d6815..76dbe020bc 100644 --- a/src/compile/wrapModule.ts +++ b/src/compile/wrapModule.ts @@ -27,7 +27,7 @@ export default function wrapModule( module_exports: Export[], source: string ): string { - const internalPath = `${sveltePath}/internal.js`; + const internalPath = `${sveltePath}/internal`; if (format === 'esm') { return esm(code, name, options, banner, sveltePath, internalPath, helpers, imports, module_exports, source); diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index 3451ef6dc5..8b0241ed47 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var button, foo_action, current; diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index b3e8fe20d5..97f776295a 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var a, link_action, current; diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index 42c4d087b2..65c9bf9f14 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var div, div_resize_listener, current; diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index df67257c96..4d13bfe165 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function add_css() { var style = createElement("style"); diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index dc8ea83544..abbde3284c 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var current; diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index 357d7c20ea..71cb810a5d 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var current; diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index 357d7c20ea..71cb810a5d 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var current; diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index 4201f86c21..6f53c66d88 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var current; diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index 3e5ed4f081..14b0dfe978 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var current; diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 330aa036c7..4a9c0e2c4a 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; function add_css() { var style = createElement("style"); diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index a5b82a4fad..ccc35138fd 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteElement, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteElement, createElement, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var div, current; diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 9bc95aa300..1dd048bcf7 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; const file = undefined; diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js index 0875f766d7..e5db443057 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; const file = undefined; diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 15fbd99515..eecd79c38d 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; const file = undefined; diff --git a/test/js/samples/debug-ssr-foo/expected.js b/test/js/samples/debug-ssr-foo/expected.js index db9b35477b..afad023a3f 100644 --- a/test/js/samples/debug-ssr-foo/expected.js +++ b/test/js/samples/debug-ssr-foo/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { create_ssr_component, debug, each, escape } from "svelte/internal.js"; +import { create_ssr_component, debug, each, escape } from "svelte/internal"; const SvelteComponent = create_ssr_component(($$result, $$props, $$bindings, $$slots) => { let { things, foo } = $$props; diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 34488cc169..75fd699f2d 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, destroyEach, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index 768c03e023..28f0013dec 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; import { onMount } from "svelte"; function create_fragment(component, ctx) { diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index 76893018d1..82db1b23d2 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; const file = undefined; diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index b7e0e38dc4..45a433a52f 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var div0, text, div1, current; diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected.js b/test/js/samples/dont-use-dataset-in-legacy/expected.js index 38fa59d4e3..77ad33739e 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment(component, ctx) { var div0, text, div1, current; diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js index 7f53da9b1d..3caed4ad32 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment(component, ctx) { var svg, g0, g1, current; diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index 1d2b58c23f..80775a2fb1 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; import LazyLoad from "./LazyLoad.html"; function create_fragment(component, ctx) { diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index d4e528c469..e2a0900cc5 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 9b6bf69e6a..17dcc7bdd7 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fixPosition, flush, init, insert, run, safe_not_equal, setData, updateKeyedEach, wrapAnimation } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fixPosition, flush, init, insert, run, safe_not_equal, setData, updateKeyedEach, wrapAnimation } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index c6cc65ae44..86cd56d3c7 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, flush, init, insert, run, safe_not_equal, setData, updateKeyedEach } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, flush, init, insert, run, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; function get_each_context(ctx, list, i) { const child_ctx = Object.create(ctx); diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 7050f20f0f..edb933ce31 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; function create_fragment(component, ctx) { var div, button0, text1, button1, text3, button2, current, dispose; diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index 4b6d2a1b9f..a7c076ba95 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var meta0, meta1, current; diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index 554392af4b..6c0752b451 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; // (3:0) {:else} function create_else_block(component, ctx) { diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index da53b9b6ae..28ef59efd0 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; // (1:0) {#if foo} function create_if_block(component, ctx) { diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index 1add4c0b5d..3f4240ee4e 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment(component, ctx) { var div, current; diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index 74e4ce3433..3a14088491 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment(component, ctx) { var div, current; diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index 21d07e81fc..27774b1018 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment(component, ctx) { var div, current; diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 25e4f65189..8827c97897 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var div0, text, div1, div1_style_value, current; diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index 86fa171983..acfc8c3866 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment(component, ctx) { var input, input_updating = false, current, dispose; diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index e7719faaae..4f1d79991c 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; function create_fragment(component, ctx) { var input, current, dispose; diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 12d3fb41a4..8dc8db1088 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment(component, ctx) { var input, current, dispose; diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index 8ccf2cbbb5..e58b54f626 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function create_fragment(component, ctx) { var button, text1, p, text2, text3, current, dispose; diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index e34525d978..6b941101d6 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function create_fragment(component, ctx) { var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index 5c8742f123..bbf81ac336 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function create_fragment(component, ctx) { var button, text1, p, text2, text3, current, dispose; diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index 15a1994cf5..759cafbb51 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function create_fragment(component, ctx) { var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index 5dde731662..05c739d846 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal"; function create_fragment(component, ctx) { var input, current; diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index d934df9f41..f3c888ccb9 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; function create_fragment(component, ctx) { var audio, audio_is_paused = true, audio_updating = false, audio_animationframe, current, dispose; diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 195441148e..2c2fa6a80e 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; import Imported from "Imported.html"; function create_fragment(component, ctx) { diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index a143d8a6c3..0533703f1c 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var select, option0, option1, select_value_value, current; diff --git a/test/js/samples/setup-method/expected.js b/test/js/samples/setup-method/expected.js index f84db159ea..e5c2b1b541 100644 --- a/test/js/samples/setup-method/expected.js +++ b/test/js/samples/setup-method/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, init, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, init, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var current; diff --git a/test/js/samples/ssr-no-oncreate-etc/expected.js b/test/js/samples/ssr-no-oncreate-etc/expected.js index 73824daca8..45f86d3682 100644 --- a/test/js/samples/ssr-no-oncreate-etc/expected.js +++ b/test/js/samples/ssr-no-oncreate-etc/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { create_ssr_component } from "svelte/internal.js"; +import { create_ssr_component } from "svelte/internal"; import { onDestroy, onMount } from "svelte"; function preload(input) { diff --git a/test/js/samples/ssr-preserve-comments/expected.js b/test/js/samples/ssr-preserve-comments/expected.js index dc9f63de4d..e910b63df2 100644 --- a/test/js/samples/ssr-preserve-comments/expected.js +++ b/test/js/samples/ssr-preserve-comments/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { create_ssr_component } from "svelte/internal.js"; +import { create_ssr_component } from "svelte/internal"; const SvelteComponent = create_ssr_component(($$result, $$props, $$bindings, $$slots) => { return `
content
diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index a442194556..80b87f0fe7 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, init, insert, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var svg, title, text, current; diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index 993093d4c4..69f412640a 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; function create_fragment(component, ctx) { var title_value, current; diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index 2a1de7945f..8ef798cd67 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; // (2:1) {#if a} function create_if_block_4(component, ctx) { diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 3c3ea3d74a..fee92a8d45 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { SvelteComponent as SvelteComponent_1, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js"; +import { SvelteComponent as SvelteComponent_1, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; function create_fragment(component, ctx) { var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text0, text1, current; From 919c0c929c563f1a7287a967d9b185798171976c Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 22 Dec 2018 00:54:53 -0500 Subject: [PATCH 4/8] maybe fix custom-elements tests --- test/custom-elements/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index 1c4e64cf28..d497f1ff79 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -62,7 +62,7 @@ describe('custom-elements', function() { plugins: [ { resolveId(importee) { - if (importee === 'svelte/internal.js') { + if (importee === 'svelte/internal') { return internal; } From e671232baee16c2aa47d16fdbc577cf9c5165b7f Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 22 Dec 2018 06:55:59 -0500 Subject: [PATCH 5/8] maybe this? --- test/custom-elements/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index d497f1ff79..155688293e 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -15,7 +15,7 @@ const page = ` const assert = fs.readFileSync('test/custom-elements/assert.js', 'utf-8'); -describe('custom-elements', function() { +describe.skip('custom-elements', function() { this.timeout(10000); let svelte; @@ -51,8 +51,8 @@ describe('custom-elements', function() { const solo = /\.solo$/.test(dir); const skip = /\.skip$/.test(dir); - const internal = path.resolve('internal.js'); - const index = path.resolve('index.js'); + const internal = path.resolve('internal.mjs'); + const index = path.resolve('index.mjs'); (solo ? it.only : skip ? it.skip : it)(dir, () => { const config = loadConfig(`./custom-elements/samples/${dir}/_config.js`); @@ -118,4 +118,4 @@ describe('custom-elements', function() { }); }); -}); \ No newline at end of file +}); From cd36531e0b69c31bfe2082e3c70066c98fe587b2 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 22 Dec 2018 07:03:44 -0500 Subject: [PATCH 6/8] fix runtime tests --- test/runtime/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtime/index.js b/test/runtime/index.js index 58ef9d8734..a230e8f571 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -233,7 +233,7 @@ describe("runtime", () => { { resolveId: (importee, importer) => { if (importee.startsWith('svelte/')) { - return importee.replace('svelte', process.cwd()); + return importee.replace('svelte', process.cwd()) + '.mjs'; } } } From 5200e2bb0e422d24ee13699e201786f43d1b06af Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 22 Dec 2018 07:06:56 -0500 Subject: [PATCH 7/8] oops --- test/custom-elements/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/custom-elements/index.js b/test/custom-elements/index.js index 155688293e..ad9e6004dc 100644 --- a/test/custom-elements/index.js +++ b/test/custom-elements/index.js @@ -15,7 +15,7 @@ const page = ` const assert = fs.readFileSync('test/custom-elements/assert.js', 'utf-8'); -describe.skip('custom-elements', function() { +describe('custom-elements', function() { this.timeout(10000); let svelte; From 8d51632c5f62b85e55648e71f0f1bc5fa6771c8e Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 22 Dec 2018 07:17:42 -0500 Subject: [PATCH 8/8] remove unneeded buble devdep --- package-lock.json | 118 +--------------------------------------------- package.json | 1 - rollup.config.js | 2 - 3 files changed, 1 insertion(+), 120 deletions(-) diff --git a/package-lock.json b/package-lock.json index 071f56418a..bb8027e73b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-alpha3", + "version": "3.0.0-alpha6", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -570,28 +570,6 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "buble": { - "version": "0.19.6", - "resolved": "https://registry.npmjs.org/buble/-/buble-0.19.6.tgz", - "integrity": "sha512-9kViM6nJA1Q548Jrd06x0geh+BG2ru2+RMDkIHHgJY/8AcyCs34lTHwra9BX7YdPrZXd5aarkpr/SY8bmPgPdg==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "magic-string": "^0.25.1", - "minimist": "^1.2.0", - "os-homedir": "^1.0.1", - "regexpu-core": "^4.2.0", - "vlq": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -5815,12 +5793,6 @@ "wordwrap": "~1.0.0" } }, - "os-homedir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, "os-tmpdir": { "version": "1.0.2", "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -6496,21 +6468,6 @@ "strip-indent": "^1.0.1" } }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz", - "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==", - "dev": true, - "requires": { - "regenerate": "^1.4.0" - } - }, "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", @@ -6536,35 +6493,6 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, - "regexpu-core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", - "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^7.0.0", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.0.2" - } - }, - "regjsgen": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", - "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==", - "dev": true - }, - "regjsparser": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", - "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } - }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -6712,16 +6640,6 @@ "@types/node": "*" } }, - "rollup-plugin-buble": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-buble/-/rollup-plugin-buble-0.19.4.tgz", - "integrity": "sha512-mahvTRn9mUVKEUyA5QbrfdybOH7tipHRe4zkKZjEGMB3YSaLW95kHFSB4Vdt7BofyG9r7zMCCmAsEqZKkRaN6A==", - "dev": true, - "requires": { - "buble": "^0.19.4", - "rollup-pluginutils": "^2.3.3" - } - }, "rollup-plugin-commonjs": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.2.0.tgz", @@ -7696,34 +7614,6 @@ "integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==", "dev": true }, - "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", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz", - "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", - "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==", - "dev": true - }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -7865,12 +7755,6 @@ "extsprintf": "^1.2.0" } }, - "vlq": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.0.tgz", - "integrity": "sha512-o3WmXySo+oI5thgqr7Qy8uBkT/v9Zr+sRyrh1lr8aWPUkgDWdWt4Nae2WKBrLsocgE8BuWWD0jLc+VW8LeU+2g==", - "dev": true - }, "w3c-hr-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", diff --git a/package.json b/package.json index 4844644834..ce129160ba 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ "nyc": "^12.0.2", "prettier": "^1.12.1", "rollup": "^0.63.5", - "rollup-plugin-buble": "^0.19.2", "rollup-plugin-commonjs": "^9.1.0", "rollup-plugin-json": "^3.0.0", "rollup-plugin-node-resolve": "^3.3.0", diff --git a/rollup.config.js b/rollup.config.js index 3229a2800f..9bc4be70b7 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,10 +1,8 @@ -import path from 'path'; 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 typescript from 'rollup-plugin-typescript'; -import buble from 'rollup-plugin-buble'; import pkg from './package.json'; export default [