angular-cn/integration/ng_update_migrations
Paul Gschwendtner 0577bf0e3e refactor: enable ng update migrations for v10 (#36921)
Enables the `ng update` migrations for v10. Status for individual
migrations:

**undecorated-classes-with-di**.

This migration dealt exlusively with inherited constructors and
cases where a derived component was undecorated. In those cases,
the migration added `@Directive()` or copied the inherited decorator
to the derived class.

We don't need to run this migration again because ngtsc throws if
constructor is inherited from an undecorated class. Also ngtsc will
throw if a NgModule references an undecorated class in the declarations.

***undecorated-classes-with-decorated-fields***

This migration exclusively deals with undecorated classes that use
Angular features but are not decorated. Angular features include
the use of lifecycle hooks or class fields with Angular decorators,
such as `@Input()`.

We want to re-run this migration in v10 as we will disable the
compatibility code in ngtsc that detects such undecorated classes
as `@Directive`.

**module-with-providers**:

This migration adds an explicit generic type to `ModuleWithProviders`.
As of v10, the generic type is required, so we need to re-run the
migration again.

**renderer-to-renderer2**:

We don't need to re-run that migration again as the
renderer has been already removed in v9.

**missing-injectable**:

This migration is exclusively concerned with undecorated
providers referenced in an `NgModule`. We should re-run
that migration again as we don't have proper backsliding
prevention for this yet. We can consider adding an error
in ngtsc for v10, or v11. In either way, we should re-run
the migration.

**dynamic-queries**:

We ran this one in v9 to reduce code complexity in projects. Instead
of explicitly passing `static: false`, not passing any object literal
has the same semantics. We don't need to re-run the migration again
since there is no good way to prevent backsliding and we cannot always
run this migration for future versions (as some apps might actually
intentionally use the explicit `static: false` option).

PR Close #36921
2020-05-06 15:06:10 -07:00
..
src refactor: enable ng update migrations for v10 (#36921) 2020-05-06 15:06:10 -07:00
.gitignore build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
README.md build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
angular.json build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
browserslist build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
karma.conf.js build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
package.json build: add npm_integration_test && angular_integration_test (#33927) 2020-02-24 08:59:18 -08:00
test.js refactor: enable ng update migrations for v10 (#36921) 2020-05-06 15:06:10 -07:00
tsconfig.app.json build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
tsconfig.json build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
tsconfig.spec.json build: create integration test for ng-update migrations (#32349) 2019-08-29 12:34:43 -07:00
yarn.lock test: add integration test for undecorated-classes-with-decorated-fields migration (#35339) 2020-04-02 10:51:48 -07:00

README.md

NgUpdateMigrations

This project was generated with Angular CLI version 8.0.0-beta.15.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.