Skip to content

Conversation

@EvanHahn
Copy link
Contributor

@EvanHahn EvanHahn commented Jan 20, 2026

ref a5384b4
ref TryGhost/Ghost#25920

@tryghost/parse-email-address will be moved to the main Ghost repo in TryGhost/Ghost#25920.

This reverts commit a5384b4.

@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Walkthrough

The PR removes the entire parse-email-address package from the monorepo, deleting its source code, tests, configuration files, and documentation. Additionally, ts-node version 10.9.2 is added to the root package.json devDependencies.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: removal of the parse-email-address package from the repository due to its relocation to the Ghost monorepo.
Description check ✅ Passed The description is directly related to the changeset, providing context about why the package was removed and referencing the related commits and pull requests in the main Ghost repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

EvanHahn added a commit to TryGhost/Ghost that referenced this pull request Jan 21, 2026
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core
ref #25919
ref TryGhost/framework#342

This creates the `parse-email-address` package (previously reviewed
[here][0]--all I did was move it over) and uses it in email
normalization, used when sending magic links.

This should not change behavior for "normal", lowercase ASCII email
addresses. However, it does make several subtler tweaks to the way
emails are normalized:

- Some totally invalid emails weren't normalized.

  Before: if `req.body.email` wasn't a string or lacked an `@`, no
  normalization would occur. The system would then attempt to send an
  email that'd almost certainly fail.

  After: these throw a "bad request" error.

- Invalid emails with multiple `@` signs were considered valid.

  Before: `foo@bar@example.com` was accepted.

  After: it is not accepted and throws a "bad request" error.

- Long emails are now considered invalid.

  Before: the only limit on email length was that of the request body.

  After: the whole email is limited to 986 octets and the domain is
  limited to 253 octets (per SMTP). Domain labels are limited to 63
  octets (per DNS).

- Domains are now lowercased.

  Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`.

  After: `FOO@Example.COM` is normalized to `FOO@example.com`.

[0]: TryGhost/framework#340
@EvanHahn EvanHahn force-pushed the remove-parse-email-address-package branch from b4505b3 to 2d5bcd9 Compare January 21, 2026 13:42
EvanHahn added a commit to TryGhost/Ghost that referenced this pull request Jan 21, 2026
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core
ref #25919
ref TryGhost/framework#342

This creates the `parse-email-address` package (previously reviewed
[here][0]--all I did was move it over) and uses it in email
normalization, used when sending magic links.

This should not change behavior for "normal", lowercase ASCII email
addresses. However, it does make several subtler tweaks to the way
emails are normalized:

- Some totally invalid emails weren't normalized.

  Before: if `req.body.email` wasn't a string or lacked an `@`, no
  normalization would occur. The system would then attempt to send an
  email that'd almost certainly fail.

  After: these throw a "bad request" error.

- Invalid emails with multiple `@` signs were considered valid.

  Before: `foo@bar@example.com` was accepted.

  After: it is not accepted and throws a "bad request" error.

- Long emails are now considered invalid.

  Before: the only limit on email length was that of the request body.

  After: the whole email is limited to 986 octets and the domain is
  limited to 253 octets (per SMTP). Domain labels are limited to 63
  octets (per DNS).

- Domains are now lowercased.

  Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`.

  After: `FOO@Example.COM` is normalized to `FOO@example.com`.

[0]: TryGhost/framework#340
EvanHahn added a commit to TryGhost/Ghost that referenced this pull request Jan 21, 2026
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core
ref #25919
ref TryGhost/framework#342

This creates the `parse-email-address` package (previously reviewed
[here][0]--all I did was move it over) and uses it in email
normalization, used when sending magic links.

This should not change behavior for "normal", lowercase ASCII email
addresses. However, it does make several subtler tweaks to the way
emails are normalized:

- Some totally invalid emails weren't normalized.

  Before: if `req.body.email` wasn't a string or lacked an `@`, no
  normalization would occur. The system would then attempt to send an
  email that'd almost certainly fail.

  After: these throw a "bad request" error.

- Invalid emails with multiple `@` signs were considered valid.

  Before: `foo@bar@example.com` was accepted.

  After: it is not accepted and throws a "bad request" error.

- Long emails are now considered invalid.

  Before: the only limit on email length was that of the request body.

  After: the whole email is limited to 986 octets and the domain is
  limited to 253 octets (per SMTP). Domain labels are limited to 63
  octets (per DNS).

