Skip to content

Commit

Permalink
Update glob (#15615)
Browse files Browse the repository at this point in the history
* Update glob

* `yarn dedupe`

* Maybe this fixes it

* Windows :/

* nit

* Try this
  • Loading branch information
nicolo-ribaudo committed May 8, 2023
1 parent 6c182cd commit a34bf1c
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 68 deletions.
24 changes: 7 additions & 17 deletions Gulpfile.mjs
Expand Up @@ -21,7 +21,7 @@ import rollupReplace from "@rollup/plugin-replace";
import { terser as rollupTerser } from "rollup-plugin-terser";
import rollupDts from "rollup-plugin-dts";
import { Worker as JestWorker } from "jest-worker";
import glob from "glob";
import { Glob } from "glob";
import { resolve as importMetaResolve } from "import-meta-resolve";

import rollupBabelSource from "./scripts/rollup-plugin-babel-source.js";
Expand Down Expand Up @@ -263,23 +263,15 @@ function createWorker(useWorker) {

async function buildBabel(useWorker, ignore = []) {
const worker = createWorker(useWorker);
const files = await new Promise((resolve, reject) => {
glob(
defaultSourcesGlob,
{
ignore: ignore.map(p => `./${p.src}/**`),
},
(err, files) => {
if (err) reject(err);
resolve(files);
}
);
const files = new Glob(defaultSourcesGlob, {
ignore: ignore.map(p => `./${p.src}/**`),
posix: true,
});

const promises = [];
for (const file of files) {
for await (const file of files) {
// @example ./packages/babel-parser/src/index.js
const dest = "./" + mapSrcToLib(file.slice(2));
const dest = "./" + mapSrcToLib(file);
promises.push(
worker.transform(file, dest, {
sourceMaps: !file.endsWith(".d.ts"),
Expand All @@ -299,9 +291,7 @@ async function buildBabel(useWorker, ignore = []) {
});
})
.finally(() => {
if (worker.end !== undefined) {
worker.end();
}
worker.end?.();
});
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -54,7 +54,7 @@
"eslint-plugin-jest": "^27.1.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"glob": "^8.0.3",
"glob": "^10.2.2",
"gulp": "^4.0.2",
"gulp-filter": "^7.0.0",
"gulp-plumber": "^1.2.1",
Expand Down
188 changes: 138 additions & 50 deletions yarn.lock
Expand Up @@ -3947,6 +3947,20 @@ __metadata:
languageName: node
linkType: hard

"@isaacs/cliui@npm:^8.0.2":
version: 8.0.2
resolution: "@isaacs/cliui@npm:8.0.2"
dependencies:
string-width: ^5.1.2
string-width-cjs: "npm:string-width@^4.2.0"
strip-ansi: ^7.0.1
strip-ansi-cjs: "npm:strip-ansi@^6.0.1"
wrap-ansi: ^8.1.0
wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0"
checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb
languageName: node
linkType: hard

"@istanbuljs/load-nyc-config@npm:^1.0.0":
version: 1.1.0
resolution: "@istanbuljs/load-nyc-config@npm:1.1.0"
Expand Down Expand Up @@ -4338,6 +4352,13 @@ __metadata:
languageName: node
linkType: hard

"@pkgjs/parseargs@npm:^0.11.0":
version: 0.11.0
resolution: "@pkgjs/parseargs@npm:0.11.0"
checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f
languageName: node
linkType: hard

"@rollup/plugin-babel@npm:^5.3.1":
version: 5.3.1
resolution: "@rollup/plugin-babel@npm:5.3.1"
Expand Down Expand Up @@ -5530,10 +5551,10 @@ __metadata:
languageName: node
linkType: hard

"ansi-styles@npm:^6.0.0":
version: 6.1.0
resolution: "ansi-styles@npm:6.1.0"
checksum: 7a7f8528c07a9d20c3a92bccd2b6bc3bb4d26e5cb775c02826921477377bd495d615d61f710d56216344b6238d1d11ef2b0348e146c5b128715578bfb3217229
"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0":
version: 6.2.1
resolution: "ansi-styles@npm:6.2.1"
checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9
languageName: node
linkType: hard

Expand Down Expand Up @@ -6083,7 +6104,7 @@ __metadata:
eslint-plugin-jest: ^27.1.5
eslint-plugin-node: ^11.1.0
eslint-plugin-prettier: ^4.2.1
glob: ^8.0.3
glob: ^10.2.2
gulp: ^4.0.2
gulp-filter: ^7.0.0
gulp-plumber: ^1.2.1
Expand Down Expand Up @@ -8773,6 +8794,16 @@ __metadata:
languageName: node
linkType: hard

"foreground-child@npm:^3.1.0":
version: 3.1.1
resolution: "foreground-child@npm:3.1.1"
dependencies:
cross-spawn: ^7.0.0
signal-exit: ^4.0.1
checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5
languageName: node
linkType: hard

"forever-agent@npm:~0.6.1":
version: 0.6.1
resolution: "forever-agent@npm:0.6.1"
Expand Down Expand Up @@ -9098,6 +9129,21 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"glob@npm:^10.2.2":
version: 10.2.2
resolution: "glob@npm:10.2.2"
dependencies:
foreground-child: ^3.1.0
jackspeak: ^2.0.3
minimatch: ^9.0.0
minipass: ^5.0.0
path-scurry: ^1.7.0
bin:
glob: dist/cjs/src/bin.js
checksum: 33cbbbea74deb605107715f2ee51937953271ff2f6ce712b57d95a714e2f1bf272fa2c2b0c5101097bf98d3e5d40856941af498b05bce07567aca1a6e3cc7ae9
languageName: node
linkType: hard

"glob@npm:^7.0.0, glob@npm:^7.1.0, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0":
version: 7.2.3
resolution: "glob@npm:7.2.3"
Expand All @@ -9112,19 +9158,6 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"glob@npm:^8.0.3":
version: 8.0.3
resolution: "glob@npm:8.0.3"
dependencies:
fs.realpath: ^1.0.0
inflight: ^1.0.4
inherits: 2
minimatch: ^5.0.1
once: ^1.3.0
checksum: 50bcdea19d8e79d8de5f460b1939ffc2b3299eac28deb502093fdca22a78efebc03e66bf54f0abc3d3d07d8134d19a32850288b7440d77e072aa55f9d33b18c5
languageName: node
linkType: hard

"global-modules@npm:^1.0.0":
version: 1.0.0
resolution: "global-modules@npm:1.0.0"
Expand Down Expand Up @@ -10236,6 +10269,19 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"jackspeak@npm:^2.0.3":
version: 2.2.0
resolution: "jackspeak@npm:2.2.0"
dependencies:
"@isaacs/cliui": ^8.0.2
"@pkgjs/parseargs": ^0.11.0
dependenciesMeta:
"@pkgjs/parseargs":
optional: true
checksum: d8cd5be4f0e89cef04add5b0b068162a086bdb1ca68113ed729e99489b7865ca3edcc6430d6fd20c430e15382929ef5f3c7ec36e6aa7c17be23cac116f92dcff
languageName: node
linkType: hard

"jest-changed-files@npm:^29.0.0":
version: 29.0.0
resolution: "jest-changed-files@npm:29.0.0"
Expand Down Expand Up @@ -11337,6 +11383,13 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"lru-cache@npm:^9.0.0":
version: 9.1.1
resolution: "lru-cache@npm:9.1.1"
checksum: 4d703bb9b66216bbee55ead82a9682820a2b6acbdfca491b235390b1ef1056000a032d56dfb373fdf9ad4492f1fa9d04cc9a05a77f25bd7ce6901d21ad9b68b7
languageName: node
linkType: hard

"magic-string@npm:^0.25.7":
version: 0.25.7
resolution: "magic-string@npm:0.25.7"
Expand Down Expand Up @@ -11602,12 +11655,12 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"minimatch@npm:^5.0.1":
version: 5.1.0
resolution: "minimatch@npm:5.1.0"
"minimatch@npm:^9.0.0":
version: 9.0.0
resolution: "minimatch@npm:9.0.0"
dependencies:
brace-expansion: ^2.0.1
checksum: 15ce53d31a06361e8b7a629501b5c75491bc2b59712d53e802b1987121d91b433d73fcc5be92974fde66b2b51d8fb28d75a9ae900d249feb792bb1ba2a4f0a90
checksum: 7bd57899edd1d1b0560f50b5b2d1ea4ad2a366c5a2c8e0a943372cf2f200b64c256bae45a87a80915adbce27fa36526264296ace0da57b600481fe5ea3e372e5
languageName: node
linkType: hard

Expand All @@ -11627,6 +11680,13 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"minipass@npm:^5.0.0":
version: 5.0.0
resolution: "minipass@npm:5.0.0"
checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea
languageName: node
linkType: hard

"minizlib@npm:^2.1.1":
version: 2.1.2
resolution: "minizlib@npm:2.1.2"
Expand Down Expand Up @@ -12553,6 +12613,16 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"path-scurry@npm:^1.7.0":
version: 1.7.0
resolution: "path-scurry@npm:1.7.0"
dependencies:
lru-cache: ^9.0.0
minipass: ^5.0.0
checksum: 4e86df0fa6848cef1ba672d4a332b8dbd0297c42d5123bcc419d714c34b25ee6775b0d2e66dd5e698a38e9bcd808f8fc47333e3a3357307cada98e16bfae8b98
languageName: node
linkType: hard

"path-type@npm:^1.0.0":
version: 1.1.0
resolution: "path-type@npm:1.1.0"
Expand Down Expand Up @@ -13766,6 +13836,13 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"signal-exit@npm:^4.0.1":
version: 4.0.1
resolution: "signal-exit@npm:4.0.1"
checksum: 832043367dca23e61ab6033e8b41c595fc805119bfe4fee63dea201cdc809a8b086bc54597bbbc1b2cde1a63c7dd554d1295ed2cca92db598233834a0b59b281
languageName: node
linkType: hard

"simple-concat@npm:^1.0.0":
version: 1.0.0
resolution: "simple-concat@npm:1.0.0"
Expand Down Expand Up @@ -14158,6 +14235,17 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3":
version: 4.2.3
resolution: "string-width@npm:4.2.3"
dependencies:
emoji-regex: ^8.0.0
is-fullwidth-code-point: ^3.0.0
strip-ansi: ^6.0.1
checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb
languageName: node
linkType: hard

"string-width@npm:^1.0.1, string-width@npm:^1.0.2":
version: 1.0.2
resolution: "string-width@npm:1.0.2"
Expand All @@ -14179,18 +14267,7 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3":
version: 4.2.3
resolution: "string-width@npm:4.2.3"
dependencies:
emoji-regex: ^8.0.0
is-fullwidth-code-point: ^3.0.0
strip-ansi: ^6.0.1
checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb
languageName: node
linkType: hard

"string-width@npm:^5.0.0":
"string-width@npm:^5.0.0, string-width@npm:^5.0.1, string-width@npm:^5.1.2":
version: 5.1.2
resolution: "string-width@npm:5.1.2"
dependencies:
Expand Down Expand Up @@ -14241,6 +14318,15 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1":
version: 6.0.1
resolution: "strip-ansi@npm:6.0.1"
dependencies:
ansi-regex: ^5.0.1
checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c
languageName: node
linkType: hard

"strip-ansi@npm:^3.0.0, strip-ansi@npm:^3.0.1":
version: 3.0.1
resolution: "strip-ansi@npm:3.0.1"
Expand All @@ -14259,15 +14345,6 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1":
version: 6.0.1
resolution: "strip-ansi@npm:6.0.1"
dependencies:
ansi-regex: ^5.0.1
checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c
languageName: node
linkType: hard

"strip-ansi@npm:^7.0.1":
version: 7.0.1
resolution: "strip-ansi@npm:7.0.1"
Expand Down Expand Up @@ -15636,6 +15713,17 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0":
version: 7.0.0
resolution: "wrap-ansi@npm:7.0.0"
dependencies:
ansi-styles: ^4.0.0
string-width: ^4.1.0
strip-ansi: ^6.0.0
checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b
languageName: node
linkType: hard

"wrap-ansi@npm:^2.0.0":
version: 2.1.0
resolution: "wrap-ansi@npm:2.1.0"
Expand All @@ -15657,14 +15745,14 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"wrap-ansi@npm:^7.0.0":
version: 7.0.0
resolution: "wrap-ansi@npm:7.0.0"
"wrap-ansi@npm:^8.1.0":
version: 8.1.0
resolution: "wrap-ansi@npm:8.1.0"
dependencies:
ansi-styles: ^4.0.0
string-width: ^4.1.0
strip-ansi: ^6.0.0
checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b
ansi-styles: ^6.1.0
string-width: ^5.0.1
strip-ansi: ^7.0.1
checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238
languageName: node
linkType: hard

Expand Down

0 comments on commit a34bf1c

Please sign in to comment.