Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/jest-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"chalk": "^4.0.0",
"ci-info": "^3.2.0",
"deepmerge": "^4.2.2",
"glob": "^7.1.3",
"glob": "^10.3.4",
"graceful-fs": "^4.2.9",
"jest-circus": "workspace:^",
"jest-environment-node": "workspace:^",
Expand All @@ -53,7 +53,6 @@
"strip-json-comments": "^3.1.1"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/graceful-fs": "^4.1.3",
"@types/micromatch": "^4.0.1",
"@types/parse-json": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/jest-config/src/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {totalmem} from 'os';
import * as path from 'path';
import chalk = require('chalk');
import merge = require('deepmerge');
import {sync as glob} from 'glob';
import {glob} from 'glob';
import {statSync} from 'graceful-fs';
import micromatch = require('micromatch');
import type {Config} from '@jest/types';
Expand Down Expand Up @@ -329,7 +329,7 @@ const normalizeRootDir = (
` Configuration option ${chalk.bold('rootDir')} must be specified.`,
);
}
options.rootDir = path.normalize(options.rootDir);
options.rootDir = path.posix.normalize(options.rootDir);

try {
// try to resolve windows short paths, ignoring errors (permission errors, mostly)
Expand Down Expand Up @@ -757,7 +757,7 @@ export default async function normalize(
// We expand it to these paths. If not, we keep the original path
// for the future resolution.
const globMatches =
typeof project === 'string' ? glob(project) : [];
typeof project === 'string' ? glob.sync(project) : [];
return projects.concat(
globMatches.length ? globMatches : project,
);
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-config/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const replaceRootDirInPath = (

return path.resolve(
rootDir,
path.normalize(`./${filePath.substring('<rootDir>'.length)}`),
path.posix.normalize(`./${filePath.substring('<rootDir>'.length)}`),
);
};

Expand Down
3 changes: 1 addition & 2 deletions packages/jest-reporters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"chalk": "^4.0.0",
"collect-v8-coverage": "^1.0.0",
"exit": "^0.1.2",
"glob": "^7.1.3",
"glob": "^10.3.4",
"graceful-fs": "^4.2.9",
"istanbul-lib-coverage": "^3.0.0",
"istanbul-lib-instrument": "^6.0.0",
Expand All @@ -41,7 +41,6 @@
"@jest/test-utils": "workspace:^",
"@tsd/typescript": "^5.0.4",
"@types/exit": "^0.1.30",
"@types/glob": "^7.1.1",
"@types/graceful-fs": "^4.1.3",
"@types/istanbul-lib-coverage": "^2.0.0",
"@types/istanbul-lib-instrument": "^1.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-reporters/src/CoverageReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as path from 'path';
import {mergeProcessCovs} from '@bcoe/v8-coverage';
import type {EncodedSourceMap} from '@jridgewell/trace-mapping';
import chalk = require('chalk');
import glob = require('glob');
import {glob} from 'glob';
import * as fs from 'graceful-fs';
import istanbulCoverage = require('istanbul-lib-coverage');
import istanbulReport = require('istanbul-lib-report');
Expand Down
3 changes: 1 addition & 2 deletions packages/jest-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"chalk": "^4.0.0",
"cjs-module-lexer": "^1.0.0",
"collect-v8-coverage": "^1.0.0",
"glob": "^7.1.3",
"glob": "^10.3.4",
"graceful-fs": "^4.2.9",
"jest-haste-map": "workspace:^",
"jest-message-util": "workspace:^",
Expand All @@ -42,7 +42,6 @@
},
"devDependencies": {
"@jest/test-utils": "workspace:^",
"@types/glob": "^7.1.1",
"@types/graceful-fs": "^4.1.3",
"jest-environment-node": "workspace:^"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runtime/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import * as path from 'path';
import glob = require('glob');
import {glob} from 'glob';
import slash = require('slash');
import type {Config} from '@jest/types';

Expand Down
28 changes: 4 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,6 @@ __metadata:
"@jridgewell/trace-mapping": ^0.3.18
"@tsd/typescript": ^5.0.4
"@types/exit": ^0.1.30
"@types/glob": ^7.1.1
"@types/graceful-fs": ^4.1.3
"@types/istanbul-lib-coverage": ^2.0.0
"@types/istanbul-lib-instrument": ^1.7.2
Expand All @@ -3029,7 +3028,7 @@ __metadata:
chalk: ^4.0.0
collect-v8-coverage: ^1.0.0
exit: ^0.1.2
glob: ^7.1.3
glob: ^10.3.4
graceful-fs: ^4.2.9
istanbul-lib-coverage: ^3.0.0
istanbul-lib-instrument: ^6.0.0
Expand Down Expand Up @@ -4897,16 +4896,6 @@ __metadata:
languageName: node
linkType: hard

"@types/glob@npm:^7.1.1":
version: 7.2.0
resolution: "@types/glob@npm:7.2.0"
dependencies:
"@types/minimatch": "*"
"@types/node": "*"
checksum: 6ae717fedfdfdad25f3d5a568323926c64f52ef35897bcac8aca8e19bc50c0bd84630bbd063e5d52078b2137d8e7d3c26eabebd1a2f03ff350fff8a91e79fc19
languageName: node
linkType: hard

"@types/graceful-fs@npm:^4.1.3":
version: 4.1.6
resolution: "@types/graceful-fs@npm:4.1.6"
Expand Down Expand Up @@ -5088,13 +5077,6 @@ __metadata:
languageName: node
linkType: hard

"@types/minimatch@npm:*":
version: 5.1.2
resolution: "@types/minimatch@npm:5.1.2"
checksum: 0391a282860c7cb6fe262c12b99564732401bdaa5e395bee9ca323c312c1a0f45efbf34dce974682036e857db59a5c9b1da522f3d6055aeead7097264c8705a8
languageName: node
linkType: hard

"@types/minimist@npm:^1.2.0":
version: 1.2.2
resolution: "@types/minimist@npm:1.2.2"
Expand Down Expand Up @@ -10762,7 +10744,7 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.2.5":
"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.2.5, glob@npm:^10.3.4":
version: 10.3.4
resolution: "glob@npm:10.3.4"
dependencies:
Expand Down Expand Up @@ -12568,15 +12550,14 @@ __metadata:
"@babel/core": ^7.11.6
"@jest/test-sequencer": "workspace:^"
"@jest/types": "workspace:^"
"@types/glob": ^7.1.1
"@types/graceful-fs": ^4.1.3
"@types/micromatch": ^4.0.1
"@types/parse-json": ^4.0.0
babel-jest: "workspace:^"
chalk: ^4.0.0
ci-info: ^3.2.0
deepmerge: ^4.2.2
glob: ^7.1.3
glob: ^10.3.4
graceful-fs: ^4.2.9
jest-circus: "workspace:^"
jest-environment-node: "workspace:^"
Expand Down Expand Up @@ -12951,13 +12932,12 @@ __metadata:
"@jest/test-utils": "workspace:^"
"@jest/transform": "workspace:^"
"@jest/types": "workspace:^"
"@types/glob": ^7.1.1
"@types/graceful-fs": ^4.1.3
"@types/node": "*"
chalk: ^4.0.0
cjs-module-lexer: ^1.0.0
collect-v8-coverage: ^1.0.0
glob: ^7.1.3
glob: ^10.3.4
graceful-fs: ^4.2.9
jest-environment-node: "workspace:^"
jest-haste-map: "workspace:^"
Expand Down