Socket
Socket
Sign inDemoInstall

typescript

Package Overview
Dependencies
Maintainers
0
Versions
3204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript - npm Package Compare versions

Comparing version 5.6.0-dev.20240625 to 5.6.0-dev.20240626

48

lib/tsserver.js

@@ -18,5 +18,7 @@ /*! *****************************************************************************

"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;

@@ -32,3 +34,14 @@ var __copyProps = (to, from, except, desc) => {

var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/tsserver/server.ts
var import_os2 = __toESM(require("os"));
// src/typescript/typescript.ts

@@ -38,2 +51,9 @@ var typescript_exports = {};

// src/tsserver/nodeServer.ts
var import_child_process = __toESM(require("child_process"));
var import_fs = __toESM(require("fs"));
var import_net = __toESM(require("net"));
var import_os = __toESM(require("os"));
var import_readline = __toESM(require("readline"));
// src/tsserver/common.ts

@@ -113,4 +133,2 @@ function getLogLevel(level) {

const sys4 = typescript_exports.Debug.checkDefined(typescript_exports.sys);
const childProcess = require("child_process");
const fs = require("fs");
class Logger {

@@ -127,3 +145,3 @@ constructor(logFilename, traceToConsole, level) {

try {
this.fd = fs.openSync(this.logFilename, "w");
this.fd = import_fs.default.openSync(this.logFilename, "w");
} catch (_) {

@@ -138,3 +156,3 @@ }

if (this.fd >= 0) {
fs.close(this.fd, typescript_exports.noop);
import_fs.default.close(this.fd, typescript_exports.noop);
}

@@ -186,3 +204,3 @@ }

const buf = Buffer.from(s);
fs.writeSync(
import_fs.default.writeSync(
this.fd,

@@ -238,3 +256,3 @@ buf,

}
childProcess.execFileSync(process.execPath, args, { stdio: "ignore", env: { ELECTRON_RUN_AS_NODE: "1" } });
import_child_process.default.execFileSync(process.execPath, args, { stdio: "ignore", env: { ELECTRON_RUN_AS_NODE: "1" } });
status = true;

@@ -278,3 +296,3 @@ if (logger.hasLevel(typescript_exports.server.LogLevel.verbose)) {

try {
const factory = require("./cancellationToken");
const factory = require("./cancellationToken.js");
cancellationToken = factory(sys4.args);

@@ -361,7 +379,3 @@ } catch (e) {

function startNodeSession(options, logger, cancellationToken) {
const childProcess = require("child_process");
const os = require("os");
const net = require("net");
const readline = require("readline");
const rl = readline.createInterface({
const rl = import_readline.default.createInterface({
input: process.stdin,

@@ -419,3 +433,3 @@ output: process.stdout,

const typingsInstaller = (0, typescript_exports.combinePaths)((0, typescript_exports.getDirectoryPath)(typescript_exports.sys.getExecutingFilePath()), "typingsInstaller.js");
this.installer = childProcess.fork(typingsInstaller, args, { execArgv });
this.installer = import_child_process.default.fork(typingsInstaller, args, { execArgv });
this.installer.on("message", (m) => this.handleMessage(m));

@@ -456,3 +470,3 @@ this.host.setImmediate(() => this.event({ pid: this.installer.pid }, "typingsInstallerPid"));

if (this.canUseEvents && this.eventPort) {
const s = net.connect({ port: this.eventPort }, () => {
const s = import_net.default.connect({ port: this.eventPort }, () => {
this.eventSocket = s;

@@ -552,3 +566,3 @@ if (this.socketEventQueue) {

case "win32": {
const basePath = process.env.LOCALAPPDATA || process.env.APPDATA || os.homedir && os.homedir() || process.env.USERPROFILE || process.env.HOMEDRIVE && process.env.HOMEPATH && (0, typescript_exports.normalizeSlashes)(process.env.HOMEDRIVE + process.env.HOMEPATH) || os.tmpdir();
const basePath = process.env.LOCALAPPDATA || process.env.APPDATA || import_os.default.homedir && import_os.default.homedir() || process.env.USERPROFILE || process.env.HOMEDRIVE && process.env.HOMEPATH && (0, typescript_exports.normalizeSlashes)(process.env.HOMEDRIVE + process.env.HOMEPATH) || import_os.default.tmpdir();
return (0, typescript_exports.combinePaths)((0, typescript_exports.combinePaths)((0, typescript_exports.normalizeSlashes)(basePath), "Microsoft/TypeScript"), typescript_exports.versionMajorMinor);

@@ -574,3 +588,3 @@ }

const usersDir = platformIsDarwin ? "Users" : "home";
const homePath = os.homedir && os.homedir() || process.env.HOME || (process.env.LOGNAME || process.env.USER) && `/${usersDir}/${process.env.LOGNAME || process.env.USER}` || os.tmpdir();
const homePath = import_os.default.homedir && import_os.default.homedir() || process.env.HOME || (process.env.LOGNAME || process.env.USER) && `/${usersDir}/${process.env.LOGNAME || process.env.USER}` || import_os.default.tmpdir();
const cacheFolder = platformIsDarwin ? "Library/Caches" : ".cache";

@@ -622,3 +636,3 @@ return (0, typescript_exports.combinePaths)((0, typescript_exports.normalizeSlashes)(homePath), cacheFolder);

typescript_exports.setStackTraceLimit();
start(initializeNodeSystem(), require("os").platform());
start(initializeNodeSystem(), import_os2.default.platform());
//# sourceMappingURL=tsserver.js.map

@@ -53,2 +53,3 @@ /*! *****************************************************************************

module.exports = __toCommonJS(nodeTypingsInstaller_exports);
var import_child_process = require("child_process");
var fs = __toESM(require("fs"));

@@ -131,3 +132,2 @@ var path = __toESM(require("path"));

}
({ execSync: this.nodeExecSync } = require("child_process"));
this.ensurePackageDirectoryExists(globalTypingsCacheLocation2);

@@ -187,3 +187,3 @@ try {

try {
const stdout = this.nodeExecSync(command, { ...options, encoding: "utf-8" });
const stdout = (0, import_child_process.execFileSync)(command, { ...options, encoding: "utf-8" });
if (this.log.isEnabled()) {

@@ -190,0 +190,0 @@ this.log.writeLine(` Succeeded. stdout:${indent(typescript_exports.sys.newLine, stdout)}`);

@@ -5,3 +5,3 @@ {

"homepage": "https://www.typescriptlang.org/",
"version": "5.6.0-dev.20240625",
"version": "5.6.0-dev.20240626",
"license": "Apache-2.0",

@@ -17,7 +17,7 @@ "description": "TypeScript is a language for application scale JavaScript development",

"bugs": {
"url": "https://github.com/Microsoft/TypeScript/issues"
"url": "https://github.com/microsoft/TypeScript/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/TypeScript.git"
"url": "https://github.com/microsoft/TypeScript.git"
},

@@ -49,2 +49,3 @@ "main": "./lib/typescript.js",

"@types/chai": "^4.3.16",
"@types/diff": "^5.2.1",
"@types/minimist": "^1.2.5",

@@ -116,3 +117,3 @@ "@types/mocha": "^10.0.6",

},
"gitHead": "6c01f6c584b01caf58f2e860fe954591e8591166"
"gitHead": "ef339af12801c1f88ff4e01d4d4e602addfcca98"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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