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

@definitelytyped/utils

Package Overview
Dependencies
Maintainers
7
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@definitelytyped/utils - npm Package Compare versions

Comparing version 0.0.184 to 0.0.185

7

CHANGELOG.md
# @definitelytyped/utils
## 0.0.185
### Patch Changes
- 5d83a8ed: Fix loading on Windows
- 5d83a8ed: Fix command execution, paths on Windows
## 0.0.184

@@ -4,0 +11,0 @@

2

dist/fs.js

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

this.rootPrefix = rootPrefix;
(0, assert_1.default)(rootPrefix.startsWith("/"), "DiskFS must use absolute paths");
(0, assert_1.default)((0, path_1.isAbsolute)(rootPrefix), "DiskFS must use absolute paths");
this.rootPrefix = ensureTrailingSlash(rootPrefix);

@@ -145,0 +145,0 @@ }

@@ -5,3 +5,3 @@ /// <reference types="node" />

/** Run a command and return the error, stdout, and stderr. (Never throws.) */
export declare function exec(cmd: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<{
export declare function exec(cmd: string, args: readonly string[], cwd?: string, env?: NodeJS.ProcessEnv): Promise<{
error: Error | undefined;

@@ -12,3 +12,3 @@ stdout: string;

/** Run a command and return the stdout, or if there was an error, throw. */
export declare function execAndThrowErrors(cmd: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<string>;
export declare function execAndThrowErrors(cmd: string, args: readonly string[], cwd?: string, env?: NodeJS.ProcessEnv): Promise<string>;
export declare const enum CrashRecoveryState {

@@ -15,0 +15,0 @@ Normal = 0,

@@ -10,6 +10,7 @@ "use strict";

const net_1 = require("net");
const which_1 = __importDefault(require("which"));
const DEFAULT_CRASH_RECOVERY_MAX_OLD_SPACE_SIZE = 4096;
const DEFAULT_CHILD_RESTART_TASK_INTERVAL = 1000000;
/** Run a command and return the error, stdout, and stderr. (Never throws.) */
function exec(cmd, cwd, env) {
function exec(cmd, args, cwd, env) {
return new Promise((resolve) => {

@@ -19,3 +20,3 @@ // Fix "stdout maxBuffer exceeded" error

const maxBuffer = 1024 * 1024 * 1; // Max = 1 MiB, default is 200 KiB
(0, child_process_1.exec)(cmd, { encoding: "utf8", cwd, maxBuffer, env }, (error, stdout, stderr) => {
(0, child_process_1.execFile)(which_1.default.sync(cmd), args, { encoding: "utf8", cwd, maxBuffer, env }, (error, stdout, stderr) => {
resolve({ error: error === null ? undefined : error, stdout: stdout.trim(), stderr: stderr.trim() });

@@ -27,4 +28,4 @@ });

/** Run a command and return the stdout, or if there was an error, throw. */
async function execAndThrowErrors(cmd, cwd, env) {
const { error, stdout, stderr } = await exec(cmd, cwd, env);
async function execAndThrowErrors(cmd, args, cwd, env) {
const { error, stdout, stderr } = await exec(cmd, args, cwd, env);
if (error) {

@@ -31,0 +32,0 @@ throw new Error(`${error.stack}\n${stderr}`);

{
"name": "@definitelytyped/utils",
"version": "0.0.184",
"version": "0.0.185",
"description": "Shared utilities for DefinitelyTyped tools",

@@ -25,2 +25,3 @@ "homepage": "https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/utils#readme",

"tar-stream": "^2.1.4",
"which": "^4.0.0",
"@definitelytyped/typescript-versions": "0.0.180"

@@ -32,3 +33,4 @@ },

"@types/tar": "^6.1",
"@types/tar-stream": "^2.1.0"
"@types/tar-stream": "^2.1.0",
"@types/which": "^3.0.2"
},

@@ -35,0 +37,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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