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

vue-component-meta

Package Overview
Dependencies
Maintainers
0
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-component-meta - npm Package Compare versions

Comparing version 2.1.2 to 2.1.4

37

lib/base.js

@@ -59,3 +59,6 @@ "use strict";

};
const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, projectHost.getCompilationSettings(), commandLine.vueOptions, id => id);
const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, projectHost.getCompilationSettings(), {
...commandLine.vueOptions,
__setupedGlobalTypes: () => true,
}, id => id);
const language = vue.createLanguage([

@@ -100,8 +103,22 @@ vueLanguagePlugin,

const tsLs = ts.createLanguageService(languageServiceHost);
const directoryExists = languageServiceHost.directoryExists?.bind(languageServiceHost);
const fileExists = languageServiceHost.fileExists.bind(languageServiceHost);
const getScriptSnapshot = languageServiceHost.getScriptSnapshot.bind(languageServiceHost);
const globalTypesName = `__globalTypes_${commandLine.vueOptions.target}_${commandLine.vueOptions.strictTemplates}.d.ts`;
const snapshots = new Map();
const globalTypesName = `${commandLine.vueOptions.lib}_${commandLine.vueOptions.target}_${commandLine.vueOptions.strictTemplates}.d.ts`;
const globalTypesContents = vue.generateGlobalTypes('global', commandLine.vueOptions.lib, commandLine.vueOptions.target, commandLine.vueOptions.strictTemplates);
const globalTypesSnapshot = {
getText: (start, end) => globalTypesContents.substring(start, end),
getLength: () => globalTypesContents.length,
getChangeRange: () => undefined,
};
if (directoryExists) {
languageServiceHost.directoryExists = path => {
if (path.endsWith('.vue-global-types')) {
return true;
}
return directoryExists(path);
};
}
languageServiceHost.fileExists = path => {
if (path.endsWith(globalTypesName)) {
if (path.endsWith(`.vue-global-types/${globalTypesName}`) || path.endsWith(`.vue-global-types\\${globalTypesName}`)) {
return true;

@@ -112,12 +129,4 @@ }

languageServiceHost.getScriptSnapshot = path => {
if (path.endsWith(globalTypesName)) {
if (!snapshots.has(path)) {
const contents = vue.generateGlobalTypes(commandLine.vueOptions.lib, commandLine.vueOptions.target, commandLine.vueOptions.strictTemplates);
snapshots.set(path, {
getText: (start, end) => contents.substring(start, end),
getLength: () => contents.length,
getChangeRange: () => undefined,
});
}
return snapshots.get(path);
if (path.endsWith(`.vue-global-types/${globalTypesName}`) || path.endsWith(`.vue-global-types\\${globalTypesName}`)) {
return globalTypesSnapshot;
}

@@ -124,0 +133,0 @@ return getScriptSnapshot(path);

{
"name": "vue-component-meta",
"version": "2.1.2",
"version": "2.1.4",
"license": "MIT",

@@ -16,5 +16,5 @@ "files": [

"@volar/typescript": "~2.4.1",
"@vue/language-core": "2.1.2",
"@vue/language-core": "2.1.4",
"path-browserify": "^1.0.1",
"vue-component-type-helpers": "2.1.2"
"vue-component-type-helpers": "2.1.4"
},

@@ -33,3 +33,3 @@ "peerDependencies": {

},
"gitHead": "4e4b839ea20ae11a2aef7ee9206465cb60a4be53"
"gitHead": "5e197d08eaef57209ff2927c943ba1db3bf4eff6"
}
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