Skip to content

Commit

Permalink
Merge pull request #338 from guardian/rm/sort-vulns
Browse files Browse the repository at this point in the history
Change some packages including Webpack, Jest and Babel to sort vulnerabilities
  • Loading branch information
rhystmills authored Jan 23, 2025
2 parents 3cbc020 + a2e33c3 commit a54f3f1
Show file tree
Hide file tree
Showing 5 changed files with 3,673 additions and 6,763 deletions.
8 changes: 5 additions & 3 deletions bootstrapping-lambda/src/middleware/auth-middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { AuthenticatedRequest, getAuthMiddleware } from "./auth-middleware";
import { Response } from "express";
import { userHasPermission } from "../permissionCheck";
import { getVerifiedUserEmail } from "../panDomainAuth";
import { mocked } from "ts-jest/utils";
import { mocked } from "jest-mock";

jest.mock("../permissionCheck");
jest.mock("../panDomainAuth");

const mockedGetVerifiedUserEmail = mocked(getVerifiedUserEmail, true);
const mockedUserHasPermission = mocked(userHasPermission, true);
const mockedGetVerifiedUserEmail = mocked(getVerifiedUserEmail, {
shallow: true,
});
const mockedUserHasPermission = mocked(userHasPermission, { shallow: true });

const mockNextFunction = jest.fn();

Expand Down
10 changes: 5 additions & 5 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"react-shadow": "^19.0.2"
},
"devDependencies": {
"@babel/core": "^7.17.4",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@emotion/babel-preset-css-prop": "^11.2.0",
"@prefresh/webpack": "^3.3.3",
"@svgr/webpack": "^6.2.1",
Expand All @@ -48,8 +48,8 @@
"jest-environment-node": "^26.6.2",
"webpack": "^5.76.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.2.0",
"webpack-merge": "^5.8.0"
}
}
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,13 @@ module.exports = {
"<rootDir>/fileTransformer.js",
},
testEnvironment: "jest-environment-node",
snapshotFormat: {
// Use pre v28 Jest snapshot defaults, to prevent incompatible snapshots
escapeString: true,
printBasicPrototype: true,
},
moduleNameMapper: {
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
"^uuid$": require.resolve("uuid"),
},
};
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@graphql-codegen/typescript": "^4.1.2",
"@guardian/node-riffraff-artifact": "0.3.2",
"@types/aws-lambda": "^8.10.114",
"@types/jest": "^26.0.22",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.1",
"@types/node-fetch": "^2.6.3",
"@types/prompts": "^2.0.14",
Expand All @@ -50,15 +50,16 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.21.5",
"husky": "^7.0.0",
"jest": "^26.6.3",
"jest": "^29.7.0",
"jest-mock": "^29.7.0",
"lint-staged": ">=10",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.6",
"prompts": "^2.4.2",
"ts-jest": "^26.5.4",
"ts-jest": "^29.2.5",
"tsafe": "^1.0.1",
"typescript": "^5.7.2",
"wsrun": "^5.2.4",
"yarn-run-all": "^3.1.1"
"typescript": "^5.7.3",
"wsrun": "^5.2.4"
},
"lint-staged": {
"**/*.{ts, tsx}": "eslint --fix",
Expand Down
Loading

0 comments on commit a54f3f1

Please sign in to comment.