Skip to content

Commit

Permalink
chore: upgrade dependencies + downgrade to .net 6.x (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleF83 authored Feb 8, 2023
1 parent bb17219 commit 9b6f2f9
Show file tree
Hide file tree
Showing 16 changed files with 2,801 additions and 3,207 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"node/no-unpublished-import": [
"error",
{
"allowModules": ["playwright-chromium"]
"allowModules": ["@jest/types", "playwright-chromium"]
}
],
"unicorn/numeric-separators-style": "off",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ jobs:
- name: Setup NodeJS version
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'

- name: Setup dotnet version
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '6.0.x'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'

- name: Cache node modules
uses: actions/cache@v3
Expand Down
27 changes: 0 additions & 27 deletions e2e/jest.config.json

This file was deleted.

30 changes: 30 additions & 0 deletions e2e/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type { Config } from '@jest/types';

const config: Config.InitialOptions = {
projects: [
{
displayName: 'Backend Tests',
preset: 'ts-jest',
rootDir: '.',
snapshotSerializers: ['<rootDir>/utils/jwt-serializer.js', '<rootDir>/utils/jwt-payload-serializer.js'],
testMatch: ['<rootDir>/tests/**/*.spec.ts'],
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/dist/', '<rootDir>/tests/*.e2e-spec.ts'],
testEnvironment: 'node',
},
{
displayName: 'Frontend Tests',
preset: 'jest-playwright-preset',
rootDir: '.',
snapshotSerializers: ['<rootDir>/utils/jwt-serializer.js', '<rootDir>/utils/jwt-payload-serializer.js'],
testMatch: ['<rootDir>/tests/**/*.e2e-spec.ts'],
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/dist/'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
testEnvironment: 'node',
},
],
testTimeout: 60000,
};

export default config;
30 changes: 15 additions & 15 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
"name": "e2e",
"version": "1.0.0",
"scripts": {
"test": "jest --runInBand --ci --config jest.config.json"
"test": "jest --runInBand --ci --config jest.config.ts"
},
"license": "MIT",
"engines": {
"node": ">=10.0.0"
},
"dependencies": {
"chance": "^1.1.8",
"docker-compose": "^0.23.17",
"dotenv": "^16.0.1",
"chance": "^1.1.9",
"dotenv": "^16.0.3",
"jws": "^4.0.0",
"node-fetch": "^2.6.7",
"node-fetch": "^2.6.9",
"playwright-chromium": "^1.22.2",
"wait-on": "^6.0.1",
"yaml": "^2.1.1"
"wait-on": "^7.0.1",
"yaml": "^2.2.1"
},
"devDependencies": {
"@jest/types": "^29.4.2",
"@types/chance": "^1.1.3",
"@types/jest": "^27.5.2",
"@types/jws": "^3.2.4",
"@types/node": "^16.11.39",
"@types/node-fetch": "^2.6.1",
"@types/jest": "^29.4.0",
"@types/jws": "^3.2.5",
"@types/node": "^18.13.0",
"@types/node-fetch": "^2.6.2",
"@types/wait-on": "^5.3.1",
"jest": "^27.5.1",
"jest-playwright-preset": "^1.7.2",
"ts-jest": "^27.1.5",
"typescript": "^4.7.3"
"jest": "^29.4.2",
"jest-playwright-preset": "^3.0.1",
"ts-jest": "^29.0.5",
"typescript": "^4.9.5"
}
}
2 changes: 1 addition & 1 deletion e2e/tests/base-path.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Base path', () => {
agent: new Agent({ rejectUnauthorized: false }),
});
const result = await response.json();
expect(result.token_endpoint).toEqual(process.env.OIDC_TOKEN_URL_WITH_BASE_PATH);
expect(result).toHaveProperty('token_endpoint', process.env.OIDC_TOKEN_URL_WITH_BASE_PATH);
});

