Merge pull request #1553 from cosmos/upgrade-yarn3

Upgrade yarn to latest version 3.x
This commit is contained in:
Simon Warta 2024-02-11 00:32:51 +01:00 committed by GitHub
commit 49053d00fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 948 additions and 966 deletions

42
.pnp.cjs generated
View File

@ -16420,7 +16420,8 @@ class ZipFS extends BasePortableFakeFS {
stream$1.destroy();
},
bytesRead: 0,
path: p
path: p,
pending: false
}
);
const immediate = setImmediate(async () => {
@ -16461,11 +16462,12 @@ class ZipFS extends BasePortableFakeFS {
}
}),
{
bytesWritten: 0,
path: p,
close() {
stream$1.destroy();
}
},
bytesWritten: 0,
path: p,
pending: false
}
);
stream$1.on(`data`, (chunk) => {
@ -17405,18 +17407,10 @@ class ProxiedFS extends FakeFS {
return this.baseFs.symlinkSync(mappedTarget, mappedP, type);
}
async readFilePromise(p, encoding) {
if (encoding === `utf8`) {
return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding);
} else {
return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding);
}
}
readFileSync(p, encoding) {
if (encoding === `utf8`) {
return this.baseFs.readFileSync(this.fsMapToBase(p), encoding);
} else {
return this.baseFs.readFileSync(this.fsMapToBase(p), encoding);
}
}
async readdirPromise(p, opts) {
return this.baseFs.readdirPromise(this.mapToBase(p), opts);
@ -18142,24 +18136,14 @@ class ZipOpenFS extends BasePortableFakeFS {
}
async readFilePromise(p, encoding) {
return this.makeCallPromise(p, async () => {
switch (encoding) {
case `utf8`:
return await this.baseFs.readFilePromise(p, encoding);
default:
return await this.baseFs.readFilePromise(p, encoding);
}
}, async (zipFs, { subPath }) => {
return await zipFs.readFilePromise(subPath, encoding);
});
}
readFileSync(p, encoding) {
return this.makeCallSync(p, () => {
switch (encoding) {
case `utf8`:
return this.baseFs.readFileSync(p, encoding);
default:
return this.baseFs.readFileSync(p, encoding);
}
}, (zipFs, { subPath }) => {
return zipFs.readFileSync(subPath, encoding);
});
@ -18851,16 +18835,7 @@ function patchFs(patchedFs, fakeFs) {
patchedFs.realpathSync.native = patchedFs.realpathSync;
}
{
const origEmitWarning = process.emitWarning;
process.emitWarning = () => {
};
let patchedFsPromises;
try {
patchedFsPromises = patchedFs.promises;
} finally {
process.emitWarning = origEmitWarning;
}
if (typeof patchedFsPromises !== `undefined`) {
const patchedFsPromises = patchedFs.promises;
for (const fnName of ASYNC_IMPLEMENTATIONS) {
const origName = fnName.replace(/Promise$/, ``);
if (typeof patchedFsPromises[origName] === `undefined`)
@ -18883,7 +18858,6 @@ function patchFs(patchedFs, fakeFs) {
return new FileHandle(fd, fakeFs);
});
}
}
{
patchedFs.read[nodeUtils.promisify.custom] = async (fd, buffer, ...args) => {
const res = fakeFs.readPromise(fd, buffer, ...args);
@ -25129,7 +25103,7 @@ function makeManager(pnpapi, opts) {
apiEntry.lastRefreshCheck = timeNow;
const stats = opts.fakeFs.statSync(pnpApiPath);
if (stats.mtime > apiEntry.stats.mtime) {
process.emitWarning(`[Warning] The runtime detected new informations in a PnP file; reloading the API instance (${npath.fromPortablePath(pnpApiPath)})`);
process.emitWarning(`[Warning] The runtime detected new information in a PnP file; reloading the API instance (${npath.fromPortablePath(pnpApiPath)})`);
apiEntry.stats = stats;
apiEntry.instance = loadApiInstance(pnpApiPath);
}

29
.pnp.loader.mjs generated
View File

@ -1190,18 +1190,10 @@ class ProxiedFS extends FakeFS {
return this.baseFs.symlinkSync(mappedTarget, mappedP, type);
}
async readFilePromise(p, encoding) {
if (encoding === `utf8`) {
return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding);
} else {
return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding);
}
}
readFileSync(p, encoding) {
if (encoding === `utf8`) {
return this.baseFs.readFileSync(this.fsMapToBase(p), encoding);
} else {
return this.baseFs.readFileSync(this.fsMapToBase(p), encoding);
}
}
async readdirPromise(p, opts) {
return this.baseFs.readdirPromise(this.mapToBase(p), opts);
@ -1333,7 +1325,7 @@ const HAS_CONSOLIDATED_HOOKS = major > 16 || major === 16 && minor >= 12;
const HAS_UNFLAGGED_JSON_MODULES = major > 17 || major === 17 && minor >= 5 || major === 16 && minor >= 15;
const HAS_JSON_IMPORT_ASSERTION_REQUIREMENT = major > 17 || major === 17 && minor >= 1 || major === 16 && minor > 14;
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
const HAS_LAZY_LOADED_TRANSLATORS = major > 19 || major === 19 && minor >= 3;
const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3;
const builtinModules = new Set(Module.builtinModules || Object.keys(process.binding(`natives`)));
const isBuiltinModule = (request) => request.startsWith(`node:`) || builtinModules.has(request);
@ -2012,10 +2004,24 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
if (!HAS_LAZY_LOADED_TRANSLATORS) {
const binding = process.binding(`fs`);
const originalfstat = binding.fstat;
const originalReadFile = binding.readFileUtf8 || binding.readFileSync;
if (originalReadFile) {
binding[originalReadFile.name] = function(...args) {
try {
return fs.readFileSync(args[0], {
encoding: `utf8`,
flag: args[1]
});
} catch {
}
return originalReadFile.apply(this, args);
};
} else {
const binding2 = process.binding(`fs`);
const originalfstat = binding2.fstat;
const ZIP_MASK = 4278190080;
const ZIP_MAGIC = 704643072;
binding.fstat = function(...args) {
binding2.fstat = function(...args) {
const [fd, useBigint, req] = args;
if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) {
try {
@ -2038,6 +2044,7 @@ if (!HAS_LAZY_LOADED_TRANSLATORS) {
return originalfstat.apply(this, args);
};
}
}
const resolve = resolve$1;
const getFormat = HAS_CONSOLIDATED_HOOKS ? void 0 : getFormat$1;

File diff suppressed because one or more lines are too long

875
.yarn/releases/yarn-3.8.0.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -13,4 +13,4 @@ plugins:
pnpMode: loose
yarnPath: .yarn/releases/yarn-3.6.3.cjs
yarnPath: .yarn/releases/yarn-3.8.0.cjs

View File

@ -50,5 +50,5 @@
"prettier": "^2.8.8",
"typescript": "~4.9"
},
"packageManager": "yarn@3.6.3"
"packageManager": "yarn@3.8.0"
}