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

@volar/typescript

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/typescript - npm Package Compare versions

Comparing version 2.4.0-alpha.12 to 2.4.0-alpha.13

5

lib/quickstart/runTsc.d.ts

@@ -7,2 +7,5 @@ import type * as ts from 'typescript';

};
export declare function runTsc(tscPath: string, extensions: string[], _getLanguagePlugins: typeof getLanguagePlugins): void;
export declare function runTsc(tscPath: string, extensionsOrOptions: string[] | {
supportedExtensions: string[];
extensionsToRemove: string[];
}, _getLanguagePlugins: typeof getLanguagePlugins): void;

18

lib/quickstart/runTsc.js

@@ -8,3 +8,3 @@ "use strict";

exports.getLanguagePlugins = getLanguagePlugins;
function runTsc(tscPath, extensions, _getLanguagePlugins) {
function runTsc(tscPath, extensionsOrOptions, _getLanguagePlugins) {
exports.getLanguagePlugins = _getLanguagePlugins;

@@ -16,7 +16,15 @@ const proxyApiPath = require.resolve('../node/proxyCreateProgram');

let tsc = readFileSync(...args);
const supportedExtensions = Array.isArray(extensionsOrOptions) ? extensionsOrOptions : extensionsOrOptions.supportedExtensions;
const extensionsToRemove = Array.isArray(extensionsOrOptions) ? [] : extensionsOrOptions.extensionsToRemove;
// add allow extensions
const extsText = extensions.map(ext => `"${ext}"`).join(', ');
tsc = replace(tsc, /supportedTSExtensions = .*(?=;)/, s => s + `.concat([[${extsText}]])`);
tsc = replace(tsc, /supportedJSExtensions = .*(?=;)/, s => s + `.concat([[${extsText}]])`);
tsc = replace(tsc, /allSupportedExtensions = .*(?=;)/, s => s + `.concat([[${extsText}]])`);
if (supportedExtensions.length) {
const extsText = supportedExtensions.map(ext => `"${ext}"`).join(', ');
tsc = replace(tsc, /supportedTSExtensions = .*(?=;)/, s => s + `.concat([[${extsText}]])`);
tsc = replace(tsc, /supportedJSExtensions = .*(?=;)/, s => s + `.concat([[${extsText}]])`);
tsc = replace(tsc, /allSupportedExtensions = .*(?=;)/, s => s + `.concat([[${extsText}]])`);
}
if (extensionsToRemove.length) {
const extsText = extensionsToRemove.map(ext => `"${ext}"`).join(', ');
tsc = replace(tsc, /extensionsToRemove = .*(?=;)/, s => s + `.concat([${extsText}])`);
}
// proxy createProgram

@@ -23,0 +31,0 @@ tsc = replace(tsc, /function createProgram\(.+\) {/, s => `var createProgram = require(${JSON.stringify(proxyApiPath)}).proxyCreateProgram(`

{
"name": "@volar/typescript",
"version": "2.4.0-alpha.12",
"version": "2.4.0-alpha.13",
"license": "MIT",

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

"dependencies": {
"@volar/language-core": "2.4.0-alpha.12",
"@volar/language-core": "2.4.0-alpha.13",
"path-browserify": "^1.0.1",

@@ -23,5 +23,5 @@ "vscode-uri": "^3.0.8"

"@types/path-browserify": "latest",
"@volar/language-service": "2.4.0-alpha.12"
"@volar/language-service": "2.4.0-alpha.13"
},
"gitHead": "9418f0c81cef5ca13b21bf43a49bef67c6cb2993"
"gitHead": "5f6d5d8ec51a5dda702d071c283e9133254cae97"
}
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