Skip to content

Commit 58f44e9

Browse files
authored
feat: update to v19.0 (#990)
* fix: update origin to 19.0.0 * fix: migrate untranslated contents * fix: migrate tutorial contents * fix: migrate reference contents * fix: migrate essentials contents * fix: migrate component guides * fix: migrate di guide contents * fix: migrate directives guide contents * fix: migrate http guide contents * fix: migrate pipes guide contents * fix: migrate routing guide contents * fix: migrate signals guide contents * fix: migrate templates guide contents * fix: migrate performance, ssr guide contents * fix: migrate best-practices contents * fix: migrate update guide contents * fix: migrate essentials * fix: migrate removed contents * fix: migrate navigation * fix: migrate adev patches * fix: address lint errors * chore: update translator scripts * fix: drop aio support from angular-ja * fix: change search index * fix: update current major version value * fix: update build scripts * fix: set production build flag
1 parent 4eb3724 commit 58f44e9

File tree

156 files changed

+4330
-5891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+4330
-5891
lines changed

.textlintrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"が",
3131
"に",
3232
"にも",
33-
"は"
33+
"は",
34+
"でも"
3435
]
3536
},
3637
"no-exclamation-question-mark": false,
@@ -40,7 +41,8 @@
4041
"二重中括弧構文",
4142
"変更検知戦略",
4243
"推移的依存関係",
43-
"三重等号演算子"
44+
"三重等号演算子",
45+
"入力変換関数"
4446
]
4547
},
4648
"ja-no-mixed-period": false

adev-ja/src/app/features/update/recommendations.en.ts

+117
Original file line numberDiff line numberDiff line change
@@ -2397,4 +2397,121 @@ export const RECOMMENDATIONS: Step[] = [
23972397
action:
23982398
'You may experience tests failures if you have tests that rely on change detection execution order when using `ComponentFixture.autoDetect` because it now executes change detection for fixtures within `ApplicationRef.tick`. For example, this will cause test fixture to refresh before any dialogs that it creates whereas this may have been the other way around in the past.',
23992399
},
2400+
2401+
{
2402+
action:
2403+
'Angular directives, components and pipes are now standalone by default. Specify "standalone: false" for declarations that are currently declared in an NgModule. The Angular CLI will automatically update your code to reflect that.',
2404+
level: ApplicationComplexity.Basic,
2405+
necessaryAsOf: 1900,
2406+
possibleIn: 1900,
2407+
step: '19.0.0-standalone-declarations',
2408+
},
2409+
{
2410+
action:
2411+
'Remove `this.` prefix when accessing template reference variables. For example, refactor `<div #foo></div>{{ this.foo }}` to `<div #foo></div>{{ foo }}`',
2412+
level: ApplicationComplexity.Medium,
2413+
necessaryAsOf: 1900,
2414+
possibleIn: 1900,
2415+
step: '19.0.0-remove-this',
2416+
},
2417+
{
2418+
action:
2419+
'Replace usages of `BrowserModule.withServerTransition()` with injection of the `APP_ID` token to set the application `id` instead.',
2420+
level: ApplicationComplexity.Basic,
2421+
necessaryAsOf: 1900,
2422+
possibleIn: 1900,
2423+
step: '19.0.0-remove-browser-module-with-server-transition',
2424+
},
2425+
{
2426+
action: 'The `factories` property in `KeyValueDiffers` has been removed.',
2427+
level: ApplicationComplexity.Advanced,
2428+
necessaryAsOf: 1900,
2429+
possibleIn: 1900,
2430+
step: '19.0.0-remove-key-value-differs-factories',
2431+
},
2432+
{
2433+
action:
2434+
'In angular.json, replace the "name" option with "project" for the `@angular/localize` builder.',
2435+
level: ApplicationComplexity.Medium,
2436+
necessaryAsOf: 1900,
2437+
possibleIn: 1900,
2438+
step: '19.0.0_localize_builder_project_option',
2439+
},
2440+
{
2441+
action: 'Rename `ExperimentalPendingTasks` to `PendingTasks`.',
2442+
level: ApplicationComplexity.Advanced,
2443+
necessaryAsOf: 1900,
2444+
possibleIn: 1900,
2445+
step: '19.0.0_rename_experimental_pending_tasks',
2446+
},
2447+
{
2448+
action:
2449+
"Update tests that relied on the `Promise` timing of effects to use `await whenStable()` or call `.detectChanges()` to trigger effects. For effects triggered during change detection, ensure they don't depend on the application being fully rendered or consider using `afterRenderEffect()`. Tests using faked clocks may need to fast-forward/flush the clock.",
2450+
level: ApplicationComplexity.Medium,
2451+
necessaryAsOf: 1900,
2452+
possibleIn: 1900,
2453+
step: '19.0.0.1',
2454+
},
2455+
{
2456+
action: 'Upgrade to TypeScript version 5.5 or later.',
2457+
level: ApplicationComplexity.Basic,
2458+
necessaryAsOf: 1900,
2459+
possibleIn: 1900,
2460+
step: '19.0.0.2',
2461+
},
2462+
{
2463+
action:
2464+
'Update tests using `fakeAsync` that rely on specific timing of zone coalescing and scheduling when a change happens outside the Angular zone (hybrid mode scheduling) as these timers are now affected by `tick` and `flush`.',
2465+
level: ApplicationComplexity.Advanced,
2466+
necessaryAsOf: 1900,
2467+
possibleIn: 1900,
2468+
step: '19.0.0-timers-in-zone',
2469+
},
2470+
{
2471+
action:
2472+
"When using `createComponent` API and not passing content for the first `ng-content`, provide `document.createTextNode('')` as a `projectableNode` to prevent rendering the default fallback content.",
2473+
level: ApplicationComplexity.Medium,
2474+
necessaryAsOf: 1900,
2475+
possibleIn: 1900,
2476+
step: '19.0.0-render-default-fallback',
2477+
},
2478+
{
2479+
action:
2480+
'Update tests that rely on specific timing or ordering of change detection around custom elements, as the timing may have changed due to the switch to the hybrid scheduler.',
2481+
level: ApplicationComplexity.Advanced,
2482+
necessaryAsOf: 1900,
2483+
possibleIn: 1900,
2484+
step: '19.0.0-hybrid-scheduler-timing',
2485+
},
2486+
{
2487+
action:
2488+
'Migrate from using `Router.errorHandler` to `withNavigationErrorHandler` from `provideRouter` or `errorHandler` from `RouterModule.forRoot`.',
2489+
level: ApplicationComplexity.Basic,
2490+
necessaryAsOf: 1900,
2491+
possibleIn: 1900,
2492+
step: '19.0.0-router-error-handler',
2493+
},
2494+
{
2495+
action:
2496+
'Update tests to handle errors thrown during `ApplicationRef.tick` by either triggering change detection synchronously or rejecting outstanding `ComponentFixture.whenStable` promises.',
2497+
level: ApplicationComplexity.Advanced,
2498+
necessaryAsOf: 1900,
2499+
possibleIn: 1900,
2500+
step: '19.0.0-testbed-error-handling',
2501+
},
2502+
{
2503+
action: 'Update usages of `Resolve` interface to include `RedirectCommand` in its return type.',
2504+
level: ApplicationComplexity.Medium,
2505+
necessaryAsOf: 1900,
2506+
possibleIn: 1900,
2507+
step: '19.0.0-update-resolve-interface-return-type',
2508+
},
2509+
{
2510+
action:
2511+
'`fakeAsync` will flush pending timers by default. For tests that require the previous behavior, explicitly pass `{flush: false}` in the options parameter.',
2512+
level: ApplicationComplexity.Advanced,
2513+
necessaryAsOf: 1900,
2514+
possibleIn: 1900,
2515+
step: '19.0.0-update-fakeasync-to-flush-pending-timers',
2516+
},
24002517
];

adev-ja/src/app/features/update/recommendations.ts

