Skip to content

update to Angular 13 and partial compilation #99

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

L2jLiga
Copy link

@L2jLiga L2jLiga commented Nov 25, 2021

This PR updates library Angular version from 7 to 13 and enables partial compilation to be fully compatible with newest versions of Angular

Fixes #96
Fixes #100

@kekeh
Copy link
Owner

kekeh commented Dec 2, 2021

Hi @L2jLiga

I tried to test this PR in angular 8 project, but I got lot of errors when I tried to run ng serve or ng build --prod in Angular 8 project. Have you tested this PR with Angular 8?

ERROR in node_modules/angular-mydatepicker/lib/angular-mydatepicker.input.d.ts:82:21 - error TS2694: Namespace '"/temp/test8/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

82     static ɵfac: i0.ɵɵFactoryDeclaration<AngularMyDatePickerDirective, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/angular-mydatepicker/lib/angular-mydatepicker.input.d.ts:83:21 - error TS2694: Namespace '"/temp/test8/node_modules/@angular/core/core"' has no exported member 'ɵɵDirectiveDeclaration'.

more errors...

How to proceed:

  • In PR project build library by running npm run build-lib
  • Change dir to dist/angular-mydatepicker
  • Create npm package by running npm pack
    • Npm package angular-mydatepicker-0.11.5.tgz created
  • In Angular 8 project install package by running npm install path_to_package/angular-mydatepicker-0.11.5.tgz
  • Add angular-mydatepicker to the app.module.ts file of Angular 8 project
  • Try to run ng serve or ng build --prod
    • Those errors appears

I see you have done commits to each Angular release starting from Angular 8. Do you have any idea what could be reason to those errors or how to fix them?

@siddharth1903
Copy link

@kekeh it may not be a wise idea to have a single branch catering to all angular versions! Based on how you plan to maintain the repository, you may want to have support strategies for each branch with its own angular version.. May be you can have one v8-old branch for now that just can have bug fixes harnessed from your main branch!

@b-legrand
Copy link

hi, i'm interested in using this lib in an angular 13 project and also would'nt recommand using a lib built with angular above 9 with a version below (there were huge breaking changes in ivy)

most of the libs these days follow the angular release train, so the best way to process would be to have a major release for each angular version, ( i.e. make a PR with the 8.0 upgrade only, create a tag and release/support branch for 8.x, then make a 8.x release for this lib, make a PR with the 9.0 upgrade only, tag/branch for 9.x, then make a 9.x release for this lib and so on... )

it would make support and bugfixes easier

i'll gladly help if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning is shown when Ivy render is used in Angular 13 Fix problem with eslint
4 participants