Compare commits
71 Commits
f78b5fddae
...
renovate/n
Author | SHA1 | Date | |
---|---|---|---|
0b50669b1b | |||
90bbaed669 | |||
fd0075b376 | |||
477ef865ef | |||
19ba6d2346 | |||
0b212340d3 | |||
d514fe70f3 | |||
c0162d4888 | |||
754b9aa9c2 | |||
b1c85cb470 | |||
0404a65830 | |||
cc0e9207d1 | |||
697cd354f6 | |||
d781410a7d | |||
72ef7b8393 | |||
c89223f01d | |||
b107450333 | |||
d18c073ee8 | |||
5f4acc6ec6 | |||
859198068c | |||
7e29831831 | |||
92a78feecf | |||
10985daefa | |||
26d08f3ab0 | |||
4c130e459c | |||
39e55ee45e | |||
e46163518c | |||
13f553f323 | |||
e150107a0b | |||
c35f05c791 | |||
a5287632e4 | |||
c6aca995bb | |||
d73f35be06 | |||
86a9cae7d2 | |||
9c1eed113e | |||
133749ce52 | |||
ea96b64e67 | |||
a4bc9ff852 | |||
5b19d88a8d | |||
b6735bec20 | |||
f2a31ac727 | |||
9b118e8bc4 | |||
681bb42f0f | |||
e5236f8bde | |||
c5750013e9 | |||
876c5aa25f | |||
dd3181547c | |||
02db9d3077 | |||
9613599f80 | |||
42dfe959a5 | |||
ad320c5e4f | |||
1613dd75d6 | |||
dafd9728f8 | |||
c36f50d228 | |||
9c471f71ba | |||
189a7a95a9 | |||
ba4b18c5cc | |||
8bcd76b1bd | |||
e29063342b | |||
b2473cae0f | |||
19ec21e810 | |||
ff606eec05 | |||
07a4de6655 | |||
c8d21e83e3 | |||
5972389296 | |||
e3fe33f894 | |||
fa97cc0409 | |||
c34cdf8e96 | |||
bcf2cb830a | |||
befbddd875 | |||
8384da4051 |
@@ -27,9 +27,9 @@ steps:
|
|||||||
restore: true
|
restore: true
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
image: 'node:21.6.1-slim'
|
image: 'node:22.17.1-slim'
|
||||||
commands:
|
commands:
|
||||||
- yarn set version 4.0.2
|
- yarn set version 4.6.0
|
||||||
- yarn install
|
- yarn install
|
||||||
- yarn run jest
|
- yarn run jest
|
||||||
|
|
||||||
|
160
.pnp.loader.mjs
generated
160
.pnp.loader.mjs
generated
@@ -1,9 +1,12 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url';
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { createHash } from 'crypto';
|
import { createHash } from 'crypto';
|
||||||
import { EOL } from 'os';
|
import { EOL } from 'os';
|
||||||
import moduleExports, { isBuiltin } from 'module';
|
import esmModule, { createRequire, isBuiltin } from 'module';
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
|
||||||
const SAFE_TIME = 456789e3;
|
const SAFE_TIME = 456789e3;
|
||||||
@@ -109,8 +112,7 @@ async function copyImpl(prelayout, postlayout, destinationFs, destination, sourc
|
|||||||
updated = await copySymlink(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts);
|
updated = await copySymlink(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default: {
|
||||||
{
|
|
||||||
throw new Error(`Unsupported file type (${sourceStat.mode})`);
|
throw new Error(`Unsupported file type (${sourceStat.mode})`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,7 +131,7 @@ async function copyImpl(prelayout, postlayout, destinationFs, destination, sourc
|
|||||||
async function maybeLStat(baseFs, p) {
|
async function maybeLStat(baseFs, p) {
|
||||||
try {
|
try {
|
||||||
return await baseFs.lstatPromise(p);
|
return await baseFs.lstatPromise(p);
|
||||||
} catch (e) {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,7 +177,10 @@ async function copyFolder(prelayout, postlayout, destinationFs, destination, des
|
|||||||
}
|
}
|
||||||
async function copyFileViaIndex(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts, linkStrategy) {
|
async function copyFileViaIndex(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts, linkStrategy) {
|
||||||
const sourceHash = await sourceFs.checksumFilePromise(source, { algorithm: `sha1` });
|
const sourceHash = await sourceFs.checksumFilePromise(source, { algorithm: `sha1` });
|
||||||
const indexPath = destinationFs.pathUtils.join(linkStrategy.indexPath, sourceHash.slice(0, 2), `${sourceHash}.dat`);
|
const defaultMode = 420;
|
||||||
|
const sourceMode = sourceStat.mode & 511;
|
||||||
|
const indexFileName = `${sourceHash}${sourceMode !== defaultMode ? sourceMode.toString(8) : ``}`;
|
||||||
|
const indexPath = destinationFs.pathUtils.join(linkStrategy.indexPath, sourceHash.slice(0, 2), `${indexFileName}.dat`);
|
||||||
let AtomicBehavior;
|
let AtomicBehavior;
|
||||||
((AtomicBehavior2) => {
|
((AtomicBehavior2) => {
|
||||||
AtomicBehavior2[AtomicBehavior2["Lock"] = 0] = "Lock";
|
AtomicBehavior2[AtomicBehavior2["Lock"] = 0] = "Lock";
|
||||||
@@ -231,8 +236,12 @@ async function copyFileViaIndex(prelayout, postlayout, destinationFs, destinatio
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
postlayout.push(async () => {
|
postlayout.push(async () => {
|
||||||
if (!indexStat)
|
if (!indexStat) {
|
||||||
await destinationFs.lutimesPromise(indexPath, defaultTime, defaultTime);
|
await destinationFs.lutimesPromise(indexPath, defaultTime, defaultTime);
|
||||||
|
if (sourceMode !== defaultMode) {
|
||||||
|
await destinationFs.chmodPromise(indexPath, sourceMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (tempPath && !tempPathCleaned) {
|
if (tempPath && !tempPathCleaned) {
|
||||||
await destinationFs.unlinkPromise(tempPath);
|
await destinationFs.unlinkPromise(tempPath);
|
||||||
}
|
}
|
||||||
@@ -277,6 +286,7 @@ async function copySymlink(prelayout, postlayout, destinationFs, destination, de
|
|||||||
}
|
}
|
||||||
|
|
||||||
class FakeFS {
|
class FakeFS {
|
||||||
|
pathUtils;
|
||||||
constructor(pathUtils) {
|
constructor(pathUtils) {
|
||||||
this.pathUtils = pathUtils;
|
this.pathUtils = pathUtils;
|
||||||
}
|
}
|
||||||
@@ -472,7 +482,7 @@ class FakeFS {
|
|||||||
let current = Buffer.alloc(0);
|
let current = Buffer.alloc(0);
|
||||||
try {
|
try {
|
||||||
current = await this.readFilePromise(p);
|
current = await this.readFilePromise(p);
|
||||||
} catch (error) {
|
} catch {
|
||||||
}
|
}
|
||||||
if (Buffer.compare(current, content) === 0)
|
if (Buffer.compare(current, content) === 0)
|
||||||
return;
|
return;
|
||||||
@@ -482,7 +492,7 @@ class FakeFS {
|
|||||||
let current = ``;
|
let current = ``;
|
||||||
try {
|
try {
|
||||||
current = await this.readFilePromise(p, `utf8`);
|
current = await this.readFilePromise(p, `utf8`);
|
||||||
} catch (error) {
|
} catch {
|
||||||
}
|
}
|
||||||
const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content;
|
const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content;
|
||||||
if (current === normalizedContent)
|
if (current === normalizedContent)
|
||||||
@@ -500,7 +510,7 @@ class FakeFS {
|
|||||||
let current = Buffer.alloc(0);
|
let current = Buffer.alloc(0);
|
||||||
try {
|
try {
|
||||||
current = this.readFileSync(p);
|
current = this.readFileSync(p);
|
||||||
} catch (error) {
|
} catch {
|
||||||
}
|
}
|
||||||
if (Buffer.compare(current, content) === 0)
|
if (Buffer.compare(current, content) === 0)
|
||||||
return;
|
return;
|
||||||
@@ -510,7 +520,7 @@ class FakeFS {
|
|||||||
let current = ``;
|
let current = ``;
|
||||||
try {
|
try {
|
||||||
current = this.readFileSync(p, `utf8`);
|
current = this.readFileSync(p, `utf8`);
|
||||||
} catch (error) {
|
} catch {
|
||||||
}
|
}
|
||||||
const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content;
|
const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content;
|
||||||
if (current === normalizedContent)
|
if (current === normalizedContent)
|
||||||
@@ -550,13 +560,13 @@ class FakeFS {
|
|||||||
let pid;
|
let pid;
|
||||||
try {
|
try {
|
||||||
[pid] = await this.readJsonPromise(lockPath);
|
[pid] = await this.readJsonPromise(lockPath);
|
||||||
} catch (error) {
|
} catch {
|
||||||
return Date.now() - startTime < 500;
|
return Date.now() - startTime < 500;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
process.kill(pid, 0);
|
process.kill(pid, 0);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -569,7 +579,7 @@ class FakeFS {
|
|||||||
try {
|
try {
|
||||||
await this.unlinkPromise(lockPath);
|
await this.unlinkPromise(lockPath);
|
||||||
continue;
|
continue;
|
||||||
} catch (error2) {
|
} catch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Date.now() - startTime < 60 * 1e3) {
|
if (Date.now() - startTime < 60 * 1e3) {
|
||||||
@@ -589,7 +599,7 @@ class FakeFS {
|
|||||||
try {
|
try {
|
||||||
await this.closePromise(fd);
|
await this.closePromise(fd);
|
||||||
await this.unlinkPromise(lockPath);
|
await this.unlinkPromise(lockPath);
|
||||||
} catch (error) {
|
} catch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -824,6 +834,12 @@ class ProxiedFS extends FakeFS {
|
|||||||
rmdirSync(p, opts) {
|
rmdirSync(p, opts) {
|
||||||
return this.baseFs.rmdirSync(this.mapToBase(p), opts);
|
return this.baseFs.rmdirSync(this.mapToBase(p), opts);
|
||||||
}
|
}
|
||||||
|
async rmPromise(p, opts) {
|
||||||
|
return this.baseFs.rmPromise(this.mapToBase(p), opts);
|
||||||
|
}
|
||||||
|
rmSync(p, opts) {
|
||||||
|
return this.baseFs.rmSync(this.mapToBase(p), opts);
|
||||||
|
}
|
||||||
async linkPromise(existingP, newP) {
|
async linkPromise(existingP, newP) {
|
||||||
return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP));
|
return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP));
|
||||||
}
|
}
|
||||||
@@ -879,6 +895,7 @@ class ProxiedFS extends FakeFS {
|
|||||||
watch(p, a, b) {
|
watch(p, a, b) {
|
||||||
return this.baseFs.watch(
|
return this.baseFs.watch(
|
||||||
this.mapToBase(p),
|
this.mapToBase(p),
|
||||||
|
// @ts-expect-error - reason TBS
|
||||||
a,
|
a,
|
||||||
b
|
b
|
||||||
);
|
);
|
||||||
@@ -886,6 +903,7 @@ class ProxiedFS extends FakeFS {
|
|||||||
watchFile(p, a, b) {
|
watchFile(p, a, b) {
|
||||||
return this.baseFs.watchFile(
|
return this.baseFs.watchFile(
|
||||||
this.mapToBase(p),
|
this.mapToBase(p),
|
||||||
|
// @ts-expect-error - reason TBS
|
||||||
a,
|
a,
|
||||||
b
|
b
|
||||||
);
|
);
|
||||||
@@ -909,6 +927,7 @@ function direntToPortable(dirent) {
|
|||||||
return portableDirent;
|
return portableDirent;
|
||||||
}
|
}
|
||||||
class NodeFS extends BasePortableFakeFS {
|
class NodeFS extends BasePortableFakeFS {
|
||||||
|
realFs;
|
||||||
constructor(realFs = fs) {
|
constructor(realFs = fs) {
|
||||||
super();
|
super();
|
||||||
this.realFs = realFs;
|
this.realFs = realFs;
|
||||||
@@ -1205,6 +1224,18 @@ class NodeFS extends BasePortableFakeFS {
|
|||||||
rmdirSync(p, opts) {
|
rmdirSync(p, opts) {
|
||||||
return this.realFs.rmdirSync(npath.fromPortablePath(p), opts);
|
return this.realFs.rmdirSync(npath.fromPortablePath(p), opts);
|
||||||
}
|
}
|
||||||
|
async rmPromise(p, opts) {
|
||||||
|
return await new Promise((resolve, reject) => {
|
||||||
|
if (opts) {
|
||||||
|
this.realFs.rm(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject));
|
||||||
|
} else {
|
||||||
|
this.realFs.rm(npath.fromPortablePath(p), this.makeCallback(resolve, reject));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
rmSync(p, opts) {
|
||||||
|
return this.realFs.rmSync(npath.fromPortablePath(p), opts);
|
||||||
|
}
|
||||||
async linkPromise(existingP, newP) {
|
async linkPromise(existingP, newP) {
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject));
|
this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject));
|
||||||
@@ -1292,6 +1323,7 @@ class NodeFS extends BasePortableFakeFS {
|
|||||||
watch(p, a, b) {
|
watch(p, a, b) {
|
||||||
return this.realFs.watch(
|
return this.realFs.watch(
|
||||||
npath.fromPortablePath(p),
|
npath.fromPortablePath(p),
|
||||||
|
// @ts-expect-error - reason TBS
|
||||||
a,
|
a,
|
||||||
b
|
b
|
||||||
);
|
);
|
||||||
@@ -1299,6 +1331,7 @@ class NodeFS extends BasePortableFakeFS {
|
|||||||
watchFile(p, a, b) {
|
watchFile(p, a, b) {
|
||||||
return this.realFs.watchFile(
|
return this.realFs.watchFile(
|
||||||
npath.fromPortablePath(p),
|
npath.fromPortablePath(p),
|
||||||
|
// @ts-expect-error - reason TBS
|
||||||
a,
|
a,
|
||||||
b
|
b
|
||||||
);
|
);
|
||||||
@@ -1321,10 +1354,7 @@ const NUMBER_REGEXP = /^[0-9]+$/;
|
|||||||
const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/;
|
const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/;
|
||||||
const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/;
|
const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/;
|
||||||
class VirtualFS extends ProxiedFS {
|
class VirtualFS extends ProxiedFS {
|
||||||
constructor({ baseFs = new NodeFS() } = {}) {
|
baseFs;
|
||||||
super(ppath);
|
|
||||||
this.baseFs = baseFs;
|
|
||||||
}
|
|
||||||
static makeVirtualPath(base, component, to) {
|
static makeVirtualPath(base, component, to) {
|
||||||
if (ppath.basename(base) !== `__virtual__`)
|
if (ppath.basename(base) !== `__virtual__`)
|
||||||
throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`);
|
throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`);
|
||||||
@@ -1354,6 +1384,10 @@ class VirtualFS extends ProxiedFS {
|
|||||||
const subpath = match[5] || `.`;
|
const subpath = match[5] || `.`;
|
||||||
return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath));
|
return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath));
|
||||||
}
|
}
|
||||||
|
constructor({ baseFs = new NodeFS() } = {}) {
|
||||||
|
super(ppath);
|
||||||
|
this.baseFs = baseFs;
|
||||||
|
}
|
||||||
getExtractHint(hints) {
|
getExtractHint(hints) {
|
||||||
return this.baseFs.getExtractHint(hints);
|
return this.baseFs.getExtractHint(hints);
|
||||||
}
|
}
|
||||||
@@ -1392,9 +1426,13 @@ class VirtualFS extends ProxiedFS {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const URL = Number(process.versions.node.split('.', 1)[0]) < 20 ? URL$1 : globalThis.URL;
|
||||||
|
|
||||||
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
|
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
|
||||||
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
|
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
|
||||||
const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3;
|
const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3;
|
||||||
|
const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || major === 20 && minor >= 10 || major === 18 && minor >= 20;
|
||||||
|
const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22;
|
||||||
|
|
||||||
function readPackageScope(checkPath) {
|
function readPackageScope(checkPath) {
|
||||||
const rootSeparatorIndex = checkPath.indexOf(npath.sep);
|
const rootSeparatorIndex = checkPath.indexOf(npath.sep);
|
||||||
@@ -1432,7 +1470,7 @@ async function tryReadFile$1(path2) {
|
|||||||
}
|
}
|
||||||
function tryParseURL(str, base) {
|
function tryParseURL(str, base) {
|
||||||
try {
|
try {
|
||||||
return new URL$1(str, base);
|
return new URL(str, base);
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -1485,11 +1523,22 @@ async function load$1(urlString, context, nextLoad) {
|
|||||||
const format = getFileFormat(filePath);
|
const format = getFileFormat(filePath);
|
||||||
if (!format)
|
if (!format)
|
||||||
return nextLoad(urlString, context, nextLoad);
|
return nextLoad(urlString, context, nextLoad);
|
||||||
if (format === `json` && context.importAssertions?.type !== `json`) {
|
if (format === `json`) {
|
||||||
const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import assertion of type "json"`);
|
if (SUPPORTS_IMPORT_ATTRIBUTES_ONLY) {
|
||||||
|
if (context.importAttributes?.type !== `json`) {
|
||||||
|
const err = new TypeError(`[ERR_IMPORT_ATTRIBUTE_MISSING]: Module "${urlString}" needs an import attribute of "type: json"`);
|
||||||
|
err.code = `ERR_IMPORT_ATTRIBUTE_MISSING`;
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const type = `importAttributes` in context ? context.importAttributes?.type : context.importAssertions?.type;
|
||||||
|
if (type !== `json`) {
|
||||||
|
const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import ${SUPPORTS_IMPORT_ATTRIBUTES ? `attribute` : `assertion`} of type "json"`);
|
||||||
err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`;
|
err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`;
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) {
|
if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) {
|
||||||
const pathToSend = pathToFileURL(
|
const pathToSend = pathToFileURL(
|
||||||
npath.fromPortablePath(
|
npath.fromPortablePath(
|
||||||
@@ -1676,28 +1725,6 @@ function getPackageScopeConfig(resolved, readFileSyncFn) {
|
|||||||
return packageConfig;
|
return packageConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@license
|
|
||||||
Copyright Node.js contributors. All rights reserved.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to
|
|
||||||
deal in the Software without restriction, including without limitation the
|
|
||||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
function throwImportNotDefined(specifier, packageJSONUrl, base) {
|
function throwImportNotDefined(specifier, packageJSONUrl, base) {
|
||||||
throw new ERR_PACKAGE_IMPORT_NOT_DEFINED(
|
throw new ERR_PACKAGE_IMPORT_NOT_DEFINED(
|
||||||
specifier,
|
specifier,
|
||||||
@@ -1757,8 +1784,7 @@ function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base
|
|||||||
const packagePath = new URL(".", packageJSONUrl).pathname;
|
const packagePath = new URL(".", packageJSONUrl).pathname;
|
||||||
if (!StringPrototypeStartsWith(resolvedPath, packagePath))
|
if (!StringPrototypeStartsWith(resolvedPath, packagePath))
|
||||||
throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base);
|
throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base);
|
||||||
if (subpath === "")
|
if (subpath === "") return resolved;
|
||||||
return resolved;
|
|
||||||
if (RegExpPrototypeExec(invalidSegmentRegEx, subpath) !== null) {
|
if (RegExpPrototypeExec(invalidSegmentRegEx, subpath) !== null) {
|
||||||
const request = pattern ? StringPrototypeReplace(match, "*", () => subpath) : match + subpath;
|
const request = pattern ? StringPrototypeReplace(match, "*", () => subpath) : match + subpath;
|
||||||
throwInvalidSubpath(request, packageJSONUrl, internal, base);
|
throwInvalidSubpath(request, packageJSONUrl, internal, base);
|
||||||
@@ -1772,8 +1798,7 @@ function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base
|
|||||||
}
|
}
|
||||||
function isArrayIndex(key) {
|
function isArrayIndex(key) {
|
||||||
const keyNum = +key;
|
const keyNum = +key;
|
||||||
if (`${keyNum}` !== key)
|
if (`${keyNum}` !== key) return false;
|
||||||
return false;
|
|
||||||
return keyNum >= 0 && keyNum < 4294967295;
|
return keyNum >= 0 && keyNum < 4294967295;
|
||||||
}
|
}
|
||||||
function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) {
|
function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) {
|
||||||
@@ -1850,8 +1875,7 @@ function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, b
|
|||||||
internal,
|
internal,
|
||||||
conditions
|
conditions
|
||||||
);
|
);
|
||||||
if (resolveResult === void 0)
|
if (resolveResult === void 0) continue;
|
||||||
continue;
|
|
||||||
return resolveResult;
|
return resolveResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1872,18 +1896,12 @@ function patternKeyCompare(a, b) {
|
|||||||
const bPatternIndex = StringPrototypeIndexOf(b, "*");
|
const bPatternIndex = StringPrototypeIndexOf(b, "*");
|
||||||
const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;
|
const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;
|
||||||
const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;
|
const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;
|
||||||
if (baseLenA > baseLenB)
|
if (baseLenA > baseLenB) return -1;
|
||||||
return -1;
|
if (baseLenB > baseLenA) return 1;
|
||||||
if (baseLenB > baseLenA)
|
if (aPatternIndex === -1) return 1;
|
||||||
return 1;
|
if (bPatternIndex === -1) return -1;
|
||||||
if (aPatternIndex === -1)
|
if (a.length > b.length) return -1;
|
||||||
return 1;
|
if (b.length > a.length) return 1;
|
||||||
if (bPatternIndex === -1)
|
|
||||||
return -1;
|
|
||||||
if (a.length > b.length)
|
|
||||||
return -1;
|
|
||||||
if (b.length > a.length)
|
|
||||||
return 1;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
function packageImportsResolve({ name, base, conditions, readFileSyncFn }) {
|
function packageImportsResolve({ name, base, conditions, readFileSyncFn }) {
|
||||||
@@ -1955,6 +1973,13 @@ function packageImportsResolve({ name, base, conditions, readFileSyncFn }) {
|
|||||||
throwImportNotDefined(name, packageJSONUrl, base);
|
throwImportNotDefined(name, packageJSONUrl, base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let findPnpApi = esmModule.findPnpApi;
|
||||||
|
if (!findPnpApi) {
|
||||||
|
const require = createRequire(import.meta.url);
|
||||||
|
const pnpApi = require(`./.pnp.cjs`);
|
||||||
|
pnpApi.setup();
|
||||||
|
findPnpApi = esmModule.findPnpApi;
|
||||||
|
}
|
||||||
const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/;
|
const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/;
|
||||||
const isRelativeRegexp = /^\.{0,2}\//;
|
const isRelativeRegexp = /^\.{0,2}\//;
|
||||||
function tryReadFile(filePath) {
|
function tryReadFile(filePath) {
|
||||||
@@ -1982,7 +2007,6 @@ async function resolvePrivateRequest(specifier, issuer, context, nextResolve) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function resolve$1(originalSpecifier, context, nextResolve) {
|
async function resolve$1(originalSpecifier, context, nextResolve) {
|
||||||
const { findPnpApi } = moduleExports;
|
|
||||||
if (!findPnpApi || isBuiltin(originalSpecifier))
|
if (!findPnpApi || isBuiltin(originalSpecifier))
|
||||||
return nextResolve(originalSpecifier, context, nextResolve);
|
return nextResolve(originalSpecifier, context, nextResolve);
|
||||||
let specifier = originalSpecifier;
|
let specifier = originalSpecifier;
|
||||||
@@ -2018,6 +2042,7 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
|
|||||||
try {
|
try {
|
||||||
result = pnpapi.resolveRequest(specifier, issuer, {
|
result = pnpapi.resolveRequest(specifier, issuer, {
|
||||||
conditions: new Set(conditions),
|
conditions: new Set(conditions),
|
||||||
|
// TODO: Handle --experimental-specifier-resolution=node
|
||||||
extensions: allowLegacyResolve ? void 0 : []
|
extensions: allowLegacyResolve ? void 0 : []
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -2048,6 +2073,9 @@ if (!HAS_LAZY_LOADED_TRANSLATORS) {
|
|||||||
try {
|
try {
|
||||||
return fs.readFileSync(args[0], {
|
return fs.readFileSync(args[0], {
|
||||||
encoding: `utf8`,
|
encoding: `utf8`,
|
||||||
|
// @ts-expect-error - The docs says it needs to be a string but
|
||||||
|
// links to https://nodejs.org/dist/latest-v20.x/docs/api/fs.html#file-system-flags
|
||||||
|
// which says it can be a number which matches the implementation.
|
||||||
flag: args[1]
|
flag: args[1]
|
||||||
});
|
});
|
||||||
} catch {
|
} catch {
|
||||||
@@ -2075,6 +2103,14 @@ if (!HAS_LAZY_LOADED_TRANSLATORS) {
|
|||||||
stats.ino,
|
stats.ino,
|
||||||
stats.size,
|
stats.size,
|
||||||
stats.blocks
|
stats.blocks
|
||||||
|
// atime sec
|
||||||
|
// atime ns
|
||||||
|
// mtime sec
|
||||||
|
// mtime ns
|
||||||
|
// ctime sec
|
||||||
|
// ctime ns
|
||||||
|
// birthtime sec
|
||||||
|
// birthtime ns
|
||||||
]);
|
]);
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
nodejs 21.6.1
|
nodejs 22.18.0
|
||||||
yarn 1.22.19
|
yarn 1.22.22
|
||||||
|
35
.yarn/plugins/@yarnpkg/plugin-outdated.cjs
vendored
Normal file
35
.yarn/plugins/@yarnpkg/plugin-outdated.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
893
.yarn/releases/yarn-4.0.2.cjs
vendored
893
.yarn/releases/yarn-4.0.2.cjs
vendored
File diff suppressed because one or more lines are too long
942
.yarn/releases/yarn-4.9.2.cjs
vendored
Executable file
942
.yarn/releases/yarn-4.9.2.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
@@ -1 +1,6 @@
|
|||||||
yarnPath: .yarn/releases/yarn-4.0.2.cjs
|
plugins:
|
||||||
|
- checksum: 5e73a1acbb9741fce1e8335e243c9480ea2107b9b4b65ed7643785ddea9e3019aee254a92a853b1cd71023b16fff5b7d3afd5256fe57cd35a54f8785b8c30281
|
||||||
|
path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
|
||||||
|
spec: "https://go.mskelton.dev/yarn-outdated/v4"
|
||||||
|
|
||||||
|
yarnPath: .yarn/releases/yarn-4.9.2.cjs
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
FROM node:21.6.1-slim
|
FROM node:22.17.1-slim
|
||||||
|
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get -y install make \
|
&& apt-get -y install make \
|
||||||
&& yarn set version 3.6.3
|
&& yarn set version 4.6.0
|
||||||
|
|
||||||
COPY ./Makefile ./
|
COPY ./Makefile ./
|
||||||
COPY ./package.json ./
|
COPY ./package.json ./
|
||||||
|
2
Makefile
2
Makefile
@@ -6,7 +6,7 @@ asdf_install:
|
|||||||
|
|
||||||
.PHONY: yarn_setup
|
.PHONY: yarn_setup
|
||||||
yarn_setup:
|
yarn_setup:
|
||||||
@yarn set version 4.0.2
|
@yarn set version 4.6.0
|
||||||
@yarn init -2
|
@yarn init -2
|
||||||
@yarn add typescript jest @types/jest ts-node ts-jest
|
@yarn add typescript jest @types/jest ts-node ts-jest
|
||||||
|
|
||||||
|
14
package.json
14
package.json
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "clean-architecture",
|
"name": "clean-architecture",
|
||||||
"packageManager": "yarn@4.0.2",
|
"packageManager": "yarn@4.9.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/jest": "^29.5.4",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/node": "^20.6.3",
|
"@types/node": "^22.7.5",
|
||||||
"jest": "^29.6.4",
|
"jest": "^30.0.0",
|
||||||
"ts-jest": "^29.1.1",
|
"ts-jest": "^29.2.5",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user