Skip to content

[cli] Replace psl with tldts#12174

Merged
TooTallNate merged 3 commits intomainfrom
austinmerrick/replace-psl-with-tldts
Sep 27, 2024
Merged

[cli] Replace psl with tldts#12174
TooTallNate merged 3 commits intomainfrom
austinmerrick/replace-psl-with-tldts

Conversation

@onsclom
Copy link
Copy Markdown
Contributor

@onsclom onsclom commented Sep 25, 2024

psl is one of the deps causing the punycode deprecation warning on Node 22. The newest version includes the deprecation warning, so we can't just update psl.

Inspired by salesforce/tough-cookie#346.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 25, 2024

🦋 Changeset detected

Latest commit: c606435

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

@onsclom onsclom force-pushed the austinmerrick/replace-psl-with-tldts branch from 43b1e93 to dbb8793 Compare September 25, 2024 22:03
@onsclom onsclom marked this pull request as ready for review September 25, 2024 22:12
@socket-security
Copy link
Copy Markdown

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None +1 3.2 MB remusao

View full report↗︎

@TooTallNate TooTallNate merged commit fd86f5d into main Sep 27, 2024
@TooTallNate TooTallNate deleted the austinmerrick/replace-psl-with-tldts branch September 27, 2024 17:19
jeffsee55 pushed a commit that referenced this pull request Oct 3, 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
## @vercel/[email protected]

### Patch Changes

- add support for `images.localPatterns`
([#12195](#12195))

## [email protected]

### Patch Changes

- Add a command for enabling and disabling telemetry. Telemetry
collection is not currently enabled and when it is, will be a major
version bump for the CLI.
([#12207](#12207))

- [cli] Remove incorrect `--json` flag on `vercel alias`
([#12198](#12198))

- Standardize most error output through `output.error`
([#12012](#12012))

- Replace `psl` with `tldts` for domain parsing
([#12174](#12174))

- add support for `images.localPatterns`
([#12195](#12195))

- [cli] add telemetry tracking to `alias ls`
([#12194](#12194))

- Add support for tracking Continuous Integration vendors with telemetry
([#12180](#12180))

- Add session id to events
([#12179](#12179))

- Updated dependencies
\[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Replace `@zeit/fetch` usage with `node-fetch`
([#12171](#12171))

- Updated dependencies
\[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Link to docs ([#12216](#12216))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- add support for `images.localPatterns`
([#12195](#12195))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel-internals/[email protected]

### Patch Changes

- Add a command for enabling and disabling telemetry. Telemetry
collection is not currently enabled and when it is, will be a major
version bump for the CLI.
([#12207](#12207))

- Updated dependencies
\[[`5431ffd5de6a572f247e63f737576b4a04884f7b`](5431ffd)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Comment on lines -178 to +179
const parsedDomain = parse(challenge.domain);
if (parsedDomain.error) {
const subdomain = getSubdomain(challenge.domain);
if (!subdomain) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi, I noticed that the behavior after switching to tldts is different than with psl. There is now a migration guide which explains how to switch from psl to tldts while preserving the same behavior: https://github.com/remusao/tldts?tab=readme-ov-file#migrating-from-other-libraries

In particular, I think you might want to use the { allowPrivateDomains: true } option to consider suffixes from the private section as well (as opposed to ICANN only).

I hope that helps!

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
## @vercel/[email protected]

### Patch Changes

- add support for `images.localPatterns`
([#12195](vercel/vercel#12195))

## [email protected]

### Patch Changes

- Add a command for enabling and disabling telemetry. Telemetry
collection is not currently enabled and when it is, will be a major
version bump for the CLI.
([#12207](vercel/vercel#12207))

- [cli] Remove incorrect `--json` flag on `vercel alias`
([#12198](vercel/vercel#12198))

- Standardize most error output through `output.error`
([#12012](vercel/vercel#12012))

- Replace `psl` with `tldts` for domain parsing
([#12174](vercel/vercel#12174))

- add support for `images.localPatterns`
([#12195](vercel/vercel#12195))

- [cli] add telemetry tracking to `alias ls`
([#12194](vercel/vercel#12194))

- Add support for tracking Continuous Integration vendors with telemetry
([#12180](vercel/vercel#12180))

- Add session id to events
([#12179](vercel/vercel#12179))

- Updated dependencies
\[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Replace `@zeit/fetch` usage with `node-fetch`
([#12171](vercel/vercel#12171))

- Updated dependencies
\[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Link to docs ([#12216](vercel/vercel#12216))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- add support for `images.localPatterns`
([#12195](vercel/vercel#12195))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel-internals/[email protected]

### Patch Changes

- Add a command for enabling and disabling telemetry. Telemetry
collection is not currently enabled and when it is, will be a major
version bump for the CLI.
([#12207](vercel/vercel#12207))

- Updated dependencies
\[[`9b30d9dd12996b17c743906ba8b59d7dae45930e`](vercel/vercel@9b30d9d)]:
    -   @vercel/[email protected]

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.

4 participants