Thanks to visit codestin.com
Credit goes to github.com

Skip to content

build: update to rules_nodejs 1.0.0 #18064

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 1 commit into from
Jan 6, 2020

Conversation

gregmagolan
Copy link
Contributor

Dependency sandwich exists between material & angular so we need to patch both @angular/bazel & ts-api-guardian npm packages to land this so that the material-unit-test CI job in angular/angular#34589 can be greened up.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 29, 2019
@gregmagolan gregmagolan marked this pull request as ready for review December 29, 2019 22:41
@gregmagolan gregmagolan requested review from devversion, jelbourn and a team as code owners December 29, 2019 22:41
@gregmagolan
Copy link
Contributor Author

gregmagolan commented Dec 29, 2019

@devversion I introduced the patch-package tool which is a nicer workflow for patching npm packages IMO. A lot of the code from post install patches .js could be put into /patches/ patch files instead. I'll leave that up to you and I can switch to post install patches .js in this PR if that is preferred.

The workflow with patch-package is to edit the files in node_modules as desired and then run yarn patch-package <package name>. For example, running yarn patch-package @angular/bazel the tool checks out a clean @angular/bazel to a tmp folder, handles the diff and create the patches/@angular+bazel+9.0.0-rc.7.patch file. In postinstall you just add patch-package and all of the patch files in /patches are evaluated and applied.

@gregmagolan gregmagolan force-pushed the rules_nodejs_1.0.0 branch 2 times, most recently from 2dff01a to 304d5c2 Compare December 29, 2019 23:40
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@gregmagolan I'd prefer we keep using our existing postinstall patch code. It also allows us to apply .patch files. The benefit is that we could combine the two patches, and in general that we can provide more context on why these patches are applied/needed.

patch-package only allows to apply changes per package, while we sometimes want to apply changes to multiple packages for a single reason (this can be grouped in the current posinstall patches script). I don't feel too strong about it.

@devversion devversion added pr: lgtm target: patch This PR is targeted for the next patch release labels Dec 31, 2019
@gregmagolan
Copy link
Contributor Author

Oh nice. I didn't notice you had a convenient patchPackage() function in your postinstall .js. Switched the patches over to there. Thanks!

@gregmagolan
Copy link
Contributor Author

gregmagolan commented Dec 31, 2019

Ready to merge; I believe this needs to go on master & not patch however as that is the branch the angular pulling in CI and testing against.

This is a pre-req to landing the Angular update to rules_nodejs 1.0.0: angular/angular#34589

Dependency sandwich exists between material & angular so we need to patch both @angular/bazel & ts-api-guardian npm packages to land this so that the material-unit-test CI job in angular/angular#34589 can be greened up.
@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Dec 31, 2019
@devversion
Copy link
Member

Thanks for addressing the feedback. We want the changes between the patch branch and master branch to be as minimal as possible, so I think we want target: patch. Also master is the patch branch at the moment until v9 stable has been released.

@gregmagolan
Copy link
Contributor Author

👍 SGTM

@mmalerba mmalerba merged commit ad689cd into angular:master Jan 6, 2020
atscott pushed a commit to angular/angular that referenced this pull request Jan 10, 2020
…ejs 1.0 update (#34589)

This commit includes angular/components#18064 which is a pre-req for updating the angular repo to rules_nodejs 1.0.

PR Close #34589
atscott pushed a commit to angular/angular that referenced this pull request Jan 10, 2020
…ejs 1.0 update (#34589)

This commit includes angular/components#18064 which is a pre-req for updating the angular repo to rules_nodejs 1.0.

PR Close #34589
yifange pushed a commit to yifange/components that referenced this pull request Jan 30, 2020
Dependency sandwich exists between material & angular so we need to patch both @angular/bazel & ts-api-guardian npm packages to land this so that the material-unit-test CI job in angular/angular#34589 can be greened up.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants