Skip to content

Commit

Permalink
Revert "chore(cb2-11273): update dependencies (#85)"
Browse files Browse the repository at this point in the history
This reverts commit 05cbc2e.
  • Loading branch information
naathanbrown authored Jun 5, 2024
1 parent 05cbc2e commit 0d73bcb
Show file tree
Hide file tree
Showing 9 changed files with 9,960 additions and 11,118 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_hash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: dvsa/cvs-github-actions/.github/workflows/build-node-hash.yaml@develop
secrets:
CVS_MGMT_AWS_ROLE: ${{ secrets.CVS_MGMT_AWS_ROLE }}
DVSA_AWS_REGION: ${{ secrets.DVSA_AWS_REGION }}
DVSA_AWS_REGION: ${{ secrets.DVSA_AWS_REGION }}
20,956 changes: 9,893 additions & 11,063 deletions package-lock.json

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test": "npm-run-all test:unit:coverage",
"jest": "jest",
"audit": "npm audit --omit=dev",
"lint:analyse": "eslint",
"lint:analyse": "eslint . --ext js,ts --fix",
"lint:report": "npm run lint:analyse -- -f json -o reports/eslint/eslint-report.json",
"lint": "npm-run-all lint:*",
"prettier": "prettier --write ./**/*.{js,ts}",
Expand All @@ -47,54 +47,57 @@
"tools-setup": "echo 'pipeline requires this'"
},
"dependencies": {
"@aws-sdk/client-s3": "3.577.0",
"@aws-sdk/client-secrets-manager": "3.580.0",
"aws-lambda": "1.0.7",
"express": "4.19.2",
"moment": "2.30.1",
"@aws-sdk/client-s3": "3.554.0",
"@aws-sdk/client-secrets-manager": "3.554.0",
"aws-lambda": "1.0.6",
"express": "4.18.2",
"moment": "2.29.4",
"mysql2": "3.9.8",
"serverless-http": "3.2.0",
"source-map-support": "0.5.21",
"winston": "^3.13.0",
"serverless-http": "2.6.0",
"source-map-support": "0.5.19",
"winston": "^3.7.2",
"zlib": "1.0.5"
},
"devDependencies": {
"@aws-sdk/types": "3.577.0",
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"@dvsa/eslint-config-ts": "3.0.1",
"@serverless/typescript": "3.38.0",
"@types/aws-lambda": "8.10.138",
"@types/express": "4.17.21",
"@types/jest": "29.5.12",
"@types/node": "20.12.12",
"@types/supertest": "6.0.2",
"@typescript-eslint/parser": "7.10.0",
"@aws-sdk/types": "3.78.0",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@dvsa/eslint-config-ts": "2.0.0",
"@serverless/typescript": "2.17.0",
"@types/aws-lambda": "8.10.70",
"@types/express": "4.17.13",
"@types/jest": "26.0.20",
"@types/node": "14.14.20",
"@types/supertest": "2.0.10",
"@typescript-eslint/eslint-plugin": "4.12.0",
"@typescript-eslint/parser": "4.12.0",
"aws-sdk-client-mock": "4.0.0",
"clean-webpack-plugin": "4.0.0",
"commitlint-plugin-function-rules": "4.0.0",
"concurrently": "8.2.2",
"clean-webpack-plugin": "3.0.0",
"commitlint-plugin-function-rules": "1.1.20",
"concurrently": "5.3.0",
"cross-env": "7.0.3",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"fork-ts-checker-webpack-plugin": "9.0.2",
"husky": "9.0.11",
"jest": "29.7.0",
"eslint": "7.17.0",
"eslint-config-prettier": "7.1.0",
"eslint-plugin-jest": "24.3.2",
"eslint-plugin-prettier": "3.3.1",
"fork-ts-checker-webpack-plugin": "6.0.8",
"husky": "4.3.8",
"jest": "26.6.3",
"npm-run-all": "4.1.5",
"prettier": "3.2.5",
"rimraf": "5.0.7",
"serverless": "3.38.0",
"serverless-dotenv-plugin": "6.0.0",
"serverless-offline": "13.5.1",
"serverless-webpack": "5.14.0",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"serverless": "3.17.0",
"serverless-dotenv-plugin": "3.1.0",
"serverless-offline": "8.8.1",
"serverless-webpack": "5.10.0",
"sonar-scanner": "3.1.0",
"supertest": "7.0.0",
"ts-jest": "29.1.3",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"typescript": "5.4.5",
"webpack": "5.91.0",
"webpack-node-externals": "3.0.0"
"supertest": "6.3.3",
"ts-jest": "26.4.4",
"ts-loader": "8.0.14",
"ts-node": "9.1.1",
"typescript": "4.1.3",
"webpack": "5.74.0",
"webpack-node-externals": "2.5.2"
},
"author": "",
"license": "MIT",
Expand Down
6 changes: 5 additions & 1 deletion scripts/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ module.exports = (async () => {
},
plugins: [
new ForkTsCheckerWebpackPlugin({
typescript: {},
typescript: true,
eslint: {
enabled: false,
files: path.resolve(__dirname, '..', 'src/**/*.{ts,js}'),
},
}),
],
};
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/app/evlFeedQueryFunctionFactory.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mocked } from 'ts-jest/utils';
import queryFunctionFactory from '../../../src/app/evlFeedQueryFunctionFactory';
import * as dbFunctions from '../../../src/app/databaseService';
import DatabaseService from '../../../src/infrastructure/databaseService';
Expand All @@ -6,8 +7,8 @@ import { FeedName } from '../../../src/interfaces/FeedTypes';
jest.mock('../../../src/app/databaseService');
jest.mock('../../../src/infrastructure/databaseService');

