Skip to content

Commit 4e72f1a

Browse files
committed
chore: migrating to NG21
1 parent 28ed09e commit 4e72f1a

40 files changed

+6685
-4944
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.20.0

src/EcommerceDDD.Spa/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.20.0

src/EcommerceDDD.Spa/angular.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@
3838
"scripts": [
3939
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
4040
],
41-
"browser": "src/main.ts"
41+
"browser": "src/main.ts",
42+
"allowedCommonJsDependencies": [
43+
"@opentelemetry/api",
44+
"tinyduration"
45+
]
4246
},
4347
"configurations": {
4448
"production": {
@@ -50,7 +54,7 @@
5054
},
5155
{
5256
"type": "anyComponentStyle",
53-
"maximumWarning": "2kb",
57+
"maximumWarning": "3kb",
5458
"maximumError": "4kb"
5559
}
5660
],
@@ -60,7 +64,8 @@
6064
"with": "src/environments/environment.prod.ts"
6165
}
6266
],
63-
"outputHashing": "all"
67+
"outputHashing": "all",
68+
"optimization": true
6469
},
6570
"development": {
6671
"optimization": false,
Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
1-
21
module.exports = {
32
preset: 'jest-preset-angular',
4-
moduleDirectories: [ "node_modules", "src"],
5-
63
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
7-
testEnvironment: "jsdom",
4+
testEnvironment: 'jsdom',
5+
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/dist/'],
6+
coverageDirectory: 'coverage',
7+
transform: {
8+
'^.+\\.(ts|mjs|js|html)$': [
9+
'jest-preset-angular',
10+
{
11+
tsconfig: '<rootDir>/tsconfig.spec.json',
12+
stringifyContentPathRegex: '\\.(html|svg)$',
13+
},
14+
],
15+
},
16+
transformIgnorePatterns: ['node_modules/(?!(@microsoft|@opentelemetry|tinyduration|@angular|ngx-toastr|@ng-bootstrap|@fortawesome)/)'],
17+
moduleFileExtensions: ['ts', 'html', 'js', 'json', 'mjs'],
818
moduleNameMapper: {
9-
"@core/(.*)": "<rootDir>/src/app/core/$1",
10-
"@ecommerce/(.*)": "<rootDir>/src/app/modules/ecommerce/$1",
11-
"@authentication/(.*)": "<rootDir>/src/app/modules/authentication/$1",
12-
"@shared/(.*)": "<rootDir>/src/app/shared/$1",
13-
"@environments/(.*)": "<rootDir>/src/environments/$1"
19+
'^zone\\.js$': '<rootDir>/node_modules/zone.js/fesm2015/zone.js',
20+
'^(.*)\\.js$': '$1',
21+
'^src/app/clients/(.*)$': '<rootDir>/src/app/clients/$1',
22+
'@core/(.*)': '<rootDir>/src/app/core/$1',
23+
'@ecommerce/(.*)': '<rootDir>/src/app/modules/ecommerce/$1',
24+
'@authentication/(.*)': '<rootDir>/src/app/modules/authentication/$1',
25+
'@shared/(.*)': '<rootDir>/src/app/shared/$1',
26+
'@environments/(.*)': '<rootDir>/src/environments/$1',
1427
},
15-
coveragePathIgnorePatterns: ["/models","/constants", "/environments"]
16-
};
28+
coveragePathIgnorePatterns: ['/models', '/constants', '/environments'],
29+
};

0 commit comments

Comments
 (0)