448 Commits

Author SHA1 Message Date
Ziyi fa6299100d feat(content-manager): add Zod 4 foundation utilities (#25574) 2026-04-30 14:55:04 +02:00
Boaz Poolman ec72af97f0 Fix polymorphic relations in the document service API (#26099)
* chore: remove early exit for morph relation types

* fix: issues with creating morphToOne relations

* chore: add tests

* test: add polymorphic relations tests

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-04-30 11:58:02 +02:00
Nico André 52b8fd9e3d feat(admin): api token supports admin permissions and admin user ownership (#25657) 2026-04-29 17:57:36 +02:00
Jamie Howard 62a6230772 test: relations available status (#26051) 2026-04-24 10:39:17 +02:00
Ziyi ab7d9c38ec fix(document-service): preserve self-referential relations during publish and discard (#25890)
* fix(document-service): preserve self-referential relations during publish/discard

* test(document-service): convert self-referential API test to TypeScript

* fix(document-service): use JoinTable type and tighten Record types in self-referential-relations

* test(document-service): remove weak load() happy-path unit test

* fix(document-service): skip mappedBy attrs, deduplicate and idempotent-insert self-refs

* test(document-service): fix missing dialect and trx mocks in self-referential-relations tests

* fix(tests): use count assertions for CM API self-referential relation tests
2026-04-23 13:32:04 +02:00
Laurens Kling 104969fd8f fix(document-service): support delete selection params (#25097)
* feat: allow selectionParams in documents.delete

* fix(document-service): preserve locale-scoped delete lookup with selection params

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-04-23 10:12:13 +03:00
Simon Norris df2c928d0e feat: deploy to cloud homepage widget (#25774)
Co-authored-by: mathildeleg <82765709+mathildeleg@users.noreply.github.com>
2026-04-21 17:09:51 +02:00
Bassel Kanso e66251a30c fix(i18n): preserve non-localized media when creating a locale (#26031) 2026-04-21 14:00:24 +03:00
Ben Irvin e94abcb823 test(e2e): fixes for race conditions and file resets (#26019) 2026-04-20 18:38:46 +02:00
Ben Irvin bac520e9f8 fix(data-transfer): fix large transfer crashes; show transfer progress (#23479)
* enhancement: update progress per chunk

* fix: check stageprogress exists to make ts happy

* chore: split progress tracker into two methods

* test: fix lint

* enhancement: display readable times

* fix: speed indication for assets

* fix: restore speed indicator and fix double counting

* chore: clean up code

* fix: data transfer memory leak

* fix: yarn.lock

* chore: fix memory logging

* ci: complex project remote transfer

* enhancement: optimized transfer mode

* test(cli): data transfer and env passthrough

* chore: only send one message warning of legacy mode

* enhancement: show transfer totals and estimated time

* test(cli): fix deterministic transfer test files

* fix: push and pull shared utils backwards compatibility

* fix(data-transfer): extract legacy asset chunk parsing and tighten transfer logging/test coverage

* enhancement: checksum negotiation

* enhancement: show skipped file warnings on client

* fix: transfer diagnostics

* test: fix open handle

* fix: clear stall timeout for assets

* chore: fix misleading comments and variables

* test: fix misleading test

* test: fix typo

* test: make checks deterministic, less flaky

* enhancement(data-transfer): speed up asset totals; widen assets start reply window on remote pull

* fix(data-transfer): harden WebSocket JSON serialization for transfer frames

* fix(data-transfer): more transfer hardening

* test: fix test imports

* fix: await async write

* fix(data-transfer): resolve push transfer deadlock and harden async writes

- Extract createAssetsDestinationWritable so Writable callbacks run before
  uploadStream completes (same WS batch as PassThrough chunks).
- Add writable-async-write (write callback + drain/finished race; avoid hang
  on destroy).
- Wire push/pull, remote-source, file & directory sources to shared write().
- Fire-and-forget pull flush: Promise.resolve(flush).catch(onError); guard
  missing stream inside try.
- Add regression tests (assets writable, writable-async-write, handler checks).

* fix(data-transfer): write push stream batches sequentially

Use a for-loop with await write() instead of Promise.all over msg.data
so non-asset stages respect one in-flight write per objectMode Writable
and backpressure from writable-async-write.

- Validate minChunksForBackpressure in assertReadStreamBackpressure
- Add engine test for non-Buffer asset chunk byte progress (counts as 1)
- Assert push.ts keeps sequential msg.data handling in static handler test

* fix(data-transfer): align push streamAsset with remote-source and harden tests

- Push handler: combine stream/end under one branch, error when start is missing
  or action is invalid; shorten stage write comments.
- Engine version-matching tests: use a fresh createDestination() per engine so
  parallel transfers do not share destination writables (MaxListeners warnings).
- File destination tests: mock createWriteStream with a new Writable per call.
- CLI transfer tests: mock progress.stream so transfer::finish runs after transfer
  and clears the progress setInterval (fixes Jest worker hang).
- Misc test cleanup: assets-destination timeout clearTimeout, collect listeners,
  writable-async-write teardown; tighten push/static test descriptions.

* test: remove parity test

* fix(data-transfer): harden collect() and stabilize transfer tests

- collect(): settle once, remove listeners on resolve/reject, avoid double completion
- engine tests: add expectHeapGrowthWithinNoise for heap smoke checks
- CLI transfer tests: console spies in beforeAll; jest.restoreAllMocks in afterAll
- stream test: remove removeAllListeners workaround
2026-04-20 16:08:05 +02:00
markkaylor 7f17643db5 fix(upload): content-api does not return signed urls (#26034) 2026-04-17 10:17:51 +02:00
Nico André bc0b0e9449 feat(core/*): introduce strapi.ai namespace (#25886) 2026-04-17 08:46:33 +02:00
DMehaffy bfcef1911b enhancement: add list & delete admin user cli commands (#23022)
* enhancement: add delete user cli command

* fix: admin service reference to proper deleteById

* fix: add delete command to exported functions

* enhancement: add the list users

* fix: handle last super admin error gracefully

* enhancement: pr feedback and add active/block user commands

* fix: clean up boolean casting on active and block

* enhancement: add list-users command alias "list"

* test(cli): add user cli commands

* chore: fix linting

* test: reset stdin after tests

* chore: remove bad comment

* fix(cli): boolean admin flags, async inquirer, and stable list-users / CLI fixtures

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-04-16 14:39:34 +02:00
Adrien L f57a81a5a3 fix: bulk publish validation on required components in dz (#25687)
Co-authored-by: Ziyi Yuan <daydreamnation@live.com>
2026-04-15 14:06:22 +02:00
Jamie Howard 43420134cc fix(document-service): preserve relations during publish (#25909)
* fix(document-service): preserve relations during publish

* test: correct plural name for legacy model

* chore: update description

* fix: skip unstable virtual relations

* chore: invisible relation handling
2026-04-13 11:50:01 +01:00
Jamie Howard db2ec304ff fix(core): add firstPublishedAt field to draft (#25947)
* fix(core): add firstPublishedAt field to draft

* test: add unit test firstPublishedAt

---------

Co-authored-by: Ziyi <daydreamnation@live.com>
Co-authored-by: Alex Birkner <github@tyrola.dev>
2026-04-13 11:13:46 +01:00
Ben Irvin 3f4ea0431f test(cli): fix snapshot updating and replace fixed versions (#25986) 2026-04-13 11:43:31 +02:00
Adrien L 1799b42980 fix: preserve relations in fill from another locale (#25703) 2026-04-10 16:30:34 +02:00
Mark Kaylor f50134dbae fix: increase test timeout 2026-04-09 10:59:18 +02:00
Mark Kaylor 9b2501ceeb fix: update snapshot 2026-04-09 10:39:25 +02:00
Ben Irvin 21402c2d26 feat(data-transfer): add directory export/import format (#25867) 2026-04-02 15:07:35 +02:00
Ben Irvin e26d2748a2 test(cli): use snapshots for list output (#25898)
* test(cli): openapi generations

* test(cli): use snapshots for list output
2026-04-02 13:10:38 +02:00
Bassel Kanso b78c5e7c6a fix(create-strapi-app): generate .yarnrc.yml for Yarn projects (#25869) 2026-04-02 12:27:40 +03:00
Ben Irvin 2cc0ba2f6d test(cli): openapi generations (#25897) 2026-04-02 11:09:57 +02:00
Jamie Howard a9afb42db9 RBAC "Move to stage" for review workflows (#25723)
* feat: 'toPermissions' in stage management

* test: enhance stage tests

* test: add api tests for to stage permissions

* feat: migration for backward compatible stage transfer permissions

* chore: rename permissions to fromPermissions in workflow stages

* chore: improve type definitions

* chore: rename permissions to fromPermissions
2026-04-01 12:27:54 +01:00
Ben Irvin 62f601ae76 test(api): add REST tests for relation documentId shorthand (#25870) 2026-03-31 14:05:24 +00:00
Jamie Howard 0a1886db0f fix(core): relation handling preserves order during unpublish/republish cycles (#25764)
* fix(core): relation handling preserves order during unpublish/republish cycles

* fix: preserve bidirectional order (#25792)

- Keep join rows when related side is still draft; map to published id when available
- Sync owner-side join order when publishing the owning type (inversedBy path)
- Refactor bidirectional load into shared capture + draft→published mapping helpers

Co-authored-by: Ben Irvin <ben@innerdvations.com>

* chore(core): re add order fix

* chore(core): improve structure and batch processing

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-03-31 14:08:26 +01:00
Ben Irvin 1459f88cde fix: contains filter no longer returns empty data (#25810)
* fix: contains filter no longer returns empty data

* chore: fix comments

* fix(utils): stop recursing opaque operator operands in filter traversal

* fix(utils): keep Date and other operand objects when stripping empty filters
2026-03-31 14:15:27 +02:00
guoyangzhen 8af200e5e0 fix: change return to continue in deleteRelations when using foreign keys (#25857)
* test(api): add morphToMany delete test

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-03-31 10:26:56 +02:00
Ben Irvin c89195bced test(api): add querylimit middleware test (#25765) 2026-03-30 09:51:30 +02:00
Ben Irvin cc6b0c661b fix: use max batch sizes per dialect (#25390) 2026-03-30 09:39:46 +02:00
Ziyi 24c887eff6 fix(document-service): re-insert cascade-deleted bidirectional relations (#25725) 2026-03-23 11:13:22 +01:00
Jamie Howard ed80b16a8e test: enhance validation tests for repeatable components and dynamic zones (#25714)
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-03-19 13:13:38 +00:00
Ben Irvin 353a86a60d security: package upgrades to remove deprecated versions of boolean, tar, and glob (#25776)
* chore: upgrade tar, global-agent, dedupe yarn.lock

This removes the deprecated packages: boolean, tar<7, node-gyp<12, and others

* chore: upgrade inquirer, file-type, jscodeshift, supertest

* chore: update better-sqlite3

* chore: upgrade pg and mysql2

* fix: use dynamic imports for inquirer esm only

* test(cli): add create-strapi-app test

* test(cli): add scaffold cases

* chore: upgrade to rimraf 6.1.3

* chore: dedupe yarn.lock

* security: update jwk-to-pem

* chore: dedupe yarn.lock

* chore: align inquirer version

* chore: yarn.lock

* test: fix inquirer imports

* test(cli): support zero apps

* test: fix back-end

* test(cli): fix inquirer and fs

* chore: remove accidental file

* chore: dedupe and upgrade pinned deps
2026-03-19 13:44:02 +01:00
Ziyi 08c3b0f003 fix: Content types with attributes named filters, sort, fields, or populate no longer cause 400 validation errors on populate queries and countDraftRelations (#21338) (#25762)
* fix(utils): make convertNestedPopulate schema-aware to prevent keyword collision
2026-03-18 15:48:54 +01:00
Ben Irvin 38049559a0 fix: use strapi.fetch for remote uploads (#25661) 2026-03-18 12:34:39 +01:00
Jamie Howard a6fd594526 Chore/cm combined performance fixes (#25678)
* fix(content-manager): reduce over-populated localizations and metadata (#25557)

* Chore: Content manager performance optimizations (#25600)

* chore(content-manager): wip reduce overhead in metadata queries, populate building, and list view

* fix(content-manager): update document metadata query to select specific fields

* chore(content-manager): document metadata consolidate field selection

* chore(content-manager): streamline locale, enhance document metadata structure

* chore(content-manager): document unpublishing, improve publish status logic

---------

Co-authored-by: markkaylor <mark.kaylor@strapi.io>
2026-03-17 16:28:37 +00:00
Varun Chawla 45ea4b1c9b fix(content-manager): skip non-draftAndPublish relations in countDraftRelations (#25453)
* fix(content-manager): skip non-draftAndPublish relations in countDraftRelations

* fix(content-manager): add safety guard for undefined targetModel

* fix(content-manager): add hasDraftAndPublish guard to sumDraftCounts and getDeepPopulateDraftCount

---------

Co-authored-by: Ziyi Yuan <daydreamnation@live.com>
2026-03-16 11:35:24 +01:00
Bassel Kanso 7530773d74 fix(content-manager): reduce excessive rerendering in relation fields (#25623) 2026-03-09 17:15:10 +02:00
Owen Rossi-Keen 348e09e801 feat(content-manager): filter list view by publication status (#25510)
* feat(content-manager): add publication status filter in list view

Add a publication status filter to the content manager list view when draft & publish is enabled

* feat(content-manager): translate status query filter into document service params

Transform a "status" filter in URL query to a top level document-service param

* feat(content-manager): update publication filter key to prevent conflict with user-defined attribute

* feat(content-manager): add unit tests to extractStatusFilter util

Adds unit tests to extractStatusFilter utility function with permutations of query params as inputs.

* feat(content-manager): expand extractStatusFilter unit tests

Adds additional test cases to extractStatusFilter util

* chore: rename status filter and add test

* enhancement: add full list of status filters

* chore: update labels

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-03-06 18:40:50 +00:00
Adrien L 25ea375b1b fix(content-releases): publish in right order to preserve relations (#25551) 2026-03-06 10:06:50 +01:00
Gouttfi 3ee39f86ed feat: expand accordion by default when inserting a new component in a document (#24230) 2026-03-05 16:32:54 +01:00
Ben Irvin e2aec24015 chore: upgrade better-sqlite3 to 12.6.2 (#25611) 2026-03-05 12:13:37 +01:00
Ben Irvin 484b494b02 security(upload): improve mimetype detection for uploads (#25177) 2026-03-04 10:39:09 +01:00
markkaylor c1b52ed675 chore(upload): add import from url (#25496) 2026-02-27 09:33:24 +01:00
Ben Irvin bf7eb824dc Merge main into develop (sync with release 5.37.0) 2026-02-26 10:04:24 +01:00
Jamie Howard 4fe538996e Future media lib folder creation (#25532)
* future(upload): add folder creation functionality in AssetsPage

* future(upload): update CreateFolderDialog to use props for open state and folder name

* future(upload): front/e2e tests for folder creation + error handling
2026-02-25 17:35:06 +00:00
Ben Irvin 7786d4dcde fix: feature works and rename addBodyParams to addInputParams (#25552)
* fix: add params actually works

* fix: rename addInputParams

* test: fix register timing

* chore: update getstarted

* test(api): remove ai comment

* revert: do not merge in type unneccessarily

* revert: do not add type to route
2026-02-25 17:34:56 +01:00
Adrien L 903f4410ed future(upload): asset details drawer (#25498) 2026-02-24 17:02:08 +00:00
Ben Irvin 79a590a581 security(feat): add strictParam, addQueryParams, addBodyParams (#25528) 2026-02-24 13:51:33 +01:00