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

@volar/vue-language-core

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/vue-language-core - npm Package Compare versions

Comparing version 1.0.18 to 1.0.19

2

out/languageModule.d.ts
import type * as embedded from '@volar/language-core';
import { VueLanguagePlugin, VueCompilerOptions } from './types';
import type * as ts from 'typescript/lib/tsserverlibrary';
export declare function createLanguageModule(ts: typeof import('typescript/lib/tsserverlibrary'), rootDir: string, compilerOptions: ts.CompilerOptions, _vueCompilerOptions: VueCompilerOptions, extraPlugins?: VueLanguagePlugin[]): embedded.LanguageModule;
export declare function createLanguageModules(ts: typeof import('typescript/lib/tsserverlibrary'), rootDir: string, compilerOptions: ts.CompilerOptions, _vueCompilerOptions: VueCompilerOptions, extraPlugins?: VueLanguagePlugin[]): embedded.LanguageModule[];
Object.defineProperty(exports, "__esModule", { value: true });
exports.createLanguageModule = void 0;
exports.createLanguageModules = void 0;
const path_1 = require("path");

@@ -8,3 +8,4 @@ const plugins_1 = require("./plugins");

const ts_1 = require("./utils/ts");
function createLanguageModule(ts, rootDir, compilerOptions, _vueCompilerOptions, extraPlugins = []) {
function createLanguageModules(ts, rootDir, compilerOptions, _vueCompilerOptions, extraPlugins = []) {
var _a, _b;
const vueCompilerOptions = (0, ts_1.resolveVueCompilerOptions)(_vueCompilerOptions);

@@ -79,3 +80,6 @@ const vueLanguagePlugin = (0, plugins_1.getDefaultVueLanguagePlugins)(ts, rootDir, compilerOptions, _vueCompilerOptions, extraPlugins);

};
return languageModule;
return [
languageModule,
...(_b = (_a = vueCompilerOptions.experimentalAdditionalLanguageModules) === null || _a === void 0 ? void 0 : _a.map(module => require(module))) !== null && _b !== void 0 ? _b : [],
];
function getSharedTypesFiles(fileNames) {

@@ -87,3 +91,3 @@ const moduleFiles = fileNames.filter(fileName => vueCompilerOptions.extensions.some(ext => fileName.endsWith(ext)));

}
exports.createLanguageModule = createLanguageModule;
exports.createLanguageModules = createLanguageModules;
//# sourceMappingURL=languageModule.js.map

@@ -28,2 +28,3 @@ import * as embedded from '@volar/language-core';

experimentalUseElementAccessInTemplate: boolean;
experimentalAdditionalLanguageModules: string[];
}

