Skip to content

Commit 9608db4

Browse files
v19 Upgrade (#8)
1 parent 96b5d3a commit 9608db4

File tree

7 files changed

+9788
-13436
lines changed

7 files changed

+9788
-13436
lines changed

apps/angular-task/.eslintrc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
{
22
"extends": ["../../.eslintrc.json"],
3-
"ignorePatterns": ["!**/*"]
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"rules": {
8+
"@angular-eslint/prefer-standalone": "off"
9+
}
10+
}
11+
]
412
}

apps/angular-task/server.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { APP_BASE_HREF } from '@angular/common';
2-
import { CommonEngine } from '@angular/ssr';
2+
import { CommonEngine } from '@angular/ssr/node';
33
import express from 'express';
44
import { fileURLToPath } from 'node:url';
55
import { dirname, join, resolve } from 'node:path';
@@ -26,16 +26,15 @@ export function app (): express.Express {
2626
express.static(browserDistFolder, {
2727
maxAge: '1y',
2828
index: 'index.html',
29-
})
29+
}),
3030
);
3131

3232
// All regular routes use the Angular engine
3333
server.get('**', (req, res, next) => {
3434

3535
const { protocol, originalUrl, baseUrl, headers } = req;
3636

37-
commonEngine
38-
.render({
37+
commonEngine.render({
3938
bootstrap,
4039
documentFilePath: indexHtml,
4140
url: `${protocol}://${headers.host}${originalUrl}`,

apps/angular-task/src/app/app.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Component } from '@angular/core';
22
import { RouterModule } from '@angular/router';
33

44
@Component({
5-
standalone: true,
65
imports: [RouterModule],
76
selector: 'crx-root',
87
templateUrl: './app.component.html',
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
2-
globalThis.ngJest = {
3-
testEnvironmentOptions: {
4-
errorOnUnknownElements: true,
5-
errorOnUnknownProperties: true,
6-
},
7-
};
8-
import 'jest-preset-angular/setup-jest';
1+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2+
3+
setupZoneTestEnv();

nx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@
7676
"style": "scss",
7777
"standalone": true
7878
}
79-
}
79+
},
80+
"useLegacyCache": true
8081
}

0 commit comments

Comments
 (0)