+117
Original file line numberDiff line numberDiff line change
@@ -2397,4 +2397,121 @@ export const RECOMMENDATIONS: Step[] = [
23972397
action:
23982398
'`ComponentFixture.autoDetect` が `ApplicationRef.tick` 内のフィクスチャの変更検出を実行するようになったため、`ComponentFixture.autoDetect` を使用しているときに変更検出の実行順序に依存しているテストがあると、テストに失敗することがあります。たとえば、これによってテストフィクスチャは、これまではその逆であったかもしれませんが、作成するダイアログの前にリフレッシュされます。',
23992399
},
2400+
2401+
{
2402+
action:
2403+
'Angular directives, components and pipes are now standalone by default. Specify "standalone: false" for declarations that are currently declared in an NgModule. The Angular CLI will automatically update your code to reflect that.',
2404+
level: ApplicationComplexity.Basic,
2405+
necessaryAsOf: 1900,
2406+
possibleIn: 1900,
2407+
step: '19.0.0-standalone-declarations',
2408+
},
2409+
{
2410+
action:
2411+
'Remove `this.` prefix when accessing template reference variables. For example, refactor `<div #foo></div>{{ this.foo }}` to `<div #foo></div>{{ foo }}`',
2412+
level: ApplicationComplexity.Medium,
2413+
necessaryAsOf: 1900,
2414+
possibleIn: 1900,
2415+
step: '19.0.0-remove-this',
2416+
},
2417+
{
2418+
action:
2419+
'Replace usages of `BrowserModule.withServerTransition()` with injection of the `APP_ID` token to set the application `id` instead.',
2420+
level: ApplicationComplexity.Basic,
2421+
necessaryAsOf: 1900,
2422+
possibleIn: 1900,
2423+
step: '19.0.0-remove-browser-module-with-server-transition',
2424+
},
2425+
{
2426+
action: 'The `factories` property in `KeyValueDiffers` has been removed.',
2427+
level: ApplicationComplexity.Advanced,
2428+
necessaryAsOf: 1900,
2429+
possibleIn: 1900,
2430+
step: '19.0.0-remove-key-value-differs-factories',
2431+
},
2432+
{
2433+
action:
2434+
'In angular.json, replace the "name" option with "project" for the `@angular/localize` builder.',
2435+
level: ApplicationComplexity.Medium,
2436+
necessaryAsOf: 1900,
2437+
possibleIn: 1900,
2438+
step: '19.0.0_localize_builder_project_option',
2439+
},
2440+
{
2441+
action: 'Rename `ExperimentalPendingTasks` to `PendingTasks`.',
2442+
level: ApplicationComplexity.Advanced,
2443+
necessaryAsOf: 1900,
2444+
possibleIn: 1900,
2445+
step: '19.0.0_rename_experimental_pending_tasks',
2446+
},
2447+
{
2448+
action:
2449+
"Update tests that relied on the `Promise` timing of effects to use `await whenStable()` or call `.detectChanges()` to trigger effects. For effects triggered during change detection, ensure they don't depend on the application being fully rendered or consider using `afterRenderEffect()`. Tests using faked clocks may need to fast-forward/flush the clock.",
2450+
level: ApplicationComplexity.Medium,
2451+
necessaryAsOf: 1900,
2452+
possibleIn: 1900,
2453+
step: '19.0.0.1',
2454+
},
2455+
{
2456+
action: 'Upgrade to TypeScript version 5.5 or later.',
2457+
level: ApplicationComplexity.Basic,
2458+
necessaryAsOf: 1900,
2459+
possibleIn: 1900,
2460+
step: '19.0.0.2',
2461+
},
2462+
{
2463+
action:
2464+
'Update tests using `fakeAsync` that rely on specific timing of zone coalescing and scheduling when a change happens outside the Angular zone (hybrid mode scheduling) as these timers are now affected by `tick` and `flush`.',
2465+
level: ApplicationComplexity.Advanced,
2466+
necessaryAsOf: 1900,
2467+
possibleIn: 1900,
2468+
step: '19.0.0-timers-in-zone',
2469+
},
2470+
{
2471+
action:
2472+
"When using `createComponent` API and not passing content for the first `ng-content`, provide `document.createTextNode('')` as a `projectableNode` to prevent rendering the default fallback content.",
2473+
level: ApplicationComplexity.Medium,
2474+
necessaryAsOf: 1900,
2475+
possibleIn: 1900,
2476+
step: '19.0.0-render-default-fallback',
2477+
},
2478+
{
2479+
action:
2480+
'Update tests that rely on specific timing or ordering of change detection around custom elements, as the timing may have changed due to the switch to the hybrid scheduler.',
2481+
level: ApplicationComplexity.Advanced,
2482+
necessaryAsOf: 1900,
2483+
possibleIn: 1900,
2484+
step: '19.0.0-hybrid-scheduler-timing',
2485+
},
2486+
{
2487+
action:
2488+
'Migrate from using `Router.errorHandler` to `withNavigationErrorHandler` from `provideRouter` or `errorHandler` from `RouterModule.forRoot`.',
2489+
level: ApplicationComplexity.Basic,
2490+
necessaryAsOf: 1900,
2491+
possibleIn: 1900,
2492+
step: '19.0.0-router-error-handler',
2493+
},
2494+
{
2495+
action:
2496+
'Update tests to handle errors thrown during `ApplicationRef.tick` by either triggering change detection synchronously or rejecting outstanding `ComponentFixture.whenStable` promises.',
2497+
level: ApplicationComplexity.Advanced,
2498+
necessaryAsOf: 1900,
2499+
possibleIn: 1900,
2500+
step: '19.0.0-testbed-error-handling',
2501+
},
2502+
{
2503+
action: 'Update usages of `Resolve` interface to include `RedirectCommand` in its return type.',
2504+
level: ApplicationComplexity.Medium,
2505+
necessaryAsOf: 1900,
2506+
possibleIn: 1900,
2507+
step: '19.0.0-update-resolve-interface-return-type',
2508+
},
2509+
{
2510+
action:
2511+
'`fakeAsync` will flush pending timers by default. For tests that require the previous behavior, explicitly pass `{flush: false}` in the options parameter.',
2512+
level: ApplicationComplexity.Advanced,
2513+
necessaryAsOf: 1900,
2514+
possibleIn: 1900,
2515+
step: '19.0.0-update-fakeasync-to-flush-pending-timers',
2516+
},
24002517
];

