-
Notifications
You must be signed in to change notification settings - Fork 369
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
fix(deps): upgrade 23 outdated dependencies #7008
base: main
Are you sure you want to change the base?
Conversation
.addOption( | ||
new Option('--httpProxy [address]', 'Old, prefer --http-proxy. Proxy server address to route requests through.') | ||
.default(process.env.HTTP_PROXY || process.env.HTTPS_PROXY) | ||
.hideHelp(true), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there was an httpProxy
option and an http-proxy
option but these got accidentally(?) squashed into a duplicated httpProxy
option in https://github.com/netlify/cli/pull/5816/files#diff-67082469659283bc342bd13f7e20570cb3d1bf5096aad88545a9ac4809d6083bL106-L140. The latest version of commander throws when you declare duplicate options.
What's extra confusing is the copy here implies that http-proxy
was intended to be the new one but that's not where it landed 🤷🏼.
@@ -27,6 +27,7 @@ export const detectNetlifyLambda = async function ({ packageJson } = {}) { | |||
.option('-b, --babelrc [file]') | |||
.option('-t, --timeout [delay]') | |||
|
|||
program.allowExcessArguments() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default behaviour changed in the commander upgrade. This opts back into the previous behaviour. We might consider changing at some point, but it didn't seem right to include this in this PR (and require us to cut a major).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(To be clear here, I ended up only upgrading to commander@12 after all. This behavioural change is in commander@13, but I left this here so we're ready for it, since it doesn't hurt.)
.option('-o, --output <path>', 'Defines the filesystem path where the blob data should be persisted') | ||
.option('-O, --output <path>', 'Defines the filesystem path where the blob data should be persisted') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-o
is already used in the base command for --offline
, so this was being quietly ignored (I tested it locally).
This is fine to be considered a patch change since it has never worked.
Caught by changes in commander upgrade: tj/commander.js#2055.
.option('--json', `Output list contents as JSON`) | ||
// The BaseCommand defines a `--json` option which is hidden from the help by default | ||
.addHelpOption(new Option('--json', 'Output list contents as JSON')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above here, but in this case it's intentional. Just removing this line works, but then --json
no longer shows up in ntl blobs:get --help
. This solution seems to cover all the bases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and then same for all the command --offline
cases
c3cdea8
to
b807744
Compare
.option('-o, --open', 'Open site after deploy', false) | ||
.option('-O, --open', 'Open site after deploy', false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, there's already -o
for --offline
in the BaseCommand, so deploy -o
wasn't working as intended. It just started an offline deploy which of course didn't work.
b807744
to
4727ceb
Compare
c4adfa0
to
6450dbe
Compare
It looks like there was an `httpProxy` option and an `http-proxy` option but these got accidentally(?) squashed into a duplicated `httpProxy` option in https://github.com/netlify/cli/pull/5816/files#diff-6708246L106-L140.
`-o` is already used in the base command for `--offline`, so this was being quietly ignored This can't be considered a breaking change as it has never worked. (I just tried it to be sure.) See tj/commander.js#2055.
It's already used in the BaseCommand for `--offline`. This is not a breaking change, because this never worked as is. Same issue as in 9280c55.
It's already defined in the BaseCommand for `--offline`.
- `-r` was already used globally so this was being ignored - the camelCase version was using the same short option as the kebab-case, which isn't allowed
Undocumented but it only supports node.js >=20
would require dropping support for node.js 20.0.0 to 20.4.999
Working around an NPM bug :( also this uncovered that we were missing @types/express - we were accidentally using it implicitly via a transitive dependency that is now gone
It was redefining the options over and over and over. The latest commander throws.
04372e6
to
0d11dde
Compare
I carefully reviewed all the release notes for all of these. Many of the major bumps are just dropping support for older versions of node.js we already don't support. For anything relatively easy, I made the necessary changes. I punted on the more involved upgrades.