Browse Source

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>
pull/41765/head
dependabot[bot] 2 years ago
committed by GitHub
parent
commit
5b23a6aac2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      components/__tests__/node.test.tsx
  2. 2
      package.json
  3. 4
      scripts/batch/convert-demo.js
  4. 4
      scripts/check-demo.js
  5. 4
      scripts/check-ts-demo.js
  6. 4
      scripts/generate-cssinjs.js
  7. 4
      tests/shared/demoTest.tsx
  8. 4
      tests/shared/imageTest.tsx

6
components/__tests__/node.test.tsx

@ -1,4 +1,4 @@
import glob from 'glob';
import { globSync } from 'glob';
import * as React from 'react';
import { renderToString } from 'react-dom/server';
import type { Options } from '../../tests/shared/demoTest';
@ -21,14 +21,14 @@ describe('node', () => {
});
// 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) => {
const componentName = componentTestFile.match(/components\/([^/]*)\//)![1];
// Test for ssr
describe(componentName, () => {
const demoList = glob.globSync(`./components/${componentName}/demo/*.tsx`);
const demoList = globSync(`./components/${componentName}/demo/*.tsx`);
// Use mock to get config
require(`../../${componentTestFile}`); // eslint-disable-line global-require, import/no-dynamic-require

2
package.json

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

4
scripts/batch/convert-demo.js

@ -6,14 +6,14 @@
// ==============================================================================
const path = require('path');
const glob = require('glob');
const { globSync } = require('glob');
const fs = require('fs-extra');
const chalk = require('chalk');
(async () => {
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');
await fs.remove(tmpFolder);

4
scripts/check-demo.js

@ -1,9 +1,9 @@
const path = require('path');
const yfm = require('yaml-front-matter');
const glob = require('glob');
const { globSync } = require('glob');
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
for (const url of demoFiles) {
const demoContent = fs.readFileSync(url);

4
scripts/check-ts-demo.js

@ -1,7 +1,7 @@
/* eslint-disable no-await-in-loop, no-console */
const path = require('path');
const glob = require('glob');
const { globSync } = require('glob');
const fs = require('fs-extra');
const chalk = require('chalk');
const { spawn } = require('child_process');
@ -9,7 +9,7 @@ const { spawn } = require('child_process');
(async () => {
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');
await fs.remove(tmpFolder);

4
scripts/generate-cssinjs.js

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

4
tests/shared/demoTest.tsx

@ -1,6 +1,6 @@
/* eslint-disable react/jsx-no-constructed-context-values */
import { createCache, StyleProvider } from '@ant-design/cssinjs';
import glob from 'glob';
import { globSync } from 'glob';
import path from 'path';
import * as React from 'react';
import { renderToString } from 'react-dom/server';
@ -20,7 +20,7 @@ export type 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) => {
// to compatible windows path
file = file.split(path.sep).join('/');

4
tests/shared/imageTest.tsx

@ -3,7 +3,7 @@ import React from 'react';
// eslint-disable-next-line import/no-unresolved
import { createCache, extractStyle, StyleProvider } from '@ant-design/cssinjs';
import dayjs from 'dayjs';
import glob from 'glob';
import { globSync } from 'glob';
import { configureToMatchImageSnapshot } from 'jest-image-snapshot';
import MockDate from 'mockdate';
import ReactDOMServer from 'react-dom/server';
@ -78,7 +78,7 @@ type Options = {
// eslint-disable-next-line jest/no-export
export function imageDemoTest(component: string, options: Options = {}) {
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) => {
if (Array.isArray(options.skip) && options.skip.some((c) => file.includes(c))) {

Loading…
Cancel
Save