adev-ja/src/app/features/update/update.component.en.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export default class AppComponent {
5656
protected afterRecommendations: Step[] = [];
5757

5858
protected readonly versions = [
59+
{name: '19.0', number: 1900},
5960
{name: '18.0', number: 1800},
6061
{name: '17.0', number: 1700},
6162
{name: '16.0', number: 1600},
@@ -93,7 +94,7 @@ export default class AppComponent {
9394
];
9495
protected from = this.versions.find((version) => version.name === '17.0')!;
9596
protected to = this.versions.find((version) => version.name === '18.0')!;
96-
protected futureVersion = 1900;
97+
protected futureVersion = 2000;
9798

9899
protected readonly steps: Step[] = RECOMMENDATIONS;
99100

adev-ja/src/app/features/update/update.component.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export default class AppComponent {
5656
protected afterRecommendations: Step[] = [];
5757

5858
protected readonly versions = [
59+
{name: '19.0', number: 1900},
5960
{name: '18.0', number: 1800},
6061
{name: '17.0', number: 1700},
6162
{name: '16.0', number: 1600},
@@ -93,7 +94,7 @@ export default class AppComponent {
9394
];
9495
protected from = this.versions.find((version) => version.name === '17.0')!;
9596
protected to = this.versions.find((version) => version.name === '18.0')!;
96-
protected futureVersion = 1900;
97+
protected futureVersion = 2000;
9798

9899
protected readonly steps: Step[] = RECOMMENDATIONS;
99100

0 commit comments

Comments
 (0)