From 1d44f05e8f8b9c5c3b64d05068fa893a95c84dbd Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Tue, 7 Jan 2025 09:51:41 +0100 Subject: [PATCH] s3: ignore dirs (#4382) --- lib/plugins/gcs/index.js | 2 +- lib/plugins/s3/index.js | 2 +- npm-shrinkwrap.json | 118 ++++----------------------------------- 3 files changed, 12 insertions(+), 110 deletions(-) diff --git a/lib/plugins/gcs/index.js b/lib/plugins/gcs/index.js index 56080d4fff..b3cff6cafb 100644 --- a/lib/plugins/gcs/index.js +++ b/lib/plugins/gcs/index.js @@ -30,7 +30,7 @@ async function uploadLatestFiles(dir, gcsOptions, prefix) { } async function upload(dir, gcsOptions, prefix) { - const files = await recursiveReaddir(dir); + const files = await recursiveReaddir(dir, true); const promises = []; const storage = new Storage({ diff --git a/lib/plugins/s3/index.js b/lib/plugins/s3/index.js index ca0fbdb69c..605db11969 100644 --- a/lib/plugins/s3/index.js +++ b/lib/plugins/s3/index.js @@ -85,7 +85,7 @@ export default class S3Plugin extends SitespeedioPlugin { ); try { - const files = await recursiveReaddir(baseDir); + const files = await recursiveReaddir(baseDir, true); const limit = pLimit(s3Options.maxAsyncS3 || 20); const uploadPromises = files.map(file => limit(() => diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 9688e74c3c..25a0d24301 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2805,22 +2805,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/any-base": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/any-base/-/any-base-1.1.0.tgz", @@ -3386,6 +3370,15 @@ "@jimp/png": "0.22.12" } }, + "node_modules/browsertime/node_modules/@sitespeed.io/log": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@sitespeed.io/log/-/log-0.1.0.tgz", + "integrity": "sha512-60mZVKmIm4lNRwBCS25ugtx2JmuxW+S2xog7ckU/PkdGHlXy8IRcQ2YMo+fV75a2yYfoepE2J4NZw6//Xi3jiA==", + "license": "Apache-2.0", + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -3528,21 +3521,6 @@ "node": ">=16" } }, - "node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/changelog-parser": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/changelog-parser/-/changelog-parser-3.0.1.tgz", @@ -4188,11 +4166,6 @@ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, - "node_modules/dbug": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/dbug/-/dbug-0.4.2.tgz", - "integrity": "sha1-MrSzEF6IYQQ6b5rHVdgOVC02WzE=" - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -4571,6 +4544,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -5894,17 +5868,6 @@ "node": ">=14.0.0" } }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -6192,22 +6155,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/intel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz", - "integrity": "sha1-EdEUfraz9Fgr31M3s31UFYTp5B4=", - "dependencies": { - "chalk": "^1.1.0", - "dbug": "~0.4.2", - "stack-trace": "~0.0.9", - "strftime": "~0.10.0", - "symbol": "~0.3.1", - "utcstring": "~0.1.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/internal-slot": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", @@ -9692,14 +9639,6 @@ "nan": "^2.18.0" } }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "engines": { - "node": "*" - } - }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -9756,14 +9695,6 @@ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==" }, - "node_modules/strftime": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/strftime/-/strftime-0.10.0.tgz", - "integrity": "sha1-s/D6QZKVICpaKJ9ta+n0kJphcZM=", - "engines": { - "node": ">=0.2.0" - } - }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -9855,17 +9786,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -9981,14 +9901,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -10000,11 +9912,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/symbol": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/symbol/-/symbol-0.3.1.tgz", - "integrity": "sha1-tvmpANSWpX8CQI8iGYwQndoGMEE=" - }, "node_modules/synckit": { "version": "0.9.2", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", @@ -10470,11 +10377,6 @@ "node": "^18 || ^20 || >= 21" } }, - "node_modules/utcstring": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/utcstring/-/utcstring-0.1.0.tgz", - "integrity": "sha1-Qw/VEKt/yVtdWRDJAteYgMIIQ2s=" - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",