Skip to content

Commit

Permalink
feat: update to v19.0 (#990)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lacolaco authored Nov 20, 2024
1 parent 4eb3724 commit 58f44e9
Show file tree
Hide file tree
Showing 156 changed files with 4,330 additions and 5,891 deletions.
6 changes: 4 additions & 2 deletions .textlintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"が",
"に",
"にも",
"は"
"は",
"でも"
]
},
"no-exclamation-question-mark": false,
Expand All @@ -40,7 +41,8 @@
"二重中括弧構文",
"変更検知戦略",
"推移的依存関係",
"三重等号演算子"
"三重等号演算子",
"入力変換関数"
]
},
"ja-no-mixed-period": false
Expand Down
117 changes: 117 additions & 0 deletions adev-ja/src/app/features/update/recommendations.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2397,4 +2397,121 @@ export const RECOMMENDATIONS: Step[] = [
action:
'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.',
},

{
action:
'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.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-standalone-declarations',
},
{
action:
'Remove `this.` prefix when accessing template reference variables. For example, refactor `<div #foo></div>{{ this.foo }}` to `<div #foo></div>{{ foo }}`',
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-remove-this',
},
{
action:
'Replace usages of `BrowserModule.withServerTransition()` with injection of the `APP_ID` token to set the application `id` instead.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-remove-browser-module-with-server-transition',
},
{
action: 'The `factories` property in `KeyValueDiffers` has been removed.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-remove-key-value-differs-factories',
},
{
action:
'In angular.json, replace the "name" option with "project" for the `@angular/localize` builder.',
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0_localize_builder_project_option',
},
{
action: 'Rename `ExperimentalPendingTasks` to `PendingTasks`.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0_rename_experimental_pending_tasks',
},
{
action:
"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.",
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0.1',
},
{
action: 'Upgrade to TypeScript version 5.5 or later.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0.2',
},
{
action:
'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`.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-timers-in-zone',
},
{
action:
"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.",
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-render-default-fallback',
},
{
action:
'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.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-hybrid-scheduler-timing',
},
{
action:
'Migrate from using `Router.errorHandler` to `withNavigationErrorHandler` from `provideRouter` or `errorHandler` from `RouterModule.forRoot`.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-router-error-handler',
},
{
action:
'Update tests to handle errors thrown during `ApplicationRef.tick` by either triggering change detection synchronously or rejecting outstanding `ComponentFixture.whenStable` promises.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-testbed-error-handling',
},
{
action: 'Update usages of `Resolve` interface to include `RedirectCommand` in its return type.',
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-update-resolve-interface-return-type',
},
{
action:
'`fakeAsync` will flush pending timers by default. For tests that require the previous behavior, explicitly pass `{flush: false}` in the options parameter.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-update-fakeasync-to-flush-pending-timers',
},
];
117 changes: 117 additions & 0 deletions adev-ja/src/app/features/update/recommendations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2397,4 +2397,121 @@ export const RECOMMENDATIONS: Step[] = [
action:
'`ComponentFixture.autoDetect` が `ApplicationRef.tick` 内のフィクスチャの変更検出を実行するようになったため、`ComponentFixture.autoDetect` を使用しているときに変更検出の実行順序に依存しているテストがあると、テストに失敗することがあります。たとえば、これによってテストフィクスチャは、これまではその逆であったかもしれませんが、作成するダイアログの前にリフレッシュされます。',
},

{
action:
'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.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-standalone-declarations',
},
{
action:
'Remove `this.` prefix when accessing template reference variables. For example, refactor `<div #foo></div>{{ this.foo }}` to `<div #foo></div>{{ foo }}`',
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-remove-this',
},
{
action:
'Replace usages of `BrowserModule.withServerTransition()` with injection of the `APP_ID` token to set the application `id` instead.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-remove-browser-module-with-server-transition',
},
{
action: 'The `factories` property in `KeyValueDiffers` has been removed.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-remove-key-value-differs-factories',
},
{
action:
'In angular.json, replace the "name" option with "project" for the `@angular/localize` builder.',
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0_localize_builder_project_option',
},
{
action: 'Rename `ExperimentalPendingTasks` to `PendingTasks`.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0_rename_experimental_pending_tasks',
},
{
action:
"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.",
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0.1',
},
{
action: 'Upgrade to TypeScript version 5.5 or later.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0.2',
},
{
action:
'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`.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-timers-in-zone',
},
{
action:
"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.",
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-render-default-fallback',
},
{
action:
'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.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-hybrid-scheduler-timing',
},
{
action:
'Migrate from using `Router.errorHandler` to `withNavigationErrorHandler` from `provideRouter` or `errorHandler` from `RouterModule.forRoot`.',
level: ApplicationComplexity.Basic,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-router-error-handler',
},
{
action:
'Update tests to handle errors thrown during `ApplicationRef.tick` by either triggering change detection synchronously or rejecting outstanding `ComponentFixture.whenStable` promises.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-testbed-error-handling',
},
{
action: 'Update usages of `Resolve` interface to include `RedirectCommand` in its return type.',
level: ApplicationComplexity.Medium,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-update-resolve-interface-return-type',
},
{
action:
'`fakeAsync` will flush pending timers by default. For tests that require the previous behavior, explicitly pass `{flush: false}` in the options parameter.',
level: ApplicationComplexity.Advanced,
necessaryAsOf: 1900,
possibleIn: 1900,
step: '19.0.0-update-fakeasync-to-flush-pending-timers',
},
];
3 changes: 2 additions & 1 deletion adev-ja/src/app/features/update/update.component.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default class AppComponent {
protected afterRecommendations: Step[] = [];

protected readonly versions = [
{name: '19.0', number: 1900},
{name: '18.0', number: 1800},
{name: '17.0', number: 1700},
{name: '16.0', number: 1600},
Expand Down Expand Up @@ -93,7 +94,7 @@ export default class AppComponent {
];
protected from = this.versions.find((version) => version.name === '17.0')!;
protected to = this.versions.find((version) => version.name === '18.0')!;
protected futureVersion = 1900;
protected futureVersion = 2000;

protected readonly steps: Step[] = RECOMMENDATIONS;

Expand Down
3 changes: 2 additions & 1 deletion adev-ja/src/app/features/update/update.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default class AppComponent {
protected afterRecommendations: Step[] = [];

protected readonly versions = [
{name: '19.0', number: 1900},
{name: '18.0', number: 1800},
{name: '17.0', number: 1700},
{name: '16.0', number: 1600},
Expand Down Expand Up @@ -93,7 +94,7 @@ export default class AppComponent {
];
protected from = this.versions.find((version) => version.name === '17.0')!;
protected to = this.versions.find((version) => version.name === '18.0')!;
protected futureVersion = 1900;
protected futureVersion = 2000;

protected readonly steps: Step[] = RECOMMENDATIONS;

Expand Down
Loading

0 comments on commit 58f44e9

Please sign in to comment.