Skip to content

Commit 32b2001

Browse files
committed
deps: tar@7.5.4
1 parent 3474ec3 commit 32b2001

File tree

15 files changed

+242
-362
lines changed

15 files changed

+242
-362
lines changed

node_modules/tar/dist/commonjs/extract.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1515
}) : function(o, v) {
1616
o["default"] = v;
1717
});
18-
var __importStar = (this && this.__importStar) || function (mod) {
19-
if (mod && mod.__esModule) return mod;
20-
var result = {};
21-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22-
__setModuleDefault(result, mod);
23-
return result;
24-
};
18+
var __importStar = (this && this.__importStar) || (function () {
19+
var ownKeys = function(o) {
20+
ownKeys = Object.getOwnPropertyNames || function (o) {
21+
var ar = [];
22+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23+
return ar;
24+
};
25+
return ownKeys(o);
26+
};
27+
return function (mod) {
28+
if (mod && mod.__esModule) return mod;
29+
var result = {};
30+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31+
__setModuleDefault(result, mod);
32+
return result;
33+
};
34+
})();
2535
var __importDefault = (this && this.__importDefault) || function (mod) {
2636
return (mod && mod.__esModule) ? mod : { "default": mod };
2737
};

node_modules/tar/dist/commonjs/header.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1919
}) : function(o, v) {
2020
o["default"] = v;
2121
});
22-
var __importStar = (this && this.__importStar) || function (mod) {
23-
if (mod && mod.__esModule) return mod;
24-
var result = {};
25-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26-
__setModuleDefault(result, mod);
27-
return result;
28-
};
22+
var __importStar = (this && this.__importStar) || (function () {
23+
var ownKeys = function(o) {
24+
ownKeys = Object.getOwnPropertyNames || function (o) {
25+
var ar = [];
26+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27+
return ar;
28+
};
29+
return ownKeys(o);
30+
};
31+
return function (mod) {
32+
if (mod && mod.__esModule) return mod;
33+
var result = {};
34+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35+
__setModuleDefault(result, mod);
36+
return result;
37+
};
38+
})();
2939
Object.defineProperty(exports, "__esModule", { value: true });
3040
exports.Header = void 0;
3141
const node_path_1 = require("node:path");

node_modules/tar/dist/commonjs/index.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1818
var __exportStar = (this && this.__exportStar) || function(m, exports) {
1919
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2020
};
21-
var __importStar = (this && this.__importStar) || function (mod) {
22-
if (mod && mod.__esModule) return mod;
23-
var result = {};
24-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25-
__setModuleDefault(result, mod);
26-
return result;
27-
};
21+
var __importStar = (this && this.__importStar) || (function () {
22+
var ownKeys = function(o) {
23+
ownKeys = Object.getOwnPropertyNames || function (o) {
24+
var ar = [];
25+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26+
return ar;
27+
};
28+
return ownKeys(o);
29+
};
30+
return function (mod) {
31+
if (mod && mod.__esModule) return mod;
32+
var result = {};
33+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34+
__setModuleDefault(result, mod);
35+
return result;
36+
};
37+
})();
2838
Object.defineProperty(exports, "__esModule", { value: true });
2939
exports.u = exports.types = exports.r = exports.t = exports.x = exports.c = void 0;
3040
__exportStar(require("./create.js"), exports);

node_modules/tar/dist/commonjs/list.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1515
}) : function(o, v) {
1616
o["default"] = v;
1717
});
18-
var __importStar = (this && this.__importStar) || function (mod) {
19-
if (mod && mod.__esModule) return mod;
20-
var result = {};
21-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22-
__setModuleDefault(result, mod);
23-
return result;
24-
};
18+
var __importStar = (this && this.__importStar) || (function () {
19+
var ownKeys = function(o) {
20+
ownKeys = Object.getOwnPropertyNames || function (o) {
21+
var ar = [];
22+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23+
return ar;
24+
};
25+
return ownKeys(o);
26+
};
27+
return function (mod) {
28+
if (mod && mod.__esModule) return mod;
29+
var result = {};
30+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31+
__setModuleDefault(result, mod);
32+
return result;
33+
};
34+
})();
2535
var __importDefault = (this && this.__importDefault) || function (mod) {
2636
return (mod && mod.__esModule) ? mod : { "default": mod };
2737
};

node_modules/tar/dist/commonjs/normalize-unicode.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ const MAX = 10000;
1111
const cache = new Set();
1212
const normalizeUnicode = (s) => {
1313
if (!cache.has(s)) {
14-
normalizeCache[s] = s.normalize('NFD');
14+
// shake out identical accents and ligatures
15+
normalizeCache[s] = s
16+
.normalize('NFD')
17+
.toLocaleLowerCase('en')
18+
.toLocaleUpperCase('en');
1519
}
1620
else {
1721
cache.delete(s);

node_modules/tar/dist/commonjs/pack.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
2323
}) : function(o, v) {
2424
o["default"] = v;
2525
});
26-
var __importStar = (this && this.__importStar) || function (mod) {
27-
if (mod && mod.__esModule) return mod;
28-
var result = {};
29-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
30-
__setModuleDefault(result, mod);
31-
return result;
32-
};
26+
var __importStar = (this && this.__importStar) || (function () {
27+
var ownKeys = function(o) {
28+
ownKeys = Object.getOwnPropertyNames || function (o) {
29+
var ar = [];
30+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
31+
return ar;
32+
};
33+
return ownKeys(o);
34+
};
35+
return function (mod) {
36+
if (mod && mod.__esModule) return mod;
37+
var result = {};
38+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
39+
__setModuleDefault(result, mod);
40+
return result;
41+
};
42+
})();
3343
var __importDefault = (this && this.__importDefault) || function (mod) {
3444
return (mod && mod.__esModule) ? mod : { "default": mod };
3545
};

