New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vue/typescript-plugin

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/typescript-plugin - npm Package Compare versions

Comparing version 2.1.2 to 2.1.4

22

index.js
"use strict";
const createLanguageServicePlugin_1 = require("@volar/typescript/lib/quickstart/createLanguageServicePlugin");
const path = require("path");
const vue = require("@vue/language-core");

@@ -8,5 +9,9 @@ const common_1 = require("./lib/common");

const vueCompilerOptions = new WeakMap();
const setupedProjects = new WeakSet();
const basePlugin = (0, createLanguageServicePlugin_1.createLanguageServicePlugin)((ts, info) => {
const vueOptions = getVueCompilerOptions();
const languagePlugin = vue.createVueLanguagePlugin(ts, info.languageServiceHost.getCompilationSettings(), vueOptions, id => id);
const languagePlugin = vue.createVueLanguagePlugin(ts, info.languageServiceHost.getCompilationSettings(), {
...vueOptions,
__setupedGlobalTypes: () => setupedProjects.has(info.project),
}, id => id);
vueCompilerOptions.set(info.project, vueOptions);

@@ -48,7 +53,14 @@ return {

try {
const libDir = require.resolve(`${options.lib}/package.json`, { paths: [proj.getCurrentDirectory()] })
.slice(0, -'package.json'.length);
const globalTypesPath = `${libDir}dist/__globalTypes_${options.target}_${options.strictTemplates}.d.ts`;
const globalTypesContents = vue.generateGlobalTypes(options.lib, options.target, options.strictTemplates);
let dir = proj.getCurrentDirectory();
while (!proj.directoryExists(path.resolve(dir, 'node_modules'))) {
const parentDir = path.resolve(dir, '..');
if (dir === parentDir) {
throw 0;
}
dir = parentDir;
}
const globalTypesPath = path.resolve(dir, `node_modules/.vue-global-types/${options.lib}_${options.target}_${options.strictTemplates}.d.ts`);
const globalTypesContents = vue.generateGlobalTypes('global', options.lib, options.target, options.strictTemplates);
proj.writeFile(globalTypesPath, globalTypesContents);
setupedProjects.add(proj);
}

@@ -55,0 +67,0 @@ catch { }

{
"name": "@vue/typescript-plugin",
"version": "2.1.2",
"version": "2.1.4",
"license": "MIT",

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

"@volar/typescript": "~2.4.1",
"@vue/language-core": "2.1.2",
"@vue/language-core": "2.1.4",
"@vue/shared": "^3.4.0"

@@ -23,3 +23,3 @@ },

},
"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