progress / JSDO

Client side TypeScript library to access Progress® Data Object Services
Other
23 stars 27 forks source link

Angular 8 with JSDO #266

Closed hutcj closed 4 years ago

hutcj commented 5 years ago

Regarding the following JSDO for Angular node packages: https://www.npmjs.com/package/@progress/jsdo-core https://www.npmjs.com/package/@progress/jsdo-angular

We began using these packages in an Angular 7 project close to a year ago. We would always get warning messages that the JSDO packages required peer dependency of Angular version 6.1. However, since the code worked as expected, we ignored the warnings.

Now we would like to upgrade to Angular 8 since it is now available. However, ng update refuses to upgrade versions because JSDO has declared version 6.1 of Angular a peer dependency. When is this going to be updated?

The update process for Angular apps seems fairly straightforward: https://update.angular.io/#6.1:7.0

zerovian commented 5 years ago

Hi hutcj,

The JSDO is a community supported project and we welcome contributions. Angular 8 support is in the backlog, but right now is not a high priority for the development team. If you care to issue a pull request with the requisite changes needed, we'd be happy to review the work.

hutcj commented 5 years ago

Hi zerovian,

As far as I can tell, the version update would require nothing more than updating the @angular/core references to be something like "@angular/core": "^6.1.0 - ^8.0.0" instead of "@angular/core": "^6.1.0" as there are no relevant breaking changes between ng 6-7 and ng 7-8.

I have committed this change in a branch, following the guidelines posted here: https://github.com/progress/JSDO/blob/master/contributing.md#contribute-to-the-code-base

However, I got rejected when trying to push up my feature branch. image

zerovian commented 5 years ago

Hi hutcj,

sorry for the lag. we're in the middle of PI planning so every one is ignoring some of their responsibilities...like me.

you can't push directly to this repository. You would need to be listed as a team member. Normally the process is to clone the repository in github so you have your own personal copy of the repo, then make your changes in a feature branch, based off the develop branch, in your own repo. After you build and test, then issue a pull request to progress/JSDO upstream repository, and we'll review it and merge the pull request if it passes our tests.

hutcj commented 5 years ago

https://github.com/progress/JSDO/pull/267

edselg commented 4 years ago

Hello @hutcj

Thank you for reporting this issue and submitting a pull request.

I wanted to share with you the results of my testing.

I tried to reproduce this issue by installing Angular 7.3.9 then trying to upgrade to 8.3.9 and in this way test your changes and determine if additional changes were required.

I used the following steps:

Note: These steps can be found in the following wiki:

I reproduced the issue by running "ng update" on the Angular project:

image

The issue goes away after updating @progress/jsdo-angular with a version (new 7.0.0) that includes your proposed fix of using @angular/core 8.0.0 as a peer dependency instead of 6.1.0.

image

Note: The Angular project may error out with the following message: ERROR in The Angular Compiler requires TypeScript >=3.4.0 and <3.6.0 but 3.6.4 was found instead.

I installed TypeScript 3.4.5.

An additional change is required in @progress/jsdo-core to work with Angular 8:

    var _global = (0, eval)('this');

    if (typeof progress === "undefined") {
        _global.progress = {};
    }

The application runs fine using @progress/jsdo-angular@7.0.0 with Angular 7.0.0 as well as with Angular 8.0.0. The difference is that there would be no peer warning when using jsdo-angular 7.0.0 and Angular 8.0.0 together. The application runs fine with anonymous, basic and form authentication.

image

I will merge your pull request and perform the additional required changes.

Thank you and regards.

hutcj commented 4 years ago

Thanks, Edsel!

hutcj commented 4 years ago

@edselg I see this was merged, but is a new version going to be released soon with the changes?

edselg commented 4 years ago

@hutcj

I have not heard of a new version being released soon. You can mention of your need to your contact at Progress.

In the meantime, you can build your own packages from the develop branch.

Here are the instructions:

  1. git clone https://github.com/progress/JSDO.git
  2. cd JSDO
  3. git checkout develop
  4. npm install
  5. npm run build:jsdo
  6. npm run build:jsdo-core
  7. npm run pack:jsdo-core
  8. cd packages\ng-datasource
  9. npm install ....\build\packages\progress-jsdo-core-7.0.0.tgz
  10. npm install
  11. npm install @angular/core@8.0.0
  12. npm install rxjs@6.5.3
  13. npm install zone.js@~0.9.1
  14. npm install @types/node@8
  15. npm run build:ds
  16. npm run build:jsdo-angular
  17. npm run pack:jsdo-angular

Once you have build the packages for jsdo-core and jsdo-angular, then you install the new version in your Angular project:

I hope this helps.

Please let me know how it goes.

Thank you and regards.

zerovian commented 4 years ago

@hutcj there are no short term plans to release a new version of JSDO. Next program increment starts end of January and discussions are ongoing as to what work will be done. Best bet, for now, is to clone and build it locally following @edselg instructions.

edselg commented 4 years ago

Issue was fixed via pull request #269 .