node_modules/tar/dist/commonjs/path-reservations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class PathReservations {
4444
['win32 parallelization disabled']
4545
: paths.map(p => {
4646
// don't need normPath, because we skip this entirely for windows
47-
return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, node_path_1.join)((0, normalize_unicode_js_1.normalizeUnicode)(p))).toLowerCase();
47+
return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, node_path_1.join)((0, normalize_unicode_js_1.normalizeUnicode)(p)));
4848
});
4949
const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)));
5050
this.#reservations.set(fn, { dirs, paths });

node_modules/tar/dist/commonjs/unpack.js

Lines changed: 50 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
2020
}) : function(o, v) {
2121
o["default"] = v;
2222
});
23-
var __importStar = (this && this.__importStar) || function (mod) {
24-
if (mod && mod.__esModule) return mod;
25-
var result = {};
26-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
27-
__setModuleDefault(result, mod);
28-
return result;
29-
};
23+
var __importStar = (this && this.__importStar) || (function () {
24+
var ownKeys = function(o) {
25+
ownKeys = Object.getOwnPropertyNames || function (o) {
26+
var ar = [];
27+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
28+
return ar;
29+
};
30+
return ownKeys(o);
31+
};
32+
return function (mod) {
33+
if (mod && mod.__esModule) return mod;
34+
var result = {};
35+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36+
__setModuleDefault(result, mod);
37+
return result;
38+
};
39+
})();
3040
var __importDefault = (this && this.__importDefault) || function (mod) {
3141
return (mod && mod.__esModule) ? mod : { "default": mod };
3242
};
@@ -56,6 +66,7 @@ const SYMLINK = Symbol('symlink');
5666
const HARDLINK = Symbol('hardlink');
5767
const UNSUPPORTED = Symbol('unsupported');
5868
const CHECKPATH = Symbol('checkPath');
69+
const STRIPABSOLUTEPATH = Symbol('stripAbsolutePath');
5970
const MKDIR = Symbol('mkdir');
6071
const ONERROR = Symbol('onError');
6172
const PENDING = Symbol('pending');
@@ -239,6 +250,35 @@ class Unpack extends parse_js_1.Parser {
239250
this.emit('end');
240251
}
241252
}
253+
// return false if we need to skip this file
254+
// return true if the field was successfully sanitized
255+
[STRIPABSOLUTEPATH](entry, field) {
256+
const path = entry[field];
257+
if (!path || this.preservePaths)
258+
return true;
259+
const parts = path.split('/');
260+
if (parts.includes('..') ||
261+
/* c8 ignore next */
262+
(isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) {
263+
this.warn('TAR_ENTRY_ERROR', `${field} contains '..'`, {
264+
entry,
265+
[field]: path,
266+
});
267+
// not ok!
268+
return false;
269+
}
270+
// strip off the root
271+
const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(path);
272+
if (root) {
273+
// ok, but triggers warning about stripping root
274+
entry[field] = String(stripped);
275+
this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute ${field}`, {
276+
entry,
277+
[field]: path,
278+
});
279+
}
280+
return true;
281+
}
242282
[CHECKPATH](entry) {
243283
const p = (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path);
244284
const parts = p.split('/');
@@ -267,25 +307,9 @@ class Unpack extends parse_js_1.Parser {
267307
});
268308
return false;
269309
}
270-
if (!this.preservePaths) {
271-
if (parts.includes('..') ||
272-
/* c8 ignore next */
273-
(isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) {
274-
this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {
275-
entry,
276-
path: p,
277-
});
278-
return false;
279-
}
280-
// strip off the root
281-
const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(p);
282-
if (root) {
283-
entry.path = String(stripped);
284-
this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, {
285-
entry,
286-
path: p,
287-
});
288-
}
310+
if (!this[STRIPABSOLUTEPATH](entry, 'path') ||
311+
!this[STRIPABSOLUTEPATH](entry, 'linkpath')) {
312+
return false;
289313
}
290314
if (node_path_1.default.isAbsolute(entry.path)) {
291315
entry.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(entry.path));

node_modules/tar/dist/commonjs/write-entry.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1515
}) : function(o, v) {
1616
o["default"] = v;
1717
});
18-
var __importStar = (this && this.__importStar) || function (mod) {
19-
if (mod && mod.__esModule) return mod;
20-
var result = {};
21-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22-
__setModuleDefault(result, mod);
23-
return result;
24-
};
18+
var __importStar = (this && this.__importStar) || (function () {
19+
var ownKeys = function(o) {
20+
ownKeys = Object.getOwnPropertyNames || function (o) {
21+
var ar = [];
22+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23+
return ar;
24+
};
25+
return ownKeys(o);
26+
};
27+
return function (mod) {
28+
if (mod && mod.__esModule) return mod;
29+
var result = {};
30+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31+
__setModuleDefault(result, mod);
32+
return result;
33+
};
34+
})();
2535
var __importDefault = (this && this.__importDefault) || function (mod) {
2636
return (mod && mod.__esModule) ? mod : { "default": mod };
2737
};

node_modules/tar/dist/esm/normalize-unicode.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ const MAX = 10000;
88
const cache = new Set();
99
export const normalizeUnicode = (s) => {
1010
if (!cache.has(s)) {
11-
normalizeCache[s] = s.normalize('NFD');
11+
// shake out identical accents and ligatures
12+
normalizeCache[s] = s
13+
.normalize('NFD')
14+
.toLocaleLowerCase('en')
15+
.toLocaleUpperCase('en');
1216
}
1317
else {
1418
cache.delete(s);

0 commit comments

Comments
 (0)