Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update glob to v10.0.0 #22171

Merged
merged 4 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions code/addons/storyshots-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@
"@storybook/global": "^5.0.0",
"@storybook/preview-api": "7.1.0-alpha.10",
"@storybook/types": "7.1.0-alpha.10",
"@types/glob": "^7.1.3",
"@types/jest-specific-snapshot": "^0.5.6",
"glob": "^8.1.0",
"glob": "^10.0.0",
"jest-specific-snapshot": "^7.0.0",
"preact-render-to-string": "^5.1.19",
"pretty-format": "^29.0.0",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/storyshots-core/src/api/StoryshotsOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IOptions } from 'glob';
import type { GlobOptionsWithFileTypesFalse } from 'glob';
import type { Stories2SnapsConverter } from '../Stories2SnapsConverter';
import type { SupportedFramework } from '../frameworks';
import type { RenderTree } from '../frameworks/Loader';
Expand All @@ -25,7 +25,7 @@ export interface StoryshotsTestMethod {
export interface StoryshotsOptions {
asyncJest?: boolean;
config?: (options: any) => void;
integrityOptions?: IOptions | false;
integrityOptions?: GlobOptionsWithFileTypesFalse | false;
configPath?: string;
suite?: string;
storyKindRegex?: RegExp | string;
Expand Down
4 changes: 2 additions & 2 deletions code/addons/storyshots-core/src/api/integrityTestTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable jest/no-export */
import fs from 'fs';
import glob from 'glob';
import { globSync } from 'glob';
import { global } from '@storybook/global';
import { dedent } from 'ts-dedent';

Expand Down Expand Up @@ -50,7 +50,7 @@ function integrityTest(integrityOptions: any, stories2snapsConverter: any) {
describe('Storyshots Integrity', () => {
it('Abandoned Storyshots', () => {
const snapshotExtension = stories2snapsConverter.getSnapshotExtension();
const storyshots = glob.sync(`**/*${snapshotExtension}`, integrityOptions);
const storyshots = globSync(`**/*${snapshotExtension}`, integrityOptions);

// @ts-expect-error (ts doesn't 'get' the extension happening on line 9)
expect(storyshots).notToBeAbandoned(stories2snapsConverter);
Expand Down
3 changes: 1 addition & 2 deletions code/lib/builder-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
"es-module-lexer": "^0.9.3",
"express": "^4.17.3",
"fs-extra": "^11.1.0",
"glob": "^8.1.0",
"glob-promise": "^6.0.2",
"glob": "^10.0.0",
"magic-string": "^0.27.0",
"remark-external-links": "^8.0.0",
"remark-slug": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/builder-vite/src/list-stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from 'path';
import slash from 'slash';
import { promise as glob } from 'glob-promise';
import { glob } from 'glob';
import { normalizeStories } from '@storybook/core-common';

import type { Options } from '@storybook/types';
Expand Down
3 changes: 1 addition & 2 deletions code/lib/core-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"file-system-cache": "^2.0.0",
"find-up": "^5.0.0",
"fs-extra": "^11.1.0",
"glob": "^8.1.0",
"glob-promise": "^6.0.2",
"glob": "^10.0.0",
"handlebars": "^4.7.7",
"lazy-universal-dotenv": "^4.0.0",
"picomatch": "^2.3.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { dedent } from 'ts-dedent';
import { promise as glob } from 'glob-promise';
import { glob } from 'glob';
import path from 'path';
import slash from 'slash';
import { once } from '@storybook/node-logger';
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"eslint-plugin-storybook": "^0.6.6",
"fs-extra": "^11.1.0",
"github-release-from-changelog": "^2.1.1",
"glob": "^8.1.0",
"glob": "^10.0.0",
"http-server": "^0.12.3",
"husky": "^4.3.7",
"jest": "^29.3.1",
Expand Down
114 changes: 93 additions & 21 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4713,6 +4713,13 @@ __metadata:
languageName: node
linkType: hard

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

"@pkgr/utils@npm:^2.3.1":
version: 2.3.1
resolution: "@pkgr/utils@npm:2.3.1"
Expand Down Expand Up @@ -5348,13 +5355,12 @@ __metadata:
"@storybook/types": 7.1.0-alpha.10
"@storybook/vue": 7.1.0-alpha.10
"@storybook/vue3": 7.1.0-alpha.10
"@types/glob": ^7.1.3
"@types/jest-specific-snapshot": ^0.5.6
babel-loader: ^9.1.2
enzyme: ^3.11.0
enzyme-adapter-react-16: ^1.15.5
enzyme-to-json: ^3.6.1
glob: ^8.1.0
glob: ^10.0.0
jest-preset-angular: ^12.2.3
jest-specific-snapshot: ^7.0.0
jest-vue-preprocessor: ^1.7.1
Expand Down Expand Up @@ -5709,8 +5715,7 @@ __metadata:
es-module-lexer: ^0.9.3
express: ^4.17.3
fs-extra: ^11.1.0
glob: ^8.1.0
glob-promise: ^6.0.2
glob: ^10.0.0
magic-string: ^0.27.0
remark-external-links: ^8.0.0
remark-slug: ^6.0.0
Expand Down Expand Up @@ -6025,8 +6030,7 @@ __metadata:
file-system-cache: ^2.0.0
find-up: ^5.0.0
fs-extra: ^11.1.0
glob: ^8.1.0
glob-promise: ^6.0.2
glob: ^10.0.0
handlebars: ^4.7.7
lazy-universal-dotenv: ^4.0.0
mock-fs: ^5.2.0
Expand Down Expand Up @@ -7110,7 +7114,7 @@ __metadata:
eslint-plugin-storybook: ^0.6.6
fs-extra: ^11.1.0
github-release-from-changelog: ^2.1.1
glob: ^8.1.0
glob: ^10.0.0
http-server: ^0.12.3
husky: ^4.3.7
jest: ^29.3.1
Expand Down Expand Up @@ -8163,7 +8167,7 @@ __metadata:
languageName: node
linkType: hard

"@types/glob@npm:*, @types/glob@npm:^8.0.0":
"@types/glob@npm:*":
version: 8.1.0
resolution: "@types/glob@npm:8.1.0"
dependencies:
Expand Down Expand Up @@ -12010,7 +12014,7 @@ __metadata:
languageName: node
linkType: hard

"cliui@npm:^7.0.2":
"cliui@npm:^7.0.2, cliui@npm:^7.0.4":
version: 7.0.4
resolution: "cliui@npm:7.0.4"
dependencies:
Expand Down Expand Up @@ -15736,6 +15740,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: 9700a0285628abaeb37007c9a4d92bd49f67210f09067638774338e146c8e9c825c5c877f072b2f75f41dc6a2d0be8664f79ffc03f6576649f54a84fb9b47de0
languageName: node
linkType: hard

"fork-ts-checker-webpack-plugin@npm:^7.2.8":
version: 7.3.0
resolution: "fork-ts-checker-webpack-plugin@npm:7.3.0"
Expand Down Expand Up @@ -16447,17 +16461,6 @@ __metadata:
languageName: node
linkType: hard

"glob-promise@npm:^6.0.2":
version: 6.0.2
resolution: "glob-promise@npm:6.0.2"
dependencies:
"@types/glob": ^8.0.0
peerDependencies:
glob: ^8.0.3
checksum: fa08c8beb32b87d9313d7f24d17b2eebeed6e77fcfe0e4b743f94e9621663292cf5e665f671502dcf925683aea1086d3a756032bef08c87d7dc05014aef71c5a
languageName: node
linkType: hard

"glob-to-regexp@npm:^0.4.1":
version: 0.4.1
resolution: "glob-to-regexp@npm:0.4.1"
Expand All @@ -16479,7 +16482,7 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:8.1.0, glob@npm:^8.0.1, glob@npm:^8.1.0":
"glob@npm:8.1.0, glob@npm:^8.0.1":
version: 8.1.0
resolution: "glob@npm:8.1.0"
dependencies:
Expand All @@ -16492,6 +16495,22 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^10.0.0":
version: 10.2.1
resolution: "glob@npm:10.2.1"
dependencies:
foreground-child: ^3.1.0
fs.realpath: ^1.0.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: a640527535f46e71e407384cc580c42d1443c1ba1180befbb21406cdf6613718f655f39af129ab54d805a1f4787a61b459a2e1f3cd60f0a9c79563c936decba0
languageName: node
linkType: hard

"glob@npm:^5.0.10":
version: 5.0.15
resolution: "glob@npm:5.0.15"
Expand Down Expand Up @@ -18521,6 +18540,19 @@ __metadata:
languageName: node
linkType: hard

"jackspeak@npm:^2.0.3":
version: 2.0.3
resolution: "jackspeak@npm:2.0.3"
dependencies:
"@pkgjs/parseargs": ^0.11.0
cliui: ^7.0.4
dependenciesMeta:
"@pkgjs/parseargs":
optional: true
checksum: 50bbf3fc03632cd4127e94209deb7adfb6569e786b23c24143022c3e4e851352bd63a7645106561eb44469961bf5d6b4252e373c33cbaf3c08ac0e2fe035a9a1
languageName: node
linkType: hard

"jake@npm:^10.8.5":
version: 10.8.5
resolution: "jake@npm:10.8.5"
Expand Down Expand Up @@ -20628,6 +20660,13 @@ __metadata:
languageName: node
linkType: hard

"lru-cache@npm:^9.0.0":
version: 9.1.0
resolution: "lru-cache@npm:9.1.0"
checksum: 88b71fde4e40182a81c0f51b3609551547d48f937daa6462595750f28c722684956aa65698cc4c52433ed66a4256289381118e58d340fb4a1c7b6f0c0ddd1d68
languageName: node
linkType: hard

"lz-string@npm:^1.4.4":
version: 1.5.0
resolution: "lz-string@npm:1.5.0"
Expand Down Expand Up @@ -21853,6 +21892,15 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^9.0.0":
version: 9.0.0
resolution: "minimatch@npm:9.0.0"
dependencies:
brace-expansion: ^2.0.1
checksum: d966656c280a994f89c3711e8cdac0c78d8703d028a26722d0229e3e92bf515a065165caa64cbccdd7ca89bb0338a3094920f8d42d36295c4d55922e19ae366e
languageName: node
linkType: hard

"minimist-options@npm:4.1.0":
version: 4.1.0
resolution: "minimist-options@npm:4.1.0"
Expand Down Expand Up @@ -21978,6 +22026,13 @@ __metadata:
languageName: node
linkType: hard

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

"minizlib@npm:^2.0.0, minizlib@npm:^2.1.1, minizlib@npm:^2.1.2":
version: 2.1.2
resolution: "minizlib@npm:2.1.2"
Expand Down Expand Up @@ -23826,6 +23881,16 @@ __metadata:
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: a8d1fd105b5b1bb0b86c73e3e1433d8227b8075c4868453529611ed8b0ba768d1195c54690c1de125277c4e8f09c7459b0e98f99fbd357c9b34dd566cbe6b55b
languageName: node
linkType: hard

"path-to-regexp@npm:0.1.7":
version: 0.1.7
resolution: "path-to-regexp@npm:0.1.7"
Expand Down Expand Up @@ -26951,6 +27016,13 @@ __metadata:
languageName: node
linkType: hard

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

"sigstore@npm:^1.0.0":
version: 1.2.0
resolution: "sigstore@npm:1.2.0"
Expand Down
4 changes: 2 additions & 2 deletions scripts/combine-compodoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

import { join, resolve } from 'path';
import { realpath, readFile, writeFile, lstat } from 'fs-extra';
import glob from 'glob';
import { globSync } from 'glob';
import { directory } from 'tempy';
import { execaCommand } from './utils/exec';

const logger = console;

// Find all symlinks in a directory. There may be more efficient ways to do this, but this works.
async function findSymlinks(dir: string) {
const potentialDirs = await glob.sync(`${dir}/**/*/`);
const potentialDirs = await globSync(`${dir}/**/*/`);

return (
await Promise.all(
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"find-up": "^5.0.0",
"fs-extra": "^10.1.0",
"github-release-from-changelog": "^2.1.1",
"glob": "^8.1.0",
"glob": "^10.0.0",
"http-server": "^0.12.3",
"husky": "^4.3.7",
"jest": "^29.3.1",
Expand Down
4 changes: 2 additions & 2 deletions scripts/prepare/tsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { join } from 'path';
import fs, { move } from 'fs-extra';
import * as ts from 'typescript';
import glob from 'glob';
import { globSync } from 'glob';
import { exec } from '../utils/exec';

const hasFlag = (flags: string[], name: string) => !!flags.find((s) => s.startsWith(`--${name}`));
Expand Down Expand Up @@ -57,7 +57,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
options: { ...compilerOptions, module: ts.ModuleKind.ES2020, declaration: false },
}).emit();

const files = glob.sync(join(process.cwd(), 'dist', '*.js'));
const files = globSync(join(process.cwd(), 'dist', '*.js'));
await Promise.all(files.map((file) => move(file, file.replace('.js', '.mjs'), {})));

ts.createProgram({
Expand Down
Loading