Skip to content

Commit

Permalink
Bump glob from 8.1.0 to 10.0.0 (#12649)
Browse files Browse the repository at this point in the history
* 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](isaacs/node-glob@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] <[email protected]>

* fix glob v10 use

* fix unit test

* retain the sorted order of render tests

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vladimir Agafonkin <[email protected]>
  • Loading branch information
dependabot[bot] and mourner authored Apr 11, 2023
1 parent 0a19981 commit e82dae3
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions test/integration/lib/generate-fixture-json.js
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand All @@ -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}`);
}
Expand Down
5 changes: 3 additions & 2 deletions test/integration/lib/harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions test/unit/style-spec/migrate.test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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));
Expand Down
7 changes: 3 additions & 4 deletions test/unit/style-spec/validate.test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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);
Expand All @@ -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();
Expand Down
7 changes: 3 additions & 4 deletions test/unit/style-spec/validate_mapbox_api_supported.test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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);
Expand All @@ -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();
Expand Down
35 changes: 35 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

[email protected]:
version "4.1.0"
resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

[email protected]:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
Expand Down

0 comments on commit e82dae3

Please sign in to comment.