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

Bump Zone.js to remove warnings when using angular >=6. #1522

Merged
merged 3 commits into from
Nov 24, 2018
Merged

Bump Zone.js to remove warnings when using angular >=6. #1522

merged 3 commits into from
Nov 24, 2018

Conversation

d0x
Copy link
Contributor

@d0x d0x commented Nov 22, 2018

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
    @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10)

Description of the PR

Fixed #1506 . Bump Zone.js peer dependency. Angular 6 and 7 is using Zone.js 0.8.26. I tested zone.js 0.8.26 in our environment with Angular 6.

Since it shouldn't break anything, the current master branch is correct, or?

@Committee: I used the syntax ^0.7.6 || ^0.8.26 to support a wider range of angular versions. What do you think about this?

And why ./bin/typescript-angular-petstore-all.sh doesn't put this syntax into the generated package.jsons?

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.

@macjohnny
Copy link
Member

I think the zone.js dependency could be removed from the peerDependencies, since it will be included in angular projects anyway.

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw that the angular 2/4 samples are also affected, this should not be the case, since the zone.js dependency should remain 0.7.6 int that case

@d0x
Copy link
Contributor Author

d0x commented Nov 22, 2018

@macjohnny ok, what do you suggest?

Should I remove the zonejs dependencies since we already depend on angular/http?

And regarding the change on angular2/4 samples, what should I do there? I just regenerated all the angular samples with ^0.7.6 || ^0.8.26. That shouldn't be a problem for angular2/4. Do you agree? We don't have a switch to deliver different templates for different angular versions.
image

@macjohnny
Copy link
Member

@d0x I suggest to remove the peerDependency on zone.js. Concerning the 2/4 compatibility, I think ^0.7.6 || ^0.8.26 is a good option, as the dependency will be given by angular anyway, so npm will find the zone.js version that matches all constraints

@d0x
Copy link
Contributor Author

d0x commented Nov 22, 2018

Ok, I think we have it then.

I removed it and regenerated the templates.

@wing328 wing328 added this to the 3.3.4 milestone Nov 24, 2018
@wing328 wing328 merged commit 0ba9278 into OpenAPITools:master Nov 24, 2018
@wing328 wing328 changed the title #1506 Bump Zone.js to remove warnings when using angular >=6. Bump Zone.js to remove warnings when using angular >=6. Nov 30, 2018
@wing328
Copy link
Member

wing328 commented Dec 4, 2018

@d0x thanks for the PR, which has been included in the v3.3.4 release: https://twitter.com/oas_generator/status/1068772409795207168

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
…>=6. (OpenAPITools#1522)

* 1506 allow zonejs 0.7.x and 0.8.x to support a wider range of angular versions

* OpenAPITools#1506 Removed zone.js as peer since it comes with angular itself

* OpenAPITools#1506 Removed zone.js as peer since it comes with angular itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants