Repository navigation
[pull] main from TryGhost:main - #1443
Merged
Merged
Conversation
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`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )