Commit Graph
472 Commits
Author SHA1 Message Date
Ben Irvin 29de05e46d test(api): use lightweight resources for document-service query tests (#26466)
Several document-service API suites only need a minimal article schema and
fixtures but were loading the full shared resource pack, making setup and
teardown slow enough to flake on CI hook timeouts.
2026-05-29 10:50:38 +02:00
Jamie Howard 682bb90390 fix(i18n): preserve non-localized field inheritance (#26367)
* fix(i18n): preserve non-localized field inheritance across unsaved locale revisits

* fix(content-manager): sort availableLocales with the default locale first

* fix(content-manager): align non-localized prefill filter with server semantics

* fix(i18n): e2e tests
2026-05-28 15:40:44 +02:00
Ben Irvin 45a635ffe7 test(content-manager): stabilize dynamic zone insert e2e on Firefox (#26450) 2026-05-27 17:38:43 +02:00
Nico André d6f693da85 feat(*): introduce MCP server (#26371) 2026-05-27 16:27:48 +02:00
e2e46f74b9 future(upload): edit asset info (#26366)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Mark Kaylor <mark.kaylor@strapi.io>
2026-05-27 12:53:20 +00:00
40413d376a fix: deleteMany respects filters combined with relation (#25420)
* Use query builder init in deleteMany

* test(api): deleteMany respects filters combined with relation

* fix(database): pick filter params in deleteMany init

Apply _q, where, and filters through init like count instead of where-only
or full findMany params, avoiding populate/pagination surprises. Expand API
and unit tests for relation filters, count parity, and ignored param keys.

* chore(database): clarify deleteMany relation cleanup TODO

Replace the vague bulk-query TODO with a concrete note that deleteMany
still skips per-row deleteRelations unlike single delete().

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-27 09:42:06 +00:00
markkaylorandBen Irvin d14e758ed5 fix(homepage): homepage count-documents slow on large D&P tables (#26370)
* fix(homepage): homepage count-documents slow on large D&P tables

* chore: add api test

* test(homepage): add i18n count-documents document_id semantics tests

Assert per-document_id buckets for never-published multi-locale drafts,
partial locale publish states, and mutually exclusive published vs modified.

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-27 10:25:34 +02:00
1dd851498a feat(admin): add documentation helper link in HeaderLayout (revival of #23328) (#26422)
* feat(admin): add documentation helper link in HeaderLayout

Revival of #23328 (by @Mcastres), rebased on develop with review feedback
addressed and additional improvements:

- Replace hand-rolled find with react-router matchRoutes for proper path
  matching and specificity ranking
- Update doc URLs to canonical docs.strapi.io paths (drop redirected
  /user-docs/* and /dev-docs/* entries)
- Restore section anchors that were lost during doc-site reorganization
  (#providers, #email-templates, #advanced-settings, profile, rbac)
- Align array path entries with actual registered admin routes (rename
  /plugins/content-type-builder, /plugins/content-releases, settings
  prefix for purchase-content-releases and list-plugins, drop dead
  /marketplace external link)
- Add opt-out flag admin.flags.docLinks for white-label deployments
  (requested by @derrickmehaffy)
- Memoize getMatchingDocLink result per pathname
- Place doc link button next to primary action via gap on parent Flex
  (per @remidej review)
- Drop async from getMatchingDocLink, derive docLink synchronously from
  pathname (per @remidej review)

Closes #23328

Co-authored-by: Maxime Castres <17828745+Mcastres@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(admin): move DocLink type to getMatchingDocLink module

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(admin): add docLinks flag to EE Window strapi type

The EE admin custom.d.ts redeclares window.strapi.flags and was missing
the docLinks property, causing test:ts:front to fail with TS2339 in
HeaderLayout.tsx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test: add getMachingDocLink tests

---------

Co-authored-by: Maxime Castres <17828745+Mcastres@users.noreply.github.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-26 09:59:00 +02:00
Nico André ebba42a369 feat(admin-tokens): remove adminTokens future flag (#26391) 2026-05-21 15:31:38 +02:00
Ben Irvin 05ff01de4f feat: publicationFilter param in REST and document service (#25793) 2026-05-21 11:31:18 +02:00
Ben Irvin f9c6a232e3 fix(database): respect nested sort in populate for join-table relations (#26361)
* fix(database): respect nested sort in populate for join-table relations

* test(api): cover nested populate sort edge cases

Refs: #26359
2026-05-18 11:15:35 +00:00
6ed22b5cfa security(deps): upgrade multiple dependencies (#26326)
* chore: upgrade simple-git

* chore: upgrade axios

* chore: upgrade docusaurus

* chore: upgrade docusaurus family

* chore: yarn.lock

* chore: upgrade styled-components

* chore: upgrade yaml

* chore: bump fast-uri in pinned deps

* chore: bump axios in cloud plugin

* chore: remove unnecessary ts error suppression

* chore: align docusaurus packages

* chore: yarn.lock

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Jamie Howard <jhoward1994@gmail.com>
2026-05-15 08:52:31 +01:00
Jamie Howard 1a0cb07509 Merge pull request #26242 from strapi/fix/cms-941-rw-select
feat(review-workflows): save prompt for unsaved locales
2026-05-14 14:46:38 +01:00
Westley MarchmentandBassel Kanso d9d5ff82dd fix(graphql): inherit publication state for i18n localizations (#22163)
* Filter for published results when requesting localizations

* fix(graphql): inherit publication state for i18n localizations

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-05-14 16:42:24 +03:00
Mark Kaylor 83fec11da9 Merge remote-tracking branch 'origin/main' into develop 2026-05-13 19:12:11 +02:00
Nico AndréandBen Irvin c3d9daef94 fix(core/admin): admin and content api tokens retro-compatibility (#26313)
* fix(core/admin): api-token service treats kind.null as content-api

* fix(core/admin): services expose backward compatible 'api-token' shim

* enhancement(core/admin): api-token service uses pick instead of omit

* fix(core/admin): strategies content-api-token uses api-token-content-api service

* test: ensure api-token alias works

* test: fix useDocumentLayout for msw upgrade

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-13 14:57:11 +02:00
Garrett HeaverandBen Irvin 50732df27a fix: FK violation publishing self-relation parent & child in one release (#26147)
* fix: content release with self-relation parent & child fails with FK violation

1. Concurrent publishes within a content type race on shared join-table state.
2. Errors from scheduled publishes were also silently swallowed leaving
   no trail in the logs.

* test: api test for self-related releases

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-12 13:37:25 +02:00
Andrei L b5452ab89f chore(eslint): migrate .eslintrc + .eslintignore to .eslintrc.cjs (#26216)
* chore(eslint): migrate .eslintrc + .eslintignore to .eslintrc.cjs

Consolidates the per-package ESLint setup into a single typed
`.eslintrc.cjs` file across the monorepo (177 files touched).

Why
- `.eslintignore` is removed in ESLint v9/v10. Folding ignore patterns
  into `ignorePatterns` inside the rc file is the supported migration
  path and unblocks future ESLint upgrades (which will likely be needed
  alongside the in-flight TypeScript 6 migration).
- `.cjs` extension is explicit about module format, so the configs keep
  working if any package later adopts `"type": "module"` (no CJS/ESM
  surprises).
- Wrapping each config in `// @ts-check` + a `Linter.Config`-typed
  `const config` block gives editor autocomplete and catches typos.
  Surfaced two real duplicates in
  `eslint-config-custom/back/typescript.js`
  (`node/no-unsupported-features/es-syntax`,
  `node/no-missing-import`), now deduplicated.
- `extends` references switched from the `custom/*` shorthand to the
  explicit `eslint-config-custom/*` package name. ESLint resolves both,
  but the explicit form makes the source unambiguous.
- Added `coverage/` to `ignorePatterns` so coverage output produced
  inside a workspace is not linted.

Misc
- `examples/kitchensink` had ESLint configured but no `lint` script;
  added one so the config actually runs.
- `nx.json` hash inputs updated:
  - removed `.eslintignore` (no longer exists)
  - replaced `{projectRoot}/.eslintrc.js` with
    `{projectRoot}/**/.eslintrc.cjs` so nested package configs are also
    part of the cache key (the previous glob missed them).
- `packages/utils/upgrade/tsconfig.eslint.json` include path updated
  from `.eslintrc.js` to `.eslintrc.cjs`.

Verification
- `eslint --print-config` resolves cleanly on sampled back/front
  packages (admin, users-permissions, upload).
- Full `pnpm -r lint` is clean.

* chore(eslint): set tsconfigRootDir for vscode-eslint typed linting

CLI lint resolved tsconfig paths via cwd, but vscode-eslint runs from
the workspace root and could not locate per-package tsconfigs. Set
parserOptions.tsconfigRootDir to __dirname in each package's
.eslintrc.cjs so the editor resolves typed-lint configs correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(eslint): self-ignore configs, scope coverage to jest packages

- Replace `env: { es6: true }` workaround with `.eslintrc.cjs` in
  ignorePatterns so eslint never lints the config file itself
  (root cause of the "const is not a keyword" parse error in es5)
- Add `.eslintrc.cjs` to ignorePatterns across all configs that
  were missing it
- Restrict `coverage/` ignorePatterns to workspace roots that
  actually run jest; drop from non-test packages and admin/server
  subdir configs (tests run from the workspace root)
2026-05-12 07:32:12 +00:00
Ben Irvin bdb24ffb0d fix(database): append primary key to ORDER BY for paginated selects (#26032) 2026-05-11 15:37:50 +02:00
markkaylorandBen Irvin c06b10cad4 chore(upload): add concurrentUploadSize config (#26053)
Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-11 14:18:57 +02:00
Jamie Howard 4ec512cb11 fix: keep draft link on x-to-one relations non-dp to dp (#26179) 2026-05-06 09:23:21 +00:00
Christian Dreier 7efe492722 fix(graphql): isolate root query args per root field (#26178) 2026-05-05 16:25:56 +02:00
Ben Irvin 8a09307144 test(e2e): fix race conditions with drag methods for each browser (#26205) 2026-05-05 09:41:50 +02:00
Ben Irvin 72535fb1c2 fix(database): run cleanOrderColumns updates sequentially (#26134)
Fix concurrent UPDATEs on the same join table that can deadlock Postgres
when renumbering order and inverse order columns.

Refs: https://github.com/strapi/strapi/issues/26131
2026-05-04 17:36:59 +02:00
Ziyi fa6299100d feat(content-manager): add Zod 4 foundation utilities (#25574) 2026-04-30 14:55:04 +02:00
Boaz PoolmanandBen Irvin 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 KlingandBassel Kanso 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 Norrisandmathildeleg 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
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 LandZiyi Yuan 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
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