Socket
Socket
Sign inDemoInstall

vue-tsc

Package Overview
Dependencies
Maintainers
1
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-tsc - npm Package Compare versions

Comparing version 2.0.29 to 2.1.0

3

index.d.ts

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

export declare function run(): void;
export declare function removeEmitGlobalTypes(dts: string): string;
export declare function run(tscPath?: string): void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = run;
exports.removeEmitGlobalTypes = removeEmitGlobalTypes;
const runTsc_1 = require("@volar/typescript/lib/quickstart/runTsc");
const vue = require("@vue/language-core");
const windowsPathReg = /\\/g;
function run() {
function run(tscPath = require.resolve('typescript/lib/tsc')) {
let runExtensions = ['.vue'];
const extensionsChangedException = new Error('extensions changed');
const main = () => (0, runTsc_1.runTsc)(require.resolve('typescript/lib/tsc'), runExtensions, (ts, options) => {
const main = () => (0, runTsc_1.runTsc)(tscPath, runExtensions, (ts, options) => {
const { configFilePath } = options.options;

@@ -19,7 +18,14 @@ const vueOptions = typeof configFilePath === 'string'

&& runExtensions.every(ext => allExtensions.includes(ext))) {
const writeFile = options.host.writeFile.bind(options.host);
options.host.writeFile = (fileName, contents, ...args) => {
return writeFile(fileName, removeEmitGlobalTypes(contents), ...args);
};
const vueLanguagePlugin = vue.createVueLanguagePlugin2(ts, id => id, vue.createRootFileChecker(undefined, () => options.rootNames.map(rootName => rootName.replace(windowsPathReg, '/')), options.host?.useCaseSensitiveFileNames?.() ?? false), options.options, vueOptions);
try {
const rootDir = typeof configFilePath === 'string'
? configFilePath
: options.host?.getCurrentDirectory() ?? ts.sys.getCurrentDirectory();
const libDir = require.resolve(`${vueOptions.lib}/package.json`, { paths: [rootDir] })
.slice(0, -'package.json'.length);
const globalTypesPath = `${libDir}__globalTypes_${vueOptions.target}_${vueOptions.strictTemplates}.d.ts`;
const globalTypesContents = vue.generateGlobalTypes(vueOptions.lib, vueOptions.target, vueOptions.strictTemplates);
ts.sys.writeFile(globalTypesPath, globalTypesContents);
}
catch { }
const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, options.options, vueOptions, id => id);
return { languagePlugins: [vueLanguagePlugin] };

@@ -44,6 +50,2 @@ }

}
const removeEmitGlobalTypesRegexp = /^[^\n]*__VLS_globalTypesStart[\w\W]*__VLS_globalTypesEnd[^\n]*\n?$/mg;
function removeEmitGlobalTypes(dts) {
return dts.replace(removeEmitGlobalTypesRegexp, '');
}
//# sourceMappingURL=index.js.map
{
"name": "vue-tsc",
"version": "2.0.29",
"version": "2.1.0",
"license": "MIT",

@@ -19,4 +19,4 @@ "files": [

"dependencies": {
"@volar/typescript": "~2.4.0-alpha.18",
"@vue/language-core": "2.0.29",
"@volar/typescript": "~2.4.1",
"@vue/language-core": "2.1.0",
"semver": "^7.5.4"

@@ -30,3 +30,3 @@ },

},
"gitHead": "49ad9563e6f2677595878a000179dfea83fb910c"
"gitHead": "510063740b90b64caedaee1f0bde70974613a92c"
}
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