nodejs / node-core-test

Node 18's node:test, as an npm package
Other
95 stars 10 forks source link

Pull latest commits from node core #34

Closed aduh95 closed 2 years ago

aduh95 commented 2 years ago

I guess it would deserve to be documented somewhere. How I am doing it:

git fetch https://github.com/nodejs/node.git main
git cherry-pick -x FETCH_HEAD # instead of FETCH_HEAD, you can use a commit SHA
# ... fix the conflicts ...
# replace the URL in the files with the new git SHA
npm run test:lint:fix && npm run test:unit
# fix the failing tests, add the missing primordials, etc.
npm run test:lint:fix && npm run test:unit
git commit -S
MoLow commented 2 years ago

thanks, Il try it out on one of the next merged PRS

MoLow commented 2 years ago

@aduh95 added this, https://github.com/nodejs/node-core-test/wiki/How-this-repo-is-mantained

aduh95 commented 2 years ago

https://github.com/nodejs/node-core-test/pull/34/commits/8b5a21424038788a6b6caf29eb0bb88a36897198 is not semver-minor, it should be fix:, not feat:.

https://github.com/nodejs/node-core-test/pull/34/commits/5270582864c043eb51447cba6146e707ca002b33 should use fix(doc): copyedit `README.md` as commit title imo.

MoLow commented 2 years ago

Will fix later

aduh95 commented 2 years ago

It looks like you used -x too many times, the (cherry picked from commit …) has been duplicated in both commit messages.

FWIW, when you only want to amend the commit messages, I find it easier to use git rebase

git fetch https://github.com/nodejs/node-core-test.git main
git rebase FETCH_HEAD -i -S # it should open a text editor, you can replace `pick` with
                            # `reword` in front of the commits you want to amend.
MoLow commented 2 years ago

thansk @aduh95 !