-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(runtime-core): #7203 - adds support for custom element hydration #7300
Closed
steveworkman
wants to merge
183
commits into
vuejs:main
from
steveworkman:feat/7203-custom-element-hyrdration
Closed
Changes from 2 commits
Commits
Show all changes
183 commits
Select commit
Hold shift + click to select a range
d445b31
fix(runtime-core): #7203 - adds support for custom element hydration
steveworkman 3ccd929
chore(runtime-core): removed console.log from unit test
steveworkman 510abf9
Merge remote-tracking branch 'origin/main' into feat/7203-custom-elem…
steveworkman 81587b3
fix(runtime-core): registered custom elements should have all properi…
steveworkman 6584906
test: removed changes to unrelated test
steveworkman 95d92b3
fix: added isCustomElement check for patching in production
steveworkman 277f198
chore: run format
antfu 0e314ee
chore: apply format
antfu 2070d17
fix(shared): `feDistanceLight` changed to `feDistantLight` (#7540)
baiwusanyu-c 6a27b80
fix(build): ensure cjs re-exports can be properly detected when impor…
yyx990803 1431554
fix(build): fix cjs re-exports check for compat build
yyx990803 f3bcf00
chore: bump vite and esbuild
yyx990803 591088f
build: update build scripts to esm
yyx990803 88b6c92
wip(vitest-migration): reactivity tests passing
yyx990803 ba02d6e
wip(vitest-migration): shared tests passing
yyx990803 906d0eb
build: fix build script
yyx990803 8a795e5
wip(vitest-migration): ssr tests passing
yyx990803 834b1bb
wip(vitest-migration): compiler-core tests passing
yyx990803 959aa9f
wip(vitest-migration): compiler-dom tests passing
yyx990803 53ac665
wip(vitest-migration): compiler-sfc tests passing
yyx990803 6689aef
wip(vitest-migration): compiler-ssr tests passing
yyx990803 1bcb239
wip(vitest-migration): compat tests passing
yyx990803 3480d4b
wip(vitest-migration): runtime-core tests passing
yyx990803 ec015f1
chore: only wrap during tests
yyx990803 a628079
wip(vitest-migration): runtime-dom tests passing + use environmentMat…
yyx990803 3a24538
wip(vitest-migration): all tests passing
yyx990803 8dce248
workflow: complete migration from jest to vitest
yyx990803 657b5a3
chore: replace test global types with vitest types
yyx990803 5542380
chore: explicitly install jsdom
yyx990803 afd9a00
ci: fix dts tests
yyx990803 7687d82
test: configure test hooks sequence order, remove workaround
yyx990803 df1cfd1
chore: fix broken link (#7589)
vaakian 1f393c4
build: do not throw when running `build --release` for the 1st time (…
haoqunjiang 0b2fe2e
chore: remove debugging log
sxzz f485765
chore: remove unused import
yyx990803 16684ec
fix(build): ensure type exports is first
yyx990803 f8ffe58
test: fix await patch prop case (#7600)
sxzz a6b4821
chore: update caniuse
yyx990803 427e1b6
ci: bump netlify node version
yyx990803 94c0ba7
fix(types): accept sync `serverPrefetch()` (#7000)
antfu a582afe
fix(reactivity): `triggerRef` working with `toRef` from reactive (#7507)
antfu 2ea880c
fix(compat): fix custom transition classes in compat mode (#7435)
SxDx b13c051
chore: fix jest reference in merged test case
yyx990803 b449ea0
fix(runtime-core): fix keep-alive cache prune logic on vnodes with sa…
GRPdream 1765323
fix(compiler-sfc): support resolving type declaration from normal scr…
edison1105 2a61107
fix(types): optional boolean props should have boolean type in return…
sxzz 6d1a482
workflow: check ci status during release
yyx990803 45dc8f7
release: v3.2.46
yyx990803 73e426a
fix(build): enforce __esModule interop for cjs builds
yyx990803 d47a1b2
release: v3.2.47
yyx990803 a75d185
chore: fix types
yyx990803 0f62bdb
chore: fix size reporting for brotli
yyx990803 53c83c1
fix(build): ensure BaseTransition functions can be tree-shaken
yyx990803 040ede5
chore: define compile time flags during size check
yyx990803 2836dcc
workflow: disable threads during tests
yyx990803 92f2cf0
build: only enable esModule compat for cjs builds
yyx990803 65dd0c5
wip: isolatedModules + use rollup-plugin-esbuild
yyx990803 7bd9e7b
chore: remove rpts2
yyx990803 ceb5f37
workflow: type check on commit
yyx990803 929407d
chore: remove hanging slash from import
yyx990803 ed672eb
build: refactor rollup config
yyx990803 710ae60
chore: bump deps
yyx990803 9c3c09b
build: custom const enum processing
yyx990803 0ef6bfd
build: use rollup-plugin-dts for dts build
yyx990803 73e3a2b
build: remove api-extractor
yyx990803 458f790
build: fix handling of const enum that rely on previous values
yyx990803 3271d73
ci: try puppeteer fix
yyx990803 943c336
build: adjust dts test setup
yyx990803 7197852
build: fix size check
yyx990803 970af3d
docs: update contributing guide
yyx990803 27c67e3
ci: avoid netlify oom
yyx990803 3b261e6
docs: document git hooks [ci skip]
yyx990803 bcc60e4
chore: use type: "module"
yyx990803 9be9909
chore: update packageManager field
yyx990803 feefb95
chore: use consistent ts-check comments in scripts
yyx990803 f103666
build: stricter conditions for UnaryExpression in const enum plugin
yyx990803 c2922ef
test: more strict linking in dts tests
yyx990803 da2c8d6
chore: use workspace vue dep for sfc-playground
yyx990803 a8a60a8
build: improve dts rollup output
yyx990803 0251d3e
release: v3.3.0-alpha.1
yyx990803 3ed730f
fix(build): fix dev flag replacement in esm-bundler builds
yyx990803 883dad2
chore: avoid double-building types on release
yyx990803 91d6f25
release: v3.3.0-alpha.2
yyx990803 59942f3
chore: catch unhandled export as just in case
yyx990803 d61f9c3
build: reuse const enum data between concurrent rollup builds
yyx990803 3dc6ca1
fix(build): avoid const enum conflicts
yyx990803 0e1351d
build: fix const enum when cache dir does not exist
yyx990803 06b4f19
release: v3.3.0-alpha.3
yyx990803 973465b
fix(build): fix const enum w/ number values
yyx990803 31fe690
release: v3.3.0-alpha.4
yyx990803 e2febe2
ci: add a ecosystem-ci-trigger workflow (#7618)
haoqunjiang 074affa
chore: fix typo (#7680)
Alfred-Skyblue 1644387
refactor(runtime-core): use Symbol.for for runtime Symbols
yyx990803 9b02e7b
chore: bump vitest + use threads
yyx990803 35d0ea8
fix(runtime-core): support `getCurrentInstance` across mutiple builds…
yyx990803 1bdbf2e
chore: remove warnings due to potential false-positives
yyx990803 6e0e5ec
ci: only disable threads for gh
yyx990803 88c0b04
ci: release canary versions every week (#7860)
haoqunjiang 572c26b
build: fix canary bundling issues (#7907)
haoqunjiang 427c286
refactor: remove circular dependencies in compiler
yyx990803 c636f81
build: bump rollup, remove cjs re-exports hack
yyx990803 318c2e8
chore: bump vite & vitest
yyx990803 622a794
build: upgrade to TypeScript 5.x
yyx990803 f173fc3
feat(dx): improve readability of displayed types for props
yyx990803 e911941
test: improve test case on `$el` (#7922)
himself65 7bca739
chore: add redirect for template explorer
yyx990803 71e31e3
fix(types): ensure defineProps with generics return correct types
yyx990803 83bf6af
chore: allow editing changelog before committing release
yyx990803 ce3f597
feat(types/jsx): support jsxImportSource, avoid global JSX conflict (…
yyx990803 9ca94fe
release: v3.3.0-alpha.5
yyx990803 dbe324a
fix(types/jsx): remove $slots children override
yyx990803 967afb3
chore: fix type
yyx990803 5154061
feat(types): `defineComponent()` with generics support (#7963)
yyx990803 3db4079
ci: avoid duplicated ci runs on self-repo pull requests
yyx990803 b5ff9a6
feat(sfc): deprecate reactivity transform
yyx990803 724a8e1
test: add test for defineComponent function syntax with object emits
yyx990803 4ff561f
build: don't wait for changelog edits when `--skip-prompts` or `--can…
haoqunjiang 5ed39ab
build: exit with code 1 on release failure (#7962)
haoqunjiang 92d7cb2
chore(deps): upgrade rollup & magic-string (#7326)
sxzz 977232f
chore: remove unused deps
yyx990803 54b7f1b
chore: eslint node env should apply to root ts config files (#7687)
sxzz e793517
feat(compiler-sfc): add defineOptions macro (#5738)
sxzz bd84df4
fix(jsx-runtime): fix automatic runtime implementation (#7959)
remcohaszing d3fa878
fix(types): revert jsx global removal (to be removed in 3.4)
yyx990803 a502d7a
feat(complier-sfc): hoist literal constants for script (#5752)
sxzz 199e313
fix(compiler-sfc): rewrite default export with AST analysis instead o…
sxzz 2df2243
fix(compiler-sfc): infer function prop type from type literal w/ call…
sxzz 3f8e1c3
fix(compiler-sfc): infer TS Extract&Exclude runtime type (#7339)
sxzz aa17992
fix(compiler-sfc): unwrap TS node for defineProps (#7340)
sxzz 7ae4f2a
fix(compiler-sfc): infer TSIntersectionType in defineProps (#7394)
sxzz 690a437
fix(compiler-sfc): handle more TS built-in utilities in defineProps i…
yyx990803 6b75125
fix(compiler-sfc): allow `<script>` with lang='js' (#7398)
sxzz 0b9f820
fix(compiler-sfc): properly remove comma of multiple macros in the sa…
sxzz 087dac0
fix(compiler-sfc): fix edge case of default export call with no args …
sxzz af06907
feat(compiler-sfc): support module string names syntax (#7428)
sxzz 81e7cdb
fix(compiler-sfc): infer correct type for enums
yyx990803 f883df4
Revert "fix(compiler-sfc): infer correct type for enums"
yyx990803 dd09b4a
fix(compiler-sfc): properly handle unknown types in runtime prop infe…
yyx990803 830936a
feat(compiler-sfc): improve runtime props inference for enum
yyx990803 384ad47
feat(compiler-core): support parsing `const` modifier in type paramet…
sxzz 5356663
fix(compiler-sfc): disallow `expose` property in `defineOptions` (#7967)
sxzz 36da03b
fix(compiler-sfc): avoid codegen conflict with user variable named `e…
sxzz 532be19
chore: update snapshots
yyx990803 bb2c98f
fix(compiler-sfc): use prependLeft to handle CSSVars (#7760)
baiwusanyu-c 5502738
chore: update snapshots by #7766 (#7970)
baiwusanyu-c 376ce19
chore: fix accidentally replaced comments [ci skip]
yyx990803 935609a
feat(runtime-core): add skipCheck for prop (#7548)
sxzz a166f25
fix(compiler-core): check if expression is constant (#7974)
sxzz c653a2d
fix(types/jsx): jsx-runtime types for global JSX namespace registrati…
haoqunjiang e843f99
fix(jsx-runtime): handle keys (#7976)
leopiccionia 8525f8c
fix(types/jsx): move JSX DOM types back to `@vue/runtime-dom` (#7979)
haoqunjiang 30f48fb
fix(compiler-sfc): fix defineExpose() codegen regression from #7949
yyx990803 45cb38f
fix(compiler-sfc): infer object type for empty type literal
yyx990803 72a5cef
fix(compiler-sfc): fix function default value handling w/ props destr…
yyx990803 38b15c0
feat(compiler-sfc): enable reactive props destructure by default and …
yyx990803 ae6c6b1
fix(compiler-sfc): infer runtime type in defineProps (#7972)
sxzz 0d3ca0a
fix(compiler-core): fix codegen for literal const in non-inline mode
yyx990803 8143d84
feat(compiler-sfc): support generating variable instead of default ex…
yyx990803 63f3b12
build: improve dts generation
yyx990803 60c449b
chore: bump csstype version
yyx990803 b70f327
release: v3.3.0-alpha.6
yyx990803 0d3c75e
feat(sfc): support more ergnomic defineEmits type syntax (#7992)
yyx990803 d07d59f
feat(compiler-sfc): codegen support for defineEmits() short syntax (f…
yyx990803 f009170
refactor(compiler-sfc): remove unnecessary emits type codegen
yyx990803 fafa759
feat(sfc): revert withDefaults() deprecation
yyx990803 d9f7928
chore: remove unused param
yyx990803 6d665e3
feat(compiler-sfc): support arbitrary expression as withDefaults argu…
yyx990803 ea62511
fix(compiler-sfc): use dynamic defaults merging for methods with comp…
yyx990803 a22ff97
fix(compiler-dom): handle newlines when evaluating constants during s…
baiwusanyu-c 4425409
docs: comments on reactivity functions (fixes #4832) (#4836)
defaude 6cfd7b1
chore: add docs links for sfc macros
yyx990803 62a2b31
feat(reactivity): improve support of getter usage in reactivity APIs …
yyx990803 dc866cb
feat(types/slots): support slot presence / props type checks via `def…
sxzz cd5886d
release: v3.3.0-alpha.7
yyx990803 9aa7e55
fix(compiler-sfc): check binding is prop before erroring
yyx990803 00ef259
chore: add setupVitest to tsconfig (#8009)
JayFate 4313480
chore: remove duplicate test (#8003)
wsypower cfeee77
release: v3.3.0-alpha.8
yyx990803 bf8282f
fix(compiler-ssr): disable v-once transform in ssr vdom fallback branch
yyx990803 c89fdf6
chore: remove unused args passed to ssrRender
yyx990803 b547ff3
feat(app): app.runWithContext() (#7451)
posva 2ae405e
refactor(compiler-sfc): move related files into separate directories
yyx990803 5feb3dd
fix(types): improve defineProps return type with generic arguments
yyx990803 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to use the app config function like:
That would be more desirable as we don't want to reference any DOM apis in
runtime-core
.That check should also be done sooner, outside of the for loop.
This change would then also mean that we would have to append the docs for
app.config.isCustomElement
and explain that this function is not only useful when using the runtime Compiler, but also when using custom elements in an SSR app.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the test app we're working with (nuxt 3) the
isCustomElement
function is always undefined, so we've not been able to use that function. The other functions in the appContext appear to be there. If you're certain that it should be there, I'll dig into where it goes missing some moreThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies, it's:
See https://vuejs.org/guide/extras/web-components.html#using-custom-elements-in-vue
https://vuejs.org/api/application.html#app-config-compileroptions
And of course, that function has to be added by the developer.