Skip to content

feat(csv-import-export): demo end-to-end checks, docs, and first release - #68

Merged
fbritoferreira merged 3 commits into
feat/csv-import-export-adminfrom
feat/csv-import-export-demo
Oct 9, 2026
Merged

fbritoferreira merged 3 commits into
feat/csv-import-export-adminfrom
feat/csv-import-export-demo

Conversation

@fbritoferreira

Copy link
Copy Markdown
Owner

Summary

Demo wiring, end-to-end script, docs, and release of the CSV import/export plugin. Stacked on #67.

 demo/
 ├── config/middlewares.ts   + 'strapi::favicon'   (demo on main does not boot without it on 5.57)
+├── favicon.png             1×1 placeholder the middleware reads
 ├── config/plugins.ts       + 'csv-import-export': { enabled: true }
 ├── src/api/article         + views, featured, category (manyToOne), tags (manyToMany), cover
+├── src/api/category        name, slug
+├── src/api/tag             label (unique)
 ├── src/index.ts            + seeds categories news/sport, tags strapi/typescript/csv
+└── scripts/try-csv.mjs     end-to-end checks through the plugin's admin API
 packages/csv-import-export/
-├── "private": true
+├── publishConfig + .changeset (minor → 0.1.0)
 ├── docs/index.md           usage, permissions, match rules, formats
+└── docs/api.md             every route with request and response bodies

The demo on main fails at boot with Missing required middlewares in configuration. Add the following middlewares: "strapi::favicon". The fix ships here because nothing in this stack could be verified without it.

Evidence

  • Before: pnpm develop in demo/ exits with the favicon middleware error.
    After: pnpm try-csv on a fresh database:
first import { created: 2, updated: 1, skipped: 1, errored: 1 }
  row 4: error: views: "many" is not an integer
  row 5: skipped: category: no entry with slug "cooking"
second import { created: 0, updated: 3, skipped: 1, errored: 1 }
export: 4 rows
fail mode: batch aborted, nothing written
round trip on documentId: 4 updated, 0 created
permissions: editor export of title 200, of views 403, import 403
history: 8 jobs, latest export completed
csv import/export ok

The script fails unless the second import creates nothing, which is the upsert requirement. It reruns cleanly on the same database.

  • Also checked by hand: importing on documentId with a new locale adds that locale to the existing document (tag made localized temporarily), and resetPasswordToken on users-permissions is rejected as an unknown field.
  • pnpm lint && pnpm typecheck && pnpm test && pnpm build && pnpm package:check && pnpm docs:build exit 0; smoke passes.

Verification record and screenshots: fbritoferreira/documentation#36.

Merge Danger

Door: one-way

Merging publishes @fbritoferreira/strapi-csv-import-export@0.1.0 to npm through release.yml. A published version cannot be republished, only deprecated.

Blast Radius: demo

Outside the new package, only demo/ changes. Its article schema gains fields and relations, so an existing demo/.tmp database migrates on the next boot.

…and an end-to-end script

Adds category and tag collections, relations and media on article, and scripts/try-csv.mjs, which imports a fixture twice through the plugin and fails unless the second run creates nothing.

Also adds the strapi::favicon middleware and a favicon.png: Strapi 5.57 refuses to boot without the middleware, so the demo on main does not start.
…ission checks; demo checks them against a real role
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cad3d994-ee01-4627-ab66-c787e042883c

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@fbritoferreira
fbritoferreira added this pull request to stack #69 October 9, 2026 19:50
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for Test Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 100% (🎯 100%) 1361 / 1361
🟢 Statements 100% (🎯 100%) 1600 / 1600
🟢 Functions 100% (🎯 100%) 299 / 299
🟢 Branches 100% (🎯 100%) 1360 / 1360
File CoverageNo changed files found.
Generated in workflow #113 for commit bfa164e by the Vitest Coverage Report Action

@fbritoferreira
fbritoferreira merged commit 3ae48d0 into main Oct 9, 2026
11 checks passed
@fbritoferreira
fbritoferreira deleted the feat/csv-import-export-demo branch October 9, 2026 19:55
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.

1 participant