mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 20:09:27 -06:00
Vitest 4.0 now supports vi.fn() being used as constructors, which means arrow functions can no longer be used in mock implementations that will be called as constructors. This change required refactoring test mocks to use proper class-based approaches. Key changes: - Updated vitest and @vitest/coverage-v8 to 4.0.1 - Refactored test mocks to use class definitions in vi.mock factories - Created shared mock implementations to allow per-test configuration - Used class-based mocks instead of arrow function .mockImplementation() - Fixed biome linter conflicts by avoiding .mockImplementation() entirely The solution uses a pattern where mocks are defined as classes in vi.mock() with shared vi.fn() instances that can be configured in individual tests, avoiding the need for .mockImplementation() which biome would convert back to arrow functions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
171 lines
5.7 KiB
JSON
171 lines
5.7 KiB
JSON
{
|
|
"name": "compiler-explorer",
|
|
"description": "Interactively investigate compiler output",
|
|
"type": "module",
|
|
"private": true,
|
|
"author": {
|
|
"name": "Matt Godbolt",
|
|
"email": "matt@godbolt.org",
|
|
"url": "https://xania.org"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "compiler-explorer/compiler-explorer"
|
|
},
|
|
"version": "0.0.3",
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
},
|
|
"main": "./app.ts",
|
|
"dependencies": {
|
|
"@aws-sdk/client-dynamodb": "^3.914.0",
|
|
"@aws-sdk/client-ec2": "^3.914.0",
|
|
"@aws-sdk/client-s3": "^3.914.0",
|
|
"@aws-sdk/client-sqs": "^3.914.0",
|
|
"@aws-sdk/client-ssm": "^3.914.0",
|
|
"@aws-sdk/credential-providers": "^3.914.0",
|
|
"@flatten-js/interval-tree": "^1.1.4",
|
|
"@fortawesome/fontawesome-free": "^7.1.0",
|
|
"@orchidjs/sifter": "^1.1.0",
|
|
"@popperjs/core": "^2.11.8",
|
|
"@sentry/browser": "^10.21.0",
|
|
"@sentry/node": "^10.21.0",
|
|
"@types/semver": "^7.7.1",
|
|
"big-integer": "^1.6.52",
|
|
"bootstrap": "^5.3.8",
|
|
"buffer": "^6.0.3",
|
|
"chart.js": "^4.5.1",
|
|
"clipboard": "^2.0.11",
|
|
"commander": "^14.0.1",
|
|
"compression": "^1.8.1",
|
|
"copy-webpack-plugin": "^13.0.1",
|
|
"cross-env": "^10.1.0",
|
|
"enhanced-ms": "^4.1.0",
|
|
"events": "^3.3.0",
|
|
"express": "^5.1.0",
|
|
"file-saver": "^2.0.5",
|
|
"golden-layout": "^1.5.9",
|
|
"http-proxy": "^1.18.1",
|
|
"jquery": "^3.7.1",
|
|
"js-cookie": "^3.0.5",
|
|
"jszip": "^3.10.1",
|
|
"lodash.clonedeep": "^4.5.0",
|
|
"lru-cache": "^11.2.2",
|
|
"lz-string": "^1.5.0",
|
|
"marked": "^16.4.1",
|
|
"monaco-editor": "^0.49.0",
|
|
"monaco-vim": "^0.4.2",
|
|
"morgan": "^1.10.1",
|
|
"node-targz": "^0.2.0",
|
|
"p-queue": "^9.0.0",
|
|
"path-browserify": "^1.0.1",
|
|
"profanities": "^3.0.1",
|
|
"prom-client": "^15.1.3",
|
|
"pug": "^3.0.3",
|
|
"response-time": "^2.3.4",
|
|
"sanitize-filename": "^1.6.3",
|
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
"semver": "^7.7.3",
|
|
"systemd-socket": "0.0.0",
|
|
"tar-stream": "^3.1.7",
|
|
"tom-select": "^2.4.3",
|
|
"tree-kill": "^1.2.2",
|
|
"triple-beam": "^1.4.1",
|
|
"tsx": "^4.20.6",
|
|
"underscore": "^1.13.7",
|
|
"url-join": "^5.0.0",
|
|
"whatwg-fetch": "^3.6.20",
|
|
"which": "^5.0.0",
|
|
"winston": "^3.18.3",
|
|
"winston-loki": "^6.1.3",
|
|
"winston-papertrail": "^1.0.5",
|
|
"winston-transport": "^4.9.0",
|
|
"ws": "^8.18.3",
|
|
"yaml": "^2.8.1"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^2.2.7",
|
|
"@sentry/types": "^10.21.0",
|
|
"@smithy/util-stream": "^4.5.3",
|
|
"@types/bootstrap": "^5.2.10",
|
|
"@types/chai": "^5.2.3",
|
|
"@types/compression": "^1.8.1",
|
|
"@types/express": "^5.0.3",
|
|
"@types/file-saver": "^2.0.7",
|
|
"@types/http-proxy": "^1.17.16",
|
|
"@types/jquery": "^3.5.33",
|
|
"@types/js-cookie": "^3.0.6",
|
|
"@types/node-targz": "^0.2.4",
|
|
"@types/request": "^2.48.13",
|
|
"@types/response-time": "^2.3.9",
|
|
"@types/supertest": "^6.0.3",
|
|
"@types/temp": "^0.9.4",
|
|
"@types/underscore": "^1.13.0",
|
|
"@types/webpack-env": "^1.18.8",
|
|
"@types/which": "^3.0.4",
|
|
"@types/ws": "^8.18.1",
|
|
"@vitest/coverage-v8": "^4.0.1",
|
|
"aws-sdk-client-mock": "^4.1.0",
|
|
"cheerio": "^1.1.2",
|
|
"css-loader": "^7.1.2",
|
|
"css-minimizer-webpack-plugin": "^7.0.2",
|
|
"cypress": "^15.5.0",
|
|
"file-loader": "^6.2.0",
|
|
"happy-dom": "^20.0.8",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^16.2.5",
|
|
"mini-css-extract-plugin": "^2.9.4",
|
|
"mock-fs": "^5.5.0",
|
|
"monaco-editor-webpack-plugin": "^7.1.1",
|
|
"nock": "^14.0.10",
|
|
"npm-run-all": "^4.1.5",
|
|
"sass": "^1.93.2",
|
|
"sass-loader": "^16.0.5",
|
|
"source-map-loader": "^5.0.0",
|
|
"supertest": "^7.1.4",
|
|
"terser-webpack-plugin": "^5.3.14",
|
|
"ts-loader": "^9.5.4",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.0.1",
|
|
"vitest-fetch-mock": "^0.4.5",
|
|
"webpack": "^5.102.1",
|
|
"webpack-cli": "^6.0.1",
|
|
"webpack-dev-middleware": "^7.4.5",
|
|
"webpack-manifest-plugin": "^5.0.1"
|
|
},
|
|
"optionalDependencies": {
|
|
"@rollup/rollup-darwin-arm64": "*",
|
|
"@rollup/rollup-darwin-x64": "*",
|
|
"@rollup/rollup-linux-x64-gnu": "*",
|
|
"@rollup/rollup-linux-x64-musl": "*",
|
|
"@rollup/rollup-win32-x64-msvc": "*"
|
|
},
|
|
"scripts": {
|
|
"cypress": "cypress run",
|
|
"lint": "biome check . --write",
|
|
"lint-check": "biome check .",
|
|
"test-coverage": "vitest run --coverage",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test-min": "cross-env SKIP_EXPENSIVE_TESTS=true vitest run",
|
|
"check": "npm run ts-check && npm run lint-check && npm run check-frontend-imports && npm run test-min -- --reporter dot",
|
|
"check-frontend-imports": "node ./etc/scripts/check-frontend-imports.js",
|
|
"dev": "cross-env NODE_ENV=DEV node --no-warnings=ExperimentalWarning --import=tsx app.ts",
|
|
"debugger": "cross-env NODE_ENV=DEV node --import=tsx --inspect-brk app.ts",
|
|
"debug": "cross-env NODE_ENV=DEV node --no-warnings=ExperimentalWarning --import=tsx app.ts --debug",
|
|
"start": "npm run webpack && cross-env NODE_ENV=LOCAL node --no-warnings=ExperimentalWarning --import=tsx app.ts",
|
|
"sentry": "npx -p @sentry/cli sentry-cli",
|
|
"update-browserslist": "npx browserslist@latest -- --update-db",
|
|
"prepare": "husky",
|
|
"ts-compile": "tsc",
|
|
"ts-check": "npm-run-all ts-check:*",
|
|
"ts-check:backend": "tsc -p ./tsconfig.backend.json --noEmit",
|
|
"ts-check:frontend": "tsc -p ./tsconfig.frontend.json --noEmit",
|
|
"ts-check:tests": "tsc -p ./tsconfig.tests.json --noEmit",
|
|
"ts-check:frontend-tests": "tsc -p ./tsconfig.frontend.tests.json --noEmit",
|
|
"webpack": "node --no-warnings=ExperimentalWarning --import=tsx ./node_modules/webpack-cli/bin/cli.js --node-env=production --config webpack.config.esm.ts"
|
|
},
|
|
"license": "BSD-2-Clause",
|
|
"packageManager": "npm@11.2.0"
|
|
}
|