Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vue/language-core

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/language-core - npm Package Compare versions

Comparing version 1.8.8 to 1.8.10

6

out/generators/script.d.ts

@@ -1,2 +0,1 @@

import { Segment } from '@volar/source-map';
import { FileRangeCapabilities, MirrorBehaviorCapabilities } from '@volar/language-core';

@@ -8,8 +7,9 @@ import * as SourceMaps from '@volar/source-map';

import type { ScriptSetupRanges } from '../parsers/scriptSetupRanges';
import type { VueCompilerOptions } from '../types';
import { Sfc } from '../types';
import type { VueCompilerOptions } from '../types';
export declare function generate(ts: typeof import('typescript/lib/tsserverlibrary'), fileName: string, _sfc: Sfc, lang: string, scriptRanges: ScriptRanges | undefined, scriptSetupRanges: ScriptSetupRanges | undefined, htmlGen: ReturnType<typeof templateGen['generate']> | undefined, compilerOptions: ts.CompilerOptions, vueCompilerOptions: VueCompilerOptions, codegenStack: boolean): {
codes: Segment<FileRangeCapabilities>[];
codes: SourceMaps.Segment<FileRangeCapabilities>[];
codeStacks: SourceMaps.StackNode[];
mirrorBehaviorMappings: SourceMaps.Mapping<[MirrorBehaviorCapabilities, MirrorBehaviorCapabilities]>[];
};
//# sourceMappingURL=script.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generate = void 0;
const language_core_1 = require("@volar/language-core");
const source_map_1 = require("@volar/source-map");
const language_core_1 = require("@volar/language-core");
const shared_1 = require("@vue/shared");
const muggle = __importStar(require("muggle-string"));
const path_1 = require("path");
const shared_2 = require("../utils/shared");
const sharedTypes = __importStar(require("../utils/globalTypes"));
const shared_1 = require("../utils/shared");
const transform_1 = require("../utils/transform");
const sharedTypes = require("../utils/globalTypes");
const muggle = require("muggle-string");
function generate(ts, fileName, _sfc, lang, scriptRanges, scriptSetupRanges, htmlGen, compilerOptions, vueCompilerOptions, codegenStack) {

@@ -276,2 +298,3 @@ const [codes, codeStacks] = codegenStack ? muggle.track([]) : [[], []];

codes.push(`__VLS_ctx?: Pick<Awaited<typeof __VLS_setup>, 'attrs' | 'emit' | 'slots'>,\n`);
codes.push(`__VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>['expose'],\n`);
codes.push('__VLS_setup = (async () => {\n');

@@ -737,3 +760,3 @@ scriptSetupGeneratedOffset = generateSetupFunction(true, 'none', definePropMirrors);

codes.push(`let __VLS_otherComponents!: NonNullable<typeof __VLS_internalComponent extends { components: infer C } ? C : {}> & typeof __VLS_componentsOption;\n`);
codes.push(`let __VLS_own!: __VLS_SelfComponent<typeof __VLS_name, typeof __VLS_internalComponent & typeof __VLS_publicComponent & (new () => { ${(0, shared_2.getSlotsPropertyName)(vueCompilerOptions.target)}: typeof __VLS_slots })>;\n`);
codes.push(`let __VLS_own!: __VLS_SelfComponent<typeof __VLS_name, typeof __VLS_internalComponent & typeof __VLS_publicComponent & (new () => { ${(0, shared_1.getSlotsPropertyName)(vueCompilerOptions.target)}: typeof __VLS_slots })>;\n`);
codes.push(`let __VLS_localComponents!: typeof __VLS_otherComponents & Omit<typeof __VLS_own, keyof typeof __VLS_otherComponents>;\n`);

@@ -852,3 +875,3 @@ codes.push(`let __VLS_components!: typeof __VLS_localComponents & __VLS_GlobalComponents & typeof __VLS_ctx;\n`); // for html completion, TS references...

for (const varName of bindingNames) {
if (!!htmlGen.tagNames[varName] || !!htmlGen.tagNames[(0, shared_1.hyphenate)(varName)]) {
if (!!htmlGen.tagNames[varName] || !!htmlGen.tagNames[(0, shared_1.hyphenateTag)(varName)]) {
usageVars.add(varName);

@@ -855,0 +878,0 @@ }

@@ -0,7 +1,7 @@

import { FileRangeCapabilities } from '@volar/language-core';
import { Segment } from '@volar/source-map';
import { FileRangeCapabilities } from '@volar/language-core';
import * as CompilerDOM from '@vue/compiler-dom';
import * as muggle from 'muggle-string';
import type * as ts from 'typescript/lib/tsserverlibrary';
import { Sfc, VueCompilerOptions } from '../types';
import * as muggle from 'muggle-string';
type Code = Segment<FileRangeCapabilities>;

@@ -21,1 +21,2 @@ export declare function generate(ts: typeof import('typescript/lib/tsserverlibrary'), compilerOptions: ts.CompilerOptions, vueCompilerOptions: VueCompilerOptions, sourceTemplate: string, sourceLang: string, sfc: Sfc, hasScriptSetupSlots: boolean, codegenStack: boolean): {

export {};
//# sourceMappingURL=template.d.ts.map

@@ -11,4 +11,7 @@ export * from './generators/template';

export * as sharedTypes from './utils/globalTypes';
export * from './utils/shared';
export { tsCodegen } from './plugins/vue-tsx';
export * from '@volar/language-core';
export * from '@volar/source-map';
export type * as CompilerDOM from '@vue/compiler-dom';
//# sourceMappingURL=index.d.ts.map

@@ -13,5 +13,17 @@ "use strict";

}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -27,4 +39,5 @@ exports.tsCodegen = exports.sharedTypes = exports.scriptRanges = void 0;

__exportStar(require("./utils/parseSfc"), exports);
exports.scriptRanges = require("./parsers/scriptRanges");
exports.sharedTypes = require("./utils/globalTypes");
exports.scriptRanges = __importStar(require("./parsers/scriptRanges"));
exports.sharedTypes = __importStar(require("./utils/globalTypes"));
__exportStar(require("./utils/shared"), exports);
var vue_tsx_1 = require("./plugins/vue-tsx");

@@ -31,0 +44,0 @@ Object.defineProperty(exports, "tsCodegen", { enumerable: true, get: function () { return vue_tsx_1.tsCodegen; } });

@@ -7,4 +7,5 @@ import type { Language } from '@volar/language-core';

/**
* @deprecated planed to remove in 2.0, please use getOrCreateVueLanguage instead of
* @deprecated planed to remove in 2.0, please use createVueLanguage instead of
*/
export declare function createLanguages(compilerOptions?: ts.CompilerOptions, vueCompilerOptions?: Partial<VueCompilerOptions>, ts?: typeof import('typescript/lib/tsserverlibrary'), codegenStack?: boolean): Language[];
//# sourceMappingURL=languageModule.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,3 +30,3 @@ exports.createLanguages = exports.createVueLanguage = void 0;

const sourceFile_1 = require("./sourceFile");
const sharedTypes = require("./utils/globalTypes");
const sharedTypes = __importStar(require("./utils/globalTypes"));
const ts_1 = require("./utils/ts");

@@ -91,3 +114,3 @@ const fileRegistries = [];

/**
* @deprecated planed to remove in 2.0, please use getOrCreateVueLanguage instead of
* @deprecated planed to remove in 2.0, please use createVueLanguage instead of
*/

@@ -94,0 +117,0 @@ function createLanguages(compilerOptions = {}, vueCompilerOptions = {}, ts = require('typescript'), codegenStack = false) {

@@ -16,1 +16,2 @@ import type { TextRange } from '../types';

};
//# sourceMappingURL=scriptRanges.d.ts.map

@@ -34,1 +34,2 @@ import type * as ts from 'typescript/lib/tsserverlibrary';

};
//# sourceMappingURL=scriptSetupRanges.d.ts.map

@@ -25,1 +25,2 @@ import type * as ts from 'typescript/lib/tsserverlibrary';

}[];
//# sourceMappingURL=plugins.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDefaultVueLanguagePlugins = void 0;
const useHtmlFilePlugin = require("./plugins/file-html");
const useMdFilePlugin = require("./plugins/file-md");
const useVueFilePlugin = require("./plugins/file-vue");
const useVueSfcCustomBlocks = require("./plugins/vue-sfc-customblocks");
const useVueSfcScriptsFormat = require("./plugins/vue-sfc-scripts");
const useVueSfcStyles = require("./plugins/vue-sfc-styles");
const useVueSfcTemplate = require("./plugins/vue-sfc-template");
const useHtmlTemplatePlugin = require("./plugins/vue-template-html");
const vue_tsx_1 = require("./plugins/vue-tsx");
const CompilerDOM = require("@vue/compiler-dom");
const CompilerVue2 = require("./utils/vue2TemplateCompiler");
const file_html_1 = __importDefault(require("./plugins/file-html"));
const file_md_1 = __importDefault(require("./plugins/file-md"));
const file_vue_1 = __importDefault(require("./plugins/file-vue"));
const vue_sfc_customblocks_1 = __importDefault(require("./plugins/vue-sfc-customblocks"));
const vue_sfc_scripts_1 = __importDefault(require("./plugins/vue-sfc-scripts"));
const vue_sfc_styles_1 = __importDefault(require("./plugins/vue-sfc-styles"));
const vue_sfc_template_1 = __importDefault(require("./plugins/vue-sfc-template"));
const vue_template_html_1 = __importDefault(require("./plugins/vue-template-html"));
const vue_tsx_1 = __importDefault(require("./plugins/vue-tsx"));
const CompilerDOM = __importStar(require("@vue/compiler-dom"));
const CompilerVue2 = __importStar(require("./utils/vue2TemplateCompiler"));
function getDefaultVueLanguagePlugins(ts, compilerOptions, vueCompilerOptions, codegenStack) {
const plugins = [
useMdFilePlugin,
useHtmlFilePlugin,
useVueFilePlugin,
useHtmlTemplatePlugin,
useVueSfcStyles,
useVueSfcCustomBlocks,
useVueSfcScriptsFormat,
useVueSfcTemplate,
file_md_1.default,
file_html_1.default,
file_vue_1.default,
vue_template_html_1.default,
vue_sfc_styles_1.default,
vue_sfc_customblocks_1.default,
vue_sfc_scripts_1.default,
vue_sfc_template_1.default,
vue_tsx_1.default,

@@ -30,3 +56,8 @@ ...vueCompilerOptions.plugins,

modules: {
'@vue/compiler-dom': vueCompilerOptions.target < 3 ? CompilerVue2 : CompilerDOM,
'@vue/compiler-dom': vueCompilerOptions.target < 3
? {
...CompilerDOM,
compile: CompilerVue2.compile,
}
: CompilerDOM,
typescript: ts,

@@ -33,0 +64,0 @@ },

import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=file-html.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sfcBlockReg = /\<(script|style)\b([\s\S]*?)\>([\s\S]*?)\<\/\1\>/g;

@@ -79,3 +80,3 @@ const langReg = /\blang\s*=\s*(['\"]?)(\S*)\b\1/;

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=file-html.js.map
import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=file-md.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const source_map_1 = require("@volar/source-map");

@@ -66,3 +67,3 @@ const parseSfc_1 = require("../utils/parseSfc");

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=file-md.js.map
import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=file-vue.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const parseSfc_1 = require("../utils/parseSfc");

@@ -38,3 +39,3 @@ const plugin = (_ctx) => {

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=file-vue.js.map
import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=vue-sfc-customblocks.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const language_core_1 = require("@volar/language-core");

@@ -31,3 +32,3 @@ const customBlockReg = /^(.*)\.customBlock_([^_]+)_(\d+)\.([^.]+)$/;

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=vue-sfc-customblocks.js.map
import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=vue-sfc-scripts.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const language_core_1 = require("@volar/language-core");

@@ -40,3 +41,3 @@ const scriptFormatReg = /^(.*)\.script_format\.([^.]+)$/;

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=vue-sfc-scripts.js.map
import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=vue-sfc-styles.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const language_core_1 = require("@volar/language-core");

@@ -31,3 +32,3 @@ const styleReg = /^(.*)\.style_(\d+)\.([^.]+)$/;

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=vue-sfc-styles.js.map
import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=vue-sfc-template.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const language_core_1 = require("@volar/language-core");

@@ -27,3 +28,3 @@ const templateReg = /^(.*)\.template\.([^.]+)$/;

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=vue-sfc-template.js.map
import { VueLanguagePlugin } from '../types';
declare const plugin: VueLanguagePlugin;
export = plugin;
export default plugin;
//# sourceMappingURL=vue-template-html.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugin = ({ modules }) => {

@@ -167,3 +168,3 @@ return {

};
module.exports = plugin;
exports.default = plugin;
//# sourceMappingURL=vue-template-html.js.map

@@ -58,1 +58,2 @@ import { Sfc, VueLanguagePlugin } from '../types';

export default plugin;
//# sourceMappingURL=vue-tsx.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,7 +29,7 @@ exports.tsCodegen = void 0;

const script_1 = require("../generators/script");
const templateGen = require("../generators/template");
const templateGen = __importStar(require("../generators/template"));
const scriptRanges_1 = require("../parsers/scriptRanges");
const scriptSetupRanges_1 = require("../parsers/scriptSetupRanges");
const language_core_1 = require("@volar/language-core");
const muggle = require("muggle-string");
const muggle = __importStar(require("muggle-string"));
const templateFormatReg = /^\.template_format\.ts$/;

@@ -13,0 +36,0 @@ const templateStyleCssReg = /^\.template_style\.css$/;

import { FileCapabilities, VirtualFile, FileKind, FileRangeCapabilities, MirrorBehaviorCapabilities } from '@volar/language-core';
import { Mapping, Segment, StackNode, Stack } from '@volar/source-map';
import * as CompilerDom from '@vue/compiler-dom';
import type * as CompilerDOM from '@vue/compiler-dom';
import type { SFCBlock, SFCParseResult, SFCScriptBlock, SFCStyleBlock, SFCTemplateBlock } from '@vue/compiler-sfc';

@@ -34,3 +34,3 @@ import { ComputedRef } from '@vue/reactivity';

snapshot: ts.IScriptSnapshot;
result: CompilerDom.CodegenResult;
result: CompilerDOM.CodegenResult;
plugin: ReturnType<VueLanguagePlugin>;

@@ -43,5 +43,5 @@ } | undefined;

get compiledSFCTemplate(): {
errors: CompilerDom.CompilerError[];
warnings: CompilerDom.CompilerError[];
ast: CompilerDom.RootNode | undefined;
errors: CompilerDOM.CompilerError[];
warnings: CompilerDOM.CompilerError[];
ast: CompilerDOM.RootNode | undefined;
} | undefined;

@@ -53,5 +53,5 @@ get mainScriptName(): string;

_compiledSfcTemplate: ComputedRef<{
errors: CompilerDom.CompilerError[];
warnings: CompilerDom.CompilerError[];
ast: CompilerDom.RootNode | undefined;
errors: CompilerDOM.CompilerError[];
warnings: CompilerDOM.CompilerError[];
ast: CompilerDOM.RootNode | undefined;
} | undefined>;

@@ -82,1 +82,2 @@ _pluginEmbeddedFiles: ComputedRef<{

}
//# sourceMappingURL=sourceFile.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,3 +30,3 @@ exports.VueFile = exports.VueEmbeddedFile = void 0;

const reactivity_1 = require("@vue/reactivity");
const muggle = require("muggle-string");
const muggle = __importStar(require("muggle-string"));
const parseCssVars_1 = require("./utils/parseCssVars");

@@ -10,0 +33,0 @@ const parseCssClassNames_1 = require("./utils/parseCssClassNames");

@@ -0,5 +1,5 @@

import type * as CompilerDOM from '@vue/compiler-dom';
import type { SFCParseResult } from '@vue/compiler-sfc';
import * as CompilerDom from '@vue/compiler-dom';
import type * as ts from 'typescript/lib/tsserverlibrary';
import { VueEmbeddedFile } from './sourceFile';
import type { VueEmbeddedFile } from './sourceFile';
export type { SFCParseResult } from '@vue/compiler-sfc';

@@ -55,9 +55,9 @@ export type RawVueCompilerOptions = Partial<Omit<VueCompilerOptions, 'target' | 'plugins'>> & {

}): SFCParseResult | undefined;
resolveTemplateCompilerOptions?(options: CompilerDom.CompilerOptions): CompilerDom.CompilerOptions;
compileSFCTemplate?(lang: string, template: string, options: CompilerDom.CompilerOptions): CompilerDom.CodegenResult | undefined;
updateSFCTemplate?(oldResult: CompilerDom.CodegenResult, textChange: {
resolveTemplateCompilerOptions?(options: CompilerDOM.CompilerOptions): CompilerDOM.CompilerOptions;
compileSFCTemplate?(lang: string, template: string, options: CompilerDOM.CompilerOptions): CompilerDOM.CodegenResult | undefined;
updateSFCTemplate?(oldResult: CompilerDOM.CodegenResult, textChange: {
start: number;
end: number;
newText: string;
}): CompilerDom.CodegenResult | undefined;
}): CompilerDOM.CodegenResult | undefined;
getEmbeddedFileNames?(fileName: string, sfc: Sfc): string[];

@@ -101,3 +101,3 @@ resolveEmbeddedFile?(fileName: string, sfc: Sfc, embeddedFile: VueEmbeddedFile): void;

})[];
templateAst: CompilerDom.RootNode | undefined;
templateAst: CompilerDOM.RootNode | undefined;
scriptAst: ts.SourceFile | undefined;

@@ -110,1 +110,2 @@ scriptSetupAst: ts.SourceFile | undefined;

}
//# sourceMappingURL=types.d.ts.map

@@ -5,1 +5,2 @@ import { VueCompilerOptions } from '../types';

export declare function genConstructorOverloads(name?: string, nums?: number): string;
//# sourceMappingURL=globalTypes.d.ts.map

@@ -5,1 +5,2 @@ export declare function parseCssClassNames(styleContent: string): Generator<{

}, void, unknown>;
//# sourceMappingURL=parseCssClassNames.d.ts.map

@@ -6,1 +6,2 @@ export declare function parseCssVars(styleContent: string): Generator<{

export declare function clearComments(css: string): string;
//# sourceMappingURL=parseCssVars.d.ts.map
import type { SFCParseResult } from '@vue/compiler-sfc';
export declare function parse(source: string): SFCParseResult;
//# sourceMappingURL=parseSfc.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = void 0;
const compiler = require("@vue/compiler-dom");
const compiler = __importStar(require("@vue/compiler-dom"));
function parse(source) {

@@ -6,0 +29,0 @@ const errors = [];

export declare function getSlotsPropertyName(vueVersion: number): "$scopedSlots" | "$slots";
export { hyphenate as hyphenateTag } from '@vue/shared';
export declare function hyphenateAttr(str: string): string;
//# sourceMappingURL=shared.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSlotsPropertyName = void 0;
exports.hyphenateAttr = exports.hyphenateTag = exports.getSlotsPropertyName = void 0;
const shared_1 = require("@vue/shared");
function getSlotsPropertyName(vueVersion) {

@@ -8,2 +9,13 @@ return vueVersion < 3 ? '$scopedSlots' : '$slots';

exports.getSlotsPropertyName = getSlotsPropertyName;
var shared_2 = require("@vue/shared");
Object.defineProperty(exports, "hyphenateTag", { enumerable: true, get: function () { return shared_2.hyphenate; } });
function hyphenateAttr(str) {
let hyphencase = (0, shared_1.hyphenate)(str);
// fix https://github.com/vuejs/core/issues/8811
if (str.length && str[0] !== str[0].toLowerCase()) {
hyphencase = '-' + hyphencase;
}
return hyphencase;
}
exports.hyphenateAttr = hyphenateAttr;
//# sourceMappingURL=shared.js.map

@@ -9,1 +9,2 @@ import type * as ts from 'typescript/lib/tsserverlibrary';

export declare function colletVars(ts: typeof import('typescript/lib/tsserverlibrary'), node: ts.Node, result: string[]): void;
//# sourceMappingURL=transform.d.ts.map

@@ -6,4 +6,5 @@ import type * as ts from 'typescript/lib/tsserverlibrary';

};
export declare function createParsedCommandLineByJson(ts: typeof import('typescript/lib/tsserverlibrary'), parseConfigHost: ts.ParseConfigHost, rootDir: string, json: any): ParsedCommandLine;
export declare function createParsedCommandLineByJson(ts: typeof import('typescript/lib/tsserverlibrary'), parseConfigHost: ts.ParseConfigHost, rootDir: string, json: any, configFileName?: string): ParsedCommandLine;
export declare function createParsedCommandLine(ts: typeof import('typescript/lib/tsserverlibrary'), parseConfigHost: ts.ParseConfigHost, tsConfigPath: string): ParsedCommandLine;
export declare function resolveVueCompilerOptions(vueOptions: Partial<VueCompilerOptions>): VueCompilerOptions;
//# sourceMappingURL=ts.d.ts.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveVueCompilerOptions = exports.createParsedCommandLine = exports.createParsedCommandLineByJson = void 0;
const path = require("path");
function createParsedCommandLineByJson(ts, parseConfigHost, rootDir, json) {
const path = __importStar(require("path"));
function createParsedCommandLineByJson(ts, parseConfigHost, rootDir, json, configFileName = rootDir + '/jsconfig.json') {
const proxyHost = proxyParseConfigHostForExtendConfigPaths(parseConfigHost);
ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, rootDir + '/jsconfig.json');
ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, configFileName);
let vueOptions = {};

@@ -18,3 +41,3 @@ for (const extendPath of proxyHost.extendConfigPaths.reverse()) {

}
const parsed = ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, rootDir + '/jsconfig.json', undefined, (vueOptions.extensions ?? ['.vue']).map(extension => ({
const parsed = ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, configFileName, undefined, (vueOptions.extensions ?? ['.vue']).map(extension => ({
extension: extension.slice(1),

@@ -124,8 +147,12 @@ isMixedContent: true,

}
else {
console.warn('Load plugin failed:', pluginPath);
}
}
catch (error) {
console.warn('Load plugin failed', pluginPath, error);
console.warn('Load plugin failed:', pluginPath, error);
}
return [];
})
.filter((plugin) => !!plugin);
.flat(Infinity);
result.plugins = plugins;

@@ -132,0 +159,0 @@ }

@@ -1,3 +0,3 @@

import * as CompilerDom from '@vue/compiler-dom';
export * from '@vue/compiler-dom';
export declare function compile(template: string, options?: CompilerDom.CompilerOptions): CompilerDom.CodegenResult;
import * as CompilerDOM from '@vue/compiler-dom';
export declare function compile(template: string, options?: CompilerDOM.CompilerOptions): CompilerDOM.CodegenResult;
//# sourceMappingURL=vue2TemplateCompiler.d.ts.map

@@ -13,10 +13,18 @@ "use strict";

}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.compile = void 0;
const CompilerDom = require("@vue/compiler-dom");
const CompilerDOM = __importStar(require("@vue/compiler-dom"));
const Vue2TemplateCompiler = require('vue-template-compiler/build');
__exportStar(require("@vue/compiler-dom"), exports);
function compile(template, options = {}) {

@@ -26,4 +34,4 @@ const onError = options.onError;

options.onError = (error) => {
if (error.code === 33 /* CompilerDom.ErrorCodes.X_V_FOR_TEMPLATE_KEY_PLACEMENT */ // :key binding allowed in v-for template child in vue 2
|| error.code === 29 /* CompilerDom.ErrorCodes.X_V_IF_SAME_KEY */ // fix https://github.com/vuejs/language-tools/issues/1638
if (error.code === 33 // :key binding allowed in v-for template child in vue 2
|| error.code === 29 // fix https://github.com/vuejs/language-tools/issues/1638
) {

@@ -64,8 +72,8 @@ return;

}
return baseCompile(template, Object.assign({}, CompilerDom.parserOptions, options, {
return baseCompile(template, Object.assign({}, CompilerDOM.parserOptions, options, {
nodeTransforms: [
...CompilerDom.DOMNodeTransforms,
...CompilerDOM.DOMNodeTransforms,
...(options.nodeTransforms || [])
],
directiveTransforms: Object.assign({}, CompilerDom.DOMDirectiveTransforms, options.directiveTransforms || {}),
directiveTransforms: Object.assign({}, CompilerDOM.DOMDirectiveTransforms, options.directiveTransforms || {}),
}));

@@ -79,9 +87,9 @@ }

if (!prefixIdentifiers && options.cacheHandlers) {
onError(CompilerDom.createCompilerError(49 /* CompilerDom.ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
onError(CompilerDOM.createCompilerError(49));
}
if (options.scopeId && !isModuleMode) {
onError(CompilerDom.createCompilerError(50 /* CompilerDom.ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
onError(CompilerDOM.createCompilerError(50));
}
const ast = CompilerDom.baseParse(template, options);
const [nodeTransforms, directiveTransforms] = CompilerDom.getBaseTransformPreset(prefixIdentifiers);
const ast = CompilerDOM.baseParse(template, options);
const [nodeTransforms, directiveTransforms] = CompilerDOM.getBaseTransformPreset(prefixIdentifiers);
// v-for > v-if in vue 2

@@ -92,3 +100,3 @@ const transformIf = nodeTransforms[1];

nodeTransforms[3] = transformIf;
CompilerDom.transform(ast, Object.assign({}, options, {
CompilerDOM.transform(ast, Object.assign({}, options, {
prefixIdentifiers,

@@ -102,3 +110,3 @@ nodeTransforms: [

}));
return CompilerDom.generate(ast, Object.assign({}, options, {
return CompilerDOM.generate(ast, Object.assign({}, options, {
prefixIdentifiers

@@ -105,0 +113,0 @@ }));

{
"name": "@vue/language-core",
"version": "1.8.8",
"version": "1.8.10",
"main": "out/index.js",

@@ -37,3 +37,3 @@ "license": "MIT",

},
"gitHead": "62a08c35722319bcca90ea3ebd3236fbd986a6a6"
"gitHead": "97d60fa475b653fe435a7fae6e2a626821658351"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc