Skip to content

Commit 4ff6738

Browse files
authored
chore: updating minimatch (#19434)
- Adding a devDependency on minimatch in the root, so that all outdated versions get pushed into duplicates. - Updated `minimatch` direct dependency packages/node, packages/react-router, and packages/remix - Once getsentry/sentry-javascript-bundler-plugins#885 lands, we can update the dependency coming in from `@sentry/bundler-plugin-core` There are several other dependencies that transitively bring in a minimatch v3, v5, v8, or v9. Fixes for the ReDOS will be backported where those dependencies cannot be easily updated. Before submitting a pull request, please take a look at our [Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md) guidelines and verify: - [ ] If you've added code that should be tested, please add tests. - [ ] Ensure your code lints and the test suite passes (`yarn lint`) & (`yarn test`). - [ ] Link an issue if there is one related to your pull request. If no issue is linked, one will be auto-generated and linked. Closes #issue_link_here
1 parent ab883e7 commit 4ff6738

File tree

11 files changed

+86
-110
lines changed

11 files changed

+86
-110
lines changed

dev-packages/browser-integration-tests/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@
6969
"webpack": "^5.95.0"
7070
},
7171
"devDependencies": {
72-
"@types/glob": "8.0.0",
7372
"@types/node": "^18.19.1",
7473
"eslint-plugin-regexp": "^1.15.0",
75-
"glob": "8.0.3"
74+
"glob": "^13.0.6"
7675
},
7776
"volta": {
7877
"extends": "../../package.json"

dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as childProcess from 'child_process';
22
import * as fs from 'fs';
33
import * as path from 'path';
4-
import * as glob from 'glob';
4+
import { globSync } from 'glob';
55

66
/**
77
* Assume that each test runs for 3s.
@@ -112,7 +112,7 @@ function getPerTestRunCount(testPaths: string[]) {
112112
}
113113

114114
function getTestPaths(): string[] {
115-
const paths = glob.sync('suites/**/test.{ts,js}', {
115+
const paths = globSync('suites/**/test.{ts,js}', {
116116
cwd: path.join(__dirname, '../'),
117117
});
118118

dev-packages/e2e-tests/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
"clean:pnpm": "pnpm store prune"
2222
},
2323
"devDependencies": {
24-
"@types/glob": "8.0.0",
2524
"@types/node": "^18.19.1",
2625
"dotenv": "16.0.3",
2726
"esbuild": "0.20.0",
2827
"eslint-plugin-regexp": "^1.15.0",
29-
"glob": "8.0.3",
30-
"rimraf": "^5.0.10",
28+
"glob": "^13.0.6",
29+
"rimraf": "^6.1.3",
3130
"ts-node": "10.9.2",
3231
"yaml": "2.8.2"
3332
},

dev-packages/e2e-tests/publish-packages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as childProcess from 'child_process';
22
import { readFileSync } from 'fs';
3-
import * as glob from 'glob';
3+
import { globSync } from 'glob';
44
import * as path from 'path';
55

66
const repositoryRoot = path.resolve(__dirname, '../..');
@@ -10,7 +10,7 @@ const version = (JSON.parse(readFileSync(path.join(__dirname, './package.json'),
1010

1111
// Get absolute paths of all the packages we want to publish to the fake registry
1212
// Only include the current versions, to avoid getting old tarballs published as well
13-
const packageTarballPaths = glob.sync(`packages/*/sentry-*-${version}.tgz`, {
13+
const packageTarballPaths = globSync(`packages/*/sentry-*-${version}.tgz`, {
1414
cwd: repositoryRoot,
1515
absolute: true,
1616
});

dev-packages/e2e-tests/validate-test-app-setups.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable no-console */
22
import * as fs from 'fs';
3-
import * as glob from 'glob';
3+
import { globSync } from 'glob';
44
import * as path from 'path';
55

6-
const testRecipePaths = glob.sync('test-applications/*/test-recipe.json', {
6+
const testRecipePaths = globSync('test-applications/*/test-recipe.json', {
77
cwd: __dirname,
88
absolute: true,
99
});

dev-packages/e2e-tests/validate-verdaccio-configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as assert from 'assert';
22
import * as fs from 'fs';
3-
import * as glob from 'glob';
3+
import { globSync } from 'glob';
44
import * as path from 'path';
55
import * as YAML from 'yaml';
66

@@ -19,7 +19,7 @@ const sentryScopedPackagesInVerdaccioConfig = Object.keys(verdaccioConfig.packag
1919
packageName.startsWith('@sentry/'),
2020
);
2121

22-
const packageJsonPaths = glob.sync('packages/*/package.json', {
22+
const packageJsonPaths = globSync('packages/*/package.json', {
2323
cwd: repositoryRoot,
2424
absolute: true,
2525
});

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@
149149
"we need to resolve them to the CommonJS versions."
150150
],
151151
"resolutions": {
152+
"**/nx/minimatch": "10.2.4",
153+
"**/ng-packagr/postcss-url/minimatch": "3.1.5",
154+
"**/@angular-devkit/build-angular/minimatch": "5.1.9",
152155
"gauge/strip-ansi": "6.0.1",
153156
"wide-align/string-width": "4.2.3",
154157
"cliui/wrap-ansi": "7.0.0",

packages/react-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@sentry/node": "10.40.0",
5656
"@sentry/react": "10.40.0",
5757
"@sentry/vite-plugin": "^5.1.0",
58-
"glob": "^13.0.1"
58+
"glob": "^13.0.6"
5959
},
6060
"devDependencies": {
6161
"@react-router/dev": "^7.13.0",

packages/remix/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@sentry/core": "10.40.0",
7373
"@sentry/node": "10.40.0",
7474
"@sentry/react": "10.40.0",
75-
"glob": "^10.3.4",
75+
"glob": "^13.0.6",
7676
"yargs": "^17.6.0"
7777
},
7878
"devDependencies": {

packages/remix/scripts/deleteSourcemaps.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
const fs = require('fs');
33
const path = require('path');
44

5-
const glob = require('glob');
5+
const { globSync } = require('glob');
66

77
function deleteSourcemaps(buildPath) {
88
console.info(`[sentry] Deleting sourcemaps from ${buildPath}`);
99

1010
// Delete all .map files in the build folder and its subfolders
11-
const mapFiles = glob.sync('**/*.map', { cwd: buildPath });
11+
const mapFiles = globSync('**/*.map', { cwd: buildPath });
1212

1313
mapFiles.forEach(file => {
1414
fs.unlinkSync(path.join(buildPath, file));

0 commit comments

Comments
 (0)