From fb0ebd6079d0f6189640b14de62b227cacb247d7 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 13 May 2024 14:01:29 +0200 Subject: [PATCH] [yarn] Update version to 4.2.2 --- .pnp.cjs | 56 ++++++++++++++++++++++++++++++++++++++++++++++ .pnp.loader.mjs | 42 ++++++++++++++++++++++++++++++---- .yarn/corepack.tgz | 4 ++-- package.json | 2 +- 4 files changed, 97 insertions(+), 7 deletions(-) diff --git a/.pnp.cjs b/.pnp.cjs index 0506c1cd8..5a429bcc1 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -1,5 +1,6 @@ #!/usr/bin/env node /* eslint-disable */ +// @ts-nocheck "use strict"; const RAW_RUNTIME_STATE = @@ -27281,6 +27282,12 @@ class ProxiedFS extends FakeFS { rmdirSync(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) { return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); } @@ -27662,6 +27669,18 @@ class NodeFS extends BasePortableFakeFS { rmdirSync(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) { return await new Promise((resolve, reject) => { this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); @@ -28317,6 +28336,20 @@ class MountFS extends BasePortableFakeFS { return mountFs.rmdirSync(subPath, opts); }); } + async rmPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.rmPromise(p, opts); + }, async (mountFs, { subPath }) => { + return await mountFs.rmPromise(subPath, opts); + }); + } + rmSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.rmSync(p, opts); + }, (mountFs, { subPath }) => { + return mountFs.rmSync(subPath, opts); + }); + } async linkPromise(existingP, newP) { return await this.makeCallPromise(newP, async () => { return await this.baseFs.linkPromise(existingP, newP); @@ -28955,6 +28988,7 @@ const SYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `realpathSync`, `renameSync`, `rmdirSync`, + `rmSync`, `statSync`, `symlinkSync`, `truncateSync`, @@ -28990,6 +29024,7 @@ const ASYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `readlinkPromise`, `renamePromise`, `rmdirPromise`, + `rmPromise`, `statPromise`, `symlinkPromise`, `truncatePromise`, @@ -31015,6 +31050,27 @@ class ZipFS extends BasePortableFakeFS { throw EINVAL(`rmdir '${p}'`); this.deleteEntry(p, index); } + async rmPromise(p, opts) { + return this.rmSync(p, opts); + } + rmSync(p, { recursive = false } = {}) { + if (this.readOnly) + throw EROFS(`rm '${p}'`); + if (recursive) { + this.removeSync(p); + return; + } + const resolvedP = this.resolveFilename(`rm '${p}'`, p); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw ENOTDIR(`rm '${p}'`); + if (directoryListing.size > 0) + throw ENOTEMPTY(`rm '${p}'`); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw EINVAL(`rm '${p}'`); + this.deleteEntry(p, index); + } hydrateDirectory(resolvedP) { const index = this.libzip.dir.add(this.zip, ppath.relative(PortablePath.root, resolvedP)); if (index === -1) diff --git a/.pnp.loader.mjs b/.pnp.loader.mjs index 81ae9a6b2..6815830b6 100644 --- a/.pnp.loader.mjs +++ b/.pnp.loader.mjs @@ -1,3 +1,6 @@ +/* eslint-disable */ +// @ts-nocheck + import fs from 'fs'; import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url'; import path from 'path'; @@ -830,6 +833,12 @@ class ProxiedFS extends FakeFS { rmdirSync(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) { return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); } @@ -1211,6 +1220,18 @@ class NodeFS extends BasePortableFakeFS { rmdirSync(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) { return await new Promise((resolve, reject) => { this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); @@ -1403,6 +1424,8 @@ const URL = Number(process.versions.node.split('.', 1)[0]) < 20 ? URL$1 : global 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 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) { const rootSeparatorIndex = checkPath.indexOf(npath.sep); @@ -1493,10 +1516,21 @@ async function load$1(urlString, context, nextLoad) { const format = getFileFormat(filePath); if (!format) return nextLoad(urlString, context, nextLoad); - if (format === `json` && context.importAssertions?.type !== `json`) { - const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import assertion of type "json"`); - err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`; - throw err; + if (format === `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`; + throw err; + } + } } if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { const pathToSend = pathToFileURL( diff --git a/.yarn/corepack.tgz b/.yarn/corepack.tgz index d556c57dd..6aab5c972 100644 --- a/.yarn/corepack.tgz +++ b/.yarn/corepack.tgz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0be71e7aa5eabf6010b56188df17c4b42fcf67d181d9e236db4fd06b51022930 -size 983421 +oid sha256:d959daf507a8a46f1100da8fa970368fac7ecdacbf8a9ede0649163275999980 +size 985138 diff --git a/package.json b/package.json index 00cba6cda..93d6f4c3d 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "typescript": "5.1.6", "yaml": "^2.3.4" }, - "packageManager": "yarn@4.1.1", + "packageManager": "yarn@4.2.2", "dependenciesMeta": { "@discordapp/twemoji@14.1.2": { "unplugged": true