From fa36011e455a0c9083c46d5aab007d34852fc696 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 2 May 2023 11:52:28 +0200
Subject: [PATCH] chore(deps): update dependency glob to v10 (#21865)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
---
 package.json                                  |  4 +-
 test/static-files.spec.ts                     |  5 +--
 tools/check-fenced-code.mjs                   |  5 +--
 tools/generate-imports.mjs                    | 14 ++++---
 .../generate-azure-pipelines-tasks.mjs        |  4 +-
 yarn.lock                                     | 38 ++++++++++---------
 6 files changed, 34 insertions(+), 36 deletions(-)

diff --git a/package.json b/package.json
index 3539c11a11..0f95c8ba25 100644
--- a/package.json
+++ b/package.json
@@ -266,7 +266,6 @@
     "@types/fs-extra": "11.0.1",
     "@types/git-url-parse": "9.0.1",
     "@types/github-url-from-git": "1.5.1",
-    "@types/glob": "8.1.0",
     "@types/global-agent": "2.1.1",
     "@types/ini": "1.3.31",
     "@types/js-yaml": "4.0.5",
@@ -277,6 +276,7 @@
     "@types/markdown-it": "12.2.3",
     "@types/markdown-table": "2.0.0",
     "@types/marshal": "0.5.1",
+    "@types/minimatch": "5.1.2",
     "@types/moo": "0.5.5",
     "@types/nock": "10.0.3",
     "@types/node": "18.16.0",
@@ -308,7 +308,7 @@
     "eslint-plugin-promise": "6.1.1",
     "eslint-plugin-typescript-enum": "2.1.0",
     "expect-more-jest": "5.5.0",
-    "glob": "8.1.0",
+    "glob": "10.2.1",
     "graphql": "16.6.0",
     "husky": "8.0.3",
     "jest": "29.5.0",
diff --git a/test/static-files.spec.ts b/test/static-files.spec.ts
index 4328a1890f..8e72b52f0d 100644
--- a/test/static-files.spec.ts
+++ b/test/static-files.spec.ts
@@ -1,7 +1,4 @@
-import util from 'node:util';
-import _glob from 'glob';
-
-const glob = util.promisify(_glob);
+import { glob } from 'glob';
 
 const ignoredExtensions = [
   'js',
diff --git a/tools/check-fenced-code.mjs b/tools/check-fenced-code.mjs
index cc9f6a1df5..1da933b7a1 100644
--- a/tools/check-fenced-code.mjs
+++ b/tools/check-fenced-code.mjs
@@ -1,10 +1,7 @@
-import { promisify } from 'node:util';
 import fs from 'fs-extra';
-import g from 'glob';
+import { glob } from 'glob';
 import MarkdownIt from 'markdown-it';
 
-const glob = promisify(g);
-
 const errorTitle = 'Invalid JSON in fenced code block';
 const errorBody =
   'Fix this manually by ensuring each block is a valid, complete JSON document.';
diff --git a/tools/generate-imports.mjs b/tools/generate-imports.mjs
index 3e60f97e3f..076ee8bf9c 100644
--- a/tools/generate-imports.mjs
+++ b/tools/generate-imports.mjs
@@ -1,12 +1,9 @@
-import util from 'node:util';
 import fs from 'fs-extra';
-import _glob from 'glob';
+import { glob } from 'glob';
 import hasha from 'hasha';
 import minimatch from 'minimatch';
 import upath from 'upath';
 
-const glob = util.promisify(_glob);
-
 console.log('generating imports');
 const newFiles = new Set();
 
@@ -178,9 +175,14 @@ await (async () => {
     await generateData();
     await generateHash();
     await Promise.all(
-      (await glob('lib/**/*.generated.ts'))
+      (
+        await glob('lib/**/*.generated.ts')
+      )
+        .map((f) => upath.join(f))
         .filter((f) => !newFiles.has(f))
-        .map((file) => fs.remove(file))
+        .map(async (file) => {
+          await fs.remove(file);
+        })
     );
   } catch (e) {
     console.log(e.toString());
diff --git a/tools/static-data/generate-azure-pipelines-tasks.mjs b/tools/static-data/generate-azure-pipelines-tasks.mjs
index e13d9e5d61..5d8603b85c 100644
--- a/tools/static-data/generate-azure-pipelines-tasks.mjs
+++ b/tools/static-data/generate-azure-pipelines-tasks.mjs
@@ -1,13 +1,11 @@
 import os from 'node:os';
-import { promisify } from 'node:util';
 import fs from 'fs-extra';
-import g from 'glob';
+import { glob } from 'glob';
 import JSON5 from 'json5';
 import Git from 'simple-git';
 import path from 'upath';
 import { updateJsonFile } from './utils.mjs';
 
-const glob = promisify(g);
 const localPath = path.join(os.tmpdir(), 'azure-pipelines-tasks');
 
 /**
diff --git a/yarn.lock b/yarn.lock
index 41e61b8944..d37acb908e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2916,14 +2916,6 @@
   resolved "https://registry.yarnpkg.com/@types/github-url-from-git/-/github-url-from-git-1.5.1.tgz#73b1b6fa0490b903f50e7d7d9897d91769a15d8d"
   integrity sha512-B/SvVZMrLRUI9mOoguNNz58gV8A5PDtcGIaUe5PYmzAUTsIJ+ZAn/ujwBIuGIU3mRHY5SfV9dyWfnhOWtOVh6A==
 
-"@types/glob@8.1.0":
-  version "8.1.0"
-  resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc"
-  integrity sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==
-  dependencies:
-    "@types/minimatch" "^5.1.2"
-    "@types/node" "*"
-
 "@types/global-agent@2.1.1":
   version "2.1.1"
   resolved "https://registry.yarnpkg.com/@types/global-agent/-/global-agent-2.1.1.tgz#3f93185e48a3a36e377a52a8301320cd162a831b"
@@ -3051,7 +3043,7 @@
   resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.2.tgz#e2ce9d83a613bacf284c7be7d491945e39e1f8e9"
   integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==
 
-"@types/minimatch@^5.1.2":
+"@types/minimatch@5.1.2":
   version "5.1.2"
   resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca"
   integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==
@@ -5583,16 +5575,17 @@ glob-parent@^6.0.2:
   dependencies:
     is-glob "^4.0.3"
 
-glob@8.1.0, glob@^8.0.1:
-  version "8.1.0"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e"
-  integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==
+glob@10.2.1:
+  version "10.2.1"
+  resolved "https://registry.yarnpkg.com/glob/-/glob-10.2.1.tgz#44288e9186b5cd5baa848728533ba21a94aa8f33"
+  integrity sha512-ngom3wq2UhjdbmRE/krgkD8BQyi1KZ5l+D2dVm4+Yj+jJIBp74/ZGunL6gNGc/CYuQmvUBiavWEXIotRiv5R6A==
   dependencies:
+    foreground-child "^3.1.0"
     fs.realpath "^1.0.0"
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "^5.0.1"
-    once "^1.3.0"
+    jackspeak "^2.0.3"
+    minimatch "^9.0.0"
+    minipass "^5.0.0"
+    path-scurry "^1.7.0"
 
 glob@^10.0.0, glob@^10.2.2:
   version "10.2.2"
@@ -5628,6 +5621,17 @@ glob@^7.1.3, glob@^7.1.4:
     once "^1.3.0"
     path-is-absolute "^1.0.0"
 
+glob@^8.0.1:
+  version "8.1.0"
+  resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e"
+  integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==
+  dependencies:
+    fs.realpath "^1.0.0"
+    inflight "^1.0.4"
+    inherits "2"
+    minimatch "^5.0.1"
+    once "^1.3.0"
+
 glob@^9.3.1, glob@^9.3.2:
   version "9.3.5"
   resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.5.tgz#ca2ed8ca452781a3009685607fdf025a899dfe21"
-- 
GitLab