chore(deps-dev): bump glob from 9.3.5 to 10.0.0 (#41737)

* chore(deps-dev): bump glob from 9.3.5 to 10.0.0

Bumps [glob](https://github.com/isaacs/node-glob) from 9.3.5 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/v9.3.5...v10.0.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: upgrade glob usage

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
dependabot[bot] 2023-04-12 11:40:09 +08:00 committed by GitHub
parent a496ecdb5d
commit 5b23a6aac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
import glob from 'glob'; import { globSync } from 'glob';
import * as React from 'react'; import * as React from 'react';
import { renderToString } from 'react-dom/server'; import { renderToString } from 'react-dom/server';
import type { Options } from '../../tests/shared/demoTest'; import type { Options } from '../../tests/shared/demoTest';
@ -21,14 +21,14 @@ describe('node', () => {
}); });
// Find the component exist demo test file // Find the component exist demo test file
const files = glob.globSync(`./components/*/__tests__/demo.test.@(j|t)s?(x)`); const files = globSync(`./components/*/__tests__/demo.test.@(j|t)s?(x)`);
files.forEach((componentTestFile) => { files.forEach((componentTestFile) => {
const componentName = componentTestFile.match(/components\/([^/]*)\//)![1]; const componentName = componentTestFile.match(/components\/([^/]*)\//)![1];
// Test for ssr // Test for ssr
describe(componentName, () => { describe(componentName, () => {
const demoList = glob.globSync(`./components/${componentName}/demo/*.tsx`); const demoList = globSync(`./components/${componentName}/demo/*.tsx`);
// Use mock to get config // Use mock to get config
require(`../../${componentTestFile}`); // eslint-disable-line global-require, import/no-dynamic-require require(`../../${componentTestFile}`); // eslint-disable-line global-require, import/no-dynamic-require

View File

@ -222,7 +222,7 @@
"fetch-jsonp": "^1.1.3", "fetch-jsonp": "^1.1.3",
"fs-extra": "^11.0.0", "fs-extra": "^11.0.0",
"gh-pages": "^5.0.0", "gh-pages": "^5.0.0",
"glob": "^9.2.1", "glob": "^10.0.0",
"html2sketch": "^1.0.0", "html2sketch": "^1.0.0",
"http-server": "^14.0.0", "http-server": "^14.0.0",
"husky": "^8.0.1", "husky": "^8.0.1",

View File

@ -6,14 +6,14 @@
// ============================================================================== // ==============================================================================
const path = require('path'); const path = require('path');
const glob = require('glob'); const { globSync } = require('glob');
const fs = require('fs-extra'); const fs = require('fs-extra');
const chalk = require('chalk'); const chalk = require('chalk');
(async () => { (async () => {
console.time('Execution...'); console.time('Execution...');
const demoFiles = glob.globSync(path.join(process.cwd(), 'components/*/demo/*.md')); const demoFiles = globSync(path.join(process.cwd(), 'components/*/demo/*.md'));
const tmpFolder = path.resolve('components', '~tmp'); const tmpFolder = path.resolve('components', '~tmp');
await fs.remove(tmpFolder); await fs.remove(tmpFolder);

View File

@ -1,9 +1,9 @@
const path = require('path'); const path = require('path');
const yfm = require('yaml-front-matter'); const yfm = require('yaml-front-matter');
const glob = require('glob'); const { globSync } = require('glob');
const fs = require('fs'); const fs = require('fs');
const demoFiles = glob.globSync(path.join(process.cwd(), 'components/**/demo/*.md')); const demoFiles = globSync(path.join(process.cwd(), 'components/**/demo/*.md'));
// eslint-disable-next-line no-restricted-syntax // eslint-disable-next-line no-restricted-syntax
for (const url of demoFiles) { for (const url of demoFiles) {
const demoContent = fs.readFileSync(url); const demoContent = fs.readFileSync(url);

View File

@ -1,7 +1,7 @@
/* eslint-disable no-await-in-loop, no-console */ /* eslint-disable no-await-in-loop, no-console */
const path = require('path'); const path = require('path');
const glob = require('glob'); const { globSync } = require('glob');
const fs = require('fs-extra'); const fs = require('fs-extra');
const chalk = require('chalk'); const chalk = require('chalk');
const { spawn } = require('child_process'); const { spawn } = require('child_process');
@ -9,7 +9,7 @@ const { spawn } = require('child_process');
(async () => { (async () => {
console.time('Execution...'); console.time('Execution...');
const demoFiles = glob.globSync(path.join(process.cwd(), 'components/**/demo/*.md')); const demoFiles = globSync(path.join(process.cwd(), 'components/**/demo/*.md'));
const tmpFolder = path.resolve('components', '~tmp'); const tmpFolder = path.resolve('components', '~tmp');
await fs.remove(tmpFolder); await fs.remove(tmpFolder);

View File

@ -1,8 +1,8 @@
const React = require('react'); const React = require('react');
const glob = require('glob'); const { globSync } = require('glob');
const path = require('path'); const path = require('path');
const styleFiles = glob.globSync( const styleFiles = globSync(
path.join( path.join(
process.cwd(), process.cwd(),
'components/!(version|config-provider|icon|auto-complete|col|row|time-picker)/style/index.?(ts|tsx)', 'components/!(version|config-provider|icon|auto-complete|col|row|time-picker)/style/index.?(ts|tsx)',

View File

@ -1,6 +1,6 @@
/* eslint-disable react/jsx-no-constructed-context-values */ /* eslint-disable react/jsx-no-constructed-context-values */
import { createCache, StyleProvider } from '@ant-design/cssinjs'; import { createCache, StyleProvider } from '@ant-design/cssinjs';
import glob from 'glob'; import { globSync } from 'glob';
import path from 'path'; import path from 'path';
import * as React from 'react'; import * as React from 'react';
import { renderToString } from 'react-dom/server'; import { renderToString } from 'react-dom/server';
@ -20,7 +20,7 @@ export type Options = {
}; };
function baseText(doInject: boolean, component: string, options: Options = {}) { function baseText(doInject: boolean, component: string, options: Options = {}) {
const files = glob.globSync(`./components/${component}/demo/*.tsx`); const files = globSync(`./components/${component}/demo/*.tsx`);
files.forEach((file) => { files.forEach((file) => {
// to compatible windows path // to compatible windows path
file = file.split(path.sep).join('/'); file = file.split(path.sep).join('/');

View File

@ -3,7 +3,7 @@ import React from 'react';
// eslint-disable-next-line import/no-unresolved // eslint-disable-next-line import/no-unresolved
import { createCache, extractStyle, StyleProvider } from '@ant-design/cssinjs'; import { createCache, extractStyle, StyleProvider } from '@ant-design/cssinjs';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import glob from 'glob'; import { globSync } from 'glob';
import { configureToMatchImageSnapshot } from 'jest-image-snapshot'; import { configureToMatchImageSnapshot } from 'jest-image-snapshot';
import MockDate from 'mockdate'; import MockDate from 'mockdate';
import ReactDOMServer from 'react-dom/server'; import ReactDOMServer from 'react-dom/server';
@ -78,7 +78,7 @@ type Options = {
// eslint-disable-next-line jest/no-export // eslint-disable-next-line jest/no-export
export function imageDemoTest(component: string, options: Options = {}) { export function imageDemoTest(component: string, options: Options = {}) {
let describeMethod = options.skip === true ? describe.skip : describe; let describeMethod = options.skip === true ? describe.skip : describe;
const files = glob.globSync(`./components/${component}/demo/*.tsx`); const files = globSync(`./components/${component}/demo/*.tsx`);
files.forEach((file) => { files.forEach((file) => {
if (Array.isArray(options.skip) && options.skip.some((c) => file.includes(c))) { if (Array.isArray(options.skip) && options.skip.some((c) => file.includes(c))) {