Skip to content

Commit 6a8aca4

Browse files
committed
chore: replace glob.sync with globSync
Cursor is convince that glob.sync went away. No harm in making it happy.
1 parent 2525f6c commit 6a8aca4

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

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/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
});

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)