Skip to content

[cli] Fix vc certs issue subdomain parsing#12532

Merged
onsclom merged 11 commits intomainfrom
austinmerrick/dmns-475-investigate-invalid-domain-error-in-vercel-cli-for
Nov 8, 2024
Merged

[cli] Fix vc certs issue subdomain parsing#12532
onsclom merged 11 commits intomainfrom
austinmerrick/dmns-475-investigate-invalid-domain-error-in-vercel-cli-for

Conversation

@onsclom
Copy link
Copy Markdown
Contributor

@onsclom onsclom commented Nov 6, 2024

I added a regression in fd86f5d#diff-4463dfbbb283602d090922c89d530aa8efb60baa260ffddcc33b275da6a3b00f where domains without a subdomain would incorrectly throw an error.

This fixes that and adds a test that catches this case.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 6, 2024

🦋 Changeset detected

Latest commit: b340b8a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

pendingChallenges.map(challenge => {
const subdomain = getSubdomain(challenge.domain);
if (!subdomain) {
if (subdomain === null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the value here that led to the regression? false or undefined?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Subdomain would be an empty string, and !"" is true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

getSubdomain returns null for invalid domains and and empty string if the domain has no subdomain.

jeffsee55
jeffsee55 previously approved these changes Nov 7, 2024
…te-invalid-domain-error-in-vercel-cli-for' into austinmerrick/dmns-475-investigate-invalid-domain-error-in-vercel-cli-for
@onsclom onsclom added this pull request to the merge queue Nov 7, 2024
Merged via the queue into main with commit 0a0587c Nov 8, 2024
@onsclom onsclom deleted the austinmerrick/dmns-475-investigate-invalid-domain-error-in-vercel-cli-for branch November 8, 2024 01:19
github-merge-queue bot pushed a commit that referenced this pull request Nov 12, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Major Changes

- Migrate `vercel certs` subcommands to their own command specifications
([#12463](#12463))

- Migrate `vercel dns` subcommands to their own command specifications
([#12464](#12464))

- Migrate `vercel alias` subcommands to their own command specifications
([#12458](#12458))

- Migrate `vercel projects` subcommands to their own command
specifications ([#12518](#12518))

- Migrate `vercel env` subcommands to their own command specifications
([#12476](#12476))

- Migrate `vercel domains` subcommands to their own command
specifications ([#12526](#12526))

- Migrate `vercel git` subcommands to their own command specifications
([#12524](#12524))

- Migrate `vercel teams` subcommands to their own command specifications
([#12496](#12496))

### Minor Changes

- Migrate `vercel promote` subcommands to their own command
specifications ([#12480](#12480))

- [cli] add telemetry for `vercel teams switch`
([#12493](#12493))

- Support `multiple: true` for variadic arguments in Command spec
([#12515](#12515))

- Migrate `vercel rollback` subcommands to their own command
specifications ([#12519](#12519))

- [cli] add telemetry for --help flag
([#12430](#12430))

- Adds "--target" as a new option for the "redeploy" command.
([#12523](#12523))

- Add strongly typed `subcommands` for Telemetry methods based on
command specification
([#12446](#12446))

- Migrate `vercel telemetry` subcommands to their own command
specifications ([#12460](#12460))

- Migrate `vercel target` subcommands to their own command
specifications ([#12477](#12477))

- [cli] standardize `vercel teams` subcommand routing
([#12473](#12473))

### Patch Changes

- Don't print empty "Options" section in `--help` output (after
filtering) ([#12479](#12479))

- [cli] integration resource was always redacted simplify method
([#12547](#12547))

- [cli] minor fixes in vercel target
([#12510](#12510))

- Show `vercel telemetry` subcommand help output
([#12487](#12487))

- [cli] tidy up command config structure `vercel alias`
([#12438](#12438))

- [cli] Use `getAliases` helper in `vercel certs`
([#12489](#12489))

- [cli] separately track integration-resource command
([#12543](#12543))

- [cli] use getAliases helper in vercel env
([#12491](#12491))

- Don't print empty "Examples" section in `--help` output
([#12475](#12475))

- [cli] create standard method for redacted targets
([#12544](#12544))

- [cli] redacting regions until we determine method to get list
([#12553](#12553))

- [cli] use getAliases helper in vercel integration-resource
([#12505](#12505))

- [cli] redact dns records outside allowed types
([#12548](#12548))

- [cli] remove trackCommandError method - unused
([#12546](#12546))

- [cli] derive `vercel alias` subcommand config from subcommand structs
([#12474](#12474))

- [cli] use getAliases in vercel telemetry
([#12509](#12509))

- [cli] use getAliases helper in vercel integration
([#12504](#12504))

- [cli] fix minor issues vercel pull
([#12512](#12512))

- [cli] use getAliases in vercel target
([#12508](#12508))

- Stabilize Chained Prerenders
([#12507](#12507))

- [cli] use subcommandOriginal in telemetry
([#12549](#12549))

- [cli] fix minor issues vercel project
([#12528](#12528))

- Add telemetry to teams list options
([#12440](#12440))

- Misc adjustments for `vercel bisect --help`
([#12478](#12478))

- [cli] redact Extensions
([#12542](#12542))

- fix small issues in telemetry and whoami
([#12468](#12468))

- Make `command` be an implied argument when `subcommands` array is
defined ([#12456](#12456))

- [cli] derive Map of aliases from Command structs
([#12472](#12472))

- [cli] Add aliases field to Command
([#12462](#12462))

- Include "integration" command name in synopsis line in `vercel
integration <subcommand> --help` output
([#12470](#12470))

- Consistent help output for `--next` option
([#12481](#12481))

- Fix `vercel integration-resource` subcommand help
([#12531](#12531))

- Consistent help output for `--limit` option
([#12482](#12482))

- [cli] rename getAliases helper to nonconflicting name
([#12516](#12516))

- [cli] redact unknown archive formats
([#12550](#12550))

- [cli] use getAliases helper in vercel dns
([#12490](#12490))

- [cli] move scope fetching closer to where its used in `vc bisect`
([#12439](#12439))

- [cli] redact output mode in telemetry method
([#12545](#12545))

- [cli] use subcommandOriginal for help telemetry
([#12552](#12552))

- [cli] fix minor issues vercel alias
([#12539](#12539))

- Fix certs issue to allow domain without subdomain
([#12532](#12532))

- Updated dependencies
\[[`03f02e4ae9d3e9c198584acba4231e763d9eb353`](03f02e4),
[`736f322093ebbb31d576609467d80d89ba9dc250`](736f322),
[`80c8ec3634170c1566a5ce62acf560a9d1926d60`](80c8ec3)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add support for HTTP streaming
([#12557](#12557))

## @vercel/[email protected]

### Patch Changes

- Fix basePath root matching for error pages
([#12559](#12559))

- Stabilize Chained Prerenders
([#12507](#12507))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
QuietCraftsmanship pushed a commit to QuietCraftsmanship/Vercel that referenced this pull request Jul 6, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Major Changes

- Migrate `vercel certs` subcommands to their own command specifications
([#12463](vercel/vercel#12463))

- Migrate `vercel dns` subcommands to their own command specifications
([#12464](vercel/vercel#12464))

- Migrate `vercel alias` subcommands to their own command specifications
([#12458](vercel/vercel#12458))

- Migrate `vercel projects` subcommands to their own command
specifications ([#12518](vercel/vercel#12518))

- Migrate `vercel env` subcommands to their own command specifications
([#12476](vercel/vercel#12476))

- Migrate `vercel domains` subcommands to their own command
specifications ([#12526](vercel/vercel#12526))

- Migrate `vercel git` subcommands to their own command specifications
([#12524](vercel/vercel#12524))

- Migrate `vercel teams` subcommands to their own command specifications
([#12496](vercel/vercel#12496))

### Minor Changes

- Migrate `vercel promote` subcommands to their own command
specifications ([#12480](vercel/vercel#12480))

- [cli] add telemetry for `vercel teams switch`
([#12493](vercel/vercel#12493))

- Support `multiple: true` for variadic arguments in Command spec
([#12515](vercel/vercel#12515))

- Migrate `vercel rollback` subcommands to their own command
specifications ([#12519](vercel/vercel#12519))

- [cli] add telemetry for --help flag
([#12430](vercel/vercel#12430))

- Adds "--target" as a new option for the "redeploy" command.
([#12523](vercel/vercel#12523))

- Add strongly typed `subcommands` for Telemetry methods based on
command specification
([#12446](vercel/vercel#12446))

- Migrate `vercel telemetry` subcommands to their own command
specifications ([#12460](vercel/vercel#12460))

- Migrate `vercel target` subcommands to their own command
specifications ([#12477](vercel/vercel#12477))

- [cli] standardize `vercel teams` subcommand routing
([#12473](vercel/vercel#12473))

### Patch Changes

- Don't print empty "Options" section in `--help` output (after
filtering) ([#12479](vercel/vercel#12479))

- [cli] integration resource was always redacted simplify method
([#12547](vercel/vercel#12547))

- [cli] minor fixes in vercel target
([#12510](vercel/vercel#12510))

- Show `vercel telemetry` subcommand help output
([#12487](vercel/vercel#12487))

- [cli] tidy up command config structure `vercel alias`
([#12438](vercel/vercel#12438))

- [cli] Use `getAliases` helper in `vercel certs`
([#12489](vercel/vercel#12489))

- [cli] separately track integration-resource command
([#12543](vercel/vercel#12543))

- [cli] use getAliases helper in vercel env
([#12491](vercel/vercel#12491))

- Don't print empty "Examples" section in `--help` output
([#12475](vercel/vercel#12475))

- [cli] create standard method for redacted targets
([#12544](vercel/vercel#12544))

- [cli] redacting regions until we determine method to get list
([#12553](vercel/vercel#12553))

- [cli] use getAliases helper in vercel integration-resource
([#12505](vercel/vercel#12505))

- [cli] redact dns records outside allowed types
([#12548](vercel/vercel#12548))

- [cli] remove trackCommandError method - unused
([#12546](vercel/vercel#12546))

- [cli] derive `vercel alias` subcommand config from subcommand structs
([#12474](vercel/vercel#12474))

- [cli] use getAliases in vercel telemetry
([#12509](vercel/vercel#12509))

- [cli] use getAliases helper in vercel integration
([#12504](vercel/vercel#12504))

- [cli] fix minor issues vercel pull
([#12512](vercel/vercel#12512))

- [cli] use getAliases in vercel target
([#12508](vercel/vercel#12508))

- Stabilize Chained Prerenders
([#12507](vercel/vercel#12507))

- [cli] use subcommandOriginal in telemetry
([#12549](vercel/vercel#12549))

- [cli] fix minor issues vercel project
([#12528](vercel/vercel#12528))

- Add telemetry to teams list options
([#12440](vercel/vercel#12440))

- Misc adjustments for `vercel bisect --help`
([#12478](vercel/vercel#12478))

- [cli] redact Extensions
([#12542](vercel/vercel#12542))

- fix small issues in telemetry and whoami
([#12468](vercel/vercel#12468))

- Make `command` be an implied argument when `subcommands` array is
defined ([#12456](vercel/vercel#12456))

- [cli] derive Map of aliases from Command structs
([#12472](vercel/vercel#12472))

- [cli] Add aliases field to Command
([#12462](vercel/vercel#12462))

- Include "integration" command name in synopsis line in `vercel
integration <subcommand> --help` output
([#12470](vercel/vercel#12470))

- Consistent help output for `--next` option
([#12481](vercel/vercel#12481))

- Fix `vercel integration-resource` subcommand help
([#12531](vercel/vercel#12531))

- Consistent help output for `--limit` option
([#12482](vercel/vercel#12482))

- [cli] rename getAliases helper to nonconflicting name
([#12516](vercel/vercel#12516))

- [cli] redact unknown archive formats
([#12550](vercel/vercel#12550))

- [cli] use getAliases helper in vercel dns
([#12490](vercel/vercel#12490))

- [cli] move scope fetching closer to where its used in `vc bisect`
([#12439](vercel/vercel#12439))

- [cli] redact output mode in telemetry method
([#12545](vercel/vercel#12545))

- [cli] use subcommandOriginal for help telemetry
([#12552](vercel/vercel#12552))

- [cli] fix minor issues vercel alias
([#12539](vercel/vercel#12539))

- Fix certs issue to allow domain without subdomain
([#12532](vercel/vercel#12532))

- Updated dependencies
\[[`f581d69becc9d431ba65b952fbaa888809f03e97`](vercel/vercel@f581d69),
[`32b19e6b90cb14a9911557f075dddd27725291bf`](vercel/vercel@32b19e6),
[`6b100c84cb8d02b31f9aee98e3ac689963c24ff6`](vercel/vercel@6b100c8)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add support for HTTP streaming
([#12557](vercel/vercel#12557))

## @vercel/[email protected]

### Patch Changes

- Fix basePath root matching for error pages
([#12559](vercel/vercel#12559))

- Stabilize Chained Prerenders
([#12507](vercel/vercel#12507))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants