Skip to content

Commit

Permalink
feat: upgrade to Angular 15 (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturovt authored Jan 1, 2023
1 parent fcca72b commit 067d9ab
Show file tree
Hide file tree
Showing 26 changed files with 3,522 additions and 4,320 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/single-spa-angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Do not install dependencies again if checksum for the
# `yarn.lock` is the same.
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --pure-lockfile --non-interactive --no-progress
run: yarn --pure-lockfile --non-interactive --no-progress --ignore-optional

- name: Run ESLint
run: yarn lint
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ browserslist
*.ico
dist
.cache
*.snap
assets
.husky
*.ejs
18 changes: 0 additions & 18 deletions apps/chat/.browserslistrc

This file was deleted.

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

export const AppRoutingModule = RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' });
export const AppRoutingModule = RouterModule.forRoot(routes, {});
18 changes: 0 additions & 18 deletions apps/elements/.browserslistrc

This file was deleted.

1 change: 1 addition & 0 deletions apps/elements/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "elements",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/elements/src",
Expand Down
18 changes: 0 additions & 18 deletions apps/navbar/.browserslistrc

This file was deleted.

1 change: 1 addition & 0 deletions apps/navbar/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "navbar",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/navbar/src",
Expand Down
2 changes: 1 addition & 1 deletion apps/navbar/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { EmptyRouteComponent } from './components/empty-route/empty-route.compon
const routes: Routes = [{ path: '**', component: EmptyRouteComponent }];

@NgModule({
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
imports: [RouterModule.forRoot(routes, {})],
exports: [RouterModule],
providers: [{ provide: APP_BASE_HREF, useValue: '/' }],
})
Expand Down
18 changes: 0 additions & 18 deletions apps/noop-zone/.browserslistrc

This file was deleted.

1 change: 1 addition & 0 deletions apps/noop-zone/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "noop-zone",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/noop-zone/src",
Expand Down
2 changes: 1 addition & 1 deletion apps/noop-zone/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ const routes: Routes = [
},
];

export const AppRoutingModule = RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' });
export const AppRoutingModule = RouterModule.forRoot(routes, {});
18 changes: 0 additions & 18 deletions apps/parcel/.browserslistrc

This file was deleted.

1 change: 1 addition & 0 deletions apps/parcel/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "parcel",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/parcel/src",
Expand Down
18 changes: 0 additions & 18 deletions apps/shop/.browserslistrc

This file was deleted.

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

export const AppRoutingModule = RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' });
export const AppRoutingModule = RouterModule.forRoot(routes, {});
18 changes: 0 additions & 18 deletions apps/standalone/.browserslistrc

This file was deleted.

1 change: 1 addition & 0 deletions apps/standalone/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "standalone",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/standalone/src",
Expand Down
1 change: 1 addition & 0 deletions libs/single-spa-angular/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "single-spa-angular",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/single-spa-angular/src",
Expand Down
3 changes: 2 additions & 1 deletion libs/single-spa-angular/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"importHelpers": true,
"downlevelIteration": true,
"lib": ["dom", "es2018"],
"types": ["node"]
"types": ["node"],
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"compilationMode": "partial",
Expand Down
40 changes: 18 additions & 22 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,13 @@
"affected": {
"defaultBase": "master"
},
"implicitDependencies": {
"angular.json": "*",
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
"tsconfig.json": "*",
"tslint.json": "*",
".eslintrc.json": "*",
"nx.json": "*"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"accessToken": "YmQwMTE3MTMtOTE0YS00ZjUwLTliN2ItMWI4N2NmMmQ1MTUzfHJlYWQtd3JpdGU=",
"cacheableOperations": [
"build",
"test",
"lint",
"e2e"
],
"runtimeCacheInputs": [
"node -v",
"node ./scripts/get-os.js"
],
"cacheableOperations": ["build", "test", "lint", "e2e"],
"runtimeCacheInputs": ["node -v", "node ./scripts/get-os.js"],
"canTrackAnalytics": false,
"showUsageWarnings": true,
"parallel": 1
Expand Down Expand Up @@ -60,5 +41,20 @@
}
},
"defaultProject": "single-spa-angular",
"$schema": "./node_modules/nx/schemas/nx-schema.json"
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [
"{workspaceRoot}/angular.json",
"{workspaceRoot}/tsconfig.json",
"{workspaceRoot}/tslint.json",
"{workspaceRoot}/nx.json"
],
"production": ["default"]
},
"targetDefaults": {
"build": {
"inputs": ["production", "^production"]
}
}
}
53 changes: 27 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"test": "yarn clean && jest",
"lint": "eslint apps libs --ext ts",
"// - SINGLE-SPA-ANGULAR": "Scripts for building single-spa-angular",
"build:single-spa-angular": "ng-packagr -p libs/single-spa-angular/ng-package.json && cpx README.md lib",
"build:single-spa-angular": "nx build single-spa-angular --skip-nx-cache && cpx README.md lib",
"// - WEBPACK": "Scripts for building Webpack config transformer",
"prebuild:webpack": "rimraf lib/lib",
"build:webpack": "tsc -p tsconfig.webpack.json",
Expand Down Expand Up @@ -83,28 +83,28 @@
"test:ci:integration": "yarn start-test start:all 8080 cy:run"
},
"devDependencies": {
"@angular-builders/custom-webpack": "14.0.0",
"@angular-devkit/build-angular": "14.1.0",
"@angular-devkit/core": "14.1.0",
"@angular-devkit/schematics": "14.1.0",
"@angular/animations": "14.1.0",
"@angular/cli": "14.1.0",
"@angular/common": "14.1.0",
"@angular/compiler": "14.1.0",
"@angular/compiler-cli": "14.1.0",
"@angular/core": "14.1.0",
"@angular/elements": "14.1.0",
"@angular/forms": "14.1.0",
"@angular/language-service": "14.1.0",
"@angular/platform-browser": "14.1.0",
"@angular/platform-browser-dynamic": "14.1.0",
"@angular/router": "14.1.0",
"@angular-builders/custom-webpack": "15.0.0",
"@angular-devkit/build-angular": "15.0.4",
"@angular-devkit/core": "15.0.4",
"@angular-devkit/schematics": "15.0.4",
"@angular/animations": "15.0.4",
"@angular/cli": "15.0.4",
"@angular/common": "15.0.4",
"@angular/compiler": "15.0.4",
"@angular/compiler-cli": "15.0.4",
"@angular/core": "15.0.4",
"@angular/elements": "15.0.4",
"@angular/forms": "15.0.4",
"@angular/language-service": "15.0.4",
"@angular/platform-browser": "15.0.4",
"@angular/platform-browser-dynamic": "15.0.4",
"@angular/router": "15.0.4",
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@nrwl/angular": "14.3.6",
"@nrwl/cli": "14.3.6",
"@nrwl/nx-cloud": "14.1.2",
"@nrwl/workspace": "14.3.6",
"@nrwl/angular": "15.4.2",
"@nrwl/cli": "15.4.2",
"@nrwl/nx-cloud": "15.0.2",
"@nrwl/workspace": "15.4.2",
"@types/jest": "27.0.3",
"@types/karma": "^6.1.0",
"@types/node": "15.12.1",
Expand All @@ -114,6 +114,7 @@
"@types/systemjs": "^6.1.1",
"@typescript-eslint/eslint-plugin": "4.19.0",
"@typescript-eslint/parser": "4.19.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"concurrently": "^5.1.0",
"cpx": "^1.5.0",
"cypress": "9.5.2",
Expand All @@ -124,7 +125,8 @@
"jest": "27.2.3",
"json5": "^2.2.2",
"lint-staged": "^12.1.1",
"ng-packagr": "14.1.0",
"ng-packagr": "15.0.3",
"nx": "15.4.2",
"postcss": "^8.3.9",
"postcss-import": "14.1.0",
"postcss-preset-env": "7.5.0",
Expand All @@ -133,17 +135,16 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"rimraf": "^2.6.2",
"rxjs": "^7.4.0",
"rxjs": "~7.5.0",
"serve": "^13.0.2",
"single-spa-react": "4.6.0",
"start-server-and-test": "1.14.0",
"style-loader": "^3.3.1",
"ts-jest": "27.0.5",
"tslib": "^2.0.0",
"typescript": "4.7.4",
"typescript": "4.8.4",
"webpack-cli": "^4.9.2",
"zone.js": "0.11.4",
"nx": "14.3.6"
"zone.js": "0.11.4"
},
"dependencies": {
"single-spa": ">= 5.4"
Expand Down
4 changes: 2 additions & 2 deletions workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"noop-zone": "apps/noop-zone",
"parcel": "apps/parcel",
"shop": "apps/shop",
"standalone": "apps/standalone",
"single-spa-angular": "libs/single-spa-angular"
"single-spa-angular": "libs/single-spa-angular",
"standalone": "apps/standalone"
},
"$schema": "./node_modules/nx/schemas/workspace-schema.json"
}
Loading

0 comments on commit 067d9ab

Please sign in to comment.