- Domains are now lowercased.

  Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`.

  After: `FOO@Example.COM` is normalized to `FOO@example.com`.

[0]: TryGhost/framework#340
@EvanHahn EvanHahn force-pushed the remove-parse-email-address-package branch from 2d5bcd9 to 1e0f31e Compare January 21, 2026 14:29
EvanHahn added a commit to TryGhost/Ghost that referenced this pull request Jan 22, 2026
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core
ref #25919
ref TryGhost/framework#342

This creates the `parse-email-address` package (previously reviewed
[here][0]--all I did was move it over) and uses it in email
normalization, used when sending magic links.

This should not change behavior for "normal", lowercase ASCII email
addresses. However, it does make several subtler tweaks to the way
emails are normalized:

- Some totally invalid emails weren't normalized.

  Before: if `req.body.email` wasn't a string or lacked an `@`, no
  normalization would occur. The system would then attempt to send an
  email that'd almost certainly fail.

  After: these throw a "bad request" error.

- Invalid emails with multiple `@` signs were considered valid.

  Before: `foo@bar@example.com` was accepted.

  After: it is not accepted and throws a "bad request" error.

- Long emails are now considered invalid.

  Before: the only limit on email length was that of the request body.

  After: the whole email is limited to 986 octets and the domain is
  limited to 253 octets (per SMTP). Domain labels are limited to 63
  octets (per DNS).

- Domains are now lowercased.

  Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`.

  After: `FOO@Example.COM` is normalized to `FOO@example.com`.

[0]: TryGhost/framework#340
EvanHahn added a commit to TryGhost/Ghost that referenced this pull request Jan 26, 2026
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core
ref #25919
ref TryGhost/framework#342

This creates the `parse-email-address` package (previously reviewed
[here][0]--all I did was move it over) and uses it in email
normalization, used when sending magic links.

This should not change behavior for "normal", lowercase ASCII email
addresses. However, it does make several subtler tweaks to the way
emails are normalized:

- Some totally invalid emails weren't normalized.

  Before: if `req.body.email` wasn't a string or lacked an `@`, no
  normalization would occur. The system would then attempt to send an
  email that'd almost certainly fail.

  After: these throw a "bad request" error.

- Invalid emails with multiple `@` signs were considered valid.

  Before: `foo@bar@example.com` was accepted.

  After: it is not accepted and throws a "bad request" error.

- Long emails are now considered invalid.

  Before: the only limit on email length was that of the request body.

  After: the whole email is limited to 986 octets and the domain is
  limited to 253 octets (per SMTP). Domain labels are limited to 63
  octets (per DNS).

- Domains are now lowercased.

  Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`.

  After: `FOO@Example.COM` is normalized to `FOO@example.com`.

[0]: TryGhost/framework#340
EvanHahn added a commit to TryGhost/Ghost that referenced this pull request Jan 26, 2026
closes
https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core
ref #25919
ref TryGhost/framework#342

This creates the `parse-email-address` package (previously reviewed
[here][0]--all I did was move it over) and uses it in email
normalization, used when sending magic links.

This should not change behavior for "normal", lowercase ASCII email
addresses. However, it does make several subtler tweaks to the way
emails are normalized:

- Some totally invalid emails weren't normalized.

Before: if `req.body.email` wasn't a string or lacked an `@`, no
normalization would occur. The system would then attempt to send an
email that'd almost certainly fail.

  After: these throw a "bad request" error.

- Invalid emails with multiple `@` signs were considered valid.

  Before: `foo@bar@example.com` was accepted.

  After: it is not accepted and throws a "bad request" error.

- Domains are now lowercased.

  Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`.

  After: `FOO@Example.COM` is normalized to `FOO@example.com`.

[0]: TryGhost/framework#340

Co-authored-by: Steve Larson <9larsons@gmail.com>
ref a5384b4
ref TryGhost/Ghost#25920

`@tryghost/parse-email-address` has been moved to the main Ghost repo in
<TryGhost/Ghost#25920>.

This reverts commit a5384b4.
@EvanHahn EvanHahn force-pushed the remove-parse-email-address-package branch from 1e0f31e to 377602e Compare January 26, 2026 23:58
@EvanHahn EvanHahn marked this pull request as ready for review January 27, 2026 00:01
@EvanHahn EvanHahn requested a review from 9larsons January 27, 2026 00:01
@EvanHahn EvanHahn merged commit ee8559a into main Jan 27, 2026
3 checks passed
@EvanHahn EvanHahn deleted the remove-parse-email-address-package branch January 27, 2026 15:58
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