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

Refreshed and improved to support bootstraping of major upgrade PR πŸš€ #143

Merged
merged 27 commits into from
Sep 25, 2024

Conversation

AdrieanKhisbe
Copy link
Member

Huge set of enhancements to the project, with main goals to refresh dependencies and to support the add hoc draft of major bump pull requests

  • Refreshing 🌬️

    • πŸš₯ test on latest node 522ce7c
    • πŸ™ test on github actions 2701e91
    • πŸ“€ bump of major library, replacement of outdated ones (request, bluebird), modern rewrite of async code
  • New features πŸš€

    • 🎟️ ability to infer user & retrieve token from gh cli authentification 533384a
    • πŸ“‚ ability to run on a specific folder 90a347a
    • 🎯 ability to target a specific node version from command line b6329ca
    • πŸ›‘οΈ force-with-lease by default (with optional override) d015ab0
    • πŸ“ customizable reviewers and messages 361aeb4 + 197b7b8
    • πŸš’ preserve original engine range b557b67

used latest version supporting require
default is still the new introduce --force-with-lease mode
async/await refactors and use instead p-* family from sindresorhus, in a version supporting requires
@AdrieanKhisbe AdrieanKhisbe added New Feature πŸš€ Upgrades πŸ“€ dependencies Pull requests that update a dependency file Enhancement 🍭 Nanofeatures and else ;) labels Sep 17, 2024
@AdrieanKhisbe AdrieanKhisbe requested a review from a team September 17, 2024 12:58
@AdrieanKhisbe AdrieanKhisbe self-assigned this Sep 17, 2024
src/core/config.js Show resolved Hide resolved
src/core/git.js Show resolved Hide resolved
@@ -21,7 +21,8 @@
"author": "Mr X @Coorp",
"license": "MIT",
"engines": {
"node": "^18.0.0"
"node": "^12.22.12",

Choose a reason for hiding this comment

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

why targeting node 12 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

mmmm, good catch. looks like an oversight!

Copy link
Member Author

Choose a reason for hiding this comment

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

@adamska27 the nvmrc wasn't updated in the node 18. So running code locally restored the test version.
I just updated the all the version in the test/integration (in bbfa790)

@@ -15,7 +15,8 @@
],
"rules": {
"no-continue": "off",
"fp/no-loops": "off"
"fp/no-loops": "off",
"no-nested-ternary": "off",
Copy link
Member

Choose a reason for hiding this comment

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

πŸ™ˆ

@@ -74,9 +81,23 @@ const resolveConfig = async (config, configPath, argv) => {
base.node.travis = defaultWithPath(base.node.travis, '.travis.yml');
base.node.package = defaultWithPath(base.node.package, 'package.json');
}
base.argv = argv;
base.forceFlag = argv.force ? '--force' : '--force-with-lease';
Copy link
Member

Choose a reason for hiding this comment

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

what are the scenario where you would use --force without lease πŸ˜‚ ❓

Copy link
Member Author

Choose a reason for hiding this comment

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

I had to few time to use it doing testing.

@AdrieanKhisbe AdrieanKhisbe requested a review from a team September 23, 2024 08:16
@AdrieanKhisbe AdrieanKhisbe merged commit 4e88104 into master Sep 25, 2024
11 checks passed
@AdrieanKhisbe AdrieanKhisbe deleted the refreshed-and-improved branch September 25, 2024 15:14
@AdrieanKhisbe
Copy link
Member Author

πŸš€ @coorpacademy/update-node@7.0.0

AdrieanKhisbe added a commit that referenced this pull request Oct 14, 2024
…more resilient πŸͺ­ (#147)

Merge pull request #147 from CoorpAcademy/refreshed-and-improved--more

New huge set of enhancements to the project, following #143 with main goal to make this usable on project with no prior config, and handle command lib with adherence to node version (lerna and serverless).
Also program was improved not to require a clean state before running.
Less config is needed, the program can be run out of the box on any node repository

------
Exemple of command ran: (that boostrapped that PR: CoorpAcademy/coorpacademy-lambda#1590)
```bash
update-node upgrade --target 20 -dcam "Update-node major bump πŸ“€" -R @CoorpAcademy/development-mooc -F api-media -s media
```
flags:
- `d` for default config πŸ†• 7eb2685
- `c` for clean, cleanup before running πŸ†• c6e0220
- `a` for autofigure what to do
- `target`(t) to search to bump for a specific node version (from #143)
- `F` to target a folder (was ran from `coorpacademy-lambda` root (from #143)
- `s` to `scope` in monorepo (scoped added in title and branch name) πŸ†• a1faa74
- `R` to set reviewer (from #143)

------

serverless+lerna support: Serverless runtime will be updated, and every package in a lerna mono repo will be updated ⚑🐲 8fffb7f + 22dcf55

Some adjustement where also made for the program to be more flexible with the baseBranch, supporting non `master` branches
AdrieanKhisbe added a commit that referenced this pull request Oct 21, 2024
Merge pull request #148 from CoorpAcademy/refreshed-and-improved--more-more

#143 and #147 follow up, with few enhancement and glitch fixes

- Sync the package-lock (by default, and with node nvm version loaded) πŸ”„ 
- Add hook `-b`/`--pre-commit-bump-command` to inject commands (like updating a specific package with `ncu`) πŸͺ 
- Restore force push for the autobump ⛑️
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Enhancement 🍭 Nanofeatures and else ;) New Feature πŸš€ Upgrades πŸ“€
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants