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

@yarnpkg/fslib

Package Overview
Dependencies
Maintainers
5
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/fslib - npm Package Compare versions

Comparing version 2.0.0-rc.8 to 2.0.0-rc.11

26

lib/index.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const tmp_1 = __importDefault(require("tmp"));
const NodeFS_1 = require("./NodeFS");

@@ -113,3 +109,3 @@ const path_1 = require("./path");

fakeFs.readPromise(p, buffer, ...args).then(bytesRead => {
callback(undefined, bytesRead, buffer);
callback(null, bytesRead, buffer);
}, error => {

@@ -128,3 +124,3 @@ callback(error);

fakeImpl(...args).then((result) => {
callback(undefined, result);
callback(null, result);
}, (error) => {

@@ -153,3 +149,9 @@ callback(error);

mktempSync(cb) {
const { name, removeCallback } = tmp_1.default.dirSync({ unsafeCleanup: true });
// We lazily load `tmp` because it injects itself into the `process`
// events (to clean the folders at exit time), and it may lead to
// large memory leaks. Better avoid loading it until we can't do
// otherwise (ideally the fix would be for `tmp` itself to only
// attach cleaners after the first call).
const tmp = require(`tmp`);
const { name, removeCallback } = tmp.dirSync({ unsafeCleanup: true });
if (typeof cb === `undefined`) {

@@ -168,5 +170,11 @@ return path_1.npath.toPortablePath(name);

mktempPromise(cb) {
// We lazily load `tmp` because it injects itself into the `process`
// events (to clean the folders at exit time), and it may lead to
// large memory leaks. Better avoid loading it until we can't do
// otherwise (ideally the fix would be for `tmp` itself to only
// attach cleaners after the first call).
const tmp = require(`tmp`);
if (typeof cb === `undefined`) {
return new Promise((resolve, reject) => {
tmp_1.default.dir({ unsafeCleanup: true }, (err, path) => {
tmp.dir({ unsafeCleanup: true }, (err, path) => {
if (err) {

@@ -183,3 +191,3 @@ reject(err);

return new Promise((resolve, reject) => {
tmp_1.default.dir({ unsafeCleanup: true }, (err, path, cleanup) => {
tmp.dir({ unsafeCleanup: true }, (err, path, cleanup) => {
if (err) {

@@ -186,0 +194,0 @@ reject(err);

{
"name": "@yarnpkg/fslib",
"version": "2.0.0-rc.8",
"version": "2.0.0-rc.11",
"main": "./lib/index.js",
"sideEffects": false,
"dependencies": {
"@yarnpkg/libzip": "2.0.0-rc.3",
"tmp": "^0.0.33"
"@yarnpkg/libzip": "2.0.0-rc.5",
"tmp": "^0.1.0"
},
"scripts": {
"postpack": "rm -rf lib",
"prepack": "mkdir -p lib && rsync -a --exclude '*.ts' sources/ lib/ && run build:compile packages/yarnpkg-fslib",
"prepack": "run build:compile \"$(pwd)\"",
"release": "yarn npm publish",

@@ -14,0 +14,0 @@ "test:fslib": "run test:unit packages/yarnpkg-fslib",

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