@vue/compiler-core
Advanced tools
Comparing version 3.0.0-beta.9 to 3.0.0-beta.10
@@ -100,10 +100,44 @@ import { generateCodeFrame } from '@vue/shared'; | ||
export declare interface CodegenOptions { | ||
/** | ||
* - `module` mode will generate ES module import statements for helpers | ||
* and export the render function as the default export. | ||
* - `function` mode will generate a single `const { helpers... } = Vue` | ||
* statement and return the render function. It expects `Vue` to be globally | ||
* available (or passed by wrapping the code with an IIFE). It is meant to be | ||
* used with `new Function(code)()` to generate a render function at runtime. | ||
* @default 'function' | ||
*/ | ||
mode?: 'module' | 'function'; | ||
/** | ||
* Generate source map? | ||
* @default false | ||
*/ | ||
sourceMap?: boolean; | ||
/** | ||
* Filename for source map generation. | ||
* @default 'template.vue.html' | ||
*/ | ||
filename?: string; | ||
/** | ||
* SFC scoped styles ID | ||
*/ | ||
scopeId?: string | null; | ||
prefixIdentifiers?: boolean; | ||
/** | ||
* Option to optimize helper import bindings via variable assignment | ||
* (only used for webpack code-split) | ||
* @default false | ||
*/ | ||
optimizeBindings?: boolean; | ||
/** | ||
* Customize where to import runtime helpers from. | ||
* @default 'vue' | ||
*/ | ||
runtimeModuleName?: string; | ||
/** | ||
* Customize the global variable name of `Vue` to get helpers from | ||
* in function mode | ||
* @default 'Vue' | ||
*/ | ||
runtimeGlobalName?: string; | ||
prefixIdentifiers?: boolean; | ||
ssr?: boolean; | ||
@@ -519,10 +553,37 @@ } | ||
export declare interface ParserOptions { | ||
/** | ||
* e.g. platform native elements, e.g. <div> for browsers | ||
*/ | ||
isNativeTag?: (tag: string) => boolean; | ||
/** | ||
* e.g. native elements that can self-close, e.g. <img>, <br>, <hr> | ||
*/ | ||
isVoidTag?: (tag: string) => boolean; | ||
/** | ||
* e.g. elements that should preserve whitespace inside, e.g. <pre> | ||
*/ | ||
isPreTag?: (tag: string) => boolean; | ||
/** | ||
* Platform-specific built-in components e.g. <Transition> | ||
*/ | ||
isBuiltInComponent?: (tag: string) => symbol | void; | ||
/** | ||
* Separate option for end users to extend the native elements list | ||
*/ | ||
isCustomElement?: (tag: string) => boolean; | ||
/** | ||
* Get tag namespace | ||
*/ | ||
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace; | ||
getTextMode?: (tag: string, ns: Namespace, parent: ElementNode | undefined) => TextModes; | ||
/** | ||
* Get text parsing mode for this element | ||
*/ | ||
getTextMode?: (node: ElementNode, parent: ElementNode | undefined) => TextModes; | ||
/** | ||
* @default ['{{', '}}'] | ||
*/ | ||
delimiters?: [string, string]; | ||
/** | ||
* Only needed for DOM compilers | ||
*/ | ||
decodeEntities?: (rawText: string, asAttr: boolean) => string; | ||
@@ -748,11 +809,65 @@ onError?: (error: CompilerError) => void; | ||
export declare interface TransformOptions { | ||
/** | ||
* An array of node trasnforms to be applied to every AST node. | ||
*/ | ||
nodeTransforms?: NodeTransform[]; | ||
/** | ||
* An object of { name: transform } to be applied to every directive attribute | ||
* node found on element nodes. | ||
*/ | ||
directiveTransforms?: Record<string, DirectiveTransform | undefined>; | ||
/** | ||
* An optional hook to transform a node being hoisted. | ||
* used by compiler-dom to turn hoisted nodes into stringified HTML vnodes. | ||
* @default null | ||
*/ | ||
transformHoist?: HoistTransform | null; | ||
/** | ||
* If the pairing runtime provides additional built-in elements, use this to | ||
* mark them as built-in so the compiler will generate component vnodes | ||
* for them. | ||
*/ | ||
isBuiltInComponent?: (tag: string) => symbol | void; | ||
/** | ||
* Transform expressions like {{ foo }} to `_ctx.foo`. | ||
* If this option is false, the generated code will be wrapped in a | ||
* `with (this) { ... }` block. | ||
* - This is force-enabled in module mode, since modules are by default strict | ||
* and cannot use `with` | ||
* @default mode === 'module' | ||
*/ | ||
prefixIdentifiers?: boolean; | ||
/** | ||
* Hoist static VNodes and props objects to `_hoisted_x` constants | ||
* @default false | ||
*/ | ||
hoistStatic?: boolean; | ||
/** | ||
* Cache v-on handlers to avoid creating new inline functions on each render, | ||
* also avoids the need for dynamically patching the handlers by wrapping it. | ||
* e.g `@click="foo"` by default is compiled to `{ onClick: foo }`. With this | ||
* option it's compiled to: | ||
* ```js | ||
* { onClick: _cache[0] || (_cache[0] = e => _ctx.foo(e)) } | ||
* ``` | ||
* - Requires "prefixIdentifiers" to be enabled because it relies on scope | ||
* analysis to determine if a handler is safe to cache. | ||
* @default false | ||
*/ | ||
cacheHandlers?: boolean; | ||
/** | ||
* A list of parser plugins to enable for `@babel/parser`, which is used to | ||
* parse expressions in bindings and interpolations. | ||
* https://babeljs.io/docs/en/next/babel-parser#plugins | ||
*/ | ||
expressionPlugins?: ParserPlugin[]; | ||
/** | ||
* SFC scoped styles ID | ||
*/ | ||
scopeId?: string | null; | ||
/** | ||
* Generate SSR-optimized render functions instead. | ||
* The resulting funciton must be attached to the component via the | ||
* `ssrRender` option instead of `render`. | ||
*/ | ||
ssr?: boolean; | ||
@@ -759,0 +874,0 @@ onError?: (error: CompilerError) => void; |
{ | ||
"name": "@vue/compiler-core", | ||
"version": "3.0.0-beta.9", | ||
"version": "3.0.0-beta.10", | ||
"description": "@vue/compiler-core", | ||
@@ -33,3 +33,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.0.0-beta.9", | ||
"@vue/shared": "3.0.0-beta.10", | ||
"@babel/parser": "^7.8.6", | ||
@@ -36,0 +36,0 @@ "@babel/types": "^7.8.6", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
478769
12172
+ Added@vue/shared@3.0.0-beta.10(transitive)
- Removed@vue/shared@3.0.0-beta.9(transitive)
Updated@vue/shared@3.0.0-beta.10