Skip to content

Commit

Permalink
Update NX to latest version (15.8.9) (#1586)
Browse files Browse the repository at this point in the history
* chore: add migrations and update package.json

* chore: [nx migration] update-configs-jest-29

* chore: [nx migration] update-angular-cli-version-15-2-0

* chore: update yarn.lock

* chore: Update PRODUCTION_DEPENDENCIES.md

* Chore: bump version to 0.3.210 for build/infrastructure/eo/chart/Chart.yaml

* Chore: bump version to 0.3.210 for build/infrastructure/eo/chart/values.yaml

* fix(eo): add timezone to fix spec

* fix: specs for dh-admin-feature-user-management

* fix(ui-watt): specs

* fix(market-participant): specs

* chore: fix yarn.lock

* revert: change EO spec instead

* Chore: bump version to 0.3.211 for build/infrastructure/eo/chart/values.yaml

* Chore: bump version to 0.3.211 for build/infrastructure/eo/chart/Chart.yaml

* chore: remove migrations.json

* chore: update tsconfig.spec.json to ES2016

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 67b7d5e commit e4097bc
Show file tree
Hide file tree
Showing 114 changed files with 2,165 additions and 3,313 deletions.
24 changes: 12 additions & 12 deletions PRODUCTION_DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
| Name | Version | License |
| ---- | ------- | ------- |
| [angular-slider/ngx-slider](https://github.com/angular-slider/ngx-slider) | 2.0.4 | MIT |
| [angular/animations](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/cdk](https://github.com/angular/components) | 15.1.2 | MIT |
| [angular/common](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/compiler](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/core](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/forms](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/material-date-fns-adapter](https://github.com/angular/components) | 15.1.2 | MIT |
| [angular/material](https://github.com/angular/components) | 15.1.2 | MIT |
| [angular/platform-browser-dynamic](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/platform-browser](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/router](https://github.com/angular/angular) | 15.1.2 | MIT |
| [angular/animations](https://github.com/angular/angular) | 15.2.4 | MIT |
| [angular/cdk](https://github.com/angular/components) | 15.2.4 | MIT |
| [angular/common](https://github.com/angular/angular) | 15.2.4 | MIT |
| [angular/compiler](https://github.com/angular/angular) | 15.2.4 | MIT |
| [angular/core](https://github.com/angular/angular) | 15.2.4 | MIT |
| [angular/forms](https://github.com/angular/angular) | 15.2.4 | MIT |
| [angular/material-date-fns-adapter](https://github.com/angular/components) | 15.2.4 | MIT |
| [angular/material](https://github.com/angular/components) | 15.2.4 | MIT |
| [angular/platform-browser-dynamic](https://github.com/angular/angular) | 15.2.4 | MIT |
| [angular/platform-browser](https://github.com/angular/angular) | 15.2.4 | MIT |
| [angular/router](https://github.com/angular/angular) | 15.2.4 | MIT |
| [apollo/client](https://github.com/apollographql/apollo-client) | 3.7.7 | MIT |
| [azure/msal-angular](https://github.com/AzureAD/microsoft-authentication-library-for-js) | 2.5.4 | MIT |
| [azure/msal-browser](https://github.com/AzureAD/microsoft-authentication-library-for-js) | 2.34.0 | MIT |
| [microsoft/applicationinsights-angularplugin-js](undefined) | 3.0.0 | MIT* |
| [microsoft/applicationinsights-web](https://github.com/microsoft/ApplicationInsights-JS) | 2.8.9 | MIT |
| [ngneat/transloco](https://github.com/ngneat/transloco) | 4.2.2 | MIT |
| [ngrx/component-store](https://github.com/ngrx/platform) | 15.0.0 | MIT |
| [ngrx/component-store](https://github.com/ngrx/platform) | 15.3.0 | MIT |
| [popperjs/core](https://github.com/popperjs/popper-core) | 2.11.6 | MIT |
| [rx-angular/cdk](https://github.com/rx-angular/rx-angular) | 1.0.0-rc.4 | MIT |
| [rx-angular/template](https://github.com/rx-angular/rx-angular) | 1.0.0-rc.5 | MIT |
Expand Down
16 changes: 8 additions & 8 deletions apps/dh/app-dh/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ export default {
displayName: 'dh-app',
preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
crypto: require('crypto'), // Required by MSAL
},
globals: { crypto: require('crypto') },
coverageDirectory: '../../coverage/apps/dh/app-dh',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
15 changes: 8 additions & 7 deletions apps/eo/app-eo/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ export default {
displayName: 'app-eo',
preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../coverage/apps/eo/app-eo',
/**
* https://stackoverflow.com/questions/42260218/jest-setup-syntaxerror-unexpected-token-export
Expand All @@ -34,7 +29,13 @@ export default {
'lodash-es': 'lodash',
},
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
2 changes: 1 addition & 1 deletion build/infrastructure/eo/chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: eo-frontend
description: A Helm chart for Kubernetes
type: application
version: 0.3.210
version: 0.3.211
2 changes: 1 addition & 1 deletion build/infrastructure/eo/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ app:
replicaCount: 2
image:
name: ghcr.io/energinet-datahub/eo-frontend-app
tag: 0.3.210
tag: 0.3.211
16 changes: 11 additions & 5 deletions jest.preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ const path = require('path');

module.exports = {
...nxPreset,
testEnvironment: path.join(
__dirname,
'scripts/gf/test-util',
'jsdom-lax-ssl-environment.ts'
),
testEnvironment: path.join(__dirname, 'scripts/gf/test-util', 'jsdom-lax-ssl-environment.ts'),
testURL: 'https://localhost:5001',
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
};
15 changes: 8 additions & 7 deletions libs/dh/admin/data-access-api/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-data-access-api',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/data-access-api',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
3 changes: 2 additions & 1 deletion libs/dh/admin/data-access-api/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"target": "ES2016"
},
"files": ["src/test-setup.ts"],
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/feature-create-user-role/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-feature-create-user-role',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/feature-create-user-role',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/feature-edit-permission-modal/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-feature-edit-permission-modal',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/feature-edit-permission-modal',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/feature-edit-user-role-modal/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-feature-edit-user-role-modal',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/feature-edit-user-role-modal',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/feature-invite-user-modal/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-feature-invite-user-modal',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/feature-invite-user-modal',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/feature-permissions/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-feature-permissions',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/feature-permissions',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/feature-user-management/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-feature-user-management',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/feature-user-management',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe(DhUsersTabComponent.name, () => {
expect(store.updateSearchText).toHaveBeenCalledWith(inputValue);
}));

it('forwards status filter value to store', async () => {
it('forwards status filter value to store', fakeAsync(async () => {
const { store, matSelect } = await setup();

await matSelect.open();
Expand All @@ -127,5 +127,5 @@ describe(DhUsersTabComponent.name, () => {

const allOptions = Object.keys(MarketParticipantUserStatus);
expect(store.updateStatusFilter).toHaveBeenCalledWith(allOptions);
});
}));
});
3 changes: 2 additions & 1 deletion libs/dh/admin/feature-user-management/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": ["jest", "node"],
"target": "ES2016"
},
"files": ["src/test-setup.ts"],
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/feature-user-roles/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-feature-user-roles',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/feature-user-roles',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
15 changes: 8 additions & 7 deletions libs/dh/admin/routing/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export default {
displayName: 'dh-admin-routing',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../../../coverage/libs/dh/admin/routing',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
Loading

0 comments on commit e4097bc

Please sign in to comment.