cleanup(angular): migrate to picomatch (#30081)
This commit is contained in:
parent
013da9ea1c
commit
8575fa1495
@ -262,6 +262,7 @@
|
||||
"parse-markdown-links": "^1.0.4",
|
||||
"parse5": "4.0.0",
|
||||
"picocolors": "^1.1.0",
|
||||
"picomatch": "4.0.2",
|
||||
"piscina": "^4.4.0",
|
||||
"postcss": "8.4.38",
|
||||
"postcss-import": "~14.1.0",
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"@typescript-eslint/",
|
||||
"picocolors",
|
||||
"ignore",
|
||||
"minimatch",
|
||||
"picomatch",
|
||||
"rxjs-for-await",
|
||||
"webpack-merge",
|
||||
"ts-node",
|
||||
|
||||
@ -52,8 +52,8 @@
|
||||
"@typescript-eslint/type-utils": "^8.0.0",
|
||||
"enquirer": "~2.3.6",
|
||||
"picocolors": "^1.1.0",
|
||||
"picomatch": "4.0.2",
|
||||
"magic-string": "~0.30.2",
|
||||
"minimatch": "9.0.3",
|
||||
"semver": "^7.5.3",
|
||||
"tslib": "^2.3.0",
|
||||
"webpack-merge": "^5.8.0",
|
||||
|
||||
@ -17,7 +17,7 @@ import {
|
||||
import { getProjectEntryPoints } from '../utils/storybook-ast/entry-point';
|
||||
import { getModuleFilePaths } from '../utils/storybook-ast/module-info';
|
||||
import type { StoriesGeneratorOptions } from './schema';
|
||||
import { minimatch } from 'minimatch';
|
||||
import picomatch = require('picomatch');
|
||||
import { nxVersion } from '../../utils/versions';
|
||||
|
||||
export async function angularStoriesGenerator(
|
||||
@ -37,13 +37,12 @@ export async function angularStoriesGenerator(
|
||||
const componentInfos = componentsInfo.filter(
|
||||
(f) =>
|
||||
!options.ignorePaths?.some((pattern) => {
|
||||
const shouldIgnorePath = minimatch(
|
||||
const shouldIgnorePath = picomatch(pattern)(
|
||||
joinPathFragments(
|
||||
f.moduleFolderPath,
|
||||
f.path,
|
||||
`${f.componentFileName}.ts`
|
||||
),
|
||||
pattern
|
||||
)
|
||||
);
|
||||
return shouldIgnorePath;
|
||||
})
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import { type Tree, formatFiles, visitNotIgnoredFiles } from '@nx/devkit';
|
||||
import { forEachExecutorOptions } from '@nx/devkit/src/generators/executor-options-utils';
|
||||
import { minimatch } from 'minimatch';
|
||||
import picomatch = require('picomatch');
|
||||
import { tsquery } from '@phenomnomnominal/tsquery';
|
||||
|
||||
export default async function (tree: Tree) {
|
||||
visitNotIgnoredFiles(tree, '', (path) => {
|
||||
const webpackConfigGlob = '**/webpack*.config*.{js,ts,mjs,cjs}';
|
||||
const result = minimatch(path, webpackConfigGlob);
|
||||
const result = picomatch(webpackConfigGlob)(path);
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -871,6 +871,9 @@ importers:
|
||||
picocolors:
|
||||
specifier: ^1.1.0
|
||||
version: 1.1.0
|
||||
picomatch:
|
||||
specifier: 4.0.2
|
||||
version: 4.0.2
|
||||
piscina:
|
||||
specifier: ^4.4.0
|
||||
version: 4.7.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user