From e82dae3ee414f02fd7d92388c287bb70e2944631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 16:39:04 +0300 Subject: [PATCH] Bump glob from 8.1.0 to 10.0.0 (#12649) * Bump glob from 8.1.0 to 10.0.0 Bumps [glob](https://github.com/isaacs/node-glob) from 8.1.0 to 10.0.0. - [Release notes](https://github.com/isaacs/node-glob/releases) - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v8.1.0...v10.0.0) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * fix glob v10 use * fix unit test * retain the sorted order of render tests --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vladimir Agafonkin --- package.json | 2 +- test/integration/lib/generate-fixture-json.js | 4 +-- test/integration/lib/harness.js | 5 +-- test/unit/style-spec/migrate.test.js | 4 +-- test/unit/style-spec/validate.test.js | 7 ++-- .../validate_mapbox_api_supported.test.js | 7 ++-- yarn.lock | 35 +++++++++++++++++++ 7 files changed, 49 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 5585aaab54c..0a6e0ed6401 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "eslint-plugin-jsdoc": "^39.6.4", "flow-bin": "0.188.0", "gl": "6.0.2", - "glob": "^8.0.3", + "glob": "^10.0.0", "is-builtin-module": "^3.2.0", "jsdom": "^15.2.1", "json-stringify-pretty-compact": "^4.0.0", diff --git a/test/integration/lib/generate-fixture-json.js b/test/integration/lib/generate-fixture-json.js index 7d96d54fd67..5508898c474 100644 --- a/test/integration/lib/generate-fixture-json.js +++ b/test/integration/lib/generate-fixture-json.js @@ -1,7 +1,7 @@ // Use linux 'path' syntax on all operating systems to preserve compatability with 'glob' import {posix as path} from "path"; import fs from 'fs'; -import glob from 'glob'; +import {globSync} from 'glob'; import localizeURLs from './localize-urls.js'; /** @@ -16,7 +16,7 @@ import localizeURLs from './localize-urls.js'; export function generateFixtureJson(rootDirectory, suiteDirectory, outputDirectory = 'test/integration/dist', includeImages = false, stylePaths = []) { if (!stylePaths.length) { const pathGlob = getAllFixtureGlobs(rootDirectory, suiteDirectory)[0]; - stylePaths = glob.sync(pathGlob); + stylePaths = globSync(pathGlob); if (!stylePaths.length) { console.error(`Found no tests matching the pattern ${pathGlob}`); } diff --git a/test/integration/lib/harness.js b/test/integration/lib/harness.js index f43d0b3ad65..5dd71d42ca4 100644 --- a/test/integration/lib/harness.js +++ b/test/integration/lib/harness.js @@ -2,7 +2,7 @@ import path from 'path'; import fs from 'fs'; -import glob from 'glob'; +import {globSync} from 'glob'; import shuffleSeed from 'shuffle-seed'; import {queue} from 'd3-queue'; import colors from 'chalk'; @@ -22,7 +22,8 @@ export default function (directory, implementation, options, run) { const tests = options.tests || []; const ignores = options.ignores || {}; - let sequence = glob.sync(`**/${options.fixtureFilename || 'style.json'}`, {cwd: directory}) + let sequence = globSync(`**/${options.fixtureFilename || 'style.json'}`, {cwd: directory}) + .sort((a, b) => a.localeCompare(b, 'en')) .map(fixture => { const id = path.dirname(fixture); const style = require(path.join(directory, fixture)); diff --git a/test/unit/style-spec/migrate.test.js b/test/unit/style-spec/migrate.test.js index 9c0c304b25f..f4fd0130dcd 100644 --- a/test/unit/style-spec/migrate.test.js +++ b/test/unit/style-spec/migrate.test.js @@ -1,6 +1,6 @@ import {test} from '../../util/test.js'; import fs from 'fs'; -import glob from 'glob'; +import {globSync} from 'glob'; import path from 'path'; import validate from '../../../src/style-spec/validate_style.js'; import v8 from '../../../src/style-spec/reference/v8.json'; @@ -126,7 +126,7 @@ test('converts categorical function on resolvedImage type to valid expression', t.end(); }); -glob.sync(`${__dirname}/fixture/v7-migrate/*.input.json`).forEach((file) => { +globSync(`${__dirname}/fixture/v7-migrate/*.input.json`).forEach((file) => { test(path.basename(file), (t) => { const outputfile = file.replace('.input', '.output'); const style = JSON.parse(fs.readFileSync(file)); diff --git a/test/unit/style-spec/validate.test.js b/test/unit/style-spec/validate.test.js index 742ada8aaa9..280fc670065 100644 --- a/test/unit/style-spec/validate.test.js +++ b/test/unit/style-spec/validate.test.js @@ -1,5 +1,5 @@ import {test} from '../../util/test.js'; -import glob from 'glob'; +import {globSync} from 'glob'; import fs from 'fs'; import path from 'path'; import validate from '../../../src/style-spec/validate_style.js'; @@ -9,7 +9,7 @@ const __dirname = fileURLToPath(new URL('.', import.meta.url)); const UPDATE = !!process.env.UPDATE; -glob.sync(`${__dirname}/fixture/*.input.json`).forEach((file) => { +globSync(`${__dirname}/fixture/*.input.json`).forEach((file) => { test(path.basename(file), (t) => { const outputfile = file.replace('.input', '.output'); const style = fs.readFileSync(file); @@ -25,11 +25,10 @@ glob.sync(`${__dirname}/fixture/*.input.json`).forEach((file) => { }); }); -const fixtures = glob.sync(`${__dirname}/fixture/*.input.json`); -const style = JSON.parse(fs.readFileSync(fixtures[0])); import reference from '../../../src/style-spec/reference/latest.js'; test('errors from validate do not contain line numbers', (t) => { + const style = JSON.parse(fs.readFileSync(`${__dirname}/fixture/bad-color.input.json`)); const result = validate(style, reference); t.equal(result[0].line, undefined); t.end(); diff --git a/test/unit/style-spec/validate_mapbox_api_supported.test.js b/test/unit/style-spec/validate_mapbox_api_supported.test.js index 82a136feb8e..0f19cd3c9e9 100644 --- a/test/unit/style-spec/validate_mapbox_api_supported.test.js +++ b/test/unit/style-spec/validate_mapbox_api_supported.test.js @@ -1,5 +1,5 @@ import {test} from '../../util/test.js'; -import glob from 'glob'; +import {globSync} from 'glob'; import fs from 'fs'; import path from 'path'; import validateMapboxApiSupported from '../../../src/style-spec/validate_mapbox_api_supported.js'; @@ -9,7 +9,7 @@ const __dirname = fileURLToPath(new URL('.', import.meta.url)); const UPDATE = !!process.env.UPDATE; -glob.sync(`${__dirname}/fixture/*.input.json`).forEach((file) => { +globSync(`${__dirname}/fixture/*.input.json`).forEach((file) => { test(path.basename(file), (t) => { const outputfile = file.replace('.input', '.output-api-supported'); const style = fs.readFileSync(file); @@ -25,11 +25,10 @@ glob.sync(`${__dirname}/fixture/*.input.json`).forEach((file) => { }); }); -const fixtures = glob.sync(`${__dirname}/fixture/*.input.json`); -const style = JSON.parse(fs.readFileSync(fixtures[0])); import reference from '../../../src/style-spec/reference/latest.js'; test('errors from validate do not contain line numbers', (t) => { + const style = JSON.parse(fs.readFileSync(`${__dirname}/fixture/bad-color.input.json`)); const result = validateMapboxApiSupported(style, reference); t.equal(result[0].line, undefined); t.end(); diff --git a/yarn.lock b/yarn.lock index d5772f6c79a..c68a3e1fbec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3699,6 +3699,16 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.0.0.tgz#034ab2e93644ba702e769c3e0558143d3fbd1612" + integrity sha512-zmp9ZDC6NpDNLujV2W2n+3lH+BafIVZ4/ct+Yj3BMZTH/+bgm/eVjHzeFLwxJrrIGgjjS2eiQLlpurHsNlEAtQ== + dependencies: + fs.realpath "^1.0.0" + minimatch "^9.0.0" + minipass "^5.0.0" + path-scurry "^1.6.4" + glob@^5.0.14: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -4961,6 +4971,11 @@ lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.14.0.tgz#21be64954a4680e303a09e9468f880b98a0b3c7f" integrity sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ== +lru-cache@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.0.1.tgz#ac061ed291f8b9adaca2b085534bb1d3b61bef83" + integrity sha512-C8QsKIN1UIXeOs3iWmiZ1lQY+EnKDojWd37fXy1aSbJvH4iSma1uy2OWuoB3m4SYRli5+CUjDv3Dij5DVoetmg== + magic-string@^0.27.0: version "0.27.0" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" @@ -5163,6 +5178,13 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56" + integrity sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -5231,6 +5253,11 @@ minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.5, minipass@^3.1.6, minipass@^3. dependencies: yallist "^4.0.0" +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -5791,6 +5818,14 @@ path-platform@~0.11.15: resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" integrity sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg== +path-scurry@^1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.6.4.tgz#020a9449e5382a4acb684f9c7e1283bc5695de66" + integrity sha512-Qp/9IHkdNiXJ3/Kon++At2nVpnhRiPq/aSvQN+H3U1WZbvNRK0RIQK/o4HMqPoXjpuGJUEWpHSs6Mnjxqh3TQg== + dependencies: + lru-cache "^9.0.0" + minipass "^5.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"