TryGhost
OSS
Ghost
Changed the members CSV importer to only write a file for queued imports ref BER-3811 prepare() re-serialised the parsed CSV, wrote it to content/data, and perform() read it straight back off disk. Nothing ever deleted that file, so every import left one behind — on Ghost(Pro) that lands on a shared, persistent volume with no cleanup and no per-site quota. prepare() now returns the parsed rows and perform() takes them, and a file is written only where one is genuinely needed: a queued import outlives the request that started it, and the uploaded CSV is deleted the moment the response finishes, so its rows are spooled to the system temp directory and the job that reads them deletes them, whether it succeeded or failed. The spool is JSON rather than re-serialised CSV because CSV drops any column outside the member model's own set and flattens every value to a string, so reading it back would need the same coercion the parse already did. The caller's header mapping is composed with the model's field mapping before parsing rather than after, because the parser types a value by the name it lands on, so a blank subscribed cell still reads as subscribed. Where two columns claim one model field the first now wins, which is a chosen rule rather than the previous behaviour. Three latent bugs go with it: a CSV with headers but no data rows returned a 500, a prepared file leaked on every import, and a global label containing a comma was split into two labels by the serialise and re-parse. Two changes to stored data are deliberate: values were previously persisted with the CSV formula-escape apostrophe still attached, so a member named -5 was stored as '-5, and columns the caller maps but the member model does not know now reach the import instead of being erased.
nx run ghost-monorepo:lint:boundaries
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx run ghost-monorepo:lint:boundaries
Click to copy
Linux
4 CPU cores
read-write
access token used
f1f13326
29453