From a87376299952c8f9fc5c3d467c571acc0956bfb3 Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Mon, 26 Apr 2021 15:11:18 -0700 Subject: [PATCH] feat: add new HMR runtime --- packages/compiler/index.d.ts | 1 + packages/compiler/src/config.js | 7 +- .../components/registry/index-browser.js | 1 + packages/marko/src/runtime/html/Template.js | 22 ---- packages/marko/src/runtime/html/hot-reload.js | 28 +++++ packages/marko/src/runtime/html/index.js | 32 ++--- packages/marko/src/runtime/vdom/hot-reload.js | 117 ++++++++++++++++++ packages/marko/src/runtime/vdom/index.js | 41 +++--- .../expected.js | 2 +- .../compileFileForBrowser.js/expected.js | 2 +- .../compileForBrowser-callback.js/expected.js | 2 +- .../fixtures/compileForBrowser.js/expected.js | 2 +- .../load-writer-wrapping-stream/expected.html | 1 - .../template.marko | 1 - .../load-writer-wrapping-stream/test.js | 33 ----- .../expected.html | 1 - .../template.marko | 1 - .../test.js | 25 ---- packages/translator-default/src/index.js | 113 +++++++++-------- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../at-tags-dynamic/snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../at-tags/snapshots/cjs-expected.js | 6 +- .../at-tags/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../at-tags/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../attr-boolean/snapshots/cjs-expected.js | 6 +- .../attr-boolean/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../attr-boolean/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../attr-class/snapshots/cjs-expected.js | 6 +- .../attr-class/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../attr-class/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../attr-escape/snapshots/cjs-expected.js | 6 +- .../attr-escape/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../attr-escape/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../attr-falsey/snapshots/cjs-expected.js | 6 +- .../attr-falsey/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../attr-falsey/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../attr-scoped/snapshots/cjs-expected.js | 6 +- .../attr-scoped/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../attr-scoped/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../attr-style/snapshots/cjs-expected.js | 6 +- .../attr-style/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../attr-style/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../await-tag/snapshots/cjs-expected.js | 6 +- .../await-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../await-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../fixtures/cdata/snapshots/cjs-expected.js | 6 +- .../fixtures/cdata/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../fixtures/cdata/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 9 +- .../snapshots/vdomProduction-expected.js | 9 +- .../class-inline/snapshots/cjs-expected.js | 6 +- .../class-inline/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../class-inline/snapshots/vdom-expected.js | 9 +- .../snapshots/vdomProduction-expected.js | 9 +- .../comments/snapshots/cjs-expected.js | 6 +- .../comments/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../comments/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../custom-tag-data/snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../custom-tag/snapshots/cjs-expected.js | 6 +- .../custom-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../custom-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../data-migration/snapshots/cjs-expected.js | 6 +- .../data-migration/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../data-migration/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../declaration/snapshots/cjs-expected.js | 6 +- .../declaration/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../declaration/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../doctype/snapshots/cjs-expected.js | 6 +- .../doctype/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../doctype/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../entities/snapshots/cjs-expected.js | 6 +- .../entities/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../entities/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../event-handlers/snapshots/cjs-expected.js | 6 +- .../event-handlers/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../event-handlers/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../for-tag/snapshots/cjs-expected.js | 6 +- .../for-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../for-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../hello-dynamic/snapshots/cjs-expected.js | 6 +- .../hello-dynamic/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../hello-dynamic/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../html-comment/snapshots/cjs-expected.js | 6 +- .../html-comment/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../html-comment/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../html-entity/snapshots/cjs-expected.js | 6 +- .../html-entity/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../html-entity/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../fixtures/if-tag/snapshots/cjs-expected.js | 6 +- .../if-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../if-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../import-tag/snapshots/cjs-expected.js | 6 +- .../import-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../import-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../macro-non-root/snapshots/cjs-expected.js | 6 +- .../macro-non-root/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../macro-non-root/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../fixtures/macros/snapshots/cjs-expected.js | 6 +- .../macros/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../macros/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../placeholders/snapshots/cjs-expected.js | 6 +- .../placeholders/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../placeholders/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../root-migration/snapshots/cjs-expected.js | 6 +- .../root-migration/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../root-migration/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../root-transform/snapshots/cjs-expected.js | 6 +- .../root-transform/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../root-transform/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../sanity-check/snapshots/cjs-expected.js | 6 +- .../sanity-check/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../sanity-check/snapshots/vdom-expected.js | 9 +- .../snapshots/vdomProduction-expected.js | 9 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../shorthand-id/snapshots/cjs-expected.js | 6 +- .../shorthand-id/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../shorthand-id/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../fixtures/simple/snapshots/cjs-expected.js | 6 +- .../simple/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../simple/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../split-component/snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../static-tag/snapshots/cjs-expected.js | 6 +- .../static-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../static-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../svg-tag/snapshots/cjs-expected.js | 6 +- .../svg-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../svg-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../textarea-tag/snapshots/cjs-expected.js | 6 +- .../textarea-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../textarea-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../top-level-text/snapshots/cjs-expected.js | 6 +- .../top-level-text/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../top-level-text/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../while-tag/snapshots/cjs-expected.js | 6 +- .../while-tag/snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../while-tag/snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- .../snapshots/cjs-expected.js | 6 +- .../snapshots/html-expected.js | 6 +- .../snapshots/htmlProduction-expected.js | 6 +- .../snapshots/vdom-expected.js | 7 +- .../snapshots/vdomProduction-expected.js | 7 +- 394 files changed, 1535 insertions(+), 1309 deletions(-) delete mode 100644 packages/marko/src/runtime/html/Template.js create mode 100644 packages/marko/src/runtime/html/hot-reload.js create mode 100644 packages/marko/src/runtime/vdom/hot-reload.js delete mode 100644 packages/marko/test/api/fixtures/load-writer-wrapping-stream/expected.html delete mode 100644 packages/marko/test/api/fixtures/load-writer-wrapping-stream/template.marko delete mode 100644 packages/marko/test/api/fixtures/load-writer-wrapping-stream/test.js delete mode 100644 packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/expected.html delete mode 100644 packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/template.marko delete mode 100644 packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/test.js diff --git a/packages/compiler/index.d.ts b/packages/compiler/index.d.ts index b1e0d1df4a..52076c10b1 100644 --- a/packages/compiler/index.d.ts +++ b/packages/compiler/index.d.ts @@ -29,6 +29,7 @@ export type Config = { hydrateIncludeImports?: RegExp | ((request: string) => boolean); optimize?: boolean; cache?: Map; + hot?: boolean; babelConfig?: { ast?: boolean | null; code?: boolean | null; diff --git a/packages/compiler/src/config.js b/packages/compiler/src/config.js index 7c5b85ea1c..856cbeff5b 100644 --- a/packages/compiler/src/config.js +++ b/packages/compiler/src/config.js @@ -137,7 +137,12 @@ if (globalThis[MARKO_CONFIG_KEY]) { /** * A regexp or function that receives an import path that matches file types known to be client side assets. */ - hydrateIncludeImports: /\.(css|less|s[ac]ss|styl|png|jpe?g|gif|svg|ico|webp|avif|mp4|webm|ogg|mp3|wav|flac|aac|woff2?|eot|ttf|otf)$/ + hydrateIncludeImports: /\.(css|less|s[ac]ss|styl|png|jpe?g|gif|svg|ico|webp|avif|mp4|webm|ogg|mp3|wav|flac|aac|woff2?|eot|ttf|otf)$/, + + /** + * Set to true in order to bring in the hot module replacement runtime. + */ + hot: false }; if (process.env.MARKO_CONFIG) { diff --git a/packages/marko/src/runtime/components/registry/index-browser.js b/packages/marko/src/runtime/components/registry/index-browser.js index fb4389a834..9104883121 100644 --- a/packages/marko/src/runtime/components/registry/index-browser.js +++ b/packages/marko/src/runtime/components/registry/index-browser.js @@ -139,6 +139,7 @@ function createComponent(typeName, id) { } exports.r = register; +exports.___getComponentClass = getComponentClass; exports.___createComponent = createComponent; exports.___isRegistered = isRegistered; exports.___addPendingDef = addPendingDef; diff --git a/packages/marko/src/runtime/html/Template.js b/packages/marko/src/runtime/html/Template.js deleted file mode 100644 index 760552ed2b..0000000000 --- a/packages/marko/src/runtime/html/Template.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -var AsyncStream = require("./AsyncStream"); -var makeRenderable = require("../renderable"); -var createReadable = require("./create-readable"); - -function Template(path, renderFunc, options) { - this.path = path; - this._ = renderFunc; - this.___shouldBuffer = !options || options.shouldBuffer !== false; - this.meta = undefined; -} - -Template.prototype = { - createOut: function createOut(globalData, writer, parentOut, buffer) { - return new AsyncStream(globalData, writer, parentOut, buffer); - }, - stream: createReadable -}; - -makeRenderable(Template.prototype); - -module.exports = Template; diff --git a/packages/marko/src/runtime/html/hot-reload.js b/packages/marko/src/runtime/html/hot-reload.js new file mode 100644 index 0000000000..39ed4c7f3d --- /dev/null +++ b/packages/marko/src/runtime/html/hot-reload.js @@ -0,0 +1,28 @@ +var runtime = require("."); +var createTemplate = runtime.t; +var registered = {}; + +runtime.t = function (typeName) { + if (registered[typeName]) { + return registered[typeName]; + } + + var renderFn; + var template = (registered[typeName] = createTemplate(typeName)); + Object.defineProperty(template, "_", { + get: function () { + return renderFn && proxyRenderFn; + }, + set: function (v) { + renderFn = v; + } + }); + + return template; + + function proxyRenderFn() { + return renderFn.apply(this, arguments); + } +}; + +module.exports = runtime; diff --git a/packages/marko/src/runtime/html/index.js b/packages/marko/src/runtime/html/index.js index d8ec74956c..d45535e6b8 100644 --- a/packages/marko/src/runtime/html/index.js +++ b/packages/marko/src/runtime/html/index.js @@ -6,24 +6,26 @@ * it is used to create a new Template instance. * @private */ -exports.t = function createTemplate(path) { - return new Template(path); +exports.t = function createTemplate(typeName) { + return new Template(typeName); }; -var AsyncStream = require("./AsyncStream"); -var Template = require("./Template"); - -function createOut(globalData, parent, state, buffer) { - return new AsyncStream(globalData, parent, state, buffer); +function Template(typeName) { + this.___typeName = typeName; } -exports.createWriter = function (writer) { - return new AsyncStream(null, writer); -}; +Template.prototype.stream = require("./create-readable"); -exports.Template = Template; -exports.___createOut = createOut; -exports.AsyncStream = AsyncStream; -exports.enableAsyncStackTrace = AsyncStream.enableAsyncStackTrace; +var AsyncStream = require("./AsyncStream"); +require("../createOut").___setCreateOut( + (Template.prototype.createOut = function createOut( + globalData, + writer, + parentOut, + buffer + ) { + return new AsyncStream(globalData, writer, parentOut, buffer); + }) +); -require("../createOut").___setCreateOut(createOut); +require("../renderable")(Template.prototype); diff --git a/packages/marko/src/runtime/vdom/hot-reload.js b/packages/marko/src/runtime/vdom/hot-reload.js new file mode 100644 index 0000000000..ccf7b1597b --- /dev/null +++ b/packages/marko/src/runtime/vdom/hot-reload.js @@ -0,0 +1,117 @@ +var runtime = require("."); +var queueMicrotask = require("../queueMicrotask"); +var util = require("../components/util"); +var registry = require("../components/registry"); +var updateManager = require("../components/update-manager"); + +var createTemplate = runtime.t; +var createComponent = registry.___createComponent; +var registered = {}; +var queue; + +runtime.t = function (typeName) { + if (registered[typeName]) { + return registered[typeName]; + } + + var renderFn; + var template = (registered[typeName] = createTemplate(typeName)); + var instances = (template.___instances = []); + Object.defineProperty(template, "_", { + get: function () { + return renderFn && proxyRenderer; + }, + set: function (v) { + renderFn = v; + + if (instances.length) { + if (!queue) { + queue = []; + queueMicrotask(batchUpdate); + } + + queue.push(function () { + var newProto = registry.___getComponentClass(typeName).prototype; + instances.forEach(function (instance) { + if (hasLifecycleChanged(instance.__proto__, newProto)) { + var startNode = instance.___rootNode.startNode; + var endNode = instance.___rootNode.endNode; + var parentNode = startNode.parentNode; + var curNode; + + instance.___hmrDestroyed = true; + instance.___emitDestroy(); + instance.___removeDOMEventListeners(); + + if (instance.___subscriptions) { + instance.___subscriptions.removeAllListeners(); + instance.___subscriptions = null; + } + + while ((curNode = startNode.nextSibling) !== endNode) { + util.___destroyNodeRecursive(curNode); + parentNode.removeChild(curNode); + } + + instance.___hmrDestroyed = false; + instance.___mounted = false; + } + + instance.__proto__ = newProto; + instance + .___rerender(instance.___input, false) + .afterInsert(instance.___document); + }); + }); + } + } + }); + + return template; + + function proxyRenderer() { + return renderFn.apply(this, arguments); + } +}; + +registry.___createComponent = function (typeName, id) { + var instances = registered[typeName].___instances; + var instance = createComponent(typeName, id); + instances.push(instance); + instance.once("destroy", function () { + if (!instance.___hmrDestroyed) { + instances.splice(1, instances.indexOf(instance)); + } + }); + + return instance; +}; + +function hasLifecycleChanged(oldProto, newProto) { + return ( + hasMethodChanged("onCreate") || + hasMethodChanged("onInput") || + hasMethodChanged("onRender") || + hasMethodChanged("onMount") + ); + + function hasMethodChanged(method) { + return ( + (oldProto[method] && oldProto[method].toString()) !== + (newProto[method] && newProto[method].toString()) + ); + } +} + +function batchUpdate() { + updateManager.___batchUpdate(function () { + var pending = queue; + queue = undefined; + + for (var i = 0; i < pending.length; i++) { + pending[i](); + } + }); +} + +module.exports = runtime; diff --git a/packages/marko/src/runtime/vdom/index.js b/packages/marko/src/runtime/vdom/index.js index 8ccb7ffa99..bc07ce181c 100644 --- a/packages/marko/src/runtime/vdom/index.js +++ b/packages/marko/src/runtime/vdom/index.js @@ -1,37 +1,28 @@ "use strict"; -// helpers provide a core set of various utility methods -// that are available in every template -var AsyncVDOMBuilder = require("./AsyncVDOMBuilder"); -var makeRenderable = require("../renderable"); - /** * Method is for internal usage only. This method * is invoked by code in a compiled Marko template and * it is used to create a new Template instance. * @private */ -exports.t = function createTemplate(path) { - return new Template(path); +exports.t = function createTemplate(typeName) { + return new Template(typeName); }; -function Template(path, func) { - this.path = path; - this._ = func; - this.meta = undefined; -} - -function createOut(globalData, parent, parentOut) { - return new AsyncVDOMBuilder(globalData, parent, parentOut); +function Template(typeName) { + this.___typeName = typeName; } -var Template_prototype = (Template.prototype = { - createOut: createOut -}); - -makeRenderable(Template_prototype); - -exports.Template = Template; -exports.___createOut = createOut; - -require("../createOut").___setCreateOut(createOut); +var AsyncVDOMBuilder = require("./AsyncVDOMBuilder"); +require("../createOut").___setCreateOut( + (Template.prototype.createOut = function createOut( + globalData, + parent, + parentOut + ) { + return new AsyncVDOMBuilder(globalData, parent, parentOut); + }) +); + +require("../renderable")(Template.prototype); diff --git a/packages/marko/test/api-compiler/fixtures/compileFileForBrowser-callback.js/expected.js b/packages/marko/test/api-compiler/fixtures/compileFileForBrowser-callback.js/expected.js index a8bfc98cfb..b7f8c48849 100644 --- a/packages/marko/test/api-compiler/fixtures/compileFileForBrowser-callback.js/expected.js +++ b/packages/marko/test/api-compiler/fixtures/compileFileForBrowser-callback.js/expected.js @@ -1 +1 @@ -"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_template = (0, _vdom.t)();var _default = _marko_template;exports.default = _default;const _marko_componentType = (0, _registry.r)("packages/marko/test/api-compiler/fixtures/compileFileForBrowser-callback.js/template.marko", () => _marko_template),_marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file +"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_componentType = "packages/marko/test/api-compiler/fixtures/compileFileForBrowser-callback.js/template.marko",_marko_template = (0, _vdom.t)(_marko_componentType);var _default = _marko_template;exports.default = _default;(0, _registry.r)(_marko_componentType, () => _marko_template);const _marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file diff --git a/packages/marko/test/api-compiler/fixtures/compileFileForBrowser.js/expected.js b/packages/marko/test/api-compiler/fixtures/compileFileForBrowser.js/expected.js index 6e79ddcf1c..6955c83b91 100644 --- a/packages/marko/test/api-compiler/fixtures/compileFileForBrowser.js/expected.js +++ b/packages/marko/test/api-compiler/fixtures/compileFileForBrowser.js/expected.js @@ -1 +1 @@ -"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_template = (0, _vdom.t)();var _default = _marko_template;exports.default = _default;const _marko_componentType = (0, _registry.r)("packages/marko/test/api-compiler/fixtures/compileFileForBrowser.js/template.marko", () => _marko_template),_marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file +"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_componentType = "packages/marko/test/api-compiler/fixtures/compileFileForBrowser.js/template.marko",_marko_template = (0, _vdom.t)(_marko_componentType);var _default = _marko_template;exports.default = _default;(0, _registry.r)(_marko_componentType, () => _marko_template);const _marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file diff --git a/packages/marko/test/api-compiler/fixtures/compileForBrowser-callback.js/expected.js b/packages/marko/test/api-compiler/fixtures/compileForBrowser-callback.js/expected.js index 0bcfc39c36..142283626c 100644 --- a/packages/marko/test/api-compiler/fixtures/compileForBrowser-callback.js/expected.js +++ b/packages/marko/test/api-compiler/fixtures/compileForBrowser-callback.js/expected.js @@ -1 +1 @@ -"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_template = (0, _vdom.t)();var _default = _marko_template;exports.default = _default;const _marko_componentType = (0, _registry.r)("packages/marko/test/api-compiler/fixtures/compileForBrowser-callback.js/template.marko", () => _marko_template),_marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file +"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_componentType = "packages/marko/test/api-compiler/fixtures/compileForBrowser-callback.js/template.marko",_marko_template = (0, _vdom.t)(_marko_componentType);var _default = _marko_template;exports.default = _default;(0, _registry.r)(_marko_componentType, () => _marko_template);const _marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file diff --git a/packages/marko/test/api-compiler/fixtures/compileForBrowser.js/expected.js b/packages/marko/test/api-compiler/fixtures/compileForBrowser.js/expected.js index 40fa0f5da4..ad10b41eff 100644 --- a/packages/marko/test/api-compiler/fixtures/compileForBrowser.js/expected.js +++ b/packages/marko/test/api-compiler/fixtures/compileForBrowser.js/expected.js @@ -1 +1 @@ -"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_template = (0, _vdom.t)();var _default = _marko_template;exports.default = _default;const _marko_componentType = (0, _registry.r)("packages/marko/test/api-compiler/fixtures/compileForBrowser.js/template.marko", () => _marko_template),_marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file +"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _vdom = require("marko/src/runtime/vdom");var _renderer = _interopRequireDefault(require("marko/src/runtime/components/renderer"));var _registry = require("marko/src/runtime/components/registry");var _defineComponent = _interopRequireDefault(require("marko/src/runtime/components/defineComponent"));const _marko_componentType = "packages/marko/test/api-compiler/fixtures/compileForBrowser.js/template.marko",_marko_template = (0, _vdom.t)(_marko_componentType);var _default = _marko_template;exports.default = _default;(0, _registry.r)(_marko_componentType, () => _marko_template);const _marko_component = {};_marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {out.t("Hello ", component);out.t(input.name, component);out.t("!", component);}, { t: _marko_componentType, i: true, d: true }, _marko_component);_marko_template.Component = (0, _defineComponent.default)(_marko_component, _marko_template._); \ No newline at end of file diff --git a/packages/marko/test/api/fixtures/load-writer-wrapping-stream/expected.html b/packages/marko/test/api/fixtures/load-writer-wrapping-stream/expected.html deleted file mode 100644 index 57ca709881..0000000000 --- a/packages/marko/test/api/fixtures/load-writer-wrapping-stream/expected.html +++ /dev/null @@ -1 +0,0 @@ -Hello John! \ No newline at end of file diff --git a/packages/marko/test/api/fixtures/load-writer-wrapping-stream/template.marko b/packages/marko/test/api/fixtures/load-writer-wrapping-stream/template.marko deleted file mode 100644 index 1e22449414..0000000000 --- a/packages/marko/test/api/fixtures/load-writer-wrapping-stream/template.marko +++ /dev/null @@ -1 +0,0 @@ --- Hello ${data.name}! diff --git a/packages/marko/test/api/fixtures/load-writer-wrapping-stream/test.js b/packages/marko/test/api/fixtures/load-writer-wrapping-stream/test.js deleted file mode 100644 index 46c636eff1..0000000000 --- a/packages/marko/test/api/fixtures/load-writer-wrapping-stream/test.js +++ /dev/null @@ -1,33 +0,0 @@ -var nodePath = require("path"); -var through = require("through"); - -exports.check = function (marko, markoCompiler, expect, snapshot, done) { - var output = ""; - - var stream = through(function write(data) { - output += data; - }); - - var runtimeHtml = require("marko/runtime/html"); - - var out = runtimeHtml.createWriter(stream); - out - .on("end", function () { - snapshot(output); - done(); - }) - .on("error", function (e) { - done(e); - }); - - var template = marko.load(nodePath.join(__dirname, "template.marko")); - - template - .render( - { - name: "John" - }, - out - ) - .end(); -}; diff --git a/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/expected.html b/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/expected.html deleted file mode 100644 index 57ca709881..0000000000 --- a/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/expected.html +++ /dev/null @@ -1 +0,0 @@ -Hello John! \ No newline at end of file diff --git a/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/template.marko b/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/template.marko deleted file mode 100644 index 4b66737517..0000000000 --- a/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/template.marko +++ /dev/null @@ -1 +0,0 @@ --- Hello ${data.name}! \ No newline at end of file diff --git a/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/test.js b/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/test.js deleted file mode 100644 index af494bf00f..0000000000 --- a/packages/marko/test/api/fixtures/load-writer-wrapping-string-builder/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var nodePath = require("path"); - -exports.check = function (marko, markoCompiler, expect, snapshot, done) { - var runtimeHtml = require("marko/runtime/html"); - - var out = runtimeHtml.createWriter(); - out - .on("finish", function (result) { - snapshot(result.getOutput()); - done(); - }) - .on("error", function (e) { - done(e); - }); - - var template = marko.load(nodePath.join(__dirname, "template.marko")); - template.render( - { - name: "John" - }, - out - ); - - out.end(); -}; diff --git a/packages/translator-default/src/index.js b/packages/translator-default/src/index.js index 45ace343a1..96d6ed732f 100644 --- a/packages/translator-default/src/index.js +++ b/packages/translator-default/src/index.js @@ -262,59 +262,72 @@ export const translate = { const runtimeTemplateIdentifier = path.scope.generateUidIdentifier("t"); - path.unshiftContainer("body", [ - t.importDeclaration( - [t.importSpecifier(runtimeTemplateIdentifier, t.identifier("t"))], - t.stringLiteral( - `marko/${markoOpts.optimize ? "dist" : "src"}/runtime/${ - isHTML ? "html" : "vdom" - }` - ) - ), - t.variableDeclaration("const", [ - t.variableDeclarator( - templateIdentifier, - t.callExpression( - runtimeTemplateIdentifier, - includeMetaInSource ? [t.identifier("__filename")] : [] + path.unshiftContainer( + "body", + [ + t.importDeclaration( + [t.importSpecifier(runtimeTemplateIdentifier, t.identifier("t"))], + t.stringLiteral( + `marko/${markoOpts.optimize ? "dist" : "src"}/runtime/${ + isHTML ? "html" : "vdom" + }${markoOpts.hot ? "/hot-reload" : ""}` ) - ) - ]), - t.exportDefaultDeclaration(templateIdentifier) - ]); + ), + t.variableDeclaration("const", [ + t.variableDeclarator( + componentTypeIdentifier, + t.stringLiteral(meta.id) + ), + t.variableDeclarator( + templateIdentifier, + t.callExpression(runtimeTemplateIdentifier, [ + componentTypeIdentifier + ]) + ) + ]), + includeMetaInSource && + t.expressionStatement( + t.assignmentExpression( + "=", + t.memberExpression(templateIdentifier, t.identifier("path")), + t.identifier("__filename") + ) + ), + t.exportDefaultDeclaration(templateIdentifier) + ].filter(Boolean) + ); - const componentIdString = t.stringLiteral(meta.id); path.pushContainer( "body", - t.variableDeclaration("const", [ - t.variableDeclarator( - componentTypeIdentifier, - isHTML - ? componentIdString - : t.callExpression( - importNamed( - file, - "marko/src/runtime/components/registry", - "r", - "marko_registerComponent" - ), - [ - componentIdString, - t.arrowFunctionExpression( - [], - componentBrowserFile - ? importDefault( - file, - resolveRelativePath(file, componentBrowserFile), - "marko_split_component" - ) - : templateIdentifier - ) - ] - ) - ), - t.variableDeclarator(componentIdentifier, componentClass) - ]) + [ + !isHTML && + t.expressionStatement( + t.callExpression( + importNamed( + file, + "marko/src/runtime/components/registry", + "r", + "marko_registerComponent" + ), + [ + componentTypeIdentifier, + t.arrowFunctionExpression( + [], + componentBrowserFile + ? importDefault( + file, + resolveRelativePath(file, componentBrowserFile), + "marko_split_component" + ) + : templateIdentifier + ) + ] + ) + ), + t.variableDeclaration("const", [ + t.variableDeclarator(componentIdentifier, componentClass) + ]) + ].filter(Boolean) ); const templateRenderOptionsProps = [ @@ -456,6 +469,7 @@ export function getRuntimeEntryFiles(output, optimize) { ...(output === "html" ? [ `${base}runtime/html`, + `${base}runtime/html/hot-reload`, `${base}runtime/html/helpers/attr`, `${base}runtime/html/helpers/attrs`, `${base}runtime/html/helpers/class-attr`, @@ -470,6 +484,7 @@ export function getRuntimeEntryFiles(output, optimize) { ] : [ `${base}runtime/vdom`, + `${base}runtime/vdom/hot-reload`, `${base}runtime/vdom/helpers/attrs`, `${base}runtime/vdom/helpers/const`, `${base}runtime/vdom/helpers/v-element`, diff --git a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/cjs-expected.js index 7c0027d03e..7cb6c8f3a5 100644 --- a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tag-inside-if-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tag-inside-if-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { let _thing = null; diff --git a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/html-expected.js index 06a92a8261..03dc9752d5 100644 --- a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tag-inside-if-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tag-inside-if-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _thing = null; diff --git a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/htmlProduction-expected.js index 185cf4ffb4..6774d18f2f 100644 --- a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "cY5vQoUJ", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "cY5vQoUJ", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _thing = null; diff --git a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdom-expected.js index bc668b13ff..41a7163c13 100644 --- a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tag-inside-if-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/at-tag-inside-if-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _thing = null; diff --git a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdomProduction-expected.js index bfd2857d0b..5df5ffecd8 100644 --- a/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tag-inside-if-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "cY5vQoUJ", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("cY5vQoUJ", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _thing = null; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/cjs-expected.js index 9aba2d16a2..f4952cccb2 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-and-static/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-and-static/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/html-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/html-expected.js index 067d908e3b..7a19d7335d 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-and-static/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-and-static/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/htmlProduction-expected.js index e352a94fbd..24c1750400 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "EC7Wpjet", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "EC7Wpjet", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdom-expected.js index 55f5ee7175..eb9ce7ad8d 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-and-static/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/at-tags-dynamic-and-static/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdomProduction-expected.js index 52c17edc2d..c73d0739d5 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-and-static/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "EC7Wpjet", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("EC7Wpjet", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/cjs-expected.js index b933c3669d..358be8d37b 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _dynamicTag.default)(out, input.x, () => ({ "header": { diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/html-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/html-expected.js index ab74f163c5..d7a2a2014a 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/src/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, () => ({ "header": { diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/htmlProduction-expected.js index 074e48ae23..6f1a427027 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "V8pzyNwe", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "V8pzyNwe", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, () => ({ "header": { diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdom-expected.js index 46c1c85560..e2fe667ad8 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/src/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, () => ({ "header": { diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdomProduction-expected.js index 1feafdebc6..74b5328d4c 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-tag-parent/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "V8pzyNwe", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("V8pzyNwe", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, () => ({ "header": { diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/cjs-expected.js index 67b9d2bdd8..cfa80e7643 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/cjs-expected.js @@ -15,12 +15,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-with-params/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-with-params/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { let _item = null; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/html-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/html-expected.js index dbeb5b5762..213c166485 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/html-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-with-params/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-with-params/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _item = null; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/htmlProduction-expected.js index 66b3e3934d..ce9d8af0b5 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/htmlProduction-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "OLo+Dwkn", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "OLo+Dwkn", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _item = null; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdom-expected.js index 73639d3041..39ac8718fc 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic-with-params/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/at-tags-dynamic-with-params/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _item = null; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdomProduction-expected.js index 54e281ddfe..7962e82149 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic-with-params/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "OLo+Dwkn", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("OLo+Dwkn", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _item = null; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/cjs-expected.js index 352506bbf3..d9057f5b74 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/cjs-expected.js @@ -15,12 +15,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { const _cols = []; const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/html-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/html-expected.js index fdc53e6748..9dfe875fd9 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/html-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _cols = []; const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/htmlProduction-expected.js index d58d8b5892..388f5c8898 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/htmlProduction-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "GuHig6zQ", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "GuHig6zQ", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _cols = []; const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdom-expected.js index 1901b1af03..c2885f581d 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags-dynamic/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/at-tags-dynamic/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _cols = []; const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdomProduction-expected.js index 502d5631b1..080db2c8c6 100644 --- a/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags-dynamic/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "GuHig6zQ", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("GuHig6zQ", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { const _cols = []; const _items = []; diff --git a/packages/translator-default/test/fixtures/at-tags/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/at-tags/snapshots/cjs-expected.js index 3af57bee70..a9e910bb53 100644 --- a/packages/translator-default/test/fixtures/at-tags/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/at-tags/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_index.default, { "foo": { diff --git a/packages/translator-default/test/fixtures/at-tags/snapshots/html-expected.js b/packages/translator-default/test/fixtures/at-tags/snapshots/html-expected.js index 194ab8ed65..dfe80bbf76 100644 --- a/packages/translator-default/test/fixtures/at-tags/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/at-tags/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/at-tags/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "foo": { diff --git a/packages/translator-default/test/fixtures/at-tags/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/at-tags/snapshots/htmlProduction-expected.js index 2fcfe3d064..a3effe71e7 100644 --- a/packages/translator-default/test/fixtures/at-tags/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "hNiObgtw", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "hNiObgtw", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "foo": { diff --git a/packages/translator-default/test/fixtures/at-tags/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/at-tags/snapshots/vdom-expected.js index 5980cc5809..01dc382acf 100644 --- a/packages/translator-default/test/fixtures/at-tags/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/at-tags/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/at-tags/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/at-tags/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "foo": { diff --git a/packages/translator-default/test/fixtures/at-tags/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/at-tags/snapshots/vdomProduction-expected.js index d903611fe1..5ebb586f2b 100644 --- a/packages/translator-default/test/fixtures/at-tags/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/at-tags/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "hNiObgtw", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("hNiObgtw", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "foo": { diff --git a/packages/translator-default/test/fixtures/attr-boolean/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/attr-boolean/snapshots/cjs-expected.js index 057163b3c9..49bd89badb 100644 --- a/packages/translator-default/test/fixtures/attr-boolean/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/attr-boolean/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-boolean/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-boolean/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/attr-boolean/snapshots/html-expected.js b/packages/translator-default/test/fixtures/attr-boolean/snapshots/html-expected.js index cbab4a923e..055749579c 100644 --- a/packages/translator-default/test/fixtures/attr-boolean/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/attr-boolean/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-boolean/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-boolean/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/attr-boolean/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/attr-boolean/snapshots/htmlProduction-expected.js index 6f626883f7..f9335d44a8 100644 --- a/packages/translator-default/test/fixtures/attr-boolean/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-boolean/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "CtqnD7TI", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "CtqnD7TI", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdom-expected.js index 728b994017..8abe8fba13 100644 --- a/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-boolean/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/attr-boolean/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("input", { "checked": "" diff --git a/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdomProduction-expected.js index f94b6b07ce..442eea39d0 100644 --- a/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-boolean/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "CtqnD7TI", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -12,9 +13,9 @@ const _marko_node = _marko_createElement("input", { import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("CtqnD7TI", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/attr-class/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/attr-class/snapshots/cjs-expected.js index a79261af3d..581a208b16 100644 --- a/packages/translator-default/test/fixtures/attr-class/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/attr-class/snapshots/cjs-expected.js @@ -19,12 +19,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-class/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-class/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(` _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": _marko_class_merge(["a", { diff --git a/packages/translator-default/test/fixtures/attr-class/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/attr-class/snapshots/vdomProduction-expected.js index 818b37e65b..f8f3e79348 100644 --- a/packages/translator-default/test/fixtures/attr-class/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-class/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "TKoJdMQb", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/dist/runtime/helpers/class-value"; @@ -10,9 +11,9 @@ import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("TKoJdMQb", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": _marko_class_merge(["a", { diff --git a/packages/translator-default/test/fixtures/attr-escape/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/attr-escape/snapshots/cjs-expected.js index 353da266f3..95b96ceb7b 100644 --- a/packages/translator-default/test/fixtures/attr-escape/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/attr-escape/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-escape/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-escape/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-escape/snapshots/html-expected.js b/packages/translator-default/test/fixtures/attr-escape/snapshots/html-expected.js index 0a91b2eed2..cee44de0b0 100644 --- a/packages/translator-default/test/fixtures/attr-escape/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/attr-escape/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-escape/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/src/runtime/helpers/class-value"; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-escape/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-escape/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/attr-escape/snapshots/htmlProduction-expected.js index f700bd75ff..bb31211bea 100644 --- a/packages/translator-default/test/fixtures/attr-escape/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-escape/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "SA1M0lYk", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/dist/runtime/helpers/class-value"; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "SA1M0lYk", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-escape/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/attr-escape/snapshots/vdom-expected.js index 212d1069d3..a07a845342 100644 --- a/packages/translator-default/test/fixtures/attr-escape/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/attr-escape/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-escape/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/src/runtime/helpers/class-value"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/attr-escape/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": _marko_class_merge(input.className), diff --git a/packages/translator-default/test/fixtures/attr-escape/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/attr-escape/snapshots/vdomProduction-expected.js index a9f61c9a29..6f198f39e6 100644 --- a/packages/translator-default/test/fixtures/attr-escape/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-escape/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "SA1M0lYk", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/dist/runtime/helpers/class-value"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("SA1M0lYk", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": _marko_class_merge(input.className), diff --git a/packages/translator-default/test/fixtures/attr-falsey/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/attr-falsey/snapshots/cjs-expected.js index c2565282b2..975d228b2c 100644 --- a/packages/translator-default/test/fixtures/attr-falsey/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/attr-falsey/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-falsey/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-falsey/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/attr-falsey/snapshots/html-expected.js b/packages/translator-default/test/fixtures/attr-falsey/snapshots/html-expected.js index 6baba06427..ae699872ae 100644 --- a/packages/translator-default/test/fixtures/attr-falsey/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/attr-falsey/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-falsey/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-falsey/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/attr-falsey/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/attr-falsey/snapshots/htmlProduction-expected.js index 9da8ea9295..33dcc56e0a 100644 --- a/packages/translator-default/test/fixtures/attr-falsey/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-falsey/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "9WNpCPpT", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "9WNpCPpT", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdom-expected.js index 24a59008fd..b5eb8c593e 100644 --- a/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-falsey/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/attr-falsey/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "d": "0", diff --git a/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdomProduction-expected.js index 94b9b42786..11065f3d74 100644 --- a/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-falsey/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "9WNpCPpT", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -13,9 +14,9 @@ const _marko_node = _marko_createElement("div", { import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("9WNpCPpT", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/attr-scoped/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/attr-scoped/snapshots/cjs-expected.js index 7ffc3b32be..5e522d6030 100644 --- a/packages/translator-default/test/fixtures/attr-scoped/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/attr-scoped/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-scoped/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-scoped/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-scoped/snapshots/html-expected.js b/packages/translator-default/test/fixtures/attr-scoped/snapshots/html-expected.js index b39cfcb5f7..a3ccc57ddb 100644 --- a/packages/translator-default/test/fixtures/attr-scoped/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/attr-scoped/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-scoped/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-scoped/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-scoped/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/attr-scoped/snapshots/htmlProduction-expected.js index 18e7090aa0..a87ab52e8a 100644 --- a/packages/translator-default/test/fixtures/attr-scoped/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-scoped/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "m2haKSSA", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "m2haKSSA", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdom-expected.js index c67d59a306..985ad39e3b 100644 --- a/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-scoped/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/attr-scoped/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "id": _component.elId("1"), diff --git a/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdomProduction-expected.js index a7daaef398..758556c934 100644 --- a/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-scoped/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "m2haKSSA", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("m2haKSSA", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "id": _component.elId("1"), diff --git a/packages/translator-default/test/fixtures/attr-style/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/attr-style/snapshots/cjs-expected.js index c13399470d..a3343b9673 100644 --- a/packages/translator-default/test/fixtures/attr-style/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/attr-style/snapshots/cjs-expected.js @@ -19,12 +19,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-style/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-style/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(` _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "style": _marko_style_merge({ diff --git a/packages/translator-default/test/fixtures/attr-style/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/attr-style/snapshots/vdomProduction-expected.js index 94629cded3..2e66b44549 100644 --- a/packages/translator-default/test/fixtures/attr-style/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-style/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "Up7A+MWi", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_style_merge from "marko/dist/runtime/helpers/style-value"; @@ -10,9 +11,9 @@ import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("Up7A+MWi", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "style": _marko_style_merge({ diff --git a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/cjs-expected.js index e74d746423..0e37822be8 100644 --- a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-template-literal-escape/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-template-literal-escape/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/html-expected.js b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/html-expected.js index a071bfc16c..5447e3080f 100644 --- a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-template-literal-escape/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/attr-template-literal-escape/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/htmlProduction-expected.js index a25f65c9e7..029ecd9a09 100644 --- a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "vJZypcf5", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "vJZypcf5", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(``); }, { diff --git a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdom-expected.js index 5803417f3d..55bda9aa82 100644 --- a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/attr-template-literal-escape/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/attr-template-literal-escape/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "foo": `Hello ${input.name}` diff --git a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdomProduction-expected.js index 9de2a6f275..587ae1bcfe 100644 --- a/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/attr-template-literal-escape/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "vJZypcf5", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("vJZypcf5", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "foo": `Hello ${input.name}` diff --git a/packages/translator-default/test/fixtures/await-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/await-tag/snapshots/cjs-expected.js index 52e81ff0d6..9d3e59bfd6 100644 --- a/packages/translator-default/test/fixtures/await-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/await-tag/snapshots/cjs-expected.js @@ -15,12 +15,12 @@ var _renderer2 = _interopRequireDefault(require("marko/src/runtime/components/re function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/await-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/await-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer2.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_renderer.default, { "_provider": promise, diff --git a/packages/translator-default/test/fixtures/await-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/await-tag/snapshots/html-expected.js index 99d989b83e..6fcec16aac 100644 --- a/packages/translator-default/test/fixtures/await-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/await-tag/snapshots/html-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/await-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _await from "marko/src/core-tags/core/await/renderer.js"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/await-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_await, { "_provider": promise, diff --git a/packages/translator-default/test/fixtures/await-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/await-tag/snapshots/htmlProduction-expected.js index 8ff0c2b388..bc8c0eb497 100644 --- a/packages/translator-default/test/fixtures/await-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/await-tag/snapshots/htmlProduction-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "8BXCo81d", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _await from "marko/dist/core-tags/core/await/renderer.js"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "8BXCo81d", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_await, { "_provider": promise, diff --git a/packages/translator-default/test/fixtures/await-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/await-tag/snapshots/vdom-expected.js index d763fd5ddc..41f91be4b9 100644 --- a/packages/translator-default/test/fixtures/await-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/await-tag/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/await-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _await from "marko/src/core-tags/core/await/renderer.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/await-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_await, { "_provider": promise, diff --git a/packages/translator-default/test/fixtures/await-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/await-tag/snapshots/vdomProduction-expected.js index 1f3e02617f..e6e0ed8b3b 100644 --- a/packages/translator-default/test/fixtures/await-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/await-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "8BXCo81d", + _marko_template = _t(_marko_componentType); export default _marko_template; import _await from "marko/dist/core-tags/core/await/renderer.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("8BXCo81d", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_await, { "_provider": promise, diff --git a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/cjs-expected.js index 9af0377be5..300417bd68 100644 --- a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/camel-case-attr-name-override/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/camel-case-attr-name-override/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_index.default, { "dataAttrA": true, diff --git a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/html-expected.js b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/html-expected.js index a92c1c207e..4b2b5b61fb 100644 --- a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/camel-case-attr-name-override/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/camel-case-attr-name-override/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "dataAttrA": true, diff --git a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/htmlProduction-expected.js index 722da7d068..757daad10c 100644 --- a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "MoYb8VAR", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "MoYb8VAR", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "dataAttrA": true, diff --git a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdom-expected.js index 11ae79df92..b22731c154 100644 --- a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/camel-case-attr-name-override/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/camel-case-attr-name-override/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "dataAttrA": true, diff --git a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdomProduction-expected.js index 8a9209e47e..f89af8c666 100644 --- a/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/camel-case-attr-name-override/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "MoYb8VAR", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag/index.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("MoYb8VAR", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "dataAttrA": true, diff --git a/packages/translator-default/test/fixtures/cdata/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/cdata/snapshots/cjs-expected.js index 51d76e5c25..7f075d8dfb 100644 --- a/packages/translator-default/test/fixtures/cdata/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/cdata/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/cdata/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/cdata/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w("Here is a CDATA section: "); diff --git a/packages/translator-default/test/fixtures/cdata/snapshots/html-expected.js b/packages/translator-default/test/fixtures/cdata/snapshots/html-expected.js index 8625d5541b..5a4a820400 100644 --- a/packages/translator-default/test/fixtures/cdata/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/cdata/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/cdata/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/cdata/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w("Here is a CDATA section: "); diff --git a/packages/translator-default/test/fixtures/cdata/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/cdata/snapshots/htmlProduction-expected.js index 310ffe176f..3679eb8ec1 100644 --- a/packages/translator-default/test/fixtures/cdata/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/cdata/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "EazLsc5m", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "EazLsc5m", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
Here is a CDATA section: & ]]> with all kinds of unescaped text.
"); }, { diff --git a/packages/translator-default/test/fixtures/cdata/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/cdata/snapshots/vdom-expected.js index 6f24c1cb52..4448eed2b5 100644 --- a/packages/translator-default/test/fixtures/cdata/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/cdata/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/cdata/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/cdata/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.t("Here is a CDATA section: ", component); diff --git a/packages/translator-default/test/fixtures/cdata/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/cdata/snapshots/vdomProduction-expected.js index 75edaa32c8..57a6fa9522 100644 --- a/packages/translator-default/test/fixtures/cdata/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/cdata/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "EazLsc5m", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("EazLsc5m", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.t("Here is a CDATA section: ", component); diff --git a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/cjs-expected.js index 08f2470541..94e3039146 100644 --- a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component-index/index.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component-index/index.marko", - _marko_component2 = _component2.default; +const _marko_component2 = _component2.default; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/html-expected.js b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/html-expected.js index d2f1c4edc5..031b03e1e9 100644 --- a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component-index/index.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./component.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component-index/index.marko", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/htmlProduction-expected.js index 9d7b95fe98..64306611b4 100644 --- a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "ErZDLFTk", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./component.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "ErZDLFTk", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdom-expected.js index 7f49acd996..33ceb28b04 100644 --- a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component-index/index.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./component.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/class-external-component-index/index.marko", () => _marko_template), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdomProduction-expected.js index 2f61bbe960..8bdf5038c3 100644 --- a/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component-index/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "ErZDLFTk", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -11,9 +12,9 @@ import _marko_component from "./component.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("ErZDLFTk", () => _marko_template), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/class-external-component/snapshots/cjs-expected.js index 1c9197876f..08e6e43d63 100644 --- a/packages/translator-default/test/fixtures/class-external-component/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component/template.marko", - _marko_component2 = _templateComponent.default; +const _marko_component2 = _templateComponent.default; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component/snapshots/html-expected.js b/packages/translator-default/test/fixtures/class-external-component/snapshots/html-expected.js index f6c75cb2f1..5413c4f3c1 100644 --- a/packages/translator-default/test/fixtures/class-external-component/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component/template.marko", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/class-external-component/snapshots/htmlProduction-expected.js index 308317a4d3..8ff20373bb 100644 --- a/packages/translator-default/test/fixtures/class-external-component/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "cQ4BiZgz", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "cQ4BiZgz", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/class-external-component/snapshots/vdom-expected.js index 5933235e23..dc60bd9143 100644 --- a/packages/translator-default/test/fixtures/class-external-component/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-external-component/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/class-external-component/template.marko", () => _marko_template), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/class-external-component/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/class-external-component/snapshots/vdomProduction-expected.js index a01c8ed369..78a7911b33 100644 --- a/packages/translator-default/test/fixtures/class-external-component/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-external-component/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "cQ4BiZgz", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -11,9 +12,9 @@ import _marko_component from "./template.component.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("cQ4BiZgz", () => _marko_template), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/cjs-expected.js index a536603e33..fa8d7812cf 100644 --- a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/template.marko", - _marko_component = { +const _marko_component = { onCreate() { this.x = 1 this.y = 2 diff --git a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/html-expected.js b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/html-expected.js index e746699975..3ffd4cfb30 100644 --- a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/template.marko", - _marko_component = { +const _marko_component = { onCreate() { this.x = 1 this.y = 2 diff --git a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/htmlProduction-expected.js index d6ed0847a8..2e0dda6333 100644 --- a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "rmgp0gbX", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "rmgp0gbX", - _marko_component = { +const _marko_component = { onCreate() { this.x = 1 this.y = 2 diff --git a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdom-expected.js index f55653430f..fc23df6cdb 100644 --- a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdom-expected.js @@ -1,20 +1,21 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/template.marko", () => _marko_template), - _marko_component = { +_marko_registerComponent(_marko_componentType, () => _marko_template); + +const _marko_component = { onCreate() { this.x = 1 this.y = 2 } }; - _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdomProduction-expected.js index 84f9f23df0..b8424635f7 100644 --- a/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-inline-class-props-without-on-create/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "rmgp0gbX", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,15 +11,15 @@ const _marko_node = _marko_createElement("div", null, "0", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("rmgp0gbX", () => _marko_template), - _marko_component = { +_marko_registerComponent(_marko_componentType, () => _marko_template); + +const _marko_component = { onCreate() { this.x = 1 this.y = 2 } }; - _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/class-inline/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/class-inline/snapshots/cjs-expected.js index 2e0827609a..11b956aacb 100644 --- a/packages/translator-default/test/fixtures/class-inline/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/class-inline/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-inline/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/class-inline/template.marko", - _marko_component = { +const _marko_component = { onCreate() { this.x = 1 this.y = 2 diff --git a/packages/translator-default/test/fixtures/class-inline/snapshots/html-expected.js b/packages/translator-default/test/fixtures/class-inline/snapshots/html-expected.js index 23251067fd..5536122dba 100644 --- a/packages/translator-default/test/fixtures/class-inline/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/class-inline/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-inline/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/class-inline/template.marko", - _marko_component = { +const _marko_component = { onCreate() { this.x = 1 this.y = 2 diff --git a/packages/translator-default/test/fixtures/class-inline/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/class-inline/snapshots/htmlProduction-expected.js index 31c5081abe..51ae182d06 100644 --- a/packages/translator-default/test/fixtures/class-inline/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-inline/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "F7GLatBK", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "F7GLatBK", - _marko_component = { +const _marko_component = { onCreate() { this.x = 1 this.y = 2 diff --git a/packages/translator-default/test/fixtures/class-inline/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/class-inline/snapshots/vdom-expected.js index 888623c1ac..250f4c8d5c 100644 --- a/packages/translator-default/test/fixtures/class-inline/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/class-inline/snapshots/vdom-expected.js @@ -1,13 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/class-inline/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/class-inline/template.marko", () => _marko_template), - _marko_component = { +_marko_registerComponent(_marko_componentType, () => _marko_template); + +const _marko_component = { onCreate() { this.x = 1 this.y = 2 @@ -15,7 +17,6 @@ const _marko_componentType = _marko_registerComponent("packages/translator-defau } }; - _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/class-inline/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/class-inline/snapshots/vdomProduction-expected.js index 7c110ca5bc..7e9b60603a 100644 --- a/packages/translator-default/test/fixtures/class-inline/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/class-inline/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "F7GLatBK", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,8 +11,9 @@ const _marko_node = _marko_createElement("div", null, "0", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("F7GLatBK", () => _marko_template), - _marko_component = { +_marko_registerComponent(_marko_componentType, () => _marko_template); + +const _marko_component = { onCreate() { this.x = 1 this.y = 2 @@ -19,7 +21,6 @@ const _marko_componentType = _marko_registerComponent("F7GLatBK", () => _marko_t } }; - _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/comments/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/comments/snapshots/cjs-expected.js index c56d55035a..0f1c2948f1 100644 --- a/packages/translator-default/test/fixtures/comments/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/comments/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/comments/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/comments/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/comments/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/comments/snapshots/vdom-expected.js index 55592210e6..a1e05351e8 100644 --- a/packages/translator-default/test/fixtures/comments/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/comments/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/comments/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/comments/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/comments/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/comments/snapshots/vdomProduction-expected.js index e3486ad245..17b508dfa4 100644 --- a/packages/translator-default/test/fixtures/comments/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/comments/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "7oQXz9rS", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("7oQXz9rS", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/cjs-expected.js index b51d153f95..9be7455d29 100644 --- a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-element-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-element-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/html-expected.js index 8416589023..8df0959417 100644 --- a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-element-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-element-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/htmlProduction-expected.js index a63afe5d02..ea27c9c9f6 100644 --- a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "O83mlmop", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "O83mlmop", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdom-expected.js index c8458feb50..842a34f488 100644 --- a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-element-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-element-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("hello", null, "0", component, 0, 2); }, { diff --git a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdomProduction-expected.js index 296c9e56ca..6ac2174643 100644 --- a/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-element-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "O83mlmop", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("hello", null, "0", null, 0, 2); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("O83mlmop", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/cjs-expected.js index f0dcad7e37..6cf4f42667 100644 --- a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-child-analyze/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-child-analyze/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("Hello Frank"); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/html-expected.js index 349b869323..59eebdb347 100644 --- a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-child-analyze/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-child-analyze/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello Frank"); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/htmlProduction-expected.js index f4e29bebc7..901cdea613 100644 --- a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "aA/l93YC", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "aA/l93YC", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello Frank"); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdom-expected.js index b195051230..e51e217c49 100644 --- a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-child-analyze/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-child-analyze/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello Frank", component); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdomProduction-expected.js index ab8f2111ff..f43f2debf5 100644 --- a/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-child-analyze/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "aA/l93YC", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("aA/l93YC", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello Frank", component); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/cjs-expected.js index 817811baa0..0f248723af 100644 --- a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-data/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-data/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_customTagDataTag.default, { "name": "Frank".toUpperCase(), diff --git a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/html-expected.js index ea476f5bf9..e906f39bc0 100644 --- a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-data/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTagData from "./custom-tag-data-tag.js"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-data/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTagData, { "name": "Frank".toUpperCase(), diff --git a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/htmlProduction-expected.js index 51a5dfed29..1b3b5d5ed2 100644 --- a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "ZqQwXW7R", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTagData from "./custom-tag-data-tag.js"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "ZqQwXW7R", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTagData, { "name": "Frank".toUpperCase(), diff --git a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdom-expected.js index cd9cfa5154..1a885d7fb6 100644 --- a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-data/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTagData from "./custom-tag-data-tag.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-data/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTagData, { "name": "Frank".toUpperCase(), diff --git a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdomProduction-expected.js index 5cb166b71d..79f3dc6e91 100644 --- a/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-data/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "ZqQwXW7R", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTagData from "./custom-tag-data-tag.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("ZqQwXW7R", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTagData, { "name": "Frank".toUpperCase(), diff --git a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/cjs-expected.js index 05ddf1e0cc..7e01c2c6b2 100644 --- a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-migration/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-migration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_new2.default, { "b": "1" diff --git a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/html-expected.js index 9b936e3780..4932d48413 100644 --- a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-migration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _new from "./new.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-migration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_new, { "b": "1" diff --git a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/htmlProduction-expected.js index 8c1d8ea5e2..e7913e2895 100644 --- a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "hPPGxVRm", + _marko_template = _t(_marko_componentType); export default _marko_template; import _new from "./new.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "hPPGxVRm", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_new, { "b": "1" diff --git a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdom-expected.js index ca6a1691aa..600b8b95d5 100644 --- a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-migration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _new from "./new.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-migration/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_new, { "b": "1" diff --git a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdomProduction-expected.js index 9a22cf61d1..3d61125662 100644 --- a/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-migration/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "hPPGxVRm", + _marko_template = _t(_marko_componentType); export default _marko_template; import _new from "./new.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("hPPGxVRm", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_new, { "b": "1" diff --git a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/cjs-expected.js index abc778a5cb..4fcfb68c53 100644 --- a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/cjs-expected.js @@ -15,12 +15,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-parameters/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-parameters/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_customTag2.default, { "renderBody": (out, a, b, { diff --git a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/html-expected.js index ab9e8a85a0..058b887af8 100644 --- a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/html-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-parameters/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _customTag from "./components/custom-tag.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-parameters/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "renderBody": (out, a, b, { diff --git a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/htmlProduction-expected.js index 67dbe01a1a..182e2561da 100644 --- a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/htmlProduction-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "D4iHvcrp", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _customTag from "./components/custom-tag.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "D4iHvcrp", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "renderBody": (out, a, b, { diff --git a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdom-expected.js index 409162697b..a0ad636dfb 100644 --- a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-parameters/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-parameters/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "renderBody": (out, a, b, { diff --git a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdomProduction-expected.js index 8e06af6df5..ff75ec61df 100644 --- a/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-parameters/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "D4iHvcrp", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("D4iHvcrp", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_customTag, { "renderBody": (out, a, b, { diff --git a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/cjs-expected.js index 3504f91bfc..b99dd99d65 100644 --- a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer2 = _interopRequireDefault(require("marko/src/runtime/components/re function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-render-body/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-render-body/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer2.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_renderer.default, { "name": "World", diff --git a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/html-expected.js index d1f133569c..c151cd4b5c 100644 --- a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-render-body/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testBodyFunction from "./tags/test-body-function/renderer.js"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-render-body/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testBodyFunction, { "name": "World", diff --git a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/htmlProduction-expected.js index 5ab307b2bf..026e519237 100644 --- a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "c9tNjqrV", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testBodyFunction from "./tags/test-body-function/renderer.js"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "c9tNjqrV", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testBodyFunction, { "name": "World", diff --git a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdom-expected.js index 3b1652a45d..1f119c1cb1 100644 --- a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-render-body/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testBodyFunction from "./tags/test-body-function/renderer.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-render-body/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testBodyFunction, { "name": "World", diff --git a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdomProduction-expected.js index 256008768d..9671a1525f 100644 --- a/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-render-body/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "c9tNjqrV", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testBodyFunction from "./tags/test-body-function/renderer.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("c9tNjqrV", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testBodyFunction, { "name": "World", diff --git a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/cjs-expected.js index 33cd7ec12c..5cd98f0e5f 100644 --- a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-separate-assets/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-separate-assets/template.marko", - _marko_component2 = _templateComponent.default; +const _marko_component2 = _templateComponent.default; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/html-expected.js index 539ccdd31b..41a3a59b20 100644 --- a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-separate-assets/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-separate-assets/template.marko", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/htmlProduction-expected.js index 0381d5d204..399b2a2d53 100644 --- a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "WET+Vfy4", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "WET+Vfy4", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdom-expected.js index e9153e5bb7..2363e06523 100644 --- a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-separate-assets/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-separate-assets/template.marko", () => _marko_template), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdomProduction-expected.js index 0d97140f66..f8b8036a8a 100644 --- a/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-separate-assets/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "WET+Vfy4", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -11,9 +12,9 @@ import _marko_component from "./template.component.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("WET+Vfy4", () => _marko_template), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/cjs-expected.js index 4c9f0465a3..5e93a54800 100644 --- a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-template/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-template/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_hello2.default, { "name": "Frank" diff --git a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/html-expected.js index 468a512870..5cee605bf6 100644 --- a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-template/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./hello.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-template/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "name": "Frank" diff --git a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/htmlProduction-expected.js index 518d65058c..8793ad76fe 100644 --- a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "s2zGW8TX", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./hello.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "s2zGW8TX", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "name": "Frank" diff --git a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdom-expected.js index c6bb5b9cfa..a200d51198 100644 --- a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-template/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./hello.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-template/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "name": "Frank" diff --git a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdomProduction-expected.js index a36e42c6fa..7f56b778c0 100644 --- a/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-template/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "s2zGW8TX", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./hello.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("s2zGW8TX", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_hello, { "name": "Frank" diff --git a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/cjs-expected.js index 7755c29431..196b283e89 100644 --- a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-transform/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-transform/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/html-expected.js index 0ac3eee0e0..16d36868be 100644 --- a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-transform/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-transform/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/htmlProduction-expected.js index ee978ca28d..809f3a7a0e 100644 --- a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "5fhDZgMT", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "5fhDZgMT", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdom-expected.js index a36f38c8a2..0b7b92bdfd 100644 --- a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag-transform/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag-transform/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("span", { "style": "display:block" diff --git a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdomProduction-expected.js index 57012b5d7c..eee3d6e0d7 100644 --- a/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag-transform/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "5fhDZgMT", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("5fhDZgMT", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("span", { "style": "display:block" diff --git a/packages/translator-default/test/fixtures/custom-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/custom-tag/snapshots/cjs-expected.js index f3d3689a1a..35d6707dbc 100644 --- a/packages/translator-default/test/fixtures/custom-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer2 = _interopRequireDefault(require("marko/src/runtime/components/re function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer2.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_renderer.default, { "name": "World" diff --git a/packages/translator-default/test/fixtures/custom-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/custom-tag/snapshots/html-expected.js index bced32aa17..1aa9ee71f0 100644 --- a/packages/translator-default/test/fixtures/custom-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testHello from "./tags/test-hello/renderer.js"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testHello, { "name": "World" diff --git a/packages/translator-default/test/fixtures/custom-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag/snapshots/htmlProduction-expected.js index 72f79ea0ad..b4cb16153a 100644 --- a/packages/translator-default/test/fixtures/custom-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "gHRccTPG", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testHello from "./tags/test-hello/renderer.js"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "gHRccTPG", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testHello, { "name": "World" diff --git a/packages/translator-default/test/fixtures/custom-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/custom-tag/snapshots/vdom-expected.js index 531a082b53..065ba3480e 100644 --- a/packages/translator-default/test/fixtures/custom-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/custom-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testHello from "./tags/test-hello/renderer.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/custom-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testHello, { "name": "World" diff --git a/packages/translator-default/test/fixtures/custom-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/custom-tag/snapshots/vdomProduction-expected.js index 307129a264..c0f12f22d2 100644 --- a/packages/translator-default/test/fixtures/custom-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/custom-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "gHRccTPG", + _marko_template = _t(_marko_componentType); export default _marko_template; import _testHello from "./tags/test-hello/renderer.js"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("gHRccTPG", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_testHello, { "name": "World" diff --git a/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/cjs-expected.js index e70b29aa9d..413f8a1293 100644 --- a/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/data-marko-implicit-component/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/data-marko-implicit-component/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(` _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", { "class": "test" diff --git a/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/vdomProduction-expected.js index 0dc904330f..1075103fb0 100644 --- a/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/data-marko-implicit-component/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "qc7Y7xBI", + _marko_template = _t(_marko_componentType); export default _marko_template; import "marko/dist/runtime/vdom/preserve-attrs"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("qc7Y7xBI", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", { "class": "test" diff --git a/packages/translator-default/test/fixtures/data-migration/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/data-migration/snapshots/cjs-expected.js index f12228c5e2..cb96f064fe 100644 --- a/packages/translator-default/test/fixtures/data-migration/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/data-migration/snapshots/cjs-expected.js @@ -15,12 +15,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/data-migration/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/data-migration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_test2.default, { "class": input.class, diff --git a/packages/translator-default/test/fixtures/data-migration/snapshots/html-expected.js b/packages/translator-default/test/fixtures/data-migration/snapshots/html-expected.js index 51f05a0b28..c61b4a75af 100644 --- a/packages/translator-default/test/fixtures/data-migration/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/data-migration/snapshots/html-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/data-migration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _test from "./test.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/data-migration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_test, { "class": input.class, diff --git a/packages/translator-default/test/fixtures/data-migration/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/data-migration/snapshots/htmlProduction-expected.js index 79bd8eea0c..5bd088e616 100644 --- a/packages/translator-default/test/fixtures/data-migration/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/data-migration/snapshots/htmlProduction-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "Pet223we", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _test from "./test.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "Pet223we", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_test, { "class": input.class, diff --git a/packages/translator-default/test/fixtures/data-migration/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/data-migration/snapshots/vdom-expected.js index be3be1f4ac..6498af2a1b 100644 --- a/packages/translator-default/test/fixtures/data-migration/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/data-migration/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/data-migration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _test from "./test.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/data-migration/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_test, { "class": input.class, diff --git a/packages/translator-default/test/fixtures/data-migration/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/data-migration/snapshots/vdomProduction-expected.js index a8999c3954..7902e9b8c1 100644 --- a/packages/translator-default/test/fixtures/data-migration/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/data-migration/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "Pet223we", + _marko_template = _t(_marko_componentType); export default _marko_template; import _test from "./test.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("Pet223we", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_test, { "class": input.class, diff --git a/packages/translator-default/test/fixtures/declaration/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/declaration/snapshots/cjs-expected.js index 6a13b05fc7..e346a43ece 100644 --- a/packages/translator-default/test/fixtures/declaration/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/declaration/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/declaration/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/declaration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); out.w(""); diff --git a/packages/translator-default/test/fixtures/declaration/snapshots/html-expected.js b/packages/translator-default/test/fixtures/declaration/snapshots/html-expected.js index f0be8cd4ac..25832d5b89 100644 --- a/packages/translator-default/test/fixtures/declaration/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/declaration/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/declaration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/declaration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); out.w(""); diff --git a/packages/translator-default/test/fixtures/declaration/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/declaration/snapshots/htmlProduction-expected.js index 52a338feca..5330d5f408 100644 --- a/packages/translator-default/test/fixtures/declaration/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/declaration/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "p0+/pj8a", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "p0+/pj8a", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello World"); }, { diff --git a/packages/translator-default/test/fixtures/declaration/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/declaration/snapshots/vdom-expected.js index 9b6e2ae87f..9cd42242ef 100644 --- a/packages/translator-default/test/fixtures/declaration/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/declaration/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/declaration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/declaration/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("contact-info", null, "0", component, null, 0); out.be("name", null, "1", component, null, 0); diff --git a/packages/translator-default/test/fixtures/declaration/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/declaration/snapshots/vdomProduction-expected.js index 0e7a9cd9d2..9b925be1f8 100644 --- a/packages/translator-default/test/fixtures/declaration/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/declaration/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "p0+/pj8a", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("contact-info", null, "0", null, 1, 0). import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("p0+/pj8a", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/doctype/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/doctype/snapshots/cjs-expected.js index a1ac06322f..0e4a20c837 100644 --- a/packages/translator-default/test/fixtures/doctype/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/doctype/snapshots/cjs-expected.js @@ -17,12 +17,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/doctype/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/doctype/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); out.w(""); diff --git a/packages/translator-default/test/fixtures/doctype/snapshots/html-expected.js b/packages/translator-default/test/fixtures/doctype/snapshots/html-expected.js index 6808bb4b29..cfbd1773d3 100644 --- a/packages/translator-default/test/fixtures/doctype/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/doctype/snapshots/html-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/doctype/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _initComponents from "marko/src/core-tags/components/init-components-tag.js"; @@ -8,8 +9,7 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _awaitReorderer from "marko/src/core-tags/core/await/reorderer-renderer.js"; import _preferredScriptLocation from "marko/src/core-tags/components/preferred-script-location-tag.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/doctype/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); out.w(""); diff --git a/packages/translator-default/test/fixtures/doctype/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/doctype/snapshots/htmlProduction-expected.js index 831271b4cd..af71d14bf9 100644 --- a/packages/translator-default/test/fixtures/doctype/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/doctype/snapshots/htmlProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "VJrYycFN", + _marko_template = _t(_marko_componentType); export default _marko_template; import _initComponents from "marko/dist/core-tags/components/init-components-tag.js"; @@ -8,8 +9,7 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _awaitReorderer from "marko/dist/core-tags/core/await/reorderer-renderer.js"; import _preferredScriptLocation from "marko/dist/core-tags/components/preferred-script-location-tag.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "VJrYycFN", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Title of the documentThe content of the document......"); diff --git a/packages/translator-default/test/fixtures/doctype/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/doctype/snapshots/vdom-expected.js index 7c9fd2ec87..dd76e4df7f 100644 --- a/packages/translator-default/test/fixtures/doctype/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/doctype/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/doctype/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/doctype/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("html", null, "0", component, null, 0); out.be("head", null, "1", component, null, 0); diff --git a/packages/translator-default/test/fixtures/doctype/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/doctype/snapshots/vdomProduction-expected.js index 69c39d084d..5554874dda 100644 --- a/packages/translator-default/test/fixtures/doctype/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/doctype/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "VJrYycFN", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("head", null, "1", null, 1, 0).e("title import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("VJrYycFN", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("html", null, "0", component, null, 0); out.n(_marko_node, component); diff --git a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/cjs-expected.js index d6988ac319..5e1cb57e83 100644 --- a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/cjs-expected.js @@ -19,12 +19,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/dynamic-tag-name/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/dynamic-tag-name/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _dynamicTag.default)(out, input, () => ({ "class": ["a", "b"], diff --git a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/html-expected.js b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/html-expected.js index 88fdca4e1f..d12b53134e 100644 --- a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/html-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/dynamic-tag-name/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import tagA from "./components/tag-a/index.marko"; @@ -9,8 +10,7 @@ import _marko_dynamic_tag from "marko/src/runtime/helpers/dynamic-tag"; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/dynamic-tag-name/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input, () => ({ "class": ["a", "b"], diff --git a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/htmlProduction-expected.js index 870161ebb9..935dddfe45 100644 --- a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/htmlProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "FiPq+pCl", + _marko_template = _t(_marko_componentType); export default _marko_template; import tagA from "./components/tag-a/index.marko"; @@ -9,8 +10,7 @@ import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "FiPq+pCl", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input, () => ({ "class": ["a", "b"], diff --git a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdom-expected.js index 4ab394da96..5ac12214a5 100644 --- a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/dynamic-tag-name/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import tagA from "./components/tag-a/index.marko"; @@ -10,9 +11,9 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/dynamic-tag-name/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input, () => ({ "class": ["a", "b"], diff --git a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdomProduction-expected.js index 7d01f4d104..e6fd4cb780 100644 --- a/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/dynamic-tag-name/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "FiPq+pCl", + _marko_template = _t(_marko_componentType); export default _marko_template; import tagA from "./components/tag-a/index.marko"; @@ -10,9 +11,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("FiPq+pCl", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input, () => ({ "class": ["a", "b"], diff --git a/packages/translator-default/test/fixtures/entities/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/entities/snapshots/cjs-expected.js index c99619c60a..3e1ea09db0 100644 --- a/packages/translator-default/test/fixtures/entities/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/entities/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/entities/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/entities/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("Hello John & Suzy Invalid Entity: &b ; Valid Numeric Entity: " Valid Hexadecimal Entity: ¢"); }, { diff --git a/packages/translator-default/test/fixtures/entities/snapshots/html-expected.js b/packages/translator-default/test/fixtures/entities/snapshots/html-expected.js index a6bc6b01ee..ffb895c30e 100644 --- a/packages/translator-default/test/fixtures/entities/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/entities/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/entities/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/entities/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello John & Suzy Invalid Entity: &b ; Valid Numeric Entity: " Valid Hexadecimal Entity: ¢"); }, { diff --git a/packages/translator-default/test/fixtures/entities/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/entities/snapshots/htmlProduction-expected.js index c66cb74103..df1c36ffdf 100644 --- a/packages/translator-default/test/fixtures/entities/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/entities/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "Q2oCYb3A", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "Q2oCYb3A", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello John & Suzy Invalid Entity: &b ; Valid Numeric Entity: " Valid Hexadecimal Entity: ¢"); }, { diff --git a/packages/translator-default/test/fixtures/entities/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/entities/snapshots/vdom-expected.js index f55e755275..41698b598f 100644 --- a/packages/translator-default/test/fixtures/entities/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/entities/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/entities/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/entities/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello John & Suzy Invalid Entity: &b ; Valid Numeric Entity: \" Valid Hexadecimal Entity: \xA2", component); }, { diff --git a/packages/translator-default/test/fixtures/entities/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/entities/snapshots/vdomProduction-expected.js index bffe7065c2..73fdabe575 100644 --- a/packages/translator-default/test/fixtures/entities/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/entities/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "Q2oCYb3A", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("Q2oCYb3A", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello John & Suzy Invalid Entity: &b ; Valid Numeric Entity: \" Valid Hexadecimal Entity: \xA2", component); }, { diff --git a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/cjs-expected.js index 9e28c8cc8a..1f493a93fe 100644 --- a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/error-body-only-if-no-condition/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/error-body-only-if-no-condition/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/html-expected.js b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/html-expected.js index 627b8daac4..1a2514f040 100644 --- a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/error-body-only-if-no-condition/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/error-body-only-if-no-condition/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/htmlProduction-expected.js index a8e517af24..d57a27c78a 100644 --- a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "QPcOe9nt", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "QPcOe9nt", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdom-expected.js index 1a04d8f68e..782efda1e1 100644 --- a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/error-body-only-if-no-condition/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/error-body-only-if-no-condition/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "body-only-if": "" diff --git a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdomProduction-expected.js index dd22e20f7f..9b12844a8f 100644 --- a/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/error-body-only-if-no-condition/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "QPcOe9nt", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -12,9 +13,9 @@ const _marko_node = _marko_createElement("div", { import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("QPcOe9nt", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/cjs-expected.js index 1303f63bb3..b089619d40 100644 --- a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _dynamicTag.default)(out, input.x, null, out => { out.w("Hello"); diff --git a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/html-expected.js index 502eb040a0..dcc556d5f7 100644 --- a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/src/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, null, out => { out.w("Hello"); diff --git a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/htmlProduction-expected.js index f50efff065..bdc34b7826 100644 --- a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "vPxaLPFT", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "vPxaLPFT", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, null, out => { out.w("Hello"); diff --git a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdom-expected.js index 745fb7bf45..0492ac590a 100644 --- a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/src/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, null, out => { out.t("Hello", component); diff --git a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdomProduction-expected.js index 391b76db98..a67fe7a2ec 100644 --- a/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/error-repeated-closing-dynamic-tag/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "vPxaLPFT", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("vPxaLPFT", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_dynamic_tag(out, input.x, null, out => { out.t("Hello", component); diff --git a/packages/translator-default/test/fixtures/event-handlers/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/event-handlers/snapshots/cjs-expected.js index 4f3ff8d6af..c87379dcdb 100644 --- a/packages/translator-default/test/fixtures/event-handlers/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/event-handlers/snapshots/cjs-expected.js @@ -15,12 +15,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/event-handlers/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/event-handlers/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(` _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0, { "onclick": _component.d("click", "handleClick", false, [a, b, ...d]) diff --git a/packages/translator-default/test/fixtures/event-handlers/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/event-handlers/snapshots/vdomProduction-expected.js index 7636d293a1..2940c0d27c 100644 --- a/packages/translator-default/test/fixtures/event-handlers/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/event-handlers/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "7zxvsBE8", + _marko_template = _t(_marko_componentType); export default _marko_template; import _customTag from "./components/custom-tag.marko"; @@ -8,9 +9,9 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("7zxvsBE8", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0, { "onclick": _component.d("click", "handleClick", false, [a, b, ...d]) diff --git a/packages/translator-default/test/fixtures/for-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/for-tag/snapshots/cjs-expected.js index f3fdc5ec90..21592f6afb 100644 --- a/packages/translator-default/test/fixtures/for-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/for-tag/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/for-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/for-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { let _i = 0; diff --git a/packages/translator-default/test/fixtures/for-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/for-tag/snapshots/html-expected.js index f3ce23b171..114944f1e5 100644 --- a/packages/translator-default/test/fixtures/for-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/for-tag/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/for-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_props from "marko/src/runtime/html/helpers/data-marko"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/for-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _i = 0; diff --git a/packages/translator-default/test/fixtures/for-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/for-tag/snapshots/htmlProduction-expected.js index 715b02b6b9..da7c718d30 100644 --- a/packages/translator-default/test/fixtures/for-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/for-tag/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "avg1eu47", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_props from "marko/dist/runtime/html/helpers/data-marko"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "avg1eu47", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _i = 0; diff --git a/packages/translator-default/test/fixtures/for-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/for-tag/snapshots/vdom-expected.js index 17b6ef9d33..e90984b404 100644 --- a/packages/translator-default/test/fixtures/for-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/for-tag/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/for-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/for-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _i = 0; diff --git a/packages/translator-default/test/fixtures/for-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/for-tag/snapshots/vdomProduction-expected.js index a64ef1dafc..ac03fb0a73 100644 --- a/packages/translator-default/test/fixtures/for-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/for-tag/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "avg1eu47", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("avg1eu47", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let _i = 0; diff --git a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/cjs-expected.js index 3e1c108fd3..5e829e7afa 100644 --- a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/hello-dynamic/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/hello-dynamic/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("Hello "); out.w((0, _escapeXml.x)(input.name)); diff --git a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/html-expected.js b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/html-expected.js index 05a69580c5..de579e1171 100644 --- a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/hello-dynamic/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_to_string from "marko/src/runtime/helpers/to-string"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/hello-dynamic/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello "); out.w(_marko_escapeXml(input.name)); diff --git a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/htmlProduction-expected.js index 8eed00ec71..a5cfa278c0 100644 --- a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "kCnjd+Lm", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_to_string from "marko/dist/runtime/helpers/to-string"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "kCnjd+Lm", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`Hello ${_marko_escapeXml(input.name)}! Hello ${_marko_to_string(input.name)}! Hello ${_marko_to_string(input.missing)}!`); }, { diff --git a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdom-expected.js index 6049993289..5e1025337f 100644 --- a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/hello-dynamic/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/hello-dynamic/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello ", component); out.t(input.name, component); diff --git a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdomProduction-expected.js index 434093d89d..aa25193d0d 100644 --- a/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/hello-dynamic/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "kCnjd+Lm", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("kCnjd+Lm", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello ", component); out.t(input.name, component); diff --git a/packages/translator-default/test/fixtures/html-comment/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/html-comment/snapshots/cjs-expected.js index bd2a5ec56a..2b40851d51 100644 --- a/packages/translator-default/test/fixtures/html-comment/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/html-comment/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/html-comment/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/html-comment/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/html-comment/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/html-comment/snapshots/vdom-expected.js index 5e70673449..62aa0c6878 100644 --- a/packages/translator-default/test/fixtures/html-comment/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/html-comment/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/html-comment/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/html-comment/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/html-comment/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/html-comment/snapshots/vdomProduction-expected.js index ec40f6ad97..318d792329 100644 --- a/packages/translator-default/test/fixtures/html-comment/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/html-comment/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "3DMKav/3", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("3DMKav/3", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/html-entity/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/html-entity/snapshots/cjs-expected.js index a2dad0fba4..b84811c960 100644 --- a/packages/translator-default/test/fixtures/html-entity/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/html-entity/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/html-entity/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/html-entity/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w("<div>"); diff --git a/packages/translator-default/test/fixtures/html-entity/snapshots/html-expected.js b/packages/translator-default/test/fixtures/html-entity/snapshots/html-expected.js index c74d892fe6..5df88c21f6 100644 --- a/packages/translator-default/test/fixtures/html-entity/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/html-entity/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/html-entity/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/html-entity/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w("<div>"); diff --git a/packages/translator-default/test/fixtures/html-entity/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/html-entity/snapshots/htmlProduction-expected.js index 348f6ed35d..7c6accbd7b 100644 --- a/packages/translator-default/test/fixtures/html-entity/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/html-entity/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "PF20NQ88", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "PF20NQ88", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
<div>
"); }, { diff --git a/packages/translator-default/test/fixtures/html-entity/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/html-entity/snapshots/vdom-expected.js index bf97ed3d9f..9bfa3c8695 100644 --- a/packages/translator-default/test/fixtures/html-entity/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/html-entity/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/html-entity/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/html-entity/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.t("
", component); diff --git a/packages/translator-default/test/fixtures/html-entity/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/html-entity/snapshots/vdomProduction-expected.js index 5541cbd063..04384de681 100644 --- a/packages/translator-default/test/fixtures/html-entity/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/html-entity/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "PF20NQ88", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("div", null, "0", null, 1, 0).t("
" import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("PF20NQ88", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/if-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/if-tag/snapshots/cjs-expected.js index c6b438ab97..7a0b2e28ff 100644 --- a/packages/translator-default/test/fixtures/if-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/if-tag/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/if-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/if-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { if (a + b) { out.w("Hello"); diff --git a/packages/translator-default/test/fixtures/if-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/if-tag/snapshots/html-expected.js index 8b4657ff73..b82f19dee5 100644 --- a/packages/translator-default/test/fixtures/if-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/if-tag/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/if-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/if-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { if (a + b) { out.w("Hello"); diff --git a/packages/translator-default/test/fixtures/if-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/if-tag/snapshots/htmlProduction-expected.js index 184605113e..bec21872fc 100644 --- a/packages/translator-default/test/fixtures/if-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/if-tag/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "y0rlhGQ3", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "y0rlhGQ3", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { if (a + b) { out.w("Hello"); diff --git a/packages/translator-default/test/fixtures/if-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/if-tag/snapshots/vdom-expected.js index 870828eda5..e85d1a66e0 100644 --- a/packages/translator-default/test/fixtures/if-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/if-tag/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/if-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/if-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { if (a + b) { out.t("Hello", component); diff --git a/packages/translator-default/test/fixtures/if-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/if-tag/snapshots/vdomProduction-expected.js index 0599cd7e84..fa2b85acf8 100644 --- a/packages/translator-default/test/fixtures/if-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/if-tag/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "y0rlhGQ3", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("y0rlhGQ3", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { if (a + b) { out.t("Hello", component); diff --git a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/cjs-expected.js index 4de5957733..3f9d5888a6 100644 --- a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/cjs-expected.js @@ -17,12 +17,12 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-hydrate-include/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/import-hydrate-include/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/html-expected.js b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/html-expected.js index 499e895a67..39515c7139 100644 --- a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-hydrate-include/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; import "./foo.css"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/import-hydrate-include/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/htmlProduction-expected.js index b4927ae615..55bc17528f 100644 --- a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "9FdWS4tF", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; import "./foo.css"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "9FdWS4tF", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdom-expected.js index 0343b7529a..89ee4d30c2 100644 --- a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-hydrate-include/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; @@ -8,9 +9,9 @@ import "./foo.css"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/import-hydrate-include/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdomProduction-expected.js index 732169fcf6..a427db0a4e 100644 --- a/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/import-hydrate-include/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "9FdWS4tF", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; @@ -8,9 +9,9 @@ import "./foo.css"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("9FdWS4tF", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/cjs-expected.js index f03ba800c9..a186f4b21c 100644 --- a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-tag-conflict/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/import-tag-conflict/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/html-expected.js b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/html-expected.js index b0831d3cd8..8a271528b9 100644 --- a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-tag-conflict/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { asset as test } from "./test1/asset"; import { asset } from "./test2/asset"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/import-tag-conflict/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/htmlProduction-expected.js index e761961934..d1ee9249fb 100644 --- a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "xrPYS1qL", + _marko_template = _t(_marko_componentType); export default _marko_template; import { asset as test } from "./test1/asset"; import { asset } from "./test2/asset"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "xrPYS1qL", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdom-expected.js index 4e1a66f36c..45f5ebaae8 100644 --- a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-tag-conflict/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { asset as test } from "./test1/asset"; @@ -8,9 +9,9 @@ import { asset } from "./test2/asset"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/import-tag-conflict/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdomProduction-expected.js index 9a3d77f7a7..45be460578 100644 --- a/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/import-tag-conflict/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "xrPYS1qL", + _marko_template = _t(_marko_componentType); export default _marko_template; import { asset as test } from "./test1/asset"; @@ -8,9 +9,9 @@ import { asset } from "./test2/asset"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("xrPYS1qL", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/import-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/import-tag/snapshots/cjs-expected.js index 9e6f65623c..1ce8542626 100644 --- a/packages/translator-default/test/fixtures/import-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/import-tag/snapshots/cjs-expected.js @@ -19,12 +19,12 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/import-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/import-tag/snapshots/html-expected.js index 0e5ee4afc7..8a8588600d 100644 --- a/packages/translator-default/test/fixtures/import-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/import-tag/snapshots/html-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; import "./foo"; import baz from "./components/baz.marko"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/import-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/import-tag/snapshots/htmlProduction-expected.js index 8bd6f46935..2c8331dcbe 100644 --- a/packages/translator-default/test/fixtures/import-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/import-tag/snapshots/htmlProduction-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "aVPzDB9L", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; import "./foo"; import baz from "./components/baz.marko"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "aVPzDB9L", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/import-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/import-tag/snapshots/vdom-expected.js index 3398321592..4dcc03a0f1 100644 --- a/packages/translator-default/test/fixtures/import-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/import-tag/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/import-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; @@ -9,9 +10,9 @@ import baz from "./components/baz.marko"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/import-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/import-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/import-tag/snapshots/vdomProduction-expected.js index dffa4b9ee8..2d29ab46b7 100644 --- a/packages/translator-default/test/fixtures/import-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/import-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "aVPzDB9L", + _marko_template = _t(_marko_componentType); export default _marko_template; import bar, { f as foo } from "./bar"; @@ -9,9 +10,9 @@ import baz from "./components/baz.marko"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("aVPzDB9L", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/macro-non-root/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/macro-non-root/snapshots/cjs-expected.js index 11a8484f6c..67d402ec94 100644 --- a/packages/translator-default/test/fixtures/macro-non-root/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/macro-non-root/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/macro-non-root/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/macro-non-root/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); diff --git a/packages/translator-default/test/fixtures/macro-non-root/snapshots/html-expected.js b/packages/translator-default/test/fixtures/macro-non-root/snapshots/html-expected.js index 335fa7a3bb..a90fcb6b5a 100644 --- a/packages/translator-default/test/fixtures/macro-non-root/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/macro-non-root/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/macro-non-root/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/macro-non-root/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); diff --git a/packages/translator-default/test/fixtures/macro-non-root/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/macro-non-root/snapshots/htmlProduction-expected.js index 678d8115d2..6818c61da8 100644 --- a/packages/translator-default/test/fixtures/macro-non-root/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/macro-non-root/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "R6eF4gGA", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "R6eF4gGA", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); diff --git a/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdom-expected.js index f0be9b760a..00bb3f2e5a 100644 --- a/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/macro-non-root/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/macro-non-root/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); diff --git a/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdomProduction-expected.js index 6d7acfb55e..c74733d61c 100644 --- a/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/macro-non-root/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "R6eF4gGA", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("div", null, "2", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("R6eF4gGA", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); diff --git a/packages/translator-default/test/fixtures/macros/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/macros/snapshots/cjs-expected.js index e392a8d832..47ee74b0b7 100644 --- a/packages/translator-default/test/fixtures/macros/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/macros/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/macros/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/macros/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { function _renderTree(out, node) { out.w("Name: "); diff --git a/packages/translator-default/test/fixtures/macros/snapshots/html-expected.js b/packages/translator-default/test/fixtures/macros/snapshots/html-expected.js index 697a8263fd..97b0cccfc0 100644 --- a/packages/translator-default/test/fixtures/macros/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/macros/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/macros/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_dynamic_tag from "marko/src/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/macros/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { function _renderTree(out, node) { out.w("Name: "); diff --git a/packages/translator-default/test/fixtures/macros/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/macros/snapshots/htmlProduction-expected.js index e7a6c2e14e..5a9a310f41 100644 --- a/packages/translator-default/test/fixtures/macros/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/macros/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "pLQ9rpQM", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "pLQ9rpQM", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { function _renderTree(out, node) { out.w(`Name: ${_marko_escapeXml(node.name)} Children: `); diff --git a/packages/translator-default/test/fixtures/macros/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/macros/snapshots/vdom-expected.js index 595f69f91e..640eb633ce 100644 --- a/packages/translator-default/test/fixtures/macros/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/macros/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/macros/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/src/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/macros/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { function _renderTree(out, node) { out.t("Name: ", component); diff --git a/packages/translator-default/test/fixtures/macros/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/macros/snapshots/vdomProduction-expected.js index 7d6d1d1156..6a6388adce 100644 --- a/packages/translator-default/test/fixtures/macros/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/macros/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "pLQ9rpQM", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_dynamic_tag from "marko/dist/runtime/helpers/dynamic-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("pLQ9rpQM", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { function _renderTree(out, node) { out.t("Name: ", component); diff --git a/packages/translator-default/test/fixtures/no-update-directives/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/no-update-directives/snapshots/cjs-expected.js index 3c57d96198..74f2c27028 100644 --- a/packages/translator-default/test/fixtures/no-update-directives/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/no-update-directives/snapshots/cjs-expected.js @@ -15,12 +15,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/no-update-directives/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/no-update-directives/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { (0, _renderTag.default)(_preserveTag.default, { "renderBody": out => { diff --git a/packages/translator-default/test/fixtures/no-update-directives/snapshots/html-expected.js b/packages/translator-default/test/fixtures/no-update-directives/snapshots/html-expected.js index 91d4f38ff8..a8068c1a5d 100644 --- a/packages/translator-default/test/fixtures/no-update-directives/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/no-update-directives/snapshots/html-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/no-update-directives/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/src/runtime/helpers/render-tag"; import _preserve from "marko/src/core-tags/components/preserve-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/no-update-directives/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_preserve, { "renderBody": out => { diff --git a/packages/translator-default/test/fixtures/no-update-directives/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/no-update-directives/snapshots/htmlProduction-expected.js index bec8ee1607..b452bc621e 100644 --- a/packages/translator-default/test/fixtures/no-update-directives/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/no-update-directives/snapshots/htmlProduction-expected.js @@ -1,14 +1,14 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "qUg9ApxN", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import _preserve from "marko/dist/core-tags/components/preserve-tag"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "qUg9ApxN", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_preserve, { "renderBody": out => { diff --git a/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdom-expected.js index 9718c43d7e..e2246cdfd1 100644 --- a/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/no-update-directives/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -9,9 +10,9 @@ import _preserve from "marko/src/core-tags/components/preserve-tag"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/no-update-directives/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_preserve, { "renderBody": out => { diff --git a/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdomProduction-expected.js index 96790112fd..5e4736bbfe 100644 --- a/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/no-update-directives/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "qUg9ApxN", + _marko_template = _t(_marko_componentType); export default _marko_template; import _hello from "./components/hello/index.marko"; @@ -28,9 +29,9 @@ const _marko_node8 = _marko_createElement("div", null, "17", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("qUg9ApxN", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { _marko_tag(_preserve, { "renderBody": out => { diff --git a/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/cjs-expected.js index c2dd6e11d3..1f1f1a2482 100644 --- a/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/no-update-modifier-multiple/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/no-update-modifier-multiple/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w(`"); out.w(` _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.e("input", { diff --git a/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/vdomProduction-expected.js index 6582bad264..8a586d6794 100644 --- a/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/no-update-modifier-multiple/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "r46whWwu", + _marko_template = _t(_marko_componentType); export default _marko_template; import "marko/dist/runtime/vdom/preserve-attrs"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("r46whWwu", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.e("input", { diff --git a/packages/translator-default/test/fixtures/no-update-modifier/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/no-update-modifier/snapshots/cjs-expected.js index 2dbe2873d4..094ed79add 100644 --- a/packages/translator-default/test/fixtures/no-update-modifier/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/no-update-modifier/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/no-update-modifier/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/no-update-modifier/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(` _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("input", { "value": input.defaultValue diff --git a/packages/translator-default/test/fixtures/no-update-modifier/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/no-update-modifier/snapshots/vdomProduction-expected.js index 97e98c25c0..663dcae948 100644 --- a/packages/translator-default/test/fixtures/no-update-modifier/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/no-update-modifier/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "az9GXCCR", + _marko_template = _t(_marko_componentType); export default _marko_template; import "marko/dist/runtime/vdom/preserve-attrs"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("az9GXCCR", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("input", { "value": input.defaultValue diff --git a/packages/translator-default/test/fixtures/placeholders/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/placeholders/snapshots/cjs-expected.js index f2bf9ce967..61ffeb630c 100644 --- a/packages/translator-default/test/fixtures/placeholders/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/placeholders/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/placeholders/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/placeholders/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w((0, _escapeXml.x)(input.x)); diff --git a/packages/translator-default/test/fixtures/placeholders/snapshots/html-expected.js b/packages/translator-default/test/fixtures/placeholders/snapshots/html-expected.js index a2e8b764d5..660178efb8 100644 --- a/packages/translator-default/test/fixtures/placeholders/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/placeholders/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/placeholders/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_to_string from "marko/src/runtime/helpers/to-string"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/placeholders/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w(_marko_escapeXml(input.x)); diff --git a/packages/translator-default/test/fixtures/placeholders/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/placeholders/snapshots/htmlProduction-expected.js index a7837bede3..06604d58c9 100644 --- a/packages/translator-default/test/fixtures/placeholders/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/placeholders/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "jxXJawbJ", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_to_string from "marko/dist/runtime/helpers/to-string"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "jxXJawbJ", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
${_marko_escapeXml(input.x)}Hello world <a/>${_marko_to_string(input.x)}Hello world
`); }, { diff --git a/packages/translator-default/test/fixtures/placeholders/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/placeholders/snapshots/vdom-expected.js index 98fe031a95..24cd9a3c28 100644 --- a/packages/translator-default/test/fixtures/placeholders/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/placeholders/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/placeholders/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/placeholders/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.t(input.x, component); diff --git a/packages/translator-default/test/fixtures/placeholders/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/placeholders/snapshots/vdomProduction-expected.js index 6431eaffb7..77d54c640a 100644 --- a/packages/translator-default/test/fixtures/placeholders/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/placeholders/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "jxXJawbJ", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -12,9 +13,9 @@ const _marko_node2 = _marko_createElement("style", null, "2", null, 3, 0).t("\n import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("jxXJawbJ", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.t(input.x, component); diff --git a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/cjs-expected.js index d66e7c0c82..5a98ab801a 100644 --- a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/prevent-override-component-def/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/prevent-override-component-def/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component2, component, state) { const _component = "test"; out.w("
"); diff --git a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/html-expected.js b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/html-expected.js index 760840a8e1..d02acab77a 100644 --- a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/prevent-override-component-def/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/prevent-override-component-def/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component2, component, state) { const _component = "test"; out.w("
"); diff --git a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/htmlProduction-expected.js index bd675e4e27..bef3c08cae 100644 --- a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "AWlOZ9B/", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "AWlOZ9B/", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component2, component, state) { const _component = "test"; out.w("
"); diff --git a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdom-expected.js index 2acd2a3c55..e1a30c7ba8 100644 --- a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/prevent-override-component-def/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/prevent-override-component-def/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component2, component, state) { const _component = "test"; out.e("div", null, "0", component, 0, 0); diff --git a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdomProduction-expected.js index 1441b7c470..c40d1ebcf1 100644 --- a/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/prevent-override-component-def/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "AWlOZ9B/", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("div", null, "0", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("AWlOZ9B/", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component2, component, state) { const _component = "test"; out.n(_marko_node, component); diff --git a/packages/translator-default/test/fixtures/root-migration/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/root-migration/snapshots/cjs-expected.js index 447ceeb942..f7c66e007c 100644 --- a/packages/translator-default/test/fixtures/root-migration/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/root-migration/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/root-migration/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/root-migration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/root-migration/snapshots/html-expected.js b/packages/translator-default/test/fixtures/root-migration/snapshots/html-expected.js index 1844836f7a..6c5faba68d 100644 --- a/packages/translator-default/test/fixtures/root-migration/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/root-migration/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/root-migration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/root-migration/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/root-migration/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/root-migration/snapshots/htmlProduction-expected.js index b5bc173e19..b1c0ce98c5 100644 --- a/packages/translator-default/test/fixtures/root-migration/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/root-migration/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "iJY8a2Ko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "iJY8a2Ko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/root-migration/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/root-migration/snapshots/vdom-expected.js index 9a3b182c4f..204e7a7884 100644 --- a/packages/translator-default/test/fixtures/root-migration/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/root-migration/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/root-migration/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/root-migration/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "a": new diff --git a/packages/translator-default/test/fixtures/root-migration/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/root-migration/snapshots/vdomProduction-expected.js index da73bdabe7..92f9f224de 100644 --- a/packages/translator-default/test/fixtures/root-migration/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/root-migration/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "iJY8a2Ko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("iJY8a2Ko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "a": new diff --git a/packages/translator-default/test/fixtures/root-transform/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/root-transform/snapshots/cjs-expected.js index 4ef1947eb4..5794cb7b2a 100644 --- a/packages/translator-default/test/fixtures/root-transform/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/root-transform/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/root-transform/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/root-transform/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/root-transform/snapshots/html-expected.js b/packages/translator-default/test/fixtures/root-transform/snapshots/html-expected.js index 8872b15dca..778577e87b 100644 --- a/packages/translator-default/test/fixtures/root-transform/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/root-transform/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/root-transform/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/root-transform/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/root-transform/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/root-transform/snapshots/htmlProduction-expected.js index 514b3131ac..31229fb45d 100644 --- a/packages/translator-default/test/fixtures/root-transform/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/root-transform/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "dqltXdhn", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "dqltXdhn", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/root-transform/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/root-transform/snapshots/vdom-expected.js index b0fe5d7135..16c516e973 100644 --- a/packages/translator-default/test/fixtures/root-transform/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/root-transform/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/root-transform/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/root-transform/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "a": after diff --git a/packages/translator-default/test/fixtures/root-transform/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/root-transform/snapshots/vdomProduction-expected.js index 88748f9fd6..fdd12b1cd5 100644 --- a/packages/translator-default/test/fixtures/root-transform/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/root-transform/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "dqltXdhn", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("dqltXdhn", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "a": after diff --git a/packages/translator-default/test/fixtures/sanity-check/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/sanity-check/snapshots/cjs-expected.js index 88e43ef660..0a45b49093 100644 --- a/packages/translator-default/test/fixtures/sanity-check/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/sanity-check/snapshots/cjs-expected.js @@ -29,7 +29,8 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/sanity-check/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; @@ -40,8 +41,7 @@ function more() { abc(); } -const _marko_componentType = "packages/translator-default/test/fixtures/sanity-check/template.marko", - _marko_component = { +const _marko_component = { onCreate() { this.stuff(); } diff --git a/packages/translator-default/test/fixtures/sanity-check/snapshots/html-expected.js b/packages/translator-default/test/fixtures/sanity-check/snapshots/html-expected.js index 6bac90a690..a17f1a2420 100644 --- a/packages/translator-default/test/fixtures/sanity-check/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/sanity-check/snapshots/html-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/sanity-check/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import a from "b"; @@ -21,8 +22,7 @@ import _marko_tag from "marko/src/runtime/helpers/render-tag"; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_attrs from "marko/src/runtime/html/helpers/attrs"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/sanity-check/template.marko", - _marko_component = { +const _marko_component = { onCreate() { this.stuff(); } diff --git a/packages/translator-default/test/fixtures/sanity-check/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/sanity-check/snapshots/htmlProduction-expected.js index b4e5e619a6..14813148b8 100644 --- a/packages/translator-default/test/fixtures/sanity-check/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/sanity-check/snapshots/htmlProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "OLFRWJ/R", + _marko_template = _t(_marko_componentType); export default _marko_template; import a from "b"; @@ -21,8 +22,7 @@ import _marko_tag from "marko/dist/runtime/helpers/render-tag"; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_attrs from "marko/dist/runtime/html/helpers/attrs"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "OLFRWJ/R", - _marko_component = { +const _marko_component = { onCreate() { this.stuff(); } diff --git a/packages/translator-default/test/fixtures/sanity-check/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/sanity-check/snapshots/vdom-expected.js index bd377d6222..a16f96d544 100644 --- a/packages/translator-default/test/fixtures/sanity-check/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/sanity-check/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/sanity-check/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import a from "b"; @@ -19,14 +20,14 @@ import _marko_attrs from "marko/src/runtime/vdom/helpers/attrs"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/sanity-check/template.marko", () => _marko_template), - _marko_component = { +_marko_registerComponent(_marko_componentType, () => _marko_template); + +const _marko_component = { onCreate() { this.stuff(); } }; - _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("style", { "id": "css" diff --git a/packages/translator-default/test/fixtures/sanity-check/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/sanity-check/snapshots/vdomProduction-expected.js index 7ada1c5f9d..ffd6300901 100644 --- a/packages/translator-default/test/fixtures/sanity-check/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/sanity-check/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "OLFRWJ/R", + _marko_template = _t(_marko_componentType); export default _marko_template; import a from "b"; @@ -52,14 +53,14 @@ const _marko_node10 = _marko_createElement("div", null, "24", null, 1, 0).t("123 import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("OLFRWJ/R", () => _marko_template), - _marko_component = { +_marko_registerComponent(_marko_componentType, () => _marko_template); + +const _marko_component = { onCreate() { this.stuff(); } }; - _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("style", { "id": "css" diff --git a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/cjs-expected.js index 1609b52373..634f995582 100644 --- a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/scriptlet-line-block/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/scriptlet-line-block/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { var foo = 123; diff --git a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/html-expected.js b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/html-expected.js index 625279e75a..8b1cefb7d2 100644 --- a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/scriptlet-line-block/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/scriptlet-line-block/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var foo = 123; diff --git a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/htmlProduction-expected.js index a73a526d42..e29b6be4e1 100644 --- a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "g3aimRge", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "g3aimRge", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var foo = 123; diff --git a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdom-expected.js index 92254c033c..9efa0e7852 100644 --- a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/scriptlet-line-block/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/scriptlet-line-block/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var foo = 123; diff --git a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdomProduction-expected.js index f49ed7177b..c601783d7d 100644 --- a/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/scriptlet-line-block/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "g3aimRge", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("g3aimRge", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var foo = 123; diff --git a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/cjs-expected.js index e941083b93..61507efec4 100644 --- a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/cjs-expected.js @@ -13,12 +13,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-classname/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-classname/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/html-expected.js b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/html-expected.js index ee0c6e31b4..03bb7c7f74 100644 --- a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/html-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-classname/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/src/runtime/helpers/class-value"; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-classname/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/htmlProduction-expected.js index 30ecff9427..4fe78801a9 100644 --- a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/htmlProduction-expected.js @@ -1,13 +1,13 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "WqUsRyBC", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/dist/runtime/helpers/class-value"; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "WqUsRyBC", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdom-expected.js index ffe6662744..850584c890 100644 --- a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-classname/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/src/runtime/helpers/class-value"; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/shorthand-classname/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": "shorthand" diff --git a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdomProduction-expected.js index 9eaeb3e211..e206c792e2 100644 --- a/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-classname/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "WqUsRyBC", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_class_merge from "marko/dist/runtime/helpers/class-value"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("WqUsRyBC", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": "shorthand" diff --git a/packages/translator-default/test/fixtures/shorthand-id/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/shorthand-id/snapshots/cjs-expected.js index 0fb10b6791..fc8d6ed43c 100644 --- a/packages/translator-default/test/fixtures/shorthand-id/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-id/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-id/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-id/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w(``); diff --git a/packages/translator-default/test/fixtures/shorthand-id/snapshots/html-expected.js b/packages/translator-default/test/fixtures/shorthand-id/snapshots/html-expected.js index e58524ddbc..605846dac5 100644 --- a/packages/translator-default/test/fixtures/shorthand-id/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-id/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-id/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-id/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w(``); diff --git a/packages/translator-default/test/fixtures/shorthand-id/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/shorthand-id/snapshots/htmlProduction-expected.js index 6a397d8fa3..64fc03b95b 100644 --- a/packages/translator-default/test/fixtures/shorthand-id/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-id/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "wUxkdMJU", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "wUxkdMJU", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdom-expected.js index a9a066b179..c1d1ed360c 100644 --- a/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/shorthand-id/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/shorthand-id/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "id": "shorthand" diff --git a/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdomProduction-expected.js index f9093494b9..ff22111756 100644 --- a/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/shorthand-id/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "wUxkdMJU", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -12,9 +13,9 @@ const _marko_node = _marko_createElement("div", { import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("wUxkdMJU", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); out.e("div", { diff --git a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/cjs-expected.js index 6e1330e275..3bece6514b 100644 --- a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/simple-attrs-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/simple-attrs-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/html-expected.js index 2bdf2fab69..1f218c55d8 100644 --- a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/simple-attrs-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_props from "marko/src/runtime/html/helpers/data-marko"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/simple-attrs-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/htmlProduction-expected.js index 7d5c24ff42..c8124c702a 100644 --- a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "YUZPhHIa", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_props from "marko/dist/runtime/html/helpers/data-marko"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "YUZPhHIa", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
_marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "style": "c:1px;", diff --git a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/vdomProduction-expected.js index 17a4209f52..54ea28b52e 100644 --- a/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/simple-attrs-tag/snapshots/vdomProduction-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "YUZPhHIa", + _marko_template = _t(_marko_componentType); export default _marko_template; import "marko/dist/runtime/vdom/preserve-attrs"; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("YUZPhHIa", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "style": "c:1px;", diff --git a/packages/translator-default/test/fixtures/simple/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/simple/snapshots/cjs-expected.js index d90ad7ad4b..ba58fe96d5 100644 --- a/packages/translator-default/test/fixtures/simple/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/simple/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/simple/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/simple/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("Hello "); out.w((0, _escapeXml.x)(input.name)); diff --git a/packages/translator-default/test/fixtures/simple/snapshots/html-expected.js b/packages/translator-default/test/fixtures/simple/snapshots/html-expected.js index f2dbc2cb35..b9d0c44597 100644 --- a/packages/translator-default/test/fixtures/simple/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/simple/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/simple/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/simple/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello "); out.w(_marko_escapeXml(input.name)); diff --git a/packages/translator-default/test/fixtures/simple/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/simple/snapshots/htmlProduction-expected.js index 4cf4dd09ac..6c6a2793dd 100644 --- a/packages/translator-default/test/fixtures/simple/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/simple/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "NRekT+g6", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "NRekT+g6", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`Hello ${_marko_escapeXml(input.name)}! `); diff --git a/packages/translator-default/test/fixtures/simple/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/simple/snapshots/vdom-expected.js index d6f019d91a..6a69b91890 100644 --- a/packages/translator-default/test/fixtures/simple/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/simple/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/simple/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/simple/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello ", component); out.t(input.name, component); diff --git a/packages/translator-default/test/fixtures/simple/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/simple/snapshots/vdomProduction-expected.js index bfb603bccf..544691b4dc 100644 --- a/packages/translator-default/test/fixtures/simple/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/simple/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "NRekT+g6", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("div", null, "2", null, 1, 0).t("No col import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("NRekT+g6", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello ", component); out.t(input.name, component); diff --git a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/cjs-expected.js index d03a808f74..876689d760 100644 --- a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/split-component-with-component/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/split-component-with-component/template.marko", - _marko_component2 = _templateComponent.default; +const _marko_component2 = _templateComponent.default; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/html-expected.js b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/html-expected.js index fe53df040d..6da556804f 100644 --- a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/split-component-with-component/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/split-component-with-component/template.marko", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/htmlProduction-expected.js index 9f96bfcfa7..a361eb147c 100644 --- a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "Wgq3cfjm", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "Wgq3cfjm", - _marko_component2 = _marko_component; +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdom-expected.js index 739411f1f6..4f46af8a54 100644 --- a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/split-component-with-component/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_component from "./template.component.js"; @@ -8,9 +9,9 @@ import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; import _marko_split_component from "./template.component-browser.js"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/split-component-with-component/template.marko", () => _marko_split_component), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_split_component); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdomProduction-expected.js index 44b55cdddb..d9baafe1c8 100644 --- a/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/split-component-with-component/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "Wgq3cfjm", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -12,9 +13,9 @@ import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; import _marko_split_component from "./template.component-browser.js"; -const _marko_componentType = _marko_registerComponent("Wgq3cfjm", () => _marko_split_component), - _marko_component2 = _marko_component; +_marko_registerComponent(_marko_componentType, () => _marko_split_component); +const _marko_component2 = _marko_component; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/split-component/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/split-component/snapshots/cjs-expected.js index e24605dd18..195c886ce9 100644 --- a/packages/translator-default/test/fixtures/split-component/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/split-component/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/split-component/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/split-component/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/split-component/snapshots/html-expected.js b/packages/translator-default/test/fixtures/split-component/snapshots/html-expected.js index a12f42bb71..da899cb8f3 100644 --- a/packages/translator-default/test/fixtures/split-component/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/split-component/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/split-component/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/split-component/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/split-component/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/split-component/snapshots/htmlProduction-expected.js index 0d46d52d68..bf4d18a8cb 100644 --- a/packages/translator-default/test/fixtures/split-component/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/split-component/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "tgVjO8nX", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "tgVjO8nX", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/split-component/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/split-component/snapshots/vdom-expected.js index f3da6bb86b..bf3d94c4fe 100644 --- a/packages/translator-default/test/fixtures/split-component/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/split-component/snapshots/vdom-expected.js @@ -1,15 +1,16 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/split-component/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; import _marko_split_component from "./template.component-browser.js"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/split-component/template.marko", () => _marko_split_component), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_split_component); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", null, "0", component, 0, 0); }, { diff --git a/packages/translator-default/test/fixtures/split-component/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/split-component/snapshots/vdomProduction-expected.js index 065cbed998..63e2c94889 100644 --- a/packages/translator-default/test/fixtures/split-component/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/split-component/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "tgVjO8nX", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -11,9 +12,9 @@ import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; import _marko_split_component from "./template.component-browser.js"; -const _marko_componentType = _marko_registerComponent("tgVjO8nX", () => _marko_split_component), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_split_component); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/static-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/static-tag/snapshots/cjs-expected.js index 5a46d80cbb..ecf6b1c892 100644 --- a/packages/translator-default/test/fixtures/static-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/static-tag/snapshots/cjs-expected.js @@ -9,7 +9,8 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/static-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; @@ -18,8 +19,7 @@ var foo = 123; function bar() {} var baz = 456; -const _marko_componentType = "packages/translator-default/test/fixtures/static-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/static-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/static-tag/snapshots/html-expected.js index 8d47bbcf68..df35ce7dcc 100644 --- a/packages/translator-default/test/fixtures/static-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/static-tag/snapshots/html-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/static-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; var foo = 123; @@ -9,8 +10,7 @@ function bar() {} var baz = 456; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/static-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/static-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/static-tag/snapshots/htmlProduction-expected.js index 750e0bc404..ca289b899f 100644 --- a/packages/translator-default/test/fixtures/static-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/static-tag/snapshots/htmlProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "zKxreLgp", + _marko_template = _t(_marko_componentType); export default _marko_template; var foo = 123; @@ -9,8 +10,7 @@ function bar() {} var baz = 456; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "zKxreLgp", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/static-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/static-tag/snapshots/vdom-expected.js index 0212e7878b..7871623088 100644 --- a/packages/translator-default/test/fixtures/static-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/static-tag/snapshots/vdom-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/static-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; var foo = 123; @@ -11,9 +12,9 @@ var baz = 456; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/static-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true, diff --git a/packages/translator-default/test/fixtures/static-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/static-tag/snapshots/vdomProduction-expected.js index e8885274b7..7f5667d123 100644 --- a/packages/translator-default/test/fixtures/static-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/static-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "zKxreLgp", + _marko_template = _t(_marko_componentType); export default _marko_template; var foo = 123; @@ -11,9 +12,9 @@ var baz = 456; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("zKxreLgp", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) {}, { t: _marko_componentType, i: true diff --git a/packages/translator-default/test/fixtures/style-block-empty/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/style-block-empty/snapshots/cjs-expected.js index 176ba49d2f..e3dca63e5d 100644 --- a/packages/translator-default/test/fixtures/style-block-empty/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/style-block-empty/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/style-block-empty/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/style-block-empty/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/style-block-empty/snapshots/html-expected.js b/packages/translator-default/test/fixtures/style-block-empty/snapshots/html-expected.js index b639b3c9ac..5acdb82100 100644 --- a/packages/translator-default/test/fixtures/style-block-empty/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/style-block-empty/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/style-block-empty/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/style-block-empty/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/style-block-empty/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/style-block-empty/snapshots/htmlProduction-expected.js index d6c3330e89..358e1b1fce 100644 --- a/packages/translator-default/test/fixtures/style-block-empty/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/style-block-empty/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "iTWeM9Hv", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "iTWeM9Hv", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdom-expected.js index 7e4e2443fe..c89fb5340e 100644 --- a/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/style-block-empty/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/style-block-empty/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": "test" diff --git a/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdomProduction-expected.js index a93b72cfe7..e63d4a0f80 100644 --- a/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/style-block-empty/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "iTWeM9Hv", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("iTWeM9Hv", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": "test" diff --git a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/cjs-expected.js index 16cd0ae012..507a95f975 100644 --- a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/style-block-with-styles/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/style-block-with-styles/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/html-expected.js b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/html-expected.js index 3d24094269..7e0791b925 100644 --- a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/style-block-with-styles/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/style-block-with-styles/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/htmlProduction-expected.js index d85f0733cc..ff91a2c336 100644 --- a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "ZsW3uNOB", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "ZsW3uNOB", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); }, { diff --git a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdom-expected.js index 82ad9b560a..d7f8aaaf29 100644 --- a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/style-block-with-styles/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/style-block-with-styles/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": "test" diff --git a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdomProduction-expected.js index 2b5336b5af..bcc668e5ca 100644 --- a/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/style-block-with-styles/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "ZsW3uNOB", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("ZsW3uNOB", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "class": "test" diff --git a/packages/translator-default/test/fixtures/svg-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/svg-tag/snapshots/cjs-expected.js index c86066ba4e..337ee930cd 100644 --- a/packages/translator-default/test/fixtures/svg-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/svg-tag/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/svg-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/svg-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); out.w(""); diff --git a/packages/translator-default/test/fixtures/svg-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/svg-tag/snapshots/html-expected.js index 04fcc24671..42f906dbf0 100644 --- a/packages/translator-default/test/fixtures/svg-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/svg-tag/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/svg-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/svg-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(""); out.w(""); diff --git a/packages/translator-default/test/fixtures/svg-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/svg-tag/snapshots/htmlProduction-expected.js index a6d6e9c262..bef55622b3 100644 --- a/packages/translator-default/test/fixtures/svg-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/svg-tag/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "LOy6P2CY", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "LOy6P2CY", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("TestMDN Web Docs"); }, { diff --git a/packages/translator-default/test/fixtures/svg-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/svg-tag/snapshots/vdom-expected.js index 4d8611f7bc..9fd50274b2 100644 --- a/packages/translator-default/test/fixtures/svg-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/svg-tag/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/svg-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/svg-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("svg", { "height": "100", diff --git a/packages/translator-default/test/fixtures/svg-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/svg-tag/snapshots/vdomProduction-expected.js index 9ff117e575..547b0e0cca 100644 --- a/packages/translator-default/test/fixtures/svg-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/svg-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "LOy6P2CY", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -32,9 +33,9 @@ const _marko_node7 = _marko_createElement("a", null, "8", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("LOy6P2CY", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("svg", { "height": "100", diff --git a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/cjs-expected.js index 99ac2d935d..3fae66d03d 100644 --- a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/tag-block-scoping/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/tag-block-scoping/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { var b = thing; let c = thing; diff --git a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/html-expected.js b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/html-expected.js index a23affe795..8f78231c52 100644 --- a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/tag-block-scoping/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/tag-block-scoping/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var b = thing; let c = thing; diff --git a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/htmlProduction-expected.js index 6b3c9979e8..7feba4df07 100644 --- a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "s8GmyX5C", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "s8GmyX5C", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var b = thing; let c = thing; diff --git a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdom-expected.js index 2485f975f1..fece622db8 100644 --- a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/tag-block-scoping/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/tag-block-scoping/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var b = thing; let c = thing; diff --git a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdomProduction-expected.js index ccb0e15f08..ec167edb93 100644 --- a/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/tag-block-scoping/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "s8GmyX5C", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("s8GmyX5C", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { var b = thing; let c = thing; diff --git a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/cjs-expected.js index 44b1a6559b..60b5f79893 100644 --- a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/tag-with-default-attr/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/tag-with-default-attr/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/html-expected.js b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/html-expected.js index 10bccd8a6b..3080fb5b33 100644 --- a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/tag-with-default-attr/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/src/runtime/html/helpers/attr"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/tag-with-default-attr/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/htmlProduction-expected.js index 181cfde225..43031ea00e 100644 --- a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "d4MwwGDt", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_attr from "marko/dist/runtime/html/helpers/attr"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "d4MwwGDt", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w(`
`); }, { diff --git a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdom-expected.js index 2490a1249c..912ae20df9 100644 --- a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/tag-with-default-attr/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/tag-with-default-attr/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.e("div", { "default": "" diff --git a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdomProduction-expected.js index 45c75c83f3..a8b319c7fe 100644 --- a/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/tag-with-default-attr/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "d4MwwGDt", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -14,9 +15,9 @@ const _marko_node2 = _marko_createElement("div", null, "1", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("d4MwwGDt", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); out.n(_marko_node2, component); diff --git a/packages/translator-default/test/fixtures/textarea-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/textarea-tag/snapshots/cjs-expected.js index aa52dc8d17..04990f9f72 100644 --- a/packages/translator-default/test/fixtures/textarea-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/textarea-tag/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/textarea-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/textarea-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w(""); }, { diff --git a/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdom-expected.js index acda9ccf99..dc9ad9be6c 100644 --- a/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/textarea-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/textarea-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("textarea", null, "0", component, null, 0); out.t("\n hello world\n", component); diff --git a/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdomProduction-expected.js index d6e43c2f1d..9e2d2efd57 100644 --- a/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/textarea-tag/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "or1T1BHP", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -10,9 +11,9 @@ const _marko_node = _marko_createElement("textarea", null, "0", null, 1, 0).t("\ import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("or1T1BHP", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); }, { diff --git a/packages/translator-default/test/fixtures/top-level-text/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/top-level-text/snapshots/cjs-expected.js index 1582b3d1d1..0dace140cf 100644 --- a/packages/translator-default/test/fixtures/top-level-text/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/top-level-text/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/top-level-text/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/top-level-text/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("Hello John"); }, { diff --git a/packages/translator-default/test/fixtures/top-level-text/snapshots/html-expected.js b/packages/translator-default/test/fixtures/top-level-text/snapshots/html-expected.js index 37a0dde9de..e86ac2a79d 100644 --- a/packages/translator-default/test/fixtures/top-level-text/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/top-level-text/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/top-level-text/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/top-level-text/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello John"); }, { diff --git a/packages/translator-default/test/fixtures/top-level-text/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/top-level-text/snapshots/htmlProduction-expected.js index 54eed82078..89c8c2e588 100644 --- a/packages/translator-default/test/fixtures/top-level-text/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/top-level-text/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "L6x2qKS4", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "L6x2qKS4", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("Hello John"); }, { diff --git a/packages/translator-default/test/fixtures/top-level-text/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/top-level-text/snapshots/vdom-expected.js index 58b72a6585..2cd04be1fc 100644 --- a/packages/translator-default/test/fixtures/top-level-text/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/top-level-text/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/top-level-text/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/top-level-text/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello John", component); }, { diff --git a/packages/translator-default/test/fixtures/top-level-text/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/top-level-text/snapshots/vdomProduction-expected.js index 2c39ddd03c..a0142f7e0a 100644 --- a/packages/translator-default/test/fixtures/top-level-text/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/top-level-text/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "L6x2qKS4", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("L6x2qKS4", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.t("Hello John", component); }, { diff --git a/packages/translator-default/test/fixtures/while-tag/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/while-tag/snapshots/cjs-expected.js index 2f00f7d21e..1e252a445e 100644 --- a/packages/translator-default/test/fixtures/while-tag/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/while-tag/snapshots/cjs-expected.js @@ -9,12 +9,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/while-tag/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/while-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { let i = 0; let _keyValue = 0; diff --git a/packages/translator-default/test/fixtures/while-tag/snapshots/html-expected.js b/packages/translator-default/test/fixtures/while-tag/snapshots/html-expected.js index f15abd171c..a6612b9207 100644 --- a/packages/translator-default/test/fixtures/while-tag/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/while-tag/snapshots/html-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/while-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/while-tag/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let i = 0; let _keyValue = 0; diff --git a/packages/translator-default/test/fixtures/while-tag/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/while-tag/snapshots/htmlProduction-expected.js index c52e62e9cb..94361b8191 100644 --- a/packages/translator-default/test/fixtures/while-tag/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/while-tag/snapshots/htmlProduction-expected.js @@ -1,11 +1,11 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "R2kcOR51", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "R2kcOR51", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let i = 0; let _keyValue = 0; diff --git a/packages/translator-default/test/fixtures/while-tag/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/while-tag/snapshots/vdom-expected.js index 0dc856a351..5a18352996 100644 --- a/packages/translator-default/test/fixtures/while-tag/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/while-tag/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/while-tag/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/while-tag/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let i = 0; let _keyValue = 0; diff --git a/packages/translator-default/test/fixtures/while-tag/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/while-tag/snapshots/vdomProduction-expected.js index e5e57f97f3..a1c34de90f 100644 --- a/packages/translator-default/test/fixtures/while-tag/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/while-tag/snapshots/vdomProduction-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "R2kcOR51", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("R2kcOR51", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { let i = 0; let _keyValue = 0; diff --git a/packages/translator-default/test/fixtures/white-space-test/snapshots/cjs-expected.js b/packages/translator-default/test/fixtures/white-space-test/snapshots/cjs-expected.js index 70bdfdde24..9604a559c6 100644 --- a/packages/translator-default/test/fixtures/white-space-test/snapshots/cjs-expected.js +++ b/packages/translator-default/test/fixtures/white-space-test/snapshots/cjs-expected.js @@ -11,12 +11,12 @@ var _renderer = _interopRequireDefault(require("marko/src/runtime/components/ren function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const _marko_template = (0, _html.t)(); +const _marko_componentType = "packages/translator-default/test/fixtures/white-space-test/template.marko", + _marko_template = (0, _html.t)(_marko_componentType); var _default = _marko_template; exports.default = _default; -const _marko_componentType = "packages/translator-default/test/fixtures/white-space-test/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = (0, _renderer.default)(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/white-space-test/snapshots/html-expected.js b/packages/translator-default/test/fixtures/white-space-test/snapshots/html-expected.js index a0cbe2ec68..3e1e096cdc 100644 --- a/packages/translator-default/test/fixtures/white-space-test/snapshots/html-expected.js +++ b/packages/translator-default/test/fixtures/white-space-test/snapshots/html-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/src/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/white-space-test/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/src/runtime/html/helpers/escape-xml"; import _marko_renderer from "marko/src/runtime/components/renderer"; -const _marko_componentType = "packages/translator-default/test/fixtures/white-space-test/template.marko", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
"); out.w("
"); diff --git a/packages/translator-default/test/fixtures/white-space-test/snapshots/htmlProduction-expected.js b/packages/translator-default/test/fixtures/white-space-test/snapshots/htmlProduction-expected.js index 567935eacc..6b6fa47685 100644 --- a/packages/translator-default/test/fixtures/white-space-test/snapshots/htmlProduction-expected.js +++ b/packages/translator-default/test/fixtures/white-space-test/snapshots/htmlProduction-expected.js @@ -1,12 +1,12 @@ import { t as _t } from "marko/dist/runtime/html"; -const _marko_template = _t(); +const _marko_componentType = "TRrwGTtp", + _marko_template = _t(_marko_componentType); export default _marko_template; import { x as _marko_escapeXml } from "marko/dist/runtime/html/helpers/escape-xml"; import _marko_renderer from "marko/dist/runtime/components/renderer"; -const _marko_componentType = "TRrwGTtp", - _marko_component = {}; +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.w("
Hello
World
Hello
\n    This should  \n      be preserved\n  
Hello
"); scriptletA(); diff --git a/packages/translator-default/test/fixtures/white-space-test/snapshots/vdom-expected.js b/packages/translator-default/test/fixtures/white-space-test/snapshots/vdom-expected.js index b13c34221a..474d70209a 100644 --- a/packages/translator-default/test/fixtures/white-space-test/snapshots/vdom-expected.js +++ b/packages/translator-default/test/fixtures/white-space-test/snapshots/vdom-expected.js @@ -1,14 +1,15 @@ import { t as _t } from "marko/src/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "packages/translator-default/test/fixtures/white-space-test/template.marko", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_renderer from "marko/src/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/src/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("packages/translator-default/test/fixtures/white-space-test/template.marko", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.be("div", null, "0", component, null, 0); out.be("div", null, "1", component, null, 0); diff --git a/packages/translator-default/test/fixtures/white-space-test/snapshots/vdomProduction-expected.js b/packages/translator-default/test/fixtures/white-space-test/snapshots/vdomProduction-expected.js index 2e77bf412c..f3b6d2d0e7 100644 --- a/packages/translator-default/test/fixtures/white-space-test/snapshots/vdomProduction-expected.js +++ b/packages/translator-default/test/fixtures/white-space-test/snapshots/vdomProduction-expected.js @@ -1,6 +1,7 @@ import { t as _t } from "marko/dist/runtime/vdom"; -const _marko_template = _t(); +const _marko_componentType = "TRrwGTtp", + _marko_template = _t(_marko_componentType); export default _marko_template; import _marko_createElement from "marko/dist/runtime/vdom/helpers/v-element"; @@ -12,9 +13,9 @@ const _marko_node2 = _marko_createElement("div", null, "2", null, 0, 0); import _marko_renderer from "marko/dist/runtime/components/renderer"; import { r as _marko_registerComponent } from "marko/dist/runtime/components/registry"; -const _marko_componentType = _marko_registerComponent("TRrwGTtp", () => _marko_template), - _marko_component = {}; +_marko_registerComponent(_marko_componentType, () => _marko_template); +const _marko_component = {}; _marko_template._ = _marko_renderer(function (input, out, _component, component, state) { out.n(_marko_node, component); out.be("div", null, "1", component, null, 0);