Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions patches/minimatch@10.2.6.patch → patches/minimatch@11.0.9.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
diff --git a/dist/commonjs/index.js b/dist/commonjs/index.js
index 5a69834..64cb018 100644
--- a/dist/commonjs/index.js
+++ b/dist/commonjs/index.js
@@ -1124,4 +1124,8 @@ exports.minimatch.AST = ast_js_1.AST;
@@ -1881,4 +1881,5 @@
exports.minimatch.Minimatch = Minimatch;
exports.minimatch.escape = escape_js_1.escape;
exports.minimatch.unescape = unescape_js_1.unescape;
+// Interop: mirrors the ESM half this patch also fixes. `exports.defaults`
+// is the defaults() helper, not a default export, so a compiled
+// __importDefault call finds nothing once __esModule is set.
+exports.default = exports.minimatch;
//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/dist/esm/index.js b/dist/esm/index.js
index a5e6fa8..5a6216e 100644
--- a/dist/esm/index.js
+++ b/dist/esm/index.js
@@ -1111,4 +1111,9 @@ minimatch.AST = AST;
@@ -1870,4 +1870,5 @@
minimatch.Minimatch = Minimatch;
minimatch.escape = escape;
minimatch.unescape = unescape;
+// Interop: the ESM build ships named exports only. A default import (the
+// shape the fleet CI cache action resolves through the `import` condition)
+// otherwise throws "does not provide an export named 'default'" and kills
+// the job at setup before a check runs.
+export default minimatch;
//# sourceMappingURL=index.js.map
\ No newline at end of file
36 changes: 36 additions & 0 deletions patches/node-gyp@12.4.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/lib/install.js b/lib/install.js
index 3580cdd..3ad4f00 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -223,6 +223,8 @@ async function install (gyp, argv) {
throw new Error(`${res.status} response downloading ${release.tarballUrl}`)
}

+ const file = path.join(tarExtractDir, 'headers.tar.gz')
+ // Hash the full response even if the tar reader stops at archive EOF.
await pipeline(
res.body,
// content checksum
@@ -231,13 +233,16 @@ async function install (gyp, argv) {
contentShasums[filename] = checksum
log.verbose('content checksum', filename, checksum)
}),
- tar.extract({
- strip: 1,
- cwd: tarExtractDir,
- filter: isValid,
- onwarn
- })
+ createWriteStream(file)
)
+ await tar.extract({
+ file,
+ strip: 1,
+ cwd: tarExtractDir,
+ filter: isValid,
+ onwarn
+ })
+ await fs.unlink(file)
} catch (err) {
// something went wrong downloading the tarball?
if (err.code === 'ENOTFOUND') {
93 changes: 93 additions & 0 deletions patches/pacote@21.5.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
diff --git a/lib/dir.js b/lib/dir.js
index 04846eb..35d8299 100644
--- a/lib/dir.js
+++ b/lib/dir.js
@@ -2,6 +2,7 @@ const { resolve } = require('node:path')
const packlist = require('npm-packlist')
const runScript = require('@npmcli/run-script')
const tar = require('tar')
+const { Readable } = require('node:stream')
const { Minipass } = require('minipass')
const Fetcher = require('./fetcher.js')
const FileFetcher = require('./file.js')
@@ -78,7 +79,7 @@ class DirFetcher extends Fetcher {
}
return packlist(this.tree, { path: this.resolved, prefix, workspaces })
})
- .then(files => tar.c(tarCreateOptions(this.package), files)
+ .then(files => Readable.fromWeb(tar.c(tarCreateOptions(this.package), files))
.on('error', er => stream.emit('error', er)).pipe(stream))
.catch(er => stream.emit('error', er))
return stream
diff --git a/lib/fetcher.js b/lib/fetcher.js
index 8324f46..dd921ff 100644
--- a/lib/fetcher.js
+++ b/lib/fetcher.js
@@ -3,8 +3,10 @@
// It handles the unpacking and retry logic that is shared among
// all of the other Fetcher types.

-const { basename, dirname } = require('node:path')
+const { createWriteStream } = require('node:fs')
+const { basename, dirname, join } = require('node:path')
const { rm, mkdir } = require('node:fs/promises')
+const { pipeline } = require('node:stream/promises')
const PackageJson = require('@npmcli/package-json')
const cacache = require('cacache')
const fsm = require('fs-minipass')
@@ -357,7 +359,10 @@ class FetcherBase {
// the tarball comes from.
async extract (dest) {
await this.#mkdir(dest)
- return this.tarballStream((tarball) => this.#extract(dest, tarball))
+ return cacache.tmp.withTmp(this.cache, this.opts, tmp => {
+ const file = join(tmp, 'package.tgz')
+ return this.tarballStream(tarball => this.#extract(dest, tarball, file))
+ })
}

#toFile (dest) {
@@ -381,28 +386,21 @@ class FetcherBase {
return this.#toFile(dest)
}

- #extract (dest, tarball) {
- const extractor = tar.x(this.#tarxOptions({ cwd: dest }))
- const p = new Promise((resolve, reject) => {
- extractor.on('end', () => {
- resolve({
- resolved: this.resolved,
- integrity: this.integrity && String(this.integrity),
- from: this.from,
- })
- })
-
- extractor.on('error', er => {
- log.warn('tar', er.message)
- log.silly('tar', er)
- reject(er)
- })
-
- tarball.on('error', er => reject(er))
- })
-
- tarball.pipe(extractor)
- return p
+ async #extract (dest, tarball, file) {
+ try {
+ // Finish reading the stream so integrity and late errors are reported.
+ await pipeline(tarball, createWriteStream(file))
+ await tar.x({ ...this.#tarxOptions({ cwd: dest }), file })
+ } catch (er) {
+ log.warn('tar', er.message)
+ log.silly('tar', er)
+ throw er
+ }
+ return {
+ resolved: this.resolved,
+ integrity: this.integrity && String(this.integrity),
+ from: this.from,
+ }
}

// always ensure that entries are at least as permissive as our configured
22 changes: 12 additions & 10 deletions patches/vitest@5.0.3.patch → patches/vitest@5.1.2.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
diff --git a/dist/chunks/index.DpLw24bj.js b/dist/chunks/index.DpLw24bj.js
index 5dc15d7e594cadfb4a11532dc65108287441cc5c..fd889b6517f868e0934fecbd9038fa2889dfef54 100644
--- a/dist/chunks/index.DpLw24bj.js
+++ b/dist/chunks/index.DpLw24bj.js
@@ -11068,6 +11068,7 @@ class ForksPoolWorker {
diff --git a/dist/chunks/index.6pLw0FLK.js b/dist/chunks/index.6pLw0FLK.js
--- a/dist/chunks/index.6pLw0FLK.js
+++ b/dist/chunks/index.6pLw0FLK.js
@@ -5566,6 +5566,7 @@
entrypoint;
execArgv;
env;
+ sigkillTimeout;
distPath;
_fork;
stdout;
stderr;
@@ -11076,6 +11077,8 @@ class ForksPoolWorker {
@@ -5575,6 +5576,8 @@
constructor(options) {
this.execArgv = options.execArgv;
this.env = options.env;
+ const teardownTimeout = options.project.config.teardownTimeout;
+ this.sigkillTimeout = this.execArgv.includes("--cpu-prof") && Number.isFinite(teardownTimeout) && teardownTimeout > 0 && teardownTimeout <= 2147483647 ? teardownTimeout : SIGKILL_TIMEOUT;
this.stdout = options.project.vitest.logger.outputStream;
this.stderr = options.project.vitest.logger.errorStream;
/** Loads {@link file://./../../../runtime/workers/forks.ts} */
@@ -11123,7 +11126,7 @@ class ForksPoolWorker {
this.distPath = options.distPath;
@@ -5624,7 +5627,7 @@
* - https://github.com/jestjs/jest/blob/25a8785584c9d54a05887001ee7f498d489a5441/packages/jest-worker/src/workers/ChildProcessWorker.ts#L463-L477
* - https://github.com/tinylibs/tinypool/blob/40b4b3eb926dabfbfd3d0a7e3d1222d4dd1c0d2d/src/runtime/process-worker.ts#L56
*/
Expand All @@ -28,7 +27,10 @@ index 5dc15d7e594cadfb4a11532dc65108287441cc5c..fd889b6517f868e0934fecbd9038fa28
fork.kill();
await waitForExit;
clearTimeout(sigkillTimeout);
@@ -15020,10 +15023,7 @@ Update your dependencies and make sure the versions match.`));
diff --git a/dist/chunks/cli-api.9v9AxcPO.js b/dist/chunks/cli-api.9v9AxcPO.js
--- a/dist/chunks/cli-api.9v9AxcPO.js
+++ b/dist/chunks/cli-api.9v9AxcPO.js
@@ -7217,10 +7217,7 @@
const include = this.options.include;
this.globMatchers = {
matchExclude: exclude.length ? pm(exclude, { dot: true }) : () => false,
Expand Down
Loading