Skip to content

[pull] main from TryGhost:main - #1443

Merged
pull[bot] merged 7 commits into
code:mainfrom
TryGhost:main
Aug 25, 2026
Merged

pull[bot] merged 7 commits into
code:mainfrom
TryGhost:main

Conversation

@pull

@pull pull Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

acburdine and others added 7 commits August 25, 2026 17:19
no ref
- fix changeset and package.json formatting
- update release script to format after file changes
ref https://linear.app/ghost/project/4b2edbd66469/ - Milestone 4.5

Each commit references an individual Linear issue

Adds ZIP support to the CSV post importer, including field mapping,
archive validation, and embedded image, media, and file handling.
Existing JSON ZIP imports continue through the `/db/` flow.

Also moved the ZIP archive handling into a reusable helper, as the CSV
importer uses much of the same functionality.
…0205)

closes #30204

When a members CSV import has failed rows, the error file downloaded
from the Admin import modal is built from the raw API rows. Array fields
like labels render as `[object Object]` and the columns use internal
field names (`subscribed`) instead of the export headers
(`subscribed_to_emails`). Re-uploading the downloaded report then
creates a label literally named `[object Object]` on the member, since
labels are created on import, and drops subscription state because that
header isn't in the import mapping.

Rows are now shaped into the members export vocabulary before
serialization, matching the emailed error report: labels joined by name,
`subscribed_to_emails` instead of `subscribed`, custom field columns
passed through, and a newsletters column carried only when the submitted
file had one, so re-uploading a report can't change subscription state
the original file never mentioned.
fixes #30231

The email analytics `fetchMissing` job crashes on every run on SQLite
installs with `TypeError: begin.getTime is not a function`.

`getLastJobRunTimestamp()` is typed to return `Promise<Date | null>` but
returns the raw column value, which SQLite hands back as a string.
`getLastMissingEventTimestamp()` uses that value directly as `begin`, so
downstream `Date` calls throw. The sibling `getLastEventTimestamp()`
already normalises timestamps to `Date`; this applies the same
normalisation at the source so every caller gets a real `Date`.
no refs

## Context

These compile-time assertions were deliberately written with each
invalid declaration on a single line. Because `@ts-expect-error` only
applies to the immediately following line, TypeScript originally
reported and suppressed each expected error on the declaration line.

The repository-wide `oxfmt` migration in #30184 expanded several of
those object declarations across multiple lines. TypeScript then
reported the invalid `subFields` values on their property lines, while
the expectations remained above the `const` declarations. That left the
expectations unused (`TS2578`) and allowed the intended type errors to
escape. Because these typechecks were not running as a discrete CI task,
the formatting-only change landed without exposing the regression.

## Changes

- Moved each affected `@ts-expect-error` directly above the `subFields`
property where TypeScript now reports the error.
- Kept the single-line assertion unchanged where TypeScript still
reports the error on the declaration line.
- Updated the explanatory comment to document the formatter-compatible
placement requirement.

This preserves the original intent: the file passes while the invalid
examples remain rejected, and it will fail if those type constraints are
accidentally weakened.

## Testing

- `pnpm nx run @tryghost/admin-x-framework:test:types --skip-nx-cache`
- `pnpm nx run @tryghost/admin-x-framework:lint`
@pull pull Bot locked and limited conversation to collaborators Aug 25, 2026
@pull pull Bot added the ⤵️ pull label Aug 25, 2026
@pull
pull Bot merged commit a509378 into code:main Aug 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants