Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🤖 upgrade to angular v16 #661

Merged
merged 4 commits into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
18 changes: 0 additions & 18 deletions angular.json

This file was deleted.

2 changes: 2 additions & 0 deletions apps/transloco-playground-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "transloco-playground-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/transloco-playground-e2e/src",
"projectType": "application",
"targets": {
Expand Down
17 changes: 0 additions & 17 deletions apps/transloco-playground/.browserslistrc

This file was deleted.

2 changes: 2 additions & 0 deletions apps/transloco-playground/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "transloco-playground",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/transloco-playground/src",
"prefix": "transloco-nx-shell",
Expand Down
2 changes: 1 addition & 1 deletion apps/transloco-playground/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule { }
6 changes: 0 additions & 6 deletions apps/transloco-playground/src/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
3 changes: 2 additions & 1 deletion apps/transloco-playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
14 changes: 13 additions & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
const nxPreset = require('@nrwl/jest/preset').default;

module.exports = { ...nxPreset };
module.exports = {
...nxPreset,
/* 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 },
};
6 changes: 4 additions & 2 deletions libs/transloco-locale/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "transloco-locale",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/transloco-locale/src",
"prefix": "transloco-nx-shell",
"targets": {
"build": {
"executor": "@nrwl/angular:package",
"outputs": ["dist/libs/transloco-locale"],
"executor": "@nx/angular:package",
"outputs": ["{workspaceRoot}/dist/libs/transloco-locale"],
"options": {
"updateBuildableProjectDepsInPackageJson": false,
"project": "libs/transloco-locale/ng-package.json"
Expand Down
6 changes: 0 additions & 6 deletions libs/transloco-locale/src/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
3 changes: 2 additions & 1 deletion libs/transloco-locale/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion libs/transloco-locale/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"types": []
},
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
"include": ["**/*.ts"]
Expand Down
6 changes: 4 additions & 2 deletions libs/transloco-messageformat/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "transloco-messageformat",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/transloco-messageformat/src",
"prefix": "transloco-nx-shell",
"targets": {
"build": {
"executor": "@nrwl/angular:package",
"outputs": ["dist/libs/transloco-messageformat"],
"executor": "@nx/angular:package",
"outputs": ["{workspaceRoot}/dist/libs/transloco-messageformat"],
"options": {
"updateBuildableProjectDepsInPackageJson": false,
"project": "libs/transloco-messageformat/ng-package.json"
Expand Down
6 changes: 0 additions & 6 deletions libs/transloco-messageformat/src/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
3 changes: 2 additions & 1 deletion libs/transloco-messageformat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion libs/transloco-messageformat/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"target": "es2015",
"target": "es2020",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
Expand Down
2 changes: 2 additions & 0 deletions libs/transloco-optimize/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "transloco-optimize",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/transloco-optimize/src",
"projectType": "library",
"targets": {
Expand Down
6 changes: 0 additions & 6 deletions libs/transloco-optimize/src/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
5 changes: 4 additions & 1 deletion libs/transloco-optimize/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
{
"path": "./tsconfig.spec.json"
}
]
],
"compilerOptions": {
"target": "es2020"
}
}
6 changes: 4 additions & 2 deletions libs/transloco-persist-lang/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "transloco-persist-lang",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/transloco-persist-lang/src",
"prefix": "transloco-nx-shell",
"targets": {
"build": {
"executor": "@nrwl/angular:package",
"outputs": ["dist/libs/transloco-persist-lang"],
"executor": "@nx/angular:package",
"outputs": ["{workspaceRoot}/dist/libs/transloco-persist-lang"],
"options": {
"updateBuildableProjectDepsInPackageJson": false,
"project": "libs/transloco-persist-lang/ng-package.json"
Expand Down
6 changes: 0 additions & 6 deletions libs/transloco-persist-lang/src/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
3 changes: 2 additions & 1 deletion libs/transloco-persist-lang/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion libs/transloco-persist-lang/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"target": "es2015",
"target": "es2020",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
Expand Down
6 changes: 4 additions & 2 deletions libs/transloco-persist-translations/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "transloco-persist-translations",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/transloco-persist-translations/src",
"prefix": "transloco-nx-shell",
"targets": {
"build": {
"executor": "@nrwl/angular:package",
"outputs": ["dist/libs/transloco-persist-translations"],
"executor": "@nx/angular:package",
"outputs": ["{workspaceRoot}/dist/libs/transloco-persist-translations"],
"options": {
"updateBuildableProjectDepsInPackageJson": false,
"project": "libs/transloco-persist-translations/ng-package.json"
Expand Down
6 changes: 0 additions & 6 deletions libs/transloco-persist-translations/src/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
3 changes: 2 additions & 1 deletion libs/transloco-persist-translations/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion libs/transloco-persist-translations/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"target": "es2015",
"target": "es2020",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
Expand Down
6 changes: 4 additions & 2 deletions libs/transloco-preload-langs/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "transloco-preload-langs",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/transloco-preload-langs/src",
"prefix": "transloco-nx-shell",
"targets": {
"build": {
"executor": "@nrwl/angular:package",
"outputs": ["dist/libs/transloco-preload-langs"],
"executor": "@nx/angular:package",
"outputs": ["{workspaceRoot}/dist/libs/transloco-preload-langs"],
"options": {
"updateBuildableProjectDepsInPackageJson": false,
"project": "libs/transloco-preload-langs/ng-package.json"
Expand Down
6 changes: 0 additions & 6 deletions libs/transloco-preload-langs/src/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
3 changes: 2 additions & 1 deletion libs/transloco-preload-langs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion libs/transloco-preload-langs/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"target": "es2015",
"target": "es2020",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
Expand Down
Loading