Upgrade to Jest 30

This commit is contained in:
Shivam Mathur
2025-06-13 02:06:31 +05:30
parent 433bdeeaf0
commit 0f7f1d08e3
4 changed files with 4336 additions and 742 deletions

5062
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -40,10 +40,10 @@
"compare-versions": "^6.1.1" "compare-versions": "^6.1.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/compat": "^1.2.9", "@eslint/compat": "^1.3.0",
"@eslint/js": "9.28.0", "@eslint/js": "9.28.0",
"@types/jest": "^29.5.14", "@types/jest": "^29.5.14",
"@types/node": "^24.0.0", "@types/node": "^24.0.1",
"@typescript-eslint/eslint-plugin": "^8.34.0", "@typescript-eslint/eslint-plugin": "^8.34.0",
"@typescript-eslint/parser": "^8.34.0", "@typescript-eslint/parser": "^8.34.0",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
@ -53,17 +53,14 @@
"eslint-plugin-jest": "^28.13.3", "eslint-plugin-jest": "^28.13.3",
"eslint-plugin-prettier": "^5.4.1", "eslint-plugin-prettier": "^5.4.1",
"globals": "^16.2.0", "globals": "^16.2.0",
"jest": "^29.7.0", "jest": "^30.0.0",
"jest-circus": "^29.7.0", "jest-circus": "^30.0.0",
"nock": "^14.0.5", "nock": "^14.0.5",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"simple-git-hooks": "^2.13.0", "simple-git-hooks": "^2.13.0",
"ts-jest": "^29.3.4", "ts-jest": "^29.4.0",
"typescript": "^5.8.3" "typescript": "^5.8.3"
}, },
"overrides": {
"brace-expansion": "^4.0.1"
},
"bugs": { "bugs": {
"url": "https://github.com/shivammathur/setup-php/issues" "url": "https://github.com/shivammathur/setup-php/issues"
}, },

View File

@ -419,6 +419,7 @@ export async function addPhive(data: RS): Promise<string> {
* @param data * @param data
*/ */
export async function addPHPUnitTools(data: RS): Promise<string> { export async function addPHPUnitTools(data: RS): Promise<string> {
/* istanbul ignore next */
if (data['version'] === 'latest') { if (data['version'] === 'latest') {
data['version'] = data['version'] =
(await packagist.search(data['packagist'], data['php_version'])) ?? (await packagist.search(data['packagist'], data['php_version'])) ??

View File

@ -456,6 +456,7 @@ export async function readPHPVersion(): Promise<string> {
const composerLock = path.join(composerProjectDir, 'composer.lock'); const composerLock = path.join(composerProjectDir, 'composer.lock');
if (fs.existsSync(composerLock)) { if (fs.existsSync(composerLock)) {
const lockFileContents = JSON.parse(fs.readFileSync(composerLock, 'utf8')); const lockFileContents = JSON.parse(fs.readFileSync(composerLock, 'utf8'));
/* istanbul ignore next */
if ( if (
lockFileContents['platform-overrides'] && lockFileContents['platform-overrides'] &&
lockFileContents['platform-overrides']['php'] lockFileContents['platform-overrides']['php']
@ -469,6 +470,7 @@ export async function readPHPVersion(): Promise<string> {
const composerFileContents = JSON.parse( const composerFileContents = JSON.parse(
fs.readFileSync(composerJson, 'utf8') fs.readFileSync(composerJson, 'utf8')
); );
/* istanbul ignore next */
if ( if (
composerFileContents['config'] && composerFileContents['config'] &&
composerFileContents['config']['platform'] && composerFileContents['config']['platform'] &&