diff --git a/package-lock.json b/package-lock.json index b6aa9c1ca5..a897999744 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,6 @@ "@eslint/js": "^9.36.0", "@shikijs/monaco": "^3.7.0", "@types/chai": "^4.1.4", - "@types/glob": "7.1.3", "@types/js-yaml": "^4.0.9", "@types/lru-cache": "^5.1.0", "@types/marked": "^0.7.2", @@ -74,7 +73,7 @@ "eslint-plugin-rulesdir": "^0.2.2", "event-stream": "^4.0.1", "fork-ts-checker-webpack-plugin": "9.1.0", - "glob": "7.1.6", + "glob": "13.0.6", "globals": "^16.4.0", "graphql": "15.5.0", "graphql-tag": "2.11.0", @@ -1825,15 +1824,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/glob": { - "version": "7.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, "node_modules/@types/hast": { "version": "3.0.4", "dev": true, @@ -1897,11 +1887,6 @@ "@types/unist": "*" } }, - "node_modules/@types/minimatch": { - "version": "3.0.3", - "dev": true, - "license": "MIT" - }, "node_modules/@types/mocha": { "version": "10.0.10", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", @@ -6068,19 +6053,18 @@ } }, "node_modules/glob": { - "version": "7.1.6", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -6161,6 +6145,72 @@ "dev": true, "license": "BSD-2-Clause" }, + "node_modules/glob/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz", + "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/glob/node_modules/lru-cache": { + "version": "11.5.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", + "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "16.4.0", "dev": true, @@ -8138,9 +8188,11 @@ } }, "node_modules/minipass": { - "version": "7.1.2", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" } @@ -9932,6 +9984,28 @@ "rimraf": "bin.js" } }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/ripemd160": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz", diff --git a/package.json b/package.json index 587d1b3ab1..b4aceb347f 100644 --- a/package.json +++ b/package.json @@ -4235,7 +4235,6 @@ "@eslint/js": "^9.36.0", "@shikijs/monaco": "^3.7.0", "@types/chai": "^4.1.4", - "@types/glob": "7.1.3", "@types/js-yaml": "^4.0.9", "@types/lru-cache": "^5.1.0", "@types/marked": "^0.7.2", @@ -4265,7 +4264,7 @@ "eslint-plugin-rulesdir": "^0.2.2", "event-stream": "^4.0.1", "fork-ts-checker-webpack-plugin": "9.1.0", - "glob": "7.1.6", + "glob": "13.0.6", "globals": "^16.4.0", "graphql": "15.5.0", "graphql-tag": "2.11.0", diff --git a/scripts/preprocess-svg.js b/scripts/preprocess-svg.js index a04963208e..bdae04a6b1 100644 --- a/scripts/preprocess-svg.js +++ b/scripts/preprocess-svg.js @@ -1,9 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + const util = require('util'); const fs = require('fs'); const path = require('path'); const minimist = require('minimist'); const svgLoader = require('svg-inline-loader'); -const globCb = require('glob'); +const { glob } = require('glob'); const mkdirpCb = require('mkdirp'); function printUsage(consoleFn, exitCode) { @@ -14,9 +19,9 @@ with the way that Webpack will transpile them at build time. Options: - --help, -h Display this message. - --in, -i [dirname] Discover and convert SVG files beneath [dirname]. - --out, -o [dirname] Emit JavaScript source to files beneath [dirname]. + --help, -h Display this message. + --in, -i [dirname] Discover and convert SVG files beneath [dirname]. + --out, -o [dirname] Emit JavaScript source to files beneath [dirname]. `); process.exit(exitCode); } @@ -52,7 +57,6 @@ async function processFile(inFilename, outFilename) { await writeFile(outFilename, moduleSource, { encoding: 'utf8' }); } -const glob = util.promisify(globCb); const mkdirp = util.promisify(mkdirpCb); async function processDirectory(inDirectory, outDirectory) { diff --git a/src/test/index.ts b/src/test/index.ts index 6ded19c0c2..2c5c015166 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -7,7 +7,7 @@ // This file is providing the test runner to use when running extension tests. import * as path from 'path'; import * as vscode from 'vscode'; -import glob from 'glob'; +import * as glob from 'glob'; import Mocha from 'mocha'; import { mockWebviewEnvironment } from './mocks/mockWebviewEnvironment'; import { EXTENSION_ID } from '../constants';