cleanup(misc): migrate to picomatch (#30485)

This commit is contained in:
James Garbutt 2025-05-01 08:07:06 +01:00 committed by GitHub
parent 1ab8bdbe98
commit da8baa95da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View File

@ -10,6 +10,10 @@
{
"name": "chalk",
"message": "Please use `picocolors` in place of `chalk` for rendering terminal colors"
},
{
"name": "minimatch",
"message": "Please use `picomatch` instead."
}
]
}

View File

@ -38,8 +38,8 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^12.1.0",
"autoprefixer": "^10.4.9",
"minimatch": "9.0.3",
"picocolors": "^1.1.0",
"picomatch": "4.0.2",
"postcss": "^8.4.38",
"rollup": "^4.14.0",
"rollup-plugin-copy": "^3.5.0",

View File

@ -5,7 +5,7 @@ import {
type ProjectConfiguration,
type Tree,
} from '@nx/devkit';
import { minimatch } from 'minimatch';
import picomatch = require('picomatch');
export async function addPluginRegistrations<T>(
tree: Tree,
@ -38,7 +38,7 @@ export async function addPluginRegistrations<T>(
} else if (existingPlugin.include) {
if (
!existingPlugin.include.some((include) =>
minimatch(projectIncludeGlob, include, { dot: true })
picomatch(include)(projectIncludeGlob)
)
) {
existingPlugin.include.push(projectIncludeGlob);