Skip to content

Commit 1cec941

Browse files
committed
feat!: remove deprecated camelCase options
These commands option have been deprecated since 12.8.0 (25 months ago): https://github.com/netlify/cli/releases/tag/v12.8.0. Removes: - `--httpProxyCertificateFilename` - `--prodIfUnlocked` - `--functionsPort` - `--targetPort` - `--edgeInspect` - `--edgeInspectBrk` - `--replaceExisting` - `--gitRemoteName` The change in 12.8.0 also intended to rename `--httpProxy` to `--http-proxy` but there was a typo resulting in that never happening. To err on the safe side, this fixes that change without removing the camel case variant yet.
1 parent 504e7f3 commit 1cec941

File tree

7 files changed

+5
-69
lines changed

7 files changed

+5
-69
lines changed

src/commands/base-command.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,16 @@ export default class BaseCommand extends Command {
192192
.addOption(new Option('--cwd <cwd>').hideHelp(true))
193193
.addOption(new Option('-o, --offline').hideHelp(true))
194194
.addOption(new Option('--auth <token>', 'Netlify auth token').hideHelp(true))
195+
// TODO(serhalp) Remove in next major release. This was intended to be deprecated in 2023 but a typo
196+
// delayed it to Feb 2025.
195197
.addOption(
196198
new Option('--httpProxy [address]', 'Old, prefer --http-proxy. Proxy server address to route requests through.')
197199
.default(process.env.HTTP_PROXY || process.env.HTTPS_PROXY)
198200
.hideHelp(true),
199201
)
200202
.addOption(
201-
new Option(
202-
'--httpProxyCertificateFilename [file]',
203-
'Old, prefer --http-proxy-certificate-filename. Certificate file to use when connecting using a proxy server.',
204-
)
205-
.default(process.env.NETLIFY_PROXY_CERTIFICATE_FILENAME)
203+
new Option('--http-proxy [address]', 'Proxy server address to route requests through.')
204+
.default(process.env.HTTP_PROXY || process.env.HTTPS_PROXY)
206205
.hideHelp(true),
207206
)
208207
.addOption(
@@ -213,11 +212,6 @@ export default class BaseCommand extends Command {
213212
.default(process.env.NETLIFY_PROXY_CERTIFICATE_FILENAME)
214213
.hideHelp(true),
215214
)
216-
.addOption(
217-
new Option('--httpProxy [address]', 'Proxy server address to route requests through.')
218-
.default(process.env.HTTP_PROXY || process.env.HTTPS_PROXY)
219-
.hideHelp(true),
220-
)
221215
.option('--debug', 'Print debugging information')
222216

223217
// only add the `--filter` option to commands that are workspace aware

src/commands/deploy/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,10 @@ Support for package.json's main field, and intrinsic index.js entrypoints are co
8383
new Option('-p, --prod', 'Deploy to production').default(false).conflicts(['alias', 'branch', 'prodIfUnlocked']),
8484
)
8585
.addOption(
86-
new Option(
87-
'--prodIfUnlocked',
88-
'Old, prefer --prod-if-unlocked. Deploy to production if unlocked, create a draft otherwise',
89-
)
86+
new Option('--prod-if-unlocked', 'Deploy to production if unlocked, create a draft otherwise')
9087
.default(false)
91-
.hideHelp(true)
9288
.conflicts(['alias', 'branch', 'prod']),
9389
)
94-
.option('--prod-if-unlocked', 'Deploy to production if unlocked, create a draft otherwise', false)
9590
.option(
9691
'--alias <name>',
9792
'Specifies the alias for deployment, the string at the beginning of the deploy subdomain. Useful for creating predictable deployment URLs. Avoid setting an alias string to the same value as a deployed branch. `alias` doesn’t create a branch deploy and can’t be used in conjunction with the branch subdomain feature. Maximum 37 characters.',

src/commands/dev/dev.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,6 @@ export const createDevCommand = (program: BaseCommand) => {
266266
normalizeContext,
267267
)
268268
.option('-p ,--port <port>', 'port of netlify dev', (value) => Number.parseInt(value))
269-
.addOption(
270-
new Option('--targetPort <port>', 'Old, prefer --target-port. Port of target app server')
271-
.argParser((value) => Number.parseInt(value))
272-
.hideHelp(true),
273-
)
274269
.addOption(new Option('--skip-wait-port', 'disables waiting for target port to become available').hideHelp(true))
275270
.addOption(new Option('--no-open', 'disables the automatic opening of a browser window'))
276271
.option('--target-port <port>', 'port of target app server', (value) => Number.parseInt(value))
@@ -292,11 +287,6 @@ export const createDevCommand = (program: BaseCommand) => {
292287
'start a public live session; optionally, supply a subdomain to generate a custom URL',
293288
false,
294289
)
295-
.addOption(
296-
new Option('--functionsPort <port>', 'Old, prefer --functions-port. Port of functions server')
297-
.argParser((value) => Number.parseInt(value))
298-
.hideHelp(true),
299-
)
300290
.option('--functions-port <port>', 'port of functions server', (value) => Number.parseInt(value))
301291
.addOption(
302292
new Option(
@@ -317,15 +307,6 @@ export const createDevCommand = (program: BaseCommand) => {
317307
.argParser((value) => Number.parseInt(value))
318308
.hideHelp(),
319309
)
320-
.addOption(
321-
new Option(
322-
'-e, --edgeInspect [address]',
323-
'Old, prefer --edge-inspect. Enable the V8 Inspector Protocol for Edge Functions, with an optional address in the host:port format',
324-
)
325-
.conflicts('edgeInspectBrk')
326-
.argParser(validateShortFlagArgs)
327-
.hideHelp(true),
328-
)
329310
.addOption(
330311
new Option(
331312
'-e, --edge-inspect [address]',
@@ -334,15 +315,6 @@ export const createDevCommand = (program: BaseCommand) => {
334315
.conflicts('edgeInspectBrk')
335316
.argParser(validateShortFlagArgs),
336317
)
337-
.addOption(
338-
new Option(
339-
'-E, --edgeInspectBrk [address]',
340-
'Old, prefer --edge-inspect-brk. Enable the V8 Inspector Protocol for Edge Functions and pause execution on the first line of code, with an optional address in the host:port format',
341-
)
342-
.conflicts('edgeInspect')
343-
.hideHelp(true)
344-
.argParser(validateShortFlagArgs),
345-
)
346318
.addOption(
347319
new Option(
348320
'-E, --edge-inspect-brk [address]',

src/commands/env/env.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ export const createEnvCommand = (program: BaseCommand) => {
3737
program
3838
.command('env:import')
3939
.argument('<fileName>', '.env file to import')
40-
.addOption(
41-
new Option(
42-
'-r --replaceExisting',
43-
'Old, prefer --replace-existing. Replace all existing variables instead of merging them with the current ones',
44-
)
45-
.default(false)
46-
.hideHelp(true),
47-
)
4840
.option(
4941
'-r, --replace-existing',
5042
'Replace all existing variables instead of merging them with the current ones',

src/commands/init/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ export const createInitCommand = (program: BaseCommand) =>
99
'Configure continuous deployment for a new or existing site. To create a new site without continuous deployment, use `netlify sites:create`',
1010
)
1111
.option('-m, --manual', 'Manually configure a git remote for CI')
12-
.addOption(
13-
new Option(
14-
'--gitRemoteName <name>',
15-
'Old, prefer --git-remote-name. Name of Git remote to use. e.g. "origin"',
16-
).hideHelp(true),
17-
)
1812
.option('--git-remote-name <name>', 'Name of Git remote to use. e.g. "origin"')
1913
.action(async (options: OptionValues, command: BaseCommand) => {
2014
const { init } = await import('./init.js')

src/commands/link/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ export const createLinkCommand = (program: BaseCommand) =>
88
.description('Link a local repo or project folder to an existing site on Netlify')
99
.option('--id <id>', 'ID of site to link to')
1010
.option('--name <name>', 'Name of site to link to')
11-
.addOption(
12-
new Option(
13-
'--gitRemoteName <name>',
14-
'Old, prefer --git-remote-name. Name of Git remote to use. e.g. "origin"',
15-
).hideHelp(true),
16-
)
1711
.option('--git-remote-name <name>', 'Name of Git remote to use. e.g. "origin"')
1812
.addExamples(['netlify link', 'netlify link --id 123-123-123-123', 'netlify link --name my-site-name'])
1913
.action(async (options: OptionValues, command: BaseCommand) => {

src/commands/serve/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ export const createServeCommand = (program: BaseCommand) =>
2525
"disables edge functions. use this if your environment doesn't support Deno. This option is internal and should not be used by end users.",
2626
).hideHelp(true),
2727
)
28-
.addOption(
29-
new Option('--functionsPort <port>', 'Old, prefer --functions-port. Port of functions server')
30-
.argParser((value) => Number.parseInt(value))
31-
.hideHelp(true),
32-
)
3328
.option('--functions-port <port>', 'port of functions server', (value) => Number.parseInt(value))
3429
.addOption(
3530
new Option(

0 commit comments

Comments
 (0)