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

feat: update to v19.0 #990

Merged
merged 27 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c40300b
fix: update origin to 19.0.0
lacolaco Nov 20, 2024
6b12134
fix: migrate untranslated contents
lacolaco Nov 20, 2024
fdb847a
fix: migrate tutorial contents
lacolaco Nov 20, 2024
41e3836
fix: migrate reference contents
lacolaco Nov 20, 2024
75c4e1c
fix: migrate essentials contents
lacolaco Nov 20, 2024
fcc2a65
fix: migrate component guides
lacolaco Nov 20, 2024
e12ebc9
fix: migrate di guide contents
lacolaco Nov 20, 2024
e52a05e
fix: migrate directives guide contents
lacolaco Nov 20, 2024
2aedd1b
fix: migrate http guide contents
lacolaco Nov 20, 2024
645a2c1
fix: migrate pipes guide contents
lacolaco Nov 20, 2024
aac5a47
fix: migrate routing guide contents
lacolaco Nov 20, 2024
5ad5efb
fix: migrate signals guide contents
lacolaco Nov 20, 2024
6bf9366
fix: migrate templates guide contents
lacolaco Nov 20, 2024
eb16522
fix: migrate performance, ssr guide contents
lacolaco Nov 20, 2024
5152ab5
fix: migrate best-practices contents
lacolaco Nov 20, 2024
2e303e3
fix: migrate update guide contents
lacolaco Nov 20, 2024
3b535df
fix: migrate essentials
lacolaco Nov 20, 2024
518caae
fix: migrate removed contents
lacolaco Nov 20, 2024
02a978e
fix: migrate navigation
lacolaco Nov 20, 2024
15ff45d
fix: migrate adev patches
lacolaco Nov 20, 2024
4a24de8
fix: address lint errors
lacolaco Nov 20, 2024
73e2392
chore: update translator scripts
lacolaco Nov 20, 2024
2d3bb6d
fix: drop aio support from angular-ja
lacolaco Nov 20, 2024
6dfd649
fix: change search index
lacolaco Nov 20, 2024
9f3b0c6
fix: update current major version value
lacolaco Nov 20, 2024
485a6ff
fix: update build scripts
lacolaco Nov 20, 2024
4dfb547
fix: set production build flag
lacolaco Nov 20, 2024
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
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
Loading