Skip to content

feat: basic update for @nativescript/[email protected] #276

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

Merged
merged 11 commits into from
Jun 16, 2020

Conversation

d-koppenhagen
Copy link
Contributor

PR Checklist

What is the current behavior?

Running the current schematics with an Angular 9 project needs some manual changes after it:
https://github.com/NativeScript/nativescript-angular/wiki/Updating-and-developing-for-@nativescript-angular-v9-with-Ivy-or-without

What is the new behavior?

The changes will add the manual steps to the schematics so that they will work immediately with angular9.

Fixes/Implements/Closes #275.

BREAKING CHANGES:

Angular 9 is required.

@d-koppenhagen
Copy link
Contributor Author

@NathanWalker let's start supporting Angular 9. Would be great to check my changes in detail.

@NathanWalker
Copy link
Contributor

@d-koppenhagen excellent start here! Thank you - we'll collaborate here 👍

@NathanWalker NathanWalker self-assigned this Jun 11, 2020
to be alinged with the Angular CLI Breaking Change intorduced in 9.0.0.
See: https://github.com/angular/angular-cli/releases/tag/v9.0.0

BREAKING CHANGE:
use `style` CLI option instead of `styleext` option from now
@cla-bot cla-bot bot added the cla: yes label Jun 14, 2020
@d-koppenhagen
Copy link
Contributor Author

@NathanWalker there are still two tests failing:

It seems that there is some logic removing one Module in case the other is used.
In the old version the imports came from separate modules but now they are all from @nativescript/angular.

**************************************************
*                    Failures                    *
**************************************************

1) Refactor NsNg Modules Schematic when a feature module has both NativeScriptModule and NativeScriptAnimationsModule imported should remove the NativeScriptAnimationsModule import
  - Expected '
          import { , NativeScriptCommonModuleNativeScriptAnimationsModule } from "@nativescript/angular";
          import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";

          @NgModule({
            imports: [
              NativeScriptCommonModule,,
            ],
            schemas: [NO_ERRORS_SCHEMA]
          })
          export class FeatureModule { }
        ' not to match 'NativeScriptAnimationsModule'.

2) Refactor NsNg Modules Schematic when a feature module has both NativeScriptModule and NativeScriptAnimationsModule imported should import the NativeScriptCommonModule to the feature module
  - Expected '
          import { , NativeScriptCommonModuleNativeScriptAnimationsModule } from "@nativescript/angular";
          import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";

          @NgModule({
            imports: [
              NativeScriptCommonModule,,
            ],
            schemas: [NO_ERRORS_SCHEMA]
          })
          export class FeatureModule { }
        ' to match 'import { NativeScriptCommonModule } from "@nativescript/angular"'.

Executed 151 of 151 specs (2 FAILED) in 11 secs.

I couldn't dig deeper into it until now.

@d-koppenhagen d-koppenhagen marked this pull request as draft June 14, 2020 11:43
@d-koppenhagen
Copy link
Contributor Author

Oh and will nativescript-dev-webpack find also a new place in the @nativescript scope?
So probably: @nativescript/dev-webpack in the near future?

@NathanWalker
Copy link
Contributor

@d-koppenhagen Yes on webpack. That will become @nativescript/webpack this summer.

@d-koppenhagen
Copy link
Contributor Author

@NathanWalker okay, the breaking stuff was my faulf: I also adjusted the Angular CLI migartion script from previous version which should stay the same as before as they will be applied step by step. Still open: Migration script from current version to new version

@NathanWalker NathanWalker marked this pull request as ready for review June 16, 2020 05:14
@NathanWalker NathanWalker merged commit 0bacc61 into NativeScript:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to Angular 9
2 participants