Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/types/diff-6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Amndeep7 authored Dec 30, 2024
2 parents 4cf1cd4 + f257184 commit f5fc87f
Show file tree
Hide file tree
Showing 32 changed files with 1,083 additions and 1,041 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hdfconverter-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inspecjs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
cache: 'yarn'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "22"
check-latest: true
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- uses: actions/setup-node@v4
if: always()
with:
node-version: "18"
node-version: "22"
check-latest: true
registry-url: 'https://npm.pkg.github.com'
cache: 'yarn'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
22
93 changes: 93 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,96 @@
v2.11.1
- Update to node22 - requires nodejs 22 at minimum now @Amndeep7 (#6440)

## Dependency Updates

- Bump eslint-plugin-vue from 9.31.0 to 9.32.0 @dependabot (#6439)
- Bump @aws-sdk/client-s3 from 3.701.0 to 3.703.0 @dependabot (#6438)
- Bump @types/node from 22.10.0 to 22.10.1 @dependabot (#6433)
- Bump @nestjs/common from 10.4.11 to 10.4.12 @dependabot (#6437)
- Bump @nestjs/platform-express from 10.4.11 to 10.4.12 @dependabot (#6434)
- Bump @nestjs/core from 10.4.11 to 10.4.12 @dependabot (#6435)
- Bump @nestjs/testing from 10.4.11 to 10.4.12 @dependabot (#6436)
- Bump @nestjs/testing from 10.4.9 to 10.4.11 @dependabot (#6429)
- Bump @aws-sdk/client-config-service from 3.699.0 to 3.702.0 @dependabot (#6430)
- Bump @nestjs/common from 10.4.9 to 10.4.11 @dependabot (#6431)
- Bump @nestjs/platform-express from 10.4.9 to 10.4.11 @dependabot (#6432)
- Bump @nestjs/core from 10.4.9 to 10.4.11 @dependabot (#6428)
- Bump @aws-sdk/client-s3 from 3.700.0 to 3.701.0 @dependabot (#6424)
- Bump prettier from 3.3.3 to 3.4.1 @dependabot (#6425)
- Bump @types/node from 22.9.4 to 22.10.0 @dependabot (#6427)
- Bump @types/express-session from 1.18.0 to 1.18.1 @dependabot (#6426)
- Bump @nestjs/core from 10.4.8 to 10.4.9 @dependabot (#6420)
- Bump oauth2-mock-server from 7.1.2 to 7.2.0 @dependabot (#6418)
- Bump @nestjs/common from 10.4.8 to 10.4.9 @dependabot (#6419)
- Bump @nestjs/testing from 10.4.8 to 10.4.9 @dependabot (#6416)
- Bump @nestjs/platform-express from 10.4.8 to 10.4.9 @dependabot (#6422)
- Bump @aws-sdk/client-s3 from 3.698.0 to 3.700.0 @dependabot (#6421)
- Bump @types/node from 22.9.2 to 22.9.4 @dependabot (#6423)
- Bump axios from 1.7.7 to 1.7.8 @dependabot (#6415)
- Bump @types/node from 22.9.1 to 22.9.2 @dependabot (#6411)
- Bump @aws-sdk/client-config-service from 3.696.0 to 3.699.0 @dependabot (#6410)
- Bump @aws-sdk/client-s3 from 3.697.0 to 3.698.0 @dependabot (#6405)
- Bump csv-stringify from 6.5.1 to 6.5.2 @dependabot (#6407)
- Bump dotenv-cli from 7.4.3 to 7.4.4 @dependabot (#6406)
- Bump @aws-sdk/client-s3 from 3.696.0 to 3.697.0 @dependabot (#6404)
- Bump @nestjs/cli from 10.4.7 to 10.4.8 @dependabot (#6403)
- Bump cypress from 13.15.2 to 13.16.0 @dependabot (#6400)
- Bump @aws-sdk/client-s3 from 3.691.0 to 3.696.0 @dependabot (#6397)
- Bump @types/node from 22.9.0 to 22.9.1 @dependabot (#6399)
- Bump @aws-sdk/client-config-service from 3.693.0 to 3.696.0 @dependabot (#6398)
- Bump @nestjs/testing from 10.4.7 to 10.4.8 @dependabot (#6394)
- Bump yaml from 2.6.0 to 2.6.1 @dependabot (#6396)
- Bump dotenv-cli from 7.4.2 to 7.4.3 @dependabot (#6395)
- Bump @nestjs/common from 10.4.7 to 10.4.8 @dependabot (#6390)
- Bump @nestjs/platform-express from 10.4.7 to 10.4.8 @dependabot (#6389)
- Bump @aws-sdk/client-config-service from 3.692.0 to 3.693.0 @dependabot (#6391)
- Bump @nestjs/core from 10.4.7 to 10.4.8 @dependabot (#6388)
- Bump @aws-sdk/client-config-service from 3.687.0 to 3.692.0 @dependabot (#6387)
- Bump @aws-sdk/client-sts from 3.691.0 to 3.692.0 @dependabot (#6385)
- Bump tailwindcss from 3.4.14 to 3.4.15 @dependabot (#6384)
- Bump @smithy/node-http-handler from 3.2.5 to 3.3.1 @dependabot (#6383)
- Bump winston from 3.16.0 to 3.17.0 @dependabot (#6376)
- Bump @aws-sdk/client-s3 from 3.689.0 to 3.691.0 @dependabot (#6380)
- Bump eslint-plugin-vue from 9.30.0 to 9.31.0 @dependabot (#6377)
- Bump @aws-sdk/client-s3 from 3.688.0 to 3.689.0 @dependabot (#6379)
- Bump uuid from 11.0.2 to 11.0.3 @dependabot (#6378)
- Bump @aws-sdk/client-s3 from 3.685.0 to 3.688.0 @dependabot (#6375)
- Bump @aws-sdk/client-config-service from 3.682.0 to 3.687.0 @dependabot (#6372)
- Bump @types/vuelidate from 0.7.21 to 0.7.22 @dependabot (#6369)
- Bump @nestjs/testing from 10.4.6 to 10.4.7 @dependabot (#6365)
- Bump @nestjs/common from 10.4.6 to 10.4.7 @dependabot (#6367)
- Bump @nestjs/platform-express from 10.4.6 to 10.4.7 @dependabot (#6366)
- Bump @nestjs/core from 10.4.6 to 10.4.7 @dependabot (#6364)
- Bump cypress from 13.15.1 to 13.15.2 @dependabot (#6363)
- Bump @nestjs/cli from 10.4.5 to 10.4.7 @dependabot (#6361)
- Bump @types/node from 22.8.6 to 22.9.0 @dependabot (#6360)
- Bump winston from 3.15.0 to 3.16.0 @dependabot (#6357)
- Bump @aws-sdk/client-s3 from 3.682.0 to 3.685.0 @dependabot (#6358)
- Bump typedoc from 0.26.10 to 0.26.11 @dependabot (#6356)
- Bump lerna from 8.1.8 to 8.1.9 @dependabot (#6353)
- Bump mock-fs from 5.4.0 to 5.4.1 @dependabot (#6354)
- Bump @types/node from 22.8.4 to 22.8.6 @dependabot (#6355)
- Bump core-js from 3.38.1 to 3.39.0 @dependabot (#6350)
- Bump sass-loader from 16.0.2 to 16.0.3 @dependabot (#6351)
- Bump @casl/ability from 6.7.1 to 6.7.2 @dependabot (#6349)
- Bump @aws-sdk/client-config-service from 3.679.0 to 3.682.0 @dependabot (#6346)
- Bump eslint-plugin-vue from 9.29.1 to 9.30.0 @dependabot (#6338)
- Bump @types/node from 22.8.1 to 22.8.4 @dependabot (#6345)
- Bump @types/lodash from 4.17.12 to 4.17.13 @dependabot (#6343)
- Bump uuid from 10.0.0 to 11.0.2 @dependabot (#6341)
- Bump @aws-sdk/client-s3 from 3.679.0 to 3.682.0 @dependabot (#6344)
- Bump tsx from 4.19.1 to 4.19.2 @dependabot (#6337)
- Bump @nestjs/schematics from 10.2.2 to 10.2.3 @dependabot (#6339)
- Bump @types/node from 22.7.9 to 22.8.1 @dependabot (#6333)
- Bump elliptic from 6.5.7 to 6.6.0 @dependabot (#6335)
- Bump rexml from 3.3.6 to 3.3.9 in /libs/inspecjs @dependabot (#6334)
- Bump sequelize from 6.37.4 to 6.37.5 @dependabot (#6332)
- Bump @aws-sdk/client-config-service from 3.678.0 to 3.679.0 @dependabot (#6328)
- Bump @aws-sdk/client-s3 from 3.678.0 to 3.679.0 @dependabot (#6329)
- Bump pg from 8.13.0 to 8.13.1 @dependabot (#6327)
- Bump cypress from 13.15.0 to 13.15.1 @dependabot (#6326)
- Bump @types/prismjs from 1.26.4 to 1.26.5 @dependabot (#6320)

v2.10.20

- Dependency track mapper @Amndeep7 (#6307)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_CONTAINER=registry.access.redhat.com/ubi8/nodejs-18-minimal:1
ARG BASE_CONTAINER=registry.access.redhat.com/ubi9/nodejs-22-minimal:1

FROM $BASE_CONTAINER AS builder

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.lite
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_CONTAINER=registry.access.redhat.com/ubi8/nodejs-18-minimal:1
ARG BUILD_CONTAINER=registry.access.redhat.com/ubi9/nodejs-22-minimal:1
ARG BASE_CONTAINER=nginx:alpine

FROM $BUILD_CONTAINER AS builder
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.10.20
v2.11.1
2 changes: 1 addition & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "heimdall-server",
"version": "2.10.20",
"version": "2.11.0",
"description": "",
"license": "Apache-2.0",
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/config/config.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe('Config Service', () => {
})
});
expect(() => new ConfigService()).toThrowError(
"EACCES: permission denied, open '.env'"
"EACCES, permission denied '.env'"
);
});

Expand Down
18 changes: 6 additions & 12 deletions apps/backend/src/pipes/password-change.pipe.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ArgumentMetadata, BadRequestException} from '@nestjs/common';
import {BadRequestException} from '@nestjs/common';
import {
UPDATE_USER_DTO_TEST_OBJ,
UPDATE_USER_DTO_TEST_OBJ_WITH_UPDATED_PASSWORD,
Expand All @@ -9,7 +9,6 @@ import {PasswordChangePipe} from './password-change.pipe';

describe('PasswordChangePipe', () => {
let passwordChangePipe: PasswordChangePipe;
let metaData: ArgumentMetadata;

beforeEach(() => {
passwordChangePipe = new PasswordChangePipe();
Expand Down Expand Up @@ -95,18 +94,14 @@ describe('PasswordChangePipe', () => {
it('should return the same UpdateUserDto', () => {
expect(
passwordChangePipe.transform(
UPDATE_USER_DTO_TEST_OBJ_WITH_UPDATED_PASSWORD,
metaData
UPDATE_USER_DTO_TEST_OBJ_WITH_UPDATED_PASSWORD
)
).toEqual(UPDATE_USER_DTO_TEST_OBJ_WITH_UPDATED_PASSWORD);
});

it('should return UpdateUserDto if password fields are null', () => {
expect(
passwordChangePipe.transform(
UPDATE_USER_DTO_WITHOUT_PASSWORD_FIELDS,
metaData
)
passwordChangePipe.transform(UPDATE_USER_DTO_WITHOUT_PASSWORD_FIELDS)
).toEqual(UPDATE_USER_DTO_WITHOUT_PASSWORD_FIELDS);
});

Expand All @@ -118,8 +113,7 @@ describe('PasswordChangePipe', () => {
it('should should pass when the currentPassword is not provided and a valid new password is provided', () => {
expect(
passwordChangePipe.transform(
UPDATE_USER_DTO_WITH_INVALID_CURRENT_PASSWORD,
metaData
UPDATE_USER_DTO_WITH_INVALID_CURRENT_PASSWORD
)
).toEqual(UPDATE_USER_DTO_WITH_INVALID_CURRENT_PASSWORD);
});
Expand All @@ -130,10 +124,10 @@ describe('PasswordChangePipe', () => {
describe('Test Invalid Password Changes', () => {
it('should throw a BadRequestException', () => {
expect(() =>
passwordChangePipe.transform(UPDATE_USER_DTO_TEST_OBJ, metaData)
passwordChangePipe.transform(UPDATE_USER_DTO_TEST_OBJ)
).toThrowError(BadRequestException);
expect(() =>
passwordChangePipe.transform(UPDATE_USER_DTO_TEST_OBJ, metaData)
passwordChangePipe.transform(UPDATE_USER_DTO_TEST_OBJ)
).toThrowError(
'A minimum of four character classes must be changed when updating a password.' +
' A minimum of eight of the total number of characters must be changed when updating a password.'
Expand Down
20 changes: 6 additions & 14 deletions apps/backend/src/pipes/password-change.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import {
ArgumentMetadata,
BadRequestException,
Injectable,
PipeTransform
} from '@nestjs/common';
import {BadRequestException, Injectable, PipeTransform} from '@nestjs/common';
import levenshtein = require('js-levenshtein');

@Injectable()
export class PasswordChangePipe implements PipeTransform {
transform(
value: {
currentPassword?: string;
password: string | undefined;
passwordConfirmation: string | undefined;
},
_metadata: ArgumentMetadata
): Record<string, unknown> {
transform(value: {
currentPassword?: string;
password: string | undefined;
passwordConfirmation: string | undefined;
}): Record<string, unknown> {
if (
(!value.password && !value.passwordConfirmation) ||
!value.currentPassword
Expand Down
26 changes: 8 additions & 18 deletions apps/backend/src/pipes/password-complexity.pipe.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {validators} from '@heimdall/password-complexity';
import {ArgumentMetadata, BadRequestException} from '@nestjs/common';
import {BadRequestException} from '@nestjs/common';
import {
CREATE_USER_DTO_TEST_OBJ,
CREATE_USER_DTO_TEST_OBJ_WITH_MISSING_PASSWORD_FIELD,
Expand All @@ -14,7 +14,6 @@ import {

describe('PasswordComplexityPipe', () => {
let passwordComplexityPipe: PasswordComplexityPipe;
let metaData: ArgumentMetadata;

beforeEach(() => {
passwordComplexityPipe = new PasswordComplexityPipe();
Expand Down Expand Up @@ -121,21 +120,20 @@ describe('PasswordComplexityPipe', () => {
describe('Test Valid Password', () => {
it('should return the same CreateUserDto', () => {
expect(
passwordComplexityPipe.transform(CREATE_USER_DTO_TEST_OBJ, metaData)
passwordComplexityPipe.transform(CREATE_USER_DTO_TEST_OBJ)
).toEqual(CREATE_USER_DTO_TEST_OBJ);
});

it('should return the same UpdateUserDto', () => {
expect(
passwordComplexityPipe.transform(UPDATE_USER_DTO_TEST_OBJ, metaData)
passwordComplexityPipe.transform(UPDATE_USER_DTO_TEST_OBJ)
).toEqual(UPDATE_USER_DTO_TEST_OBJ);
});

it('should return UpdateUserDto if password fields are null', () => {
expect(
passwordComplexityPipe.transform(
UPDATE_USER_DTO_WITHOUT_PASSWORD_FIELDS,
metaData
UPDATE_USER_DTO_WITHOUT_PASSWORD_FIELDS
)
).toEqual(UPDATE_USER_DTO_WITHOUT_PASSWORD_FIELDS);
});
Expand All @@ -147,30 +145,22 @@ describe('PasswordComplexityPipe', () => {
it('should throw a BadRequestException for CreateUserDto with missing password', () => {
expect(() =>
passwordComplexityPipe.transform(
CREATE_USER_DTO_TEST_OBJ_WITH_MISSING_PASSWORD_FIELD,
metaData
CREATE_USER_DTO_TEST_OBJ_WITH_MISSING_PASSWORD_FIELD
)
).toThrowError(BadRequestException);
expect(() =>
passwordComplexityPipe.transform(
CREATE_USER_DTO_TEST_OBJ_WITH_MISSING_PASSWORD_FIELD,
metaData
CREATE_USER_DTO_TEST_OBJ_WITH_MISSING_PASSWORD_FIELD
)
).toThrowError('Password must be of type string');
});

it('should throw a BadRequestException for UpdateUserDto with missing password', () => {
expect(() =>
passwordComplexityPipe.transform(
UPDATE_USER_DTO_TEST_WITHOUT_PASSWORD,
metaData
)
passwordComplexityPipe.transform(UPDATE_USER_DTO_TEST_WITHOUT_PASSWORD)
).toThrowError(BadRequestException);
expect(() =>
passwordComplexityPipe.transform(
UPDATE_USER_DTO_TEST_WITHOUT_PASSWORD,
metaData
)
passwordComplexityPipe.transform(UPDATE_USER_DTO_TEST_WITHOUT_PASSWORD)
).toThrowError('Password must be of type string');
});
});
Expand Down
Loading

0 comments on commit f5fc87f

Please sign in to comment.