test('Token Endpoint', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ exports[`User management Token Endpoint 1`] = `
`;

exports[`User management UserInfo Endpoint 1`] = `
Object {
{
"email": Any<String>,
"name": Any<String>,
"some-custom-identity-user-claim": Any<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`Authorization Code Flow (with PKCE) - simple_user - Token Endpoint 1`]
`;

exports[`Authorization Code Flow (with PKCE) - simple_user - UserInfo Endpoint 1`] = `
Object {
{
"sub": "simple_user",
}
`;
Expand Down Expand Up @@ -81,7 +81,7 @@ exports[`Authorization Code Flow (with PKCE) - user_with_all_claim_types - Token
`;

exports[`Authorization Code Flow (with PKCE) - user_with_all_claim_types - UserInfo Endpoint 1`] = `
Object {
{
"email": "oliver.hunter@gmail.com",
"name": "Oliver Hunter",
"some-custom-identity-user-claim": "Oliver's Custom User Claim",
Expand Down Expand Up @@ -129,7 +129,7 @@ exports[`Authorization Code Flow (with PKCE) - user_with_custom_api_resource_cla
`;

exports[`Authorization Code Flow (with PKCE) - user_with_custom_api_resource_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "sam.tailor@gmail.com",
"name": "Sam Tailor",
"sub": "user_with_custom_api_resource_claims",
Expand Down Expand Up @@ -172,7 +172,7 @@ exports[`Authorization Code Flow (with PKCE) - user_with_custom_identity_claims
`;

exports[`Authorization Code Flow (with PKCE) - user_with_custom_identity_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "jack.sparrow@gmail.com",
"name": "Jack Sparrow",
"some-custom-identity-user-claim": "Jack's Custom User Claim",
Expand Down Expand Up @@ -216,7 +216,7 @@ exports[`Authorization Code Flow (with PKCE) - user_with_standard_claims - Token
`;

exports[`Authorization Code Flow (with PKCE) - user_with_standard_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "john.smith@gmail.com",
"email_verified": "true",
"name": "John Smith",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`Authorization Code Flow - simple_user - Token Endpoint 1`] = `
`;

exports[`Authorization Code Flow - simple_user - UserInfo Endpoint 1`] = `
Object {
{
"sub": "simple_user",
}
`;
Expand Down Expand Up @@ -81,7 +81,7 @@ exports[`Authorization Code Flow - user_with_all_claim_types - Token Endpoint 1`
`;

exports[`Authorization Code Flow - user_with_all_claim_types - UserInfo Endpoint 1`] = `
Object {
{
"email": "oliver.hunter@gmail.com",
"name": "Oliver Hunter",
"some-custom-identity-user-claim": "Oliver's Custom User Claim",
Expand Down Expand Up @@ -129,7 +129,7 @@ exports[`Authorization Code Flow - user_with_custom_api_resource_claims - Token
`;

exports[`Authorization Code Flow - user_with_custom_api_resource_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "sam.tailor@gmail.com",
"name": "Sam Tailor",
"sub": "user_with_custom_api_resource_claims",
Expand Down Expand Up @@ -172,7 +172,7 @@ exports[`Authorization Code Flow - user_with_custom_identity_claims - Token Endp
`;

exports[`Authorization Code Flow - user_with_custom_identity_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "jack.sparrow@gmail.com",
"name": "Jack Sparrow",
"some-custom-identity-user-claim": "Jack's Custom User Claim",
Expand Down Expand Up @@ -216,7 +216,7 @@ exports[`Authorization Code Flow - user_with_standard_claims - Token Endpoint 1`
`;

exports[`Authorization Code Flow - user_with_standard_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "john.smith@gmail.com",
"email_verified": "true",
"name": "John Smith",
Expand Down
10 changes: 5 additions & 5 deletions e2e/tests/flows/__snapshots__/implicit-flow.e2e-spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exports[`Implicit Flow - simple_user - Introspection Endpoint 1`] = `
`;

exports[`Implicit Flow - simple_user - UserInfo Endpoint 1`] = `
Object {
{
"sub": "simple_user",
}
`;
Expand Down Expand Up @@ -114,7 +114,7 @@ exports[`Implicit Flow - user_with_all_claim_types - Introspection Endpoint 1`]
`;

exports[`Implicit Flow - user_with_all_claim_types - UserInfo Endpoint 1`] = `
Object {
{
"email": "oliver.hunter@gmail.com",
"name": "Oliver Hunter",
"some-custom-identity-user-claim": "Oliver's Custom User Claim",
Expand Down Expand Up @@ -179,7 +179,7 @@ exports[`Implicit Flow - user_with_custom_api_resource_claims - Introspection En
`;

exports[`Implicit Flow - user_with_custom_api_resource_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "sam.tailor@gmail.com",
"name": "Sam Tailor",
"sub": "user_with_custom_api_resource_claims",
Expand Down Expand Up @@ -240,7 +240,7 @@ exports[`Implicit Flow - user_with_custom_identity_claims - Introspection Endpoi
`;

exports[`Implicit Flow - user_with_custom_identity_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "jack.sparrow@gmail.com",
"name": "Jack Sparrow",
"some-custom-identity-user-claim": "Jack's Custom User Claim",
Expand Down Expand Up @@ -302,7 +302,7 @@ exports[`Implicit Flow - user_with_standard_claims - Introspection Endpoint 1`]
`;

exports[`Implicit Flow - user_with_standard_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "john.smith@gmail.com",
"email_verified": "true",
"name": "John Smith",
Expand Down
10 changes: 5 additions & 5 deletions e2e/tests/flows/__snapshots__/password-flow.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports[`Password Flow - simple_user - Token Endpoint 1`] = `
`;

exports[`Password Flow - simple_user - UserInfo Endpoint 1`] = `
Object {
{
"sub": "simple_user",
}
`;
Expand Down Expand Up @@ -81,7 +81,7 @@ exports[`Password Flow - user_with_all_claim_types - Token Endpoint 1`] = `
`;

exports[`Password Flow - user_with_all_claim_types - UserInfo Endpoint 1`] = `
Object {
{
"email": "oliver.hunter@gmail.com",
"name": "Oliver Hunter",
"some-custom-identity-user-claim": "Oliver's Custom User Claim",
Expand Down Expand Up @@ -129,7 +129,7 @@ exports[`Password Flow - user_with_custom_api_resource_claims - Token Endpoint 1
`;

exports[`Password Flow - user_with_custom_api_resource_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "sam.tailor@gmail.com",
"name": "Sam Tailor",
"sub": "user_with_custom_api_resource_claims",
Expand Down Expand Up @@ -172,7 +172,7 @@ exports[`Password Flow - user_with_custom_identity_claims - Token Endpoint 1`] =
`;

exports[`Password Flow - user_with_custom_identity_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "jack.sparrow@gmail.com",
"name": "Jack Sparrow",
"some-custom-identity-user-claim": "Jack's Custom User Claim",
Expand Down Expand Up @@ -216,7 +216,7 @@ exports[`Password Flow - user_with_standard_claims - Token Endpoint 1`] = `
`;

exports[`Password Flow - user_with_standard_claims - UserInfo Endpoint 1`] = `
Object {
{
"email": "john.smith@gmail.com",
"email_verified": "true",
"name": "John Smith",
Expand Down
Loading

0 comments on commit 9b6f2f9

Please sign in to comment.