const dbFunctionsMock = jest.mocked(dbFunctions);
const dbServiceMock = (jest.mocked(DatabaseService) as unknown) as DatabaseService;
const dbFunctionsMock = mocked(dbFunctions);
const dbServiceMock = (mocked(DatabaseService, true) as unknown) as DatabaseService;

describe('Query Function Factory', () => {
it('returns the correct function when passed a vin', () => {
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/app/testResultsQueryFunctionFactory.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { mocked } from 'ts-jest/utils';
import queryFunctionFactory from '../../../src/app/testResultsQueryFunctionFactory';
import * as dbFunctions from '../../../src/app/databaseService';
import DatabaseService from '../../../src/infrastructure/databaseService';

jest.mock('../../../src/app/databaseService');
jest.mock('../../../src/infrastructure/databaseService');

const dbFunctionsMock = jest.mocked(dbFunctions);
const dbServiceMock = (jest.mocked(DatabaseService) as unknown) as DatabaseService;
const dbFunctionsMock = mocked(dbFunctions);
const dbServiceMock = (mocked(DatabaseService, true) as unknown) as DatabaseService;

describe('Query Function Factory', () => {
it('returns the correct function when passed a vin', () => {
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/app/tflFeedQueryFunctionFactory.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mocked } from 'ts-jest/utils';
import queryFunctionFactory from '../../../src/app/tflFeedQueryFunctionFactory';
import * as dbFunctions from '../../../src/app/databaseService';
import DatabaseService from '../../../src/infrastructure/databaseService';
Expand All @@ -6,8 +7,8 @@ import { FeedName } from '../../../src/interfaces/FeedTypes';
jest.mock('../../../src/app/databaseService');
jest.mock('../../../src/infrastructure/databaseService');

const dbFunctionsMock = jest.mocked(dbFunctions);
const dbServiceMock = (jest.mocked(DatabaseService) as unknown) as DatabaseService;
const dbFunctionsMock = mocked(dbFunctions);
const dbServiceMock = (mocked(DatabaseService, true) as unknown) as DatabaseService;

describe('Query Function Factory', () => {
it('returns the correct function when passed no parameters', () => {
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/app/vehicleQueryFunctionFactory.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { mocked } from 'ts-jest/utils';
import queryFunctionFactory from '../../../src/app/vehicleQueryFunctionFactory';
import * as dbFunctions from '../../../src/app/databaseService';
import DatabaseService from '../../../src/infrastructure/databaseService';

jest.mock('../../../src/app/databaseService');
jest.mock('../../../src/infrastructure/databaseService');

const dbFunctionsMock = jest.mocked(dbFunctions);
const dbServiceMock = (jest.mocked(DatabaseService) as unknown) as DatabaseService;
const dbFunctionsMock = mocked(dbFunctions);
const dbServiceMock = (mocked(DatabaseService, true) as unknown) as DatabaseService;

describe('Query Function Factory', () => {
it('returns the correct function when passed a vin', () => {
Expand Down
9 changes: 5 additions & 4 deletions tests/unit/resources/localDatabase.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { spawnSync, SpawnSyncReturns } from 'child_process';
import { mocked } from 'ts-jest/utils';
import localDatabase, { containerName } from '../../../src/resources/localDatabase';

jest.mock('child_process');
Expand All @@ -12,7 +13,7 @@ describe('Local database', () => {
});

it('does nothing when the docker container is running', () => {
const mockedSpawnSync = jest.mocked(spawnSync);
const mockedSpawnSync = mocked(spawnSync, true);
const mockResponse = ({
stdout: Buffer.from(`${containerName} up`),
stderr: Buffer.from(''),
Expand All @@ -26,7 +27,7 @@ describe('Local database', () => {
});

it('starts the container when the container exists but is not running', () => {
const mockedSpawnSync = jest.mocked(spawnSync);
const mockedSpawnSync = mocked(spawnSync, true);
const mockResponse = ({
stdout: Buffer.from(`${containerName} exited`),
stderr: Buffer.from(''),
Expand All @@ -47,7 +48,7 @@ describe('Local database', () => {
});

it('boots the DB from scratch when it does not exist', () => {
const mockedSpawnSync = jest.mocked(spawnSync);
const mockedSpawnSync = mocked(spawnSync, true);
const mockListResponse = ({
stdout: Buffer.from(''),
stderr: Buffer.from(''),
Expand Down Expand Up @@ -75,7 +76,7 @@ describe('Local database', () => {
});

it('throws an error if the stderr is not empty', () => {
const mockedSpawnSync = jest.mocked(spawnSync);
const mockedSpawnSync = mocked(spawnSync, true);
const mockResponse = ({
stdout: Buffer.from(`${containerName} up`),
stderr: Buffer.from('Something went wrong'),
Expand Down

0 comments on commit 0d73bcb

Please sign in to comment.