Skip to content

Commit 9043761

Browse files
chore: updates for angular 16
1 parent 6dbb644 commit 9043761

15 files changed

Lines changed: 8681 additions & 26477 deletions

.eslintignore

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

.eslintrc.json

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,61 @@
44
"**/*"
55
],
66
"plugins": [
7-
"@nrwl/nx"
7+
"@nx"
88
],
99
"overrides": [
1010
{
11-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
11+
"files": [
12+
"*.ts",
13+
"*.tsx",
14+
"*.js",
15+
"*.jsx"
16+
],
1217
"rules": {
13-
"@nrwl/nx/enforce-module-boundaries": [
18+
"@nx/enforce-module-boundaries": [
1419
"error",
1520
{
1621
"enforceBuildableLibDependency": true,
1722
"allow": [],
1823
"depConstraints": [
19-
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
24+
{
25+
"sourceTag": "*",
26+
"onlyDependOnLibsWithTags": [
27+
"*"
28+
]
29+
}
2030
]
2131
}
2232
]
2333
}
2434
},
2535
{
26-
"files": ["*.ts", "*.tsx"],
27-
"extends": ["plugin:@nrwl/nx/typescript"],
28-
"parserOptions": { "project": "./tsconfig.*?.json" },
36+
"files": [
37+
"*.ts",
38+
"*.tsx"
39+
],
40+
"extends": [
41+
"plugin:@nx/typescript"
42+
],
43+
"parserOptions": {
44+
"project": "./tsconfig.*?.json"
45+
},
2946
"rules": {
3047
"semi": "off",
31-
"@typescript-eslint/semi": ["error"],
48+
"@typescript-eslint/semi": [
49+
"error"
50+
],
3251
"@typescript-eslint/ban-ts-comment": "off"
3352
}
3453
},
3554
{
36-
"files": ["*.js", "*.jsx"],
37-
"extends": ["plugin:@nrwl/nx/javascript"],
55+
"files": [
56+
"*.js",
57+
"*.jsx"
58+
],
59+
"extends": [
60+
"plugin:@nx/javascript"
61+
],
3862
"rules": {}
3963
}
4064
]

angular.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

apps/demo/.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"*.ts"
1212
],
1313
"extends": [
14-
"plugin:@nrwl/nx/angular",
14+
"plugin:@nx/angular",
1515
"plugin:@angular-eslint/template/process-inline-templates"
1616
],
1717
"rules": {}
@@ -21,7 +21,7 @@
2121
"*.html"
2222
],
2323
"extends": [
24-
"plugin:@nrwl/nx/angular-template"
24+
"plugin:@nx/angular-template"
2525
],
2626
"rules": {}
2727
}

apps/demo/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dependsOn": [
2828
{
2929
"target": "build",
30-
"projects": "dependencies"
30+
"dependencies": true
3131
}
3232
],
3333
"configurations": {
@@ -62,7 +62,7 @@
6262
}
6363
},
6464
"lint": {
65-
"executor": "@nrwl/linter:eslint",
65+
"executor": "@nx/linter:eslint",
6666
"options": {
6767
"lintFilePatterns": [
6868
"apps/demo/**/*.ts"

decorate-angular-cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ const cp = require('child_process');
2727
const isWindows = os.platform() === 'win32';
2828
let output;
2929
try {
30-
output = require('@nrwl/workspace').output;
30+
output = require('@nx/workspace').output;
3131
} catch (e) {
32-
console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.');
32+
console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nx/workspace is installed.');
3333
process.exit(0);
3434
}
3535

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const { getJestProjects } = require('@nrwl/jest');
1+
const { getJestProjects } = require('@nx/jest');
22

33
export default {"projects": getJestProjects()};

jest.preset.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
const nxPreset = require('@nrwl/jest/preset').default;
1+
const nxPreset = require('@nx/jest/preset').default;
22
module.exports = {
3-
...nxPreset,
4-
...{
3+
...nxPreset,
4+
...{
55
coverageReporters: ['text-summary', 'json', 'lcov']
6-
}
6+
},
7+
/* TODO: Update to latest Jest snapshotFormat
8+
* By default Nx has kept the older style of Jest Snapshot formats
9+
* to prevent breaking of any existing tests with snapshots.
10+
* It's recommend you update to the latest format.
11+
* You can do this by removing snapshotFormat property
12+
* and running tests with --update-snapshot flag.
13+
* Example: "nx affected --targets=test --update-snapshot"
14+
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
15+
*/
16+
snapshotFormat: { escapeString: true, printBasicPrototype: true }
717
}

libs/ng2-file-upload/.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"*.ts"
1212
],
1313
"extends": [
14-
"plugin:@nrwl/nx/angular",
14+
"plugin:@nx/angular",
1515
"plugin:@angular-eslint/template/process-inline-templates"
1616
],
1717
"rules": {}
@@ -21,7 +21,7 @@
2121
"*.html"
2222
],
2323
"extends": [
24-
"plugin:@nrwl/nx/angular-template"
24+
"plugin:@nx/angular-template"
2525
],
2626
"rules": {}
2727
}

libs/ng2-file-upload/jest.config.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ export default {
33
displayName: 'ng2-file-upload',
44
preset: '../../jest.preset.js',
55
setupFilesAfterEnv: ['<rootDir>/testing/test-setup.ts'],
6-
globals: {
7-
'ts-jest': {
8-
tsconfig: '<rootDir>/tsconfig.spec.json',
9-
10-
}
11-
},
6+
globals: { },
127
coverageDirectory: '../../coverage/libs/ng2-file-upload',
138
snapshotSerializers: [
149
'jest-preset-angular/build/serializers/no-ng-attributes',
1510
'jest-preset-angular/build/serializers/ng-snapshot',
1611
'jest-preset-angular/build/serializers/html-comment'
1712
],
18-
transform: { '^.+.(ts|mjs|js|html)$': 'jest-preset-angular' },
13+
transform: { '^.+.(ts|mjs|js|html)$': ['jest-preset-angular', {
14+
tsconfig: '<rootDir>/tsconfig.spec.json',
15+
16+
}] },
1917
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
2018
moduleFileExtensions: ['mjs', 'ts', 'js', 'html']
2119
};

0 commit comments

Comments
 (0)