@@ -30,0 +31,0 @@ export type VueLanguagePlugin = (ctx: {

@@ -32,3 +32,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

function createParsedCommandLineBase(ts, parseConfigHost, content, tsConfigPath, extraFileExtensions, extendsSet) {
var _a;
var _a, _b, _c;
let extendsVueOptions = {};

@@ -49,4 +49,13 @@ const folder = path.dirname(tsConfigPath);

const vueOptions = Object.assign(Object.assign({}, extendsVueOptions), content.raw.vueCompilerOptions);
vueOptions.hooks = (_a = vueOptions.hooks) === null || _a === void 0 ? void 0 : _a.map(hook => {
vueOptions.plugins = (_a = vueOptions.plugins) === null || _a === void 0 ? void 0 : _a.map(plugin => {
try {
plugin = require.resolve(plugin, { paths: [folder] });
}
catch (error) {
console.error(error);
}
return plugin;
});
vueOptions.hooks = (_b = vueOptions.hooks) === null || _b === void 0 ? void 0 : _b.map(hook => {
try {
hook = require.resolve(hook, { paths: [folder] });

@@ -59,2 +68,11 @@ }

});
vueOptions.experimentalAdditionalLanguageModules = (_c = vueOptions.experimentalAdditionalLanguageModules) === null || _c === void 0 ? void 0 : _c.map(module => {
try {
module = require.resolve(module, { paths: [folder] });
}
catch (error) {
console.error(error);
}
return module;
});
return Object.assign(Object.assign({}, content), { vueOptions });

@@ -84,3 +102,3 @@ }

function resolveVueCompilerOptions(vueOptions) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
const target = (_a = vueOptions.target) !== null && _a !== void 0 ? _a : 3;

@@ -96,8 +114,8 @@ return Object.assign(Object.assign({}, vueOptions), { target, extensions: (_b = vueOptions.extensions) !== null && _b !== void 0 ? _b : ['.vue'], jsxTemplates: (_c = vueOptions.jsxTemplates) !== null && _c !== void 0 ? _c : false, strictTemplates: (_d = vueOptions.strictTemplates) !== null && _d !== void 0 ? _d : false, skipTemplateCodegen: (_e = vueOptions.skipTemplateCodegen) !== null && _e !== void 0 ? _e : false, nativeTags: (_f = vueOptions.nativeTags) !== null && _f !== void 0 ? _f : [...new Set([

? [`(await import('vue')).defineComponent(`, `)`]
: [`(await import('vue')).default.extend(`, `)`]), narrowingTypesInInlineHandlers: (_k = vueOptions.narrowingTypesInInlineHandlers) !== null && _k !== void 0 ? _k : false, plugins: (_l = vueOptions.plugins) !== null && _l !== void 0 ? _l : [], hooks: (_m = vueOptions.hooks) !== null && _m !== void 0 ? _m : [],
: [`(await import('vue')).default.extend(`, `)`]), narrowingTypesInInlineHandlers: (_k = vueOptions.narrowingTypesInInlineHandlers) !== null && _k !== void 0 ? _k : false, plugins: (_l = vueOptions.plugins) !== null && _l !== void 0 ? _l : [], hooks: (_m = vueOptions.hooks) !== null && _m !== void 0 ? _m : [], experimentalAdditionalLanguageModules: (_o = vueOptions.experimentalAdditionalLanguageModules) !== null && _o !== void 0 ? _o : [],
// experimental
experimentalResolveStyleCssClasses: (_o = vueOptions.experimentalResolveStyleCssClasses) !== null && _o !== void 0 ? _o : 'scoped', experimentalRfc436: (_p = vueOptions.experimentalRfc436) !== null && _p !== void 0 ? _p : false,
experimentalResolveStyleCssClasses: (_p = vueOptions.experimentalResolveStyleCssClasses) !== null && _p !== void 0 ? _p : 'scoped', experimentalRfc436: (_q = vueOptions.experimentalRfc436) !== null && _q !== void 0 ? _q : false,
// https://github.com/vuejs/vue-next/blob/master/packages/compiler-dom/src/transforms/vModel.ts#L49-L51
// https://v3.vuejs.org/guide/forms.html#basic-usage
experimentalModelPropName: (_q = vueOptions.experimentalModelPropName) !== null && _q !== void 0 ? _q : {
experimentalModelPropName: (_r = vueOptions.experimentalModelPropName) !== null && _r !== void 0 ? _r : {
'': {

@@ -114,5 +132,5 @@ 'input': { type: 'radio' },

},
}, experimentalUseElementAccessInTemplate: (_r = vueOptions.experimentalUseElementAccessInTemplate) !== null && _r !== void 0 ? _r : false });
}, experimentalUseElementAccessInTemplate: (_s = vueOptions.experimentalUseElementAccessInTemplate) !== null && _s !== void 0 ? _s : false });
}
exports.resolveVueCompilerOptions = resolveVueCompilerOptions;
//# sourceMappingURL=ts.js.map
{
"name": "@volar/vue-language-core",
"version": "1.0.18",
"version": "1.0.19",
"main": "out/index.js",

@@ -16,4 +16,4 @@ "license": "MIT",

"dependencies": {
"@volar/language-core": "1.0.18",
"@volar/source-map": "1.0.18",
"@volar/language-core": "1.0.19",
"@volar/source-map": "1.0.19",
"@vue/compiler-dom": "^3.2.45",

@@ -29,3 +29,3 @@ "@vue/compiler-sfc": "^3.2.45",

},
"gitHead": "f102ee7bfc96792c63746a5dcb9742e3346d5cc7"
"gitHead": "02267fe83a5567b1cae7025e834cf084c8248546"
}
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