diff --git a/package.json b/package.json index 5fe861b29f..031685bdd3 100644 --- a/package.json +++ b/package.json @@ -225,7 +225,7 @@ "metro-config": "0.76.8", "metro-resolver": "0.76.8", "mini-css-extract-plugin": "~2.4.7", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "next-sitemap": "^3.1.10", "ng-packagr": "~17.0.0", "node-fetch": "^2.6.7", diff --git a/packages/angular/package.json b/packages/angular/package.json index 026152b46a..ff554b341a 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -52,7 +52,7 @@ "find-cache-dir": "^3.3.2", "ignore": "^5.0.4", "magic-string": "~0.30.2", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "semver": "7.5.3", "tslib": "^2.3.0", "webpack": "^5.80.0", diff --git a/packages/angular/src/generators/stories/stories.ts b/packages/angular/src/generators/stories/stories.ts index c8ee6aa932..300ea018d4 100644 --- a/packages/angular/src/generators/stories/stories.ts +++ b/packages/angular/src/generators/stories/stories.ts @@ -20,7 +20,7 @@ import { getProjectEntryPoints } from '../utils/storybook-ast/entry-point'; import { getE2EProject } from './lib/get-e2e-project'; import { getModuleFilePaths } from '../utils/storybook-ast/module-info'; import type { StoriesGeneratorOptions } from './schema'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import { nxVersion } from '../../utils/versions'; export async function angularStoriesGenerator( diff --git a/packages/jest/package.json b/packages/jest/package.json index fcda8fb738..ed042ccb00 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -42,7 +42,7 @@ "jest-config": "^29.4.1", "jest-resolve": "^29.4.1", "jest-util": "^29.4.1", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "resolve.exports": "1.1.0", "tslib": "^2.3.0", "@nx/devkit": "file:../devkit", diff --git a/packages/jest/src/plugins/plugin.ts b/packages/jest/src/plugins/plugin.ts index e7d2c3aae1..0bfe934ac2 100644 --- a/packages/jest/src/plugins/plugin.ts +++ b/packages/jest/src/plugins/plugin.ts @@ -18,7 +18,7 @@ import { projectGraphCacheDirectory } from 'nx/src/utils/cache-directory'; import { calculateHashForCreateNodes } from '@nx/devkit/src/utils/calculate-hash-for-create-nodes'; import { getGlobPatternsFromPackageManagerWorkspaces } from 'nx/plugins/package-json-workspaces'; import { combineGlobPatterns } from 'nx/src/utils/globs'; -import * as minimatch from 'minimatch'; +import { minimatch } from 'minimatch'; export interface JestPluginOptions { targetName?: string; diff --git a/packages/js/package.json b/packages/js/package.json index c3c808193b..254187166a 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -52,7 +52,7 @@ "tsconfig-paths": "^4.1.2", "ignore": "^5.0.4", "js-tokens": "^4.0.0", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "ora": "5.3.0", "semver": "7.5.3", "source-map-support": "0.5.19", diff --git a/packages/js/src/utils/assets/copy-assets-handler.ts b/packages/js/src/utils/assets/copy-assets-handler.ts index b4b1a78e50..f91da35bc0 100644 --- a/packages/js/src/utils/assets/copy-assets-handler.ts +++ b/packages/js/src/utils/assets/copy-assets-handler.ts @@ -1,4 +1,4 @@ -import * as minimatch from 'minimatch'; +import { minimatch } from 'minimatch'; import * as path from 'path'; import * as fse from 'fs-extra'; import ignore from 'ignore'; diff --git a/packages/nx/package.json b/packages/nx/package.json index 7a7d46ea5a..2d55c802df 100644 --- a/packages/nx/package.json +++ b/packages/nx/package.json @@ -52,7 +52,7 @@ "js-yaml": "4.1.0", "jsonc-parser": "3.2.0", "lines-and-columns": "~2.0.3", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "npm-run-path": "^4.0.1", "open": "^8.4.0", "semver": "7.5.3", diff --git a/packages/nx/src/command-line/graph/graph.ts b/packages/nx/src/command-line/graph/graph.ts index 0eae86fc30..8b415d0455 100644 --- a/packages/nx/src/command-line/graph/graph.ts +++ b/packages/nx/src/command-line/graph/graph.ts @@ -2,7 +2,7 @@ import { createHash } from 'crypto'; import { existsSync, readFileSync, statSync, writeFileSync } from 'fs'; import { copySync, ensureDirSync } from 'fs-extra'; import * as http from 'http'; -import * as minimatch from 'minimatch'; +import { minimatch } from 'minimatch'; import { URL } from 'node:url'; import * as open from 'open'; import { diff --git a/packages/nx/src/generators/utils/glob.spec.ts b/packages/nx/src/generators/utils/glob.spec.ts index d44fc42b2c..da947991b3 100644 --- a/packages/nx/src/generators/utils/glob.spec.ts +++ b/packages/nx/src/generators/utils/glob.spec.ts @@ -38,7 +38,7 @@ describe('glob', () => { tree.write('3.txt', '3'); fs.writeFile('4.md', '4'); - const withTree = glob(tree, ['*.txt']).sort(); + const withTree = glob(tree, ['**/*.txt']).sort(); expect(withTree).toMatchInlineSnapshot(` [ diff --git a/packages/nx/src/generators/utils/glob.ts b/packages/nx/src/generators/utils/glob.ts index 3c3f5f366d..a3920fef4b 100644 --- a/packages/nx/src/generators/utils/glob.ts +++ b/packages/nx/src/generators/utils/glob.ts @@ -1,10 +1,8 @@ +import { minimatch } from 'minimatch'; import { Tree } from '../tree'; import { combineGlobPatterns } from '../../utils/globs'; -import { workspaceRoot } from '../../utils/workspace-root'; import { globWithWorkspaceContext } from '../../utils/workspace-context'; -import minimatch = require('minimatch'); - /** * Performs a tree-aware glob search on the files in a workspace. Able to find newly * created files and hides deleted files before the updates are committed to disk. diff --git a/packages/nx/src/generators/utils/project-configuration.ts b/packages/nx/src/generators/utils/project-configuration.ts index 4a1af8e19f..2d8a25f852 100644 --- a/packages/nx/src/generators/utils/project-configuration.ts +++ b/packages/nx/src/generators/utils/project-configuration.ts @@ -1,3 +1,4 @@ +import { minimatch } from 'minimatch'; import { basename, join, relative } from 'path'; import { @@ -24,8 +25,6 @@ import { readNxJson } from './nx-json'; import type { Tree } from '../tree'; -import minimatch = require('minimatch'); - export { readNxJson, updateNxJson } from './nx-json'; /** diff --git a/packages/nx/src/hasher/node-task-hasher-impl.ts b/packages/nx/src/hasher/node-task-hasher-impl.ts index 1327dc2543..9114a3ea7b 100644 --- a/packages/nx/src/hasher/node-task-hasher-impl.ts +++ b/packages/nx/src/hasher/node-task-hasher-impl.ts @@ -10,7 +10,7 @@ import { Task, TaskGraph } from '../config/task-graph'; import { hashArray, hashObject } from './file-hasher'; import { getOutputsForTargetAndConfiguration } from '../tasks-runner/utils'; import { workspaceRoot } from '../utils/workspace-root'; -import * as minimatch from 'minimatch'; +import { minimatch } from 'minimatch'; import { join } from 'path'; import { hashFile } from '../native'; import { findAllProjectNodeDependencies } from '../utils/project-graph-utils'; diff --git a/packages/nx/src/hasher/task-hasher.ts b/packages/nx/src/hasher/task-hasher.ts index fdbb094860..4e9ff22aea 100644 --- a/packages/nx/src/hasher/task-hasher.ts +++ b/packages/nx/src/hasher/task-hasher.ts @@ -10,7 +10,7 @@ import { DaemonClient } from '../daemon/client/client'; import { hashArray } from './file-hasher'; import { NodeTaskHasherImpl } from './node-task-hasher-impl'; import { InputDefinition } from '../config/workspace-json-project-json'; -import * as minimatch from 'minimatch'; +import { minimatch } from 'minimatch'; import { NativeTaskHasherImpl } from './native-task-hasher-impl'; import { workspaceRoot } from '../utils/workspace-root'; import { NxWorkspaceFilesExternals } from '../native'; diff --git a/packages/nx/src/project-graph/affected/locators/project-glob-changes.ts b/packages/nx/src/project-graph/affected/locators/project-glob-changes.ts index 4ec255b206..afd7c4f8d7 100644 --- a/packages/nx/src/project-graph/affected/locators/project-glob-changes.ts +++ b/packages/nx/src/project-graph/affected/locators/project-glob-changes.ts @@ -1,5 +1,5 @@ import { TouchedProjectLocator } from '../affected-project-graph-models'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import { workspaceRoot } from '../../../utils/workspace-root'; import { getNxRequirePaths } from '../../../utils/installation-directory'; import { join } from 'path'; diff --git a/packages/nx/src/project-graph/affected/locators/workspace-projects.ts b/packages/nx/src/project-graph/affected/locators/workspace-projects.ts index 678eb67d06..58169c7475 100644 --- a/packages/nx/src/project-graph/affected/locators/workspace-projects.ts +++ b/packages/nx/src/project-graph/affected/locators/workspace-projects.ts @@ -1,4 +1,4 @@ -import * as minimatch from 'minimatch'; +import { minimatch } from 'minimatch'; import { TouchedProjectLocator } from '../affected-project-graph-models'; import { NxJsonConfiguration } from '../../../config/nx-json'; import { diff --git a/packages/nx/src/project-graph/file-utils.ts b/packages/nx/src/project-graph/file-utils.ts index d1a11da2e6..68c66e134f 100644 --- a/packages/nx/src/project-graph/file-utils.ts +++ b/packages/nx/src/project-graph/file-utils.ts @@ -24,7 +24,7 @@ import { } from './utils/project-configuration-utils'; import { NxJsonConfiguration } from '../config/nx-json'; import { getDefaultPluginsSync } from '../utils/nx-plugin.deprecated'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import { CreateNodesResult } from '../devkit-exports'; import { CreatePackageJsonProjectsNextToProjectJson } from '../plugins/project-json/build-nodes/package-json-next-to-project-json'; import { LoadedNxPlugin } from '../utils/nx-plugin'; diff --git a/packages/nx/src/project-graph/utils/project-configuration-utils.ts b/packages/nx/src/project-graph/utils/project-configuration-utils.ts index de2ad2b0fa..e1c4a78883 100644 --- a/packages/nx/src/project-graph/utils/project-configuration-utils.ts +++ b/packages/nx/src/project-graph/utils/project-configuration-utils.ts @@ -10,7 +10,7 @@ import { CreateNodesResult, LoadedNxPlugin } from '../../utils/nx-plugin'; import { readJsonFile } from '../../utils/fileutils'; import { workspaceRoot } from '../../utils/workspace-root'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import { join } from 'path'; export type SourceInformation = [string, string]; diff --git a/packages/nx/src/utils/find-matching-projects.spec.ts b/packages/nx/src/utils/find-matching-projects.spec.ts index 7c558d024c..99272de67e 100644 --- a/packages/nx/src/utils/find-matching-projects.spec.ts +++ b/packages/nx/src/utils/find-matching-projects.spec.ts @@ -3,7 +3,7 @@ import { getMatchingStringsWithCache, } from './find-matching-projects'; import type { ProjectGraphProjectNode } from '../config/project-graph'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; describe('findMatchingProjects', () => { let projectGraph: Record = { diff --git a/packages/nx/src/utils/find-matching-projects.ts b/packages/nx/src/utils/find-matching-projects.ts index e286b6321e..bdef3dd085 100644 --- a/packages/nx/src/utils/find-matching-projects.ts +++ b/packages/nx/src/utils/find-matching-projects.ts @@ -1,4 +1,4 @@ -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import type { ProjectGraphProjectNode } from '../config/project-graph'; const validPatternTypes = [ diff --git a/packages/playwright/package.json b/packages/playwright/package.json index 46f889b2e2..ceb973fac9 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -36,7 +36,7 @@ "@nx/eslint": "file:../eslint", "@nx/js": "file:../js", "tslib": "^2.3.0", - "minimatch": "3.0.5" + "minimatch": "9.0.3" }, "peerDependencies": { "@playwright/test": "^1.36.0" diff --git a/packages/playwright/src/plugins/plugin.ts b/packages/playwright/src/plugins/plugin.ts index ed33ea4c2a..65bdb94246 100644 --- a/packages/playwright/src/plugins/plugin.ts +++ b/packages/playwright/src/plugins/plugin.ts @@ -16,7 +16,7 @@ import { calculateHashForCreateNodes } from '@nx/devkit/src/utils/calculate-hash import type { PlaywrightTestConfig } from '@playwright/test'; import { getFilesInDirectoryUsingContext } from 'nx/src/utils/workspace-context'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import { loadPlaywrightConfig } from '../utils/load-config-file'; import { projectGraphCacheDirectory } from 'nx/src/utils/cache-directory'; import { getLockFileName } from '@nx/js'; diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 7790f37142..d76482c700 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -32,7 +32,7 @@ "ignore": "^5.0.4", "metro-config": "~0.76.8", "metro-resolver": "~0.76.8", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "node-fetch": "^2.6.7", "tsconfig-paths": "^4.1.2", "tslib": "^2.3.0", diff --git a/packages/react-native/src/generators/stories/stories.ts b/packages/react-native/src/generators/stories/stories.ts index 06874ef57e..ab964ce206 100644 --- a/packages/react-native/src/generators/stories/stories.ts +++ b/packages/react-native/src/generators/stories/stories.ts @@ -12,7 +12,7 @@ import { containsComponentDeclaration, projectRootPath, } from '@nx/react/src/generators/stories/stories'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import { nxVersion } from '../../utils/versions'; export async function createAllStories( diff --git a/packages/react/package.json b/packages/react/package.json index 72e72e444b..3a03649a11 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -35,7 +35,7 @@ "@svgr/webpack": "^8.0.1", "chalk": "^4.1.0", "file-loader": "^6.2.0", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "tslib": "^2.3.0", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", diff --git a/packages/react/src/generators/stories/stories.ts b/packages/react/src/generators/stories/stories.ts index ca31cfd18b..7ea237d33c 100644 --- a/packages/react/src/generators/stories/stories.ts +++ b/packages/react/src/generators/stories/stories.ts @@ -18,7 +18,7 @@ import { visitNotIgnoredFiles, } from '@nx/devkit'; import { basename, join } from 'path'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; import { ensureTypescript } from '@nx/js/src/utils/typescript/ensure-typescript'; import { nxVersion } from '../../utils/versions'; diff --git a/packages/vue/package.json b/packages/vue/package.json index decbec34ef..4e3425fe5f 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -28,7 +28,7 @@ "migrations": "./migrations.json" }, "dependencies": { - "minimatch": "3.0.5", + "minimatch": "9.0.3", "tslib": "^2.3.0", "@nx/devkit": "file:../devkit", "@nx/js": "file:../js", diff --git a/packages/vue/src/generators/stories/stories.ts b/packages/vue/src/generators/stories/stories.ts index 1fd4833447..b650d060a6 100644 --- a/packages/vue/src/generators/stories/stories.ts +++ b/packages/vue/src/generators/stories/stories.ts @@ -13,7 +13,7 @@ import { import { basename, join } from 'path'; import { nxVersion } from '../../utils/versions'; import { createComponentStories } from './lib/component-story'; -import minimatch = require('minimatch'); +import { minimatch } from 'minimatch'; export interface StorybookStoriesSchema { project: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 26c7a1becb..d2907fd2e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -750,8 +750,8 @@ devDependencies: specifier: ~2.4.7 version: 2.4.7(webpack@5.88.0) minimatch: - specifier: 3.0.5 - version: 3.0.5 + specifier: 9.0.3 + version: 9.0.3 next-sitemap: specifier: ^3.1.10 version: 3.1.29(@next/env@14.0.4)(next@13.3.4) @@ -5516,7 +5516,7 @@ packages: dependencies: '@humanwhocodes/object-schema': 1.2.1 debug: 4.3.4(supports-color@5.5.0) - minimatch: 3.0.5 + minimatch: 3.1.2 transitivePeerDependencies: - supports-color dev: true @@ -17738,7 +17738,7 @@ packages: deepmerge: 4.3.1 fs-extra: 10.1.0 memfs: 3.5.0 - minimatch: 3.0.5 + minimatch: 3.1.2 node-abort-controller: 3.0.1 schema-utils: 3.2.0 semver: 7.5.3 @@ -17761,7 +17761,7 @@ packages: deepmerge: 4.3.1 fs-extra: 10.1.0 memfs: 3.5.0 - minimatch: 3.0.5 + minimatch: 3.1.2 node-abort-controller: 3.1.1 schema-utils: 3.2.0 semver: 7.5.3 @@ -18223,7 +18223,7 @@ packages: dependencies: inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.5 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -18244,7 +18244,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.5 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -19748,7 +19748,7 @@ packages: async: 3.2.4 chalk: 4.1.2 filelist: 1.0.4 - minimatch: 3.0.5 + minimatch: 3.1.2 dev: true /jasmine-core@2.99.1: @@ -22580,7 +22580,7 @@ packages: array-differ: 3.0.0 array-union: 2.1.0 arrify: 2.0.1 - minimatch: 3.0.5 + minimatch: 3.1.2 dev: true /mute-stream@0.0.8: @@ -22798,7 +22798,7 @@ packages: resolution: {integrity: sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==} engines: {node: '>= 0.10.5'} dependencies: - minimatch: 3.0.5 + minimatch: 3.1.2 dev: true /node-domexception@1.0.0: @@ -26366,7 +26366,7 @@ packages: engines: {node: '>= 0.8.0'} dependencies: debug: 2.6.9 - minimatch: 3.0.5 + minimatch: 3.1.2 transitivePeerDependencies: - supports-color dev: true @@ -28228,7 +28228,7 @@ packages: dependencies: '@istanbuljs/schema': 0.1.3 glob: 7.1.4 - minimatch: 3.0.5 + minimatch: 3.1.2 dev: true /text-extensions@1.9.0: