repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-test/src/index.ts
packages/runtime-test/src/index.ts
import { type CreateAppFunction, type RootRenderFunction, type VNode, createRenderer, } from '@vue/runtime-core' import { type TestElement, nodeOps } from './nodeOps' import { patchProp } from './patchProp' import { serializeInner } from './serialize' import { extend } from '@vue/shared' const { render: baseRe...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-test/__tests__/testRuntime.spec.ts
packages/runtime-test/__tests__/testRuntime.spec.ts
import { NodeOpTypes, type TestElement, TestNodeTypes, type TestText, dumpOps, h, nextTick, nodeOps, reactive, ref, render, resetOps, serialize, triggerEvent, } from '../src' describe('test renderer', () => { it('should work', () => { const root = nodeOps.createElement('div') rend...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/jsx.d.ts
packages/vue/jsx.d.ts
/* eslint-disable @typescript-eslint/ban-ts-comment */ // global JSX namespace registration // somehow we have to copy=pase the jsx-runtime types here to make TypeScript happy import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom' declare global { namespace JSX { export interface Element ex...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/src/dev.ts
packages/vue/src/dev.ts
import { initCustomFormatter } from '@vue/runtime-dom' export function initDev(): void { if (__BROWSER__) { if (!__ESM_BUNDLER__) { console.info( `You are running a development build of Vue.\n` + `Make sure to use the production build (*.prod.js) when deploying for production.`, ) ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/src/runtime.ts
packages/vue/src/runtime.ts
// This entry exports the runtime only, and is built as // `dist/vue.esm-bundler.js` which is used by default for bundlers. import { initDev } from './dev' import { warn } from '@vue/runtime-dom' if (__DEV__) { initDev() } export * from '@vue/runtime-dom' export const compile = (): void => { if (__DEV__) { w...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/src/index.ts
packages/vue/src/index.ts
// This entry is the "full-build" that includes both the runtime // and the compiler, and supports on-the-fly compilation of the template option. import { initDev } from './dev' import { type CompilerError, type CompilerOptions, compile, } from '@vue/compiler-dom' import { type RenderFunction, registerRuntime...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/server-renderer/index.d.ts
packages/vue/server-renderer/index.d.ts
export * from '@vue/server-renderer'
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/customElementCasing.spec.ts
packages/vue/__tests__/customElementCasing.spec.ts
import { createApp } from '../src' // https://github.com/vuejs/docs/pull/1890 // https://github.com/vuejs/core/issues/5401 // https://github.com/vuejs/docs/issues/1708 test('custom element event casing', () => { customElements.define( 'custom-event-casing', class Foo extends HTMLElement { connectedCall...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/mathmlNamespace.spec.ts
packages/vue/__tests__/mathmlNamespace.spec.ts
// MathML logic is technically dom-specific, but the logic is placed in core // because splitting it out of core would lead to unnecessary complexity in both // the renderer and compiler implementations. // Related files: // - runtime-core/src/renderer.ts // - compiler-core/src/transforms/transformElement.ts import { ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/runtimeCompilerOptions.spec.ts
packages/vue/__tests__/runtimeCompilerOptions.spec.ts
import { createApp } from 'vue' describe('config.compilerOptions', () => { test('isCustomElement', () => { const app = createApp({ template: `<foo/>`, }) app.config.compilerOptions.isCustomElement = (tag: string) => tag === 'foo' const root = document.createElement('div') app.mount(root) ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/index.spec.ts
packages/vue/__tests__/index.spec.ts
import { EMPTY_ARR } from '@vue/shared' import { createApp, nextTick, reactive, ref } from '../src' describe('compiler + runtime integration', () => { it('should support runtime template compilation', () => { const container = document.createElement('div') const App = { template: `{{ count }}`, d...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/svgNamespace.spec.ts
packages/vue/__tests__/svgNamespace.spec.ts
// SVG logic is technically dom-specific, but the logic is placed in core // because splitting it out of core would lead to unnecessary complexity in both // the renderer and compiler implementations. // Related files: // - runtime-core/src/renderer.ts // - compiler-core/src/transforms/transformElement.ts import { vtc...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/hydrationStrategies.spec.ts
packages/vue/__tests__/e2e/hydrationStrategies.spec.ts
import path from 'node:path' import { setupPuppeteer } from './e2eUtils' import type { Ref } from '../../src/runtime' declare const window: Window & { isHydrated: boolean isRootMounted: boolean teardownCalled?: boolean show: Ref<boolean> } describe('async component hydration strategies', () => { const { pag...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/todomvc.spec.ts
packages/vue/__tests__/e2e/todomvc.spec.ts
import path from 'node:path' import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' describe('e2e: todomvc', () => { const { page, click, isVisible, count, text, value, isChecked, isFocused, classList, enterValue, clearValue, timeout, } = setupPuppeteer() async ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/e2eUtils.ts
packages/vue/__tests__/e2e/e2eUtils.ts
import puppeteer, { type Browser, type ClickOptions, type LaunchOptions, type Page, } from 'puppeteer' export const E2E_TIMEOUT: number = 30 * 1000 const puppeteerOptions: LaunchOptions = { args: process.env.CI ? ['--no-sandbox', '--disable-setuid-sandbox'] : [], headless: true, } const maxTries = 30 exp...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/commits.mock.ts
packages/vue/__tests__/e2e/commits.mock.ts
export default { main: [ { sha: 'd1527fbee422c7170e56845e55b49c4fd6de72a7', node_id: 'MDY6Q29tbWl0MTM3MDc4NDg3OmQxNTI3ZmJlZTQyMmM3MTcwZTU2ODQ1ZTU1YjQ5YzRmZDZkZTcyYTc=', commit: { author: { name: 'Haoqun Jiang', email: 'haoqunjiang@gmail.com', date: '...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/vModel.spec.ts
packages/vue/__tests__/e2e/vModel.spec.ts
import path from 'node:path' import { setupPuppeteer } from './e2eUtils' const { page, click, isChecked } = setupPuppeteer() import { nextTick } from 'vue' beforeEach(async () => { await page().addScriptTag({ path: path.resolve(__dirname, '../../dist/vue.global.js'), }) await page().setContent(`<div id="app...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/svg.spec.ts
packages/vue/__tests__/e2e/svg.spec.ts
import path from 'node:path' import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' declare const globalStats: { label: string value: number }[] declare function valueToPoint( value: number, index: number, total: number, ): { x: number y: number } describe('e2e: svg', () => { const { page, click, c...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/TransitionGroup.spec.ts
packages/vue/__tests__/e2e/TransitionGroup.spec.ts
import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' import path from 'node:path' import { createApp, ref } from 'vue' describe('e2e: TransitionGroup', () => { const { page, html, nextFrame, timeout } = setupPuppeteer() const baseUrl = `file://${path.resolve(__dirname, './transition.html')}` const duration ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/markdown.spec.ts
packages/vue/__tests__/e2e/markdown.spec.ts
import path from 'node:path' import { E2E_TIMEOUT, expectByPolling, setupPuppeteer } from './e2eUtils' describe('e2e: markdown', () => { const { page, isVisible, value, html } = setupPuppeteer() async function testMarkdown(apiType: 'classic' | 'composition') { const baseUrl = `file://${path.resolve( __d...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/trusted-types.spec.ts
packages/vue/__tests__/e2e/trusted-types.spec.ts
import { once } from 'node:events' import { createServer } from 'node:http' import path from 'node:path' import { beforeAll } from 'vitest' import serveHandler from 'serve-handler' import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' // use the `vue` package root as the public directory // because we need to serv...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/commits.spec.ts
packages/vue/__tests__/e2e/commits.spec.ts
import path from 'node:path' import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' import mocks from './commits.mock' describe('e2e: commits', () => { const { page, click, count, text, isChecked } = setupPuppeteer() async function testCommits(apiType: 'classic' | 'composition') { const baseUrl = `file://${...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/ssr-custom-element.spec.ts
packages/vue/__tests__/e2e/ssr-custom-element.spec.ts
import path from 'node:path' import { setupPuppeteer } from './e2eUtils' const { page, click, text } = setupPuppeteer() beforeEach(async () => { await page().addScriptTag({ path: path.resolve(__dirname, '../../dist/vue.global.js'), }) }) async function setContent(html: string) { await page().setContent(`<d...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/tree.spec.ts
packages/vue/__tests__/e2e/tree.spec.ts
import path from 'node:path' import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' describe('e2e: tree', () => { const { page, click, count, text, children, isVisible } = setupPuppeteer() async function testTree(apiType: 'classic' | 'composition') { const baseUrl = `file://${path.resolve( __dirname, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/grid.spec.ts
packages/vue/__tests__/e2e/grid.spec.ts
import path from 'node:path' import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' interface TableData { name: string power: number } describe('e2e: grid', () => { const { page, click, text, count, typeValue, clearValue } = setupPuppeteer() const columns = ['name', 'power'] as const async function asser...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/memory-leak.spec.ts
packages/vue/__tests__/e2e/memory-leak.spec.ts
import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' import path from 'node:path' const { page, html, click } = setupPuppeteer() beforeEach(async () => { await page().setContent(`<div id="app"></div>`) await page().addScriptTag({ path: path.resolve(__dirname, '../../dist/vue.global.js'), }) }) describe...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/__tests__/e2e/Transition.spec.ts
packages/vue/__tests__/e2e/Transition.spec.ts
import type { ElementHandle } from 'puppeteer' import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' import path from 'node:path' import { Transition, createApp, h, nextTick, ref } from 'vue' describe('e2e: Transition', () => { const { page, html, classList, style, isVisible, timeout, nextFrame, click } = set...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/jsx-runtime/index.d.ts
packages/vue/jsx-runtime/index.d.ts
/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom' /** * JSX namespace for usage with @jsxImportsSource directive * when ts compilerOptions.jsx is 'react-jsx' or 'react-jsxdev' * https://www.typescriptlang.org/tsconfig#jsxImportSource ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/vue/compiler-sfc/index.d.ts
packages/vue/compiler-sfc/index.d.ts
export * from '@vue/compiler-sfc'
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/runtimeHelpers.ts
packages/compiler-ssr/src/runtimeHelpers.ts
import { registerRuntimeHelpers } from '@vue/compiler-dom' export const SSR_INTERPOLATE: unique symbol = Symbol(`ssrInterpolate`) export const SSR_RENDER_VNODE: unique symbol = Symbol(`ssrRenderVNode`) export const SSR_RENDER_COMPONENT: unique symbol = Symbol(`ssrRenderComponent`) export const SSR_RENDER_SLOT: unique ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/ssrCodegenTransform.ts
packages/compiler-ssr/src/ssrCodegenTransform.ts
import { type BlockStatement, type CallExpression, type CompilerError, type CompilerOptions, ElementTypes, type IfStatement, type JSChildNode, NodeTypes, type RootNode, type TemplateChildNode, type TemplateLiteral, createBlockStatement, createCallExpression, createCompoundExpression, creat...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/errors.ts
packages/compiler-ssr/src/errors.ts
import { type CompilerError, DOMErrorCodes, type SourceLocation, createCompilerError, } from '@vue/compiler-dom' export interface SSRCompilerError extends CompilerError { code: SSRErrorCodes } export function createSSRCompilerError( code: SSRErrorCodes, loc?: SourceLocation, ) { return createCompilerE...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/index.ts
packages/compiler-ssr/src/index.ts
import { type CodegenResult, type CompilerOptions, type RootNode, baseParse, generate, noopDirectiveTransform, parserOptions, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformExpression, transformOn, transformStyle, transformVBindShorthand, } from '@vue/compiler-dom...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrTransformTeleport.ts
packages/compiler-ssr/src/transforms/ssrTransformTeleport.ts
import { type ComponentNode, type ExpressionNode, NodeTypes, createCallExpression, createFunctionExpression, createSimpleExpression, findProp, } from '@vue/compiler-dom' import { type SSRTransformContext, processChildrenAsStatement, } from '../ssrCodegenTransform' import { SSRErrorCodes, createSSRComp...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts
packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts
import { ElementTypes, type NodeTransform, NodeTypes, type RootNode, type TemplateChildNode, createSimpleExpression, findDir, locStub, } from '@vue/compiler-dom' export const ssrInjectCssVars: NodeTransform = (node, context) => { if (!context.ssrCssVars) { return } // _cssVars is initialized...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrVShow.ts
packages/compiler-ssr/src/transforms/ssrVShow.ts
import { DOMErrorCodes, type DirectiveTransform, createConditionalExpression, createDOMCompilerError, createObjectExpression, createObjectProperty, createSimpleExpression, } from '@vue/compiler-dom' export const ssrTransformShow: DirectiveTransform = (dir, node, context) => { if (!dir.exp) { contex...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrVModel.ts
packages/compiler-ssr/src/transforms/ssrVModel.ts
import { DOMErrorCodes, type DirectiveTransform, ElementTypes, type ExpressionNode, NodeTypes, type PlainElementNode, type TemplateChildNode, createCallExpression, createConditionalExpression, createDOMCompilerError, createInterpolation, createObjectProperty, createSimpleExpression, findProp...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrVIf.ts
packages/compiler-ssr/src/transforms/ssrVIf.ts
import { type BlockStatement, type IfBranchNode, type IfNode, type NodeTransform, NodeTypes, createBlockStatement, createCallExpression, createIfStatement, createStructuralDirectiveTransform, processIf, } from '@vue/compiler-dom' import { type SSRTransformContext, processChildrenAsStatement, } f...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrTransformElement.ts
packages/compiler-ssr/src/transforms/ssrTransformElement.ts
import { type ArrayExpression, type AttributeNode, type CallExpression, type DirectiveNode, ElementTypes, ErrorCodes, type ExpressionNode, type InterpolationNode, type JSChildNode, MERGE_PROPS, type NodeTransform, NodeTypes, type PlainElementNode, type PropsExpression, type TemplateLiteral...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrTransformSlotOutlet.ts
packages/compiler-ssr/src/transforms/ssrTransformSlotOutlet.ts
import { ElementTypes, type NodeTransform, NodeTypes, type SlotOutletNode, TRANSITION, TRANSITION_GROUP, createCallExpression, createFunctionExpression, isSlotOutlet, processSlotOutlet, resolveComponentType, } from '@vue/compiler-dom' import { SSR_RENDER_SLOT, SSR_RENDER_SLOT_INNER } from '../runt...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrTransformComponent.ts
packages/compiler-ssr/src/transforms/ssrTransformComponent.ts
import { CREATE_VNODE, type CallExpression, type CompilerOptions, type ComponentNode, DOMDirectiveTransforms, DOMNodeTransforms, type DirectiveNode, ElementTypes, type ExpressionNode, type FunctionExpression, type JSChildNode, Namespaces, type NodeTransform, NodeTypes, RESOLVE_DYNAMIC_COMP...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrTransformTransition.ts
packages/compiler-ssr/src/transforms/ssrTransformTransition.ts
import { type ComponentNode, NodeTypes, type TransformContext, findProp, } from '@vue/compiler-dom' import { type SSRTransformContext, processChildren, } from '../ssrCodegenTransform' const wipMap = new WeakMap<ComponentNode, Boolean>() export function ssrTransformTransition( node: ComponentNode, cont...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrTransformSuspense.ts
packages/compiler-ssr/src/transforms/ssrTransformSuspense.ts
import { type ComponentNode, type FunctionExpression, type SlotsExpression, type TemplateChildNode, type TransformContext, buildSlots, createCallExpression, createFunctionExpression, } from '@vue/compiler-dom' import { type SSRTransformContext, processChildrenAsStatement, } from '../ssrCodegenTransf...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrVFor.ts
packages/compiler-ssr/src/transforms/ssrVFor.ts
import { type ForNode, type NodeTransform, NodeTypes, createCallExpression, createForLoopParams, createFunctionExpression, createStructuralDirectiveTransform, processFor, } from '@vue/compiler-dom' import { type SSRTransformContext, processChildrenAsStatement, } from '../ssrCodegenTransform' import ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrInjectFallthroughAttrs.ts
packages/compiler-ssr/src/transforms/ssrInjectFallthroughAttrs.ts
import { ElementTypes, type NodeTransform, NodeTypes, type ParentNode, type RootNode, type TemplateChildNode, createSimpleExpression, findDir, isCommentOrWhitespace, locStub, } from '@vue/compiler-dom' const filterChild = (node: ParentNode) => node.children.filter(n => !isCommentOrWhitespace(n)) ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/src/transforms/ssrTransformTransitionGroup.ts
packages/compiler-ssr/src/transforms/ssrTransformTransitionGroup.ts
import { type AttributeNode, type ComponentNode, type DirectiveNode, type JSChildNode, NodeTypes, type TransformContext, buildProps, createCallExpression, findProp, } from '@vue/compiler-dom' import { SSR_RENDER_ATTRS } from '../runtimeHelpers' import { type SSRTransformContext, processChildren, }...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrSlotOutlet.spec.ts
packages/compiler-ssr/__tests__/ssrSlotOutlet.spec.ts
import { compile } from '../src' import { SSR_RENDER_SLOT_INNER, ssrHelpers } from '../src/runtimeHelpers' describe('ssr: <slot>', () => { test('basic', () => { expect(compile(`<slot/>`).code).toMatchInlineSnapshot(` "const { ssrRenderSlot: _ssrRenderSlot } = require("vue/server-renderer") return fu...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrComponent.spec.ts
packages/compiler-ssr/__tests__/ssrComponent.spec.ts
import { compile } from '../src' describe('ssr: components', () => { test('basic', () => { expect(compile(`<foo id="a" :prop="b" />`).code).toMatchInlineSnapshot(` "const { resolveComponent: _resolveComponent, mergeProps: _mergeProps } = require("vue") const { ssrRenderComponent: _ssrRenderComponent ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrSuspense.spec.ts
packages/compiler-ssr/__tests__/ssrSuspense.spec.ts
import { compile } from '../src' describe('ssr compile: suspense', () => { test('implicit default', () => { expect(compile(`<suspense><foo/></suspense>`).code).toMatchInlineSnapshot(` "const { resolveComponent: _resolveComponent, withCtx: _withCtx } = require("vue") const { ssrRenderComponent: _ssrRe...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/utils.ts
packages/compiler-ssr/__tests__/utils.ts
import { compile } from '../src' export function getCompiledString(src: string): string { // Wrap src template in a root div so that it doesn't get injected // fallthrough attr. This results in less noise in generated snapshots // but also means this util can only be used for non-root cases. const { code } = c...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrPortal.spec.ts
packages/compiler-ssr/__tests__/ssrPortal.spec.ts
import { compile } from '../src' describe('ssr compile: teleport', () => { test('should work', () => { expect(compile(`<teleport :to="target"><div/></teleport>`).code) .toMatchInlineSnapshot(` "const { ssrRenderTeleport: _ssrRenderTeleport } = require("vue/server-renderer") return function...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrVIf.spec.ts
packages/compiler-ssr/__tests__/ssrVIf.spec.ts
import { compile } from '../src' describe('ssr: v-if', () => { test('basic', () => { expect(compile(`<div v-if="foo"></div>`).code).toMatchInlineSnapshot(` "const { ssrRenderAttrs: _ssrRenderAttrs } = require("vue/server-renderer") return function ssrRender(_ctx, _push, _parent, _attrs) { if...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrScopeId.spec.ts
packages/compiler-ssr/__tests__/ssrScopeId.spec.ts
import { compile } from '../src' const scopeId = 'data-v-xxxxxxx' describe('ssr: scopeId', () => { test('basic', () => { expect( compile(`<div><span>hello</span></div>`, { scopeId, mode: 'module', }).code, ).toMatchInlineSnapshot(` "import { ssrRenderAttrs as _ssrRenderAttr...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrFallthroughAttrs.spec.ts
packages/compiler-ssr/__tests__/ssrFallthroughAttrs.spec.ts
import { compile } from '../src' describe('ssr: attrs fallthrough', () => { test('basic', () => { expect(compile(`<div/>`).code).toMatchInlineSnapshot(` "const { ssrRenderAttrs: _ssrRenderAttrs } = require("vue/server-renderer") return function ssrRender(_ctx, _push, _parent, _attrs) { _push...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrVModel.spec.ts
packages/compiler-ssr/__tests__/ssrVModel.spec.ts
import { compile } from '../src' function compileWithWrapper(src: string) { return compile(`<div>${src}</div>`) } describe('ssr: v-model', () => { test('<input> (text types)', () => { expect(compileWithWrapper(`<input v-model="bar">`).code) .toMatchInlineSnapshot(` "const { ssrRenderAttr: _ssrRe...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrVShow.spec.ts
packages/compiler-ssr/__tests__/ssrVShow.spec.ts
import { compile } from '../src' function compileWithWrapper(src: string) { return compile(`<div>${src}</div>`) } describe('ssr: v-show', () => { test('basic as root', () => { expect(compile(`<div v-show="foo"/>`).code).toMatchInlineSnapshot(` "const { mergeProps: _mergeProps } = require("vue") co...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrElement.spec.ts
packages/compiler-ssr/__tests__/ssrElement.spec.ts
import { getCompiledString } from './utils' import { compile } from '../src' describe('ssr: element', () => { test('basic elements', () => { expect(getCompiledString(`<div></div>`)).toMatchInlineSnapshot( `"\`<div></div>\`"`, ) expect(getCompiledString(`<div/>`)).toMatchInlineSnapshot( `"\`<d...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrVFor.spec.ts
packages/compiler-ssr/__tests__/ssrVFor.spec.ts
import { compile } from '../src' describe('ssr: v-for', () => { test('basic', () => { expect(compile(`<div v-for="i in list" />`).code).toMatchInlineSnapshot(` "const { ssrRenderList: _ssrRenderList } = require("vue/server-renderer") return function ssrRender(_ctx, _push, _parent, _attrs) { ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrTransitionGroup.spec.ts
packages/compiler-ssr/__tests__/ssrTransitionGroup.spec.ts
import { compile } from '../src' // transition-group should flatten and concat its children fragments into // a single one describe('transition-group', () => { test('basic', () => { expect( compile(`<transition-group><div v-for="i in list"/></transition-group>`) .code, ).toMatchInlineSnapshot(`...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrTransition.spec.ts
packages/compiler-ssr/__tests__/ssrTransition.spec.ts
import { compile } from '../src' describe('transition', () => { test('basic', () => { expect(compile(`<transition><div>foo</div></transition>`).code) .toMatchInlineSnapshot(` "const { ssrRenderAttrs: _ssrRenderAttrs } = require("vue/server-renderer") return function ssrRender(_ctx, _push, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrInjectCssVars.spec.ts
packages/compiler-ssr/__tests__/ssrInjectCssVars.spec.ts
import { BindingTypes } from '@vue/compiler-dom' import { compile } from '../src' describe('ssr: inject <style vars>', () => { test('basic', () => { expect( compile(`<div/>`, { ssrCssVars: `{ color }`, }).code, ).toMatchInlineSnapshot(` "const { mergeProps: _mergeProps } = require("...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-ssr/__tests__/ssrText.spec.ts
packages/compiler-ssr/__tests__/ssrText.spec.ts
import { compile } from '../src' import { getCompiledString } from './utils' describe('ssr: text', () => { test('static text', () => { expect(getCompiledString(`foo`)).toMatchInlineSnapshot(`"\`foo\`"`) }) test('static text with template string special chars', () => { expect(getCompiledString(`\`\${foo}...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/renderToStream.ts
packages/server-renderer/src/renderToStream.ts
import { type App, type VNode, createApp, createVNode, ssrContextKey, ssrUtils, } from 'vue' import { isPromise, isString } from '@vue/shared' import { type SSRBuffer, type SSRContext, renderComponentVNode } from './render' import type { Readable, Writable } from 'node:stream' import { resolveTeleports } fr...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/render.ts
packages/server-renderer/src/render.ts
import { Comment, type Component, type ComponentInternalInstance, type DirectiveBinding, Fragment, type FunctionalComponent, Static, Text, type VNode, type VNodeArrayChildren, type VNodeProps, mergeProps, ssrUtils, warn, } from 'vue' import { NOOP, ShapeFlags, escapeHtml, escapeHtmlC...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/renderToString.ts
packages/server-renderer/src/renderToString.ts
import { type App, type VNode, createApp, createVNode, ssrContextKey, ssrUtils, } from 'vue' import { isPromise, isString } from '@vue/shared' import { type SSRBuffer, type SSRContext, renderComponentVNode } from './render' const { isVNode } = ssrUtils function nestedUnrollBuffer( buffer: SSRBuffer, p...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/index.ts
packages/server-renderer/src/index.ts
import { initDirectivesForSSR } from 'vue' initDirectivesForSSR() // public export type { SSRContext } from './render' export { renderToString } from './renderToString' export { renderToSimpleStream, renderToNodeStream, pipeToNodeWritable, renderToWebStream, pipeToWebWritable, type SimpleReadable, // dep...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/internal.ts
packages/server-renderer/src/internal.ts
// internal runtime helpers export { renderVNode as ssrRenderVNode } from './render' export { ssrRenderComponent } from './helpers/ssrRenderComponent' export { ssrRenderSlot, ssrRenderSlotInner } from './helpers/ssrRenderSlot' export { ssrRenderTeleport } from './helpers/ssrRenderTeleport' export { ssrRenderClass, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrGetDirectiveProps.ts
packages/server-renderer/src/helpers/ssrGetDirectiveProps.ts
import { type ComponentPublicInstance, type Directive, ssrUtils } from 'vue' export function ssrGetDirectiveProps( instance: ComponentPublicInstance, dir: Directive, value?: any, arg?: string, modifiers: Record<string, boolean> = {}, ): Record<string, any> { if (typeof dir !== 'function' && dir.getSSRProps...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrRenderComponent.ts
packages/server-renderer/src/helpers/ssrRenderComponent.ts
import { type Component, type ComponentInternalInstance, type Slots, createVNode, } from 'vue' import { type Props, type SSRBuffer, renderComponentVNode } from '../render' import type { SSRSlots } from './ssrRenderSlot' export function ssrRenderComponent( comp: Component, props: Props | null = null, chil...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrRenderSuspense.ts
packages/server-renderer/src/helpers/ssrRenderSuspense.ts
import type { PushFn } from '../render' export async function ssrRenderSuspense( push: PushFn, { default: renderContent }: Record<string, (() => void) | undefined>, ): Promise<void> { if (renderContent) { renderContent() } else { push(`<!---->`) } }
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrRenderAttrs.ts
packages/server-renderer/src/helpers/ssrRenderAttrs.ts
import { escapeHtml, isArray, isObject, isRenderableAttrValue, isSVGTag, stringifyStyle, } from '@vue/shared' import { includeBooleanAttr, isBooleanAttr, isOn, isSSRSafeAttrName, isString, makeMap, normalizeClass, normalizeCssVarValue, normalizeStyle, propsToAttrMap, } from '@vue/shared'...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrInterpolate.ts
packages/server-renderer/src/helpers/ssrInterpolate.ts
import { escapeHtml, toDisplayString } from '@vue/shared' export function ssrInterpolate(value: unknown): string { return escapeHtml(toDisplayString(value)) }
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrVModelHelpers.ts
packages/server-renderer/src/helpers/ssrVModelHelpers.ts
import { isArray, looseEqual, looseIndexOf } from '@vue/shared' import { ssrRenderAttr } from './ssrRenderAttrs' export const ssrLooseEqual = looseEqual as (a: unknown, b: unknown) => boolean export function ssrLooseContain(arr: unknown[], value: unknown): boolean { return looseIndexOf(arr, value) > -1 } // for <i...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrRenderList.ts
packages/server-renderer/src/helpers/ssrRenderList.ts
import { isArray, isObject, isString } from '@vue/shared' import { warn } from '@vue/runtime-core' export function ssrRenderList( source: unknown, renderItem: (value: unknown, key: string | number, index?: number) => void, ): void { if (isArray(source) || isString(source)) { for (let i = 0, l = source.length...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrRenderSlot.ts
packages/server-renderer/src/helpers/ssrRenderSlot.ts
import { type ComponentInternalInstance, type Slots, ssrUtils } from 'vue' import { type Props, type PushFn, type SSRBufferItem, renderVNodeChildren, } from '../render' import { isArray } from '@vue/shared' const { ensureValidVNode } = ssrUtils export type SSRSlots = Record<string, SSRSlot> export type SSRSlo...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrCompile.ts
packages/server-renderer/src/helpers/ssrCompile.ts
import { type ComponentInternalInstance, type ComponentOptions, warn, } from 'vue' import { compile } from '@vue/compiler-ssr' import { NO, extend, generateCodeFrame, isFunction } from '@vue/shared' import type { CompilerError, CompilerOptions } from '@vue/compiler-core' import type { PushFn } from '../render' i...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/src/helpers/ssrRenderTeleport.ts
packages/server-renderer/src/helpers/ssrRenderTeleport.ts
import { type ComponentInternalInstance, ssrContextKey } from 'vue' import { type PushFn, type SSRBufferItem, type SSRContext, createBuffer, } from '../render' export function ssrRenderTeleport( parentPush: PushFn, contentRenderFn: (push: PushFn) => void, target: string, disabled: boolean, parentComp...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrAttrFallthrough.spec.ts
packages/server-renderer/__tests__/ssrAttrFallthrough.spec.ts
import { createApp } from 'vue' import { renderToString } from '../src/renderToString' describe('ssr: attr fallthrough', () => { test('basic', async () => { const Child = { template: `<div class="foo" />`, } const Parent = { components: { Child }, template: `<child class="bar"/>`, }...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/unrollBuffer.bench.ts
packages/server-renderer/__tests__/unrollBuffer.bench.ts
import { bench, describe } from 'vitest' import { type SSRBuffer, createBuffer } from '../src/render' import { unrollBuffer as _unrollBuffer } from '../src/renderToString' // move to local const to avoid import access overhead // https://github.com/vitest-dev/vitest/issues/6903 const unrollBuffer = _unrollBuffer fun...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/webStream.spec.ts
packages/server-renderer/__tests__/webStream.spec.ts
import { createApp, defineAsyncComponent, h } from 'vue' import { ReadableStream, TransformStream } from 'node:stream/web' import { pipeToWebWritable, renderToWebStream } from '../src' beforeEach(() => { // @ts-expect-error global.ReadableStream = ReadableStream }) afterEach(() => { // @ts-expect-error delete...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/createBuffer.bench.ts
packages/server-renderer/__tests__/createBuffer.bench.ts
import { bench, describe } from 'vitest' import { createBuffer as _createBuffer } from '../src/render' // move to local const to avoid import access overhead // https://github.com/vitest-dev/vitest/issues/6903 const createBuffer = _createBuffer describe('createBuffer', () => { let stringBuffer = createBuffer() ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrDynamicComponent.spec.ts
packages/server-renderer/__tests__/ssrDynamicComponent.spec.ts
import { createApp, createVNode } from 'vue' import { renderToString } from '../src' describe('ssr: dynamic component', () => { test('resolved to component', async () => { expect( await renderToString( createApp({ components: { one: { template: `<div><slot/></div...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrSuspense.spec.ts
packages/server-renderer/__tests__/ssrSuspense.spec.ts
import { Suspense, createApp, h } from 'vue' import { renderToString } from '../src/renderToString' describe('SSR Suspense', () => { const ResolvingAsync = { async setup() { return () => h('div', 'async') }, } const RejectingAsync = { setup() { return new Promise((_, reject) => reject('f...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrRenderList.spec.ts
packages/server-renderer/__tests__/ssrRenderList.spec.ts
import { ssrRenderList } from '../src/helpers/ssrRenderList' describe('ssr: renderList', () => { let stack: string[] = [] beforeEach(() => { stack = [] }) it('should render items in an array', () => { ssrRenderList(['1', '2', '3'], (item, index) => stack.push(`node ${index}: ${item}`), ) ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrScopeId.spec.ts
packages/server-renderer/__tests__/ssrScopeId.spec.ts
import { createApp, h, mergeProps, withCtx } from 'vue' import { renderToString } from '../src/renderToString' import { ssrRenderAttrs, ssrRenderComponent, ssrRenderSlot } from '../src' describe('ssr: scopedId runtime behavior', () => { test('id on component root', async () => { const Child = { ssrRender: ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrVModelHelpers.spec.ts
packages/server-renderer/__tests__/ssrVModelHelpers.spec.ts
import { ssrGetDynamicModelProps, ssrRenderDynamicModel, // ssrGetDynamicModelProps } from '../src/helpers/ssrVModelHelpers' describe('ssr: v-model helpers', () => { test('ssrRenderDynamicModel', () => { expect(ssrRenderDynamicModel(null, 'foo', null)).toBe(` value="foo"`) expect(ssrRenderDynamicModel(...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrSlot.spec.ts
packages/server-renderer/__tests__/ssrSlot.spec.ts
import { createApp, defineAsyncComponent, h } from 'vue' import { renderToString } from '../src/renderToString' const components = { one: { template: `<div><slot/></div>`, }, } describe('ssr: slot', () => { test('text slot', async () => { expect( await renderToString( createApp({ ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts
packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts
import { ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderStyle, } from '../src/helpers/ssrRenderAttrs' import { escapeHtml } from '@vue/shared' describe('ssr: renderAttrs', () => { test('ignore reserved props', () => { expect( ssrRenderAttrs({ key: 1, ref_key: 'foo', ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrInterpolate.spec.ts
packages/server-renderer/__tests__/ssrInterpolate.spec.ts
import { ssrInterpolate } from '../src/helpers/ssrInterpolate' import { escapeHtml } from '@vue/shared' test('ssr: interpolate', () => { expect(ssrInterpolate(0)).toBe(`0`) expect(ssrInterpolate(`foo`)).toBe(`foo`) expect(ssrInterpolate(`<div>`)).toBe(`&lt;div&gt;`) // should escape interpolated values expec...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrDirectives.spec.ts
packages/server-renderer/__tests__/ssrDirectives.spec.ts
import { renderToString } from '../src/renderToString' import { createApp, h, mergeProps, ref, resolveDirective, unref, vModelCheckbox, vModelDynamic, vModelRadio, vModelText, vShow, withDirectives, } from 'vue' import { ssrGetDirectiveProps, ssrRenderAttrs } from '../src' describe('ssr: direct...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/render.spec.ts
packages/server-renderer/__tests__/render.spec.ts
import { type ComponentOptions, KeepAlive, Transition, computed, createApp, createCommentVNode, createSSRApp, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, h, onErrorCaptured, onServerPrefetch, reactive, ref, renderSlot, resolveComponent, r...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrWatch.spec.ts
packages/server-renderer/__tests__/ssrWatch.spec.ts
import { createSSRApp, defineComponent, h, nextTick, ref, watch, watchEffect, } from 'vue' import { type SSRContext, renderToString } from '../src' describe('ssr: watch', () => { // #6013 test('should work w/ flush:sync', async () => { const App = defineComponent(() => { const count = ref(0...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrCompilerOptions.spec.ts
packages/server-renderer/__tests__/ssrCompilerOptions.spec.ts
import { createApp } from 'vue' import { renderToString } from '../src/renderToString' describe('ssr: compiler options', () => { test('config.isCustomElement (deprecated)', async () => { const app = createApp({ template: `<div><x-button/></div>`, }) app.config.isCustomElement = tag => tag.startsWit...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrTeleport.spec.ts
packages/server-renderer/__tests__/ssrTeleport.spec.ts
import { Teleport, createApp, h } from 'vue' import { renderToString } from '../src/renderToString' import { renderToSimpleStream } from '../src/renderToStream' import type { SSRContext } from '../src/render' import { ssrRenderTeleport } from '../src/helpers/ssrRenderTeleport' describe('ssrRenderTeleport', () => { t...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/server-renderer/__tests__/ssrComputed.spec.ts
packages/server-renderer/__tests__/ssrComputed.spec.ts
import { computed, createSSRApp, defineComponent, h, reactive, ref } from 'vue' import { renderToString } from '../src/renderToString' // #5208 reported memory leak of keeping computed alive during SSR // so we made computed properties created during SSR non-reactive in // https://github.com/vuejs/core/commit/f4f0966b...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-dom/src/decodeHtmlBrowser.ts
packages/compiler-dom/src/decodeHtmlBrowser.ts
/* eslint-disable no-restricted-globals */ let decoder: HTMLDivElement export function decodeHtmlBrowser(raw: string, asAttr = false): string { if (!decoder) { decoder = document.createElement('div') } if (asAttr) { decoder.innerHTML = `<div foo="${raw.replace(/"/g, '&quot;')}">` return decoder.chil...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-dom/src/runtimeHelpers.ts
packages/compiler-dom/src/runtimeHelpers.ts
import { registerRuntimeHelpers } from '@vue/compiler-core' export const V_MODEL_RADIO: unique symbol = Symbol(__DEV__ ? `vModelRadio` : ``) export const V_MODEL_CHECKBOX: unique symbol = Symbol( __DEV__ ? `vModelCheckbox` : ``, ) export const V_MODEL_TEXT: unique symbol = Symbol(__DEV__ ? `vModelText` : ``) export ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-dom/src/errors.ts
packages/compiler-dom/src/errors.ts
import { type CompilerError, ErrorCodes, type SourceLocation, createCompilerError, } from '@vue/compiler-core' export interface DOMCompilerError extends CompilerError { code: DOMErrorCodes } export function createDOMCompilerError( code: DOMErrorCodes, loc?: SourceLocation, ) { return createCompilerErr...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-dom/src/parserOptions.ts
packages/compiler-dom/src/parserOptions.ts
import { Namespaces, NodeTypes, type ParserOptions } from '@vue/compiler-core' import { isHTMLTag, isMathMLTag, isSVGTag, isVoidTag } from '@vue/shared' import { TRANSITION, TRANSITION_GROUP } from './runtimeHelpers' import { decodeHtmlBrowser } from './decodeHtmlBrowser' export const parserOptions: ParserOptions = { ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/compiler-dom/src/htmlNesting.ts
packages/compiler-dom/src/htmlNesting.ts
/** * Copied from https://github.com/MananTank/validate-html-nesting * with ISC license * * To avoid runtime dependency on validate-html-nesting * This file should not change very often in the original repo * but we may need to keep it up-to-date from time to time. */ /** * returns true if given parent-child n...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false