Socket
Socket
Sign inDemoInstall

builder-util

Package Overview
Dependencies
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder-util - npm Package Compare versions

Comparing version 2.0.7 to 2.0.8

8

out/fs.d.ts

@@ -35,2 +35,7 @@ /// <reference types="node" />

}
export interface CopyDirOptions {
filter?: Filter | null;
transformer?: FileTransformer | null;
isUseHardLink?: (file: string) => boolean;
}
/**

@@ -40,4 +45,5 @@ * Empty directories is never created.

*/
export declare function copyDir(src: string, destination: string, filter?: Filter | null, transformer?: FileTransformer | null, isUseHardLink?: (file: string) => boolean): Promise<any>;
export declare function copyDir(src: string, destination: string, options?: CopyDirOptions): Promise<any>;
export declare const DO_NOT_USE_HARD_LINKS: (file: string) => boolean;
export declare const USE_HARD_LINKS: (file: string) => boolean;
export interface Link {

@@ -44,0 +50,0 @@ readonly link: string;

22

out/fs.js

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

});
exports.DO_NOT_USE_HARD_LINKS = exports.FileCopier = exports.walk = exports.exists = exports.statOrNull = exports.CONCURRENCY = exports.MAX_FILE_REQUESTS = undefined;
exports.USE_HARD_LINKS = exports.DO_NOT_USE_HARD_LINKS = exports.FileCopier = exports.walk = exports.exists = exports.statOrNull = exports.CONCURRENCY = exports.MAX_FILE_REQUESTS = undefined;

@@ -246,3 +246,7 @@ var _bluebirdLst;

this.transformer = transformer;
this.isUseHardLink = _isUseHardLink && isUseHardLinkFunction !== DO_NOT_USE_HARD_LINKS;
if (isUseHardLinkFunction === USE_HARD_LINKS) {
this.isUseHardLink = true;
} else {
this.isUseHardLink = _isUseHardLink && isUseHardLinkFunction !== DO_NOT_USE_HARD_LINKS;
}
}

@@ -265,3 +269,4 @@ copy(src, dest, stat) {

}
yield copyOrLinkFile(src, dest, stat, !_this.isUseHardLink || _this.isUseHardLinkFunction == null ? _this.isUseHardLink : _this.isUseHardLinkFunction(dest), _this.isUseHardLink ? function () {
const isUseHardLink = !_this.isUseHardLink || _this.isUseHardLinkFunction == null ? _this.isUseHardLink : _this.isUseHardLinkFunction(dest);
yield copyOrLinkFile(src, dest, stat, isUseHardLink, isUseHardLink ? function () {
// files are copied concurrently, so, we must not check here currentIsUseHardLink — our code can be executed after that other handler will set currentIsUseHardLink to false

@@ -283,4 +288,6 @@ if (_this.isUseHardLink) {

function copyDir(src, destination, filter, transformer, isUseHardLink) {
const fileCopier = new FileCopier(isUseHardLink, transformer);
function copyDir(src, destination) {
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
const fileCopier = new FileCopier(options.isUseHardLink, options.transformer);
if ((_util || _load_util()).debug.enabled) {

@@ -291,3 +298,3 @@ (0, (_util || _load_util()).debug)(`Copying ${src} to ${destination}${fileCopier.isUseHardLink ? " using hard links" : ""}`);

const links = [];
return walk(src, filter, {
return walk(src, options.filter, {
consume: (() => {

@@ -310,3 +317,3 @@ var _ref4 = (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* (file, stat, parent) {

return function consume(_x8, _x9, _x10) {
return function consume(_x9, _x10, _x11) {
return _ref4.apply(this, arguments);

@@ -318,2 +325,3 @@ };

const DO_NOT_USE_HARD_LINKS = exports.DO_NOT_USE_HARD_LINKS = file => false;
const USE_HARD_LINKS = exports.USE_HARD_LINKS = file => true;
//# sourceMappingURL=fs.js.map
{
"name": "builder-util",
"version": "2.0.7",
"version": "2.0.8",
"main": "out/util.js",

@@ -5,0 +5,0 @@ "author": "Vladimir Krivosheev",

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