Commit Graph
1188 Commits
Author SHA1 Message Date
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
1b37af9a70 enhancement(db): migration performance improvements (#25988)
* Run batches of document_id creation

* fix(core): use better caching in discard-draft

* fix(core): improve batch sizing & document_id loop efficiency // more caching improvements

* fix(core): componentHierarchyCaches moved back outside the loop

* test(migrations): add new tests and update existing

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-05-21 12:53:22 +00:00
Bassel17 04ac8c3e90 release: 5.46.1 2026-05-20 09:09:00 +00: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
Mark Kaylor 83fec11da9 Merge remote-tracking branch 'origin/main' into develop 2026-05-13 19:12:11 +02:00
markkaylor 7f34c4b7d9 release: 5.46.0 2026-05-13 13:39:32 +00: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
Jamie Howard a2c5ecb225 Merge remote-tracking branch 'origin/main' into develop 2026-05-11 16:16:35 +01:00
Ben Irvin bdb24ffb0d fix(database): append primary key to ORDER BY for paginated selects (#26032) 2026-05-11 15:37:50 +02:00
jhoward1994 9300041094 release: 5.45.1 2026-05-11 10:41:36 +00:00
Florent Baldino 2c48df2547 fix(db): deterministic schema hash by sorting tables before hashing (#26202) 2026-05-08 14:29:20 +00:00
e907cd111b fix(database): morph typeField wins over same-name fields in populate (#26120)
* chore: remove early exit for morph relation types

* fix: issues with creating morphToOne relations

* chore: add tests

* test: add polymorphic relations tests

* fix(database): let morph typeField win over same-named target fields in populate

morphToOne and morphToMany: merge target row first, then set typeField (__type or custom)
so the polymorphic target UID is authoritative

* chore: fix ts

* docs: add contributor doc for polymorphic relations (#26121)

* test: apply morph to one

---------

Co-authored-by: Boaz Poolman <boaz_skater@hotmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-07 16:42:49 +02:00
Bassel Kanso 736571726b Merge branch 'main' into develop 2026-05-06 13:21:38 +03:00
Bassel17 c5bc749fee release: 5.45.0 2026-05-06 10:06:46 +00: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
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
Dominik JurigaandZiyi 86fe764f4f feat: sort based on publish status (#25689)
* feat: sort based on publish status

* chore: remove redundant `any` type assertions

* fix: override sort if `status` filter is present

* fix(content-manager): status sort ignored hasPublishedVersion and publicationStatusFilter

* fix(utils): remove unused STATUS_ATTRIBUTE constant

* fix(content-manager): missing deps in useEffect for status sort cleanup

---------

Co-authored-by: Ziyi <daydreamnation@live.com>
2026-05-04 13:19:13 +02:00
Adrien L 8156393f8f Merge pull request #26170 from strapi/main 2026-04-30 14:28:15 +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
Adzouz 11554fe43e release: 5.44.0 2026-04-29 13:06:31 +00:00
nclsndr 765bd19a3a Merge branch 'develop' of github.com:strapi/strapi 2026-04-24 15:40:44 +02:00
Ben Irvin ac6cd0063c chore(deps): bump multiple dependencies (#26103)
dotenv: 16.4.5 → 16.6.1
fs-extra: 11.2.0 → 11.3.4
semver: 7.5.4 → 7.7.4
typescript: 5.4.4 → 5.4.5
esbuild-loader: 4.3.0 → 4.4.3
esbuild-register: 3.5.0 → 3.6.0
grant: ^5.4.8 → 5.4.24 (pinned)
markdown-it: ^13.0.2 → 14.1.1
2026-04-24 13:11:54 +01:00
Ziyi 7f7c1c3403 fix(database): make 5.0.0-02-created-document-id migration idempotent (#26045)
Previously the migration could leave the DB in an unbootable state after
a statement_timeout or process kill: the document_id column existed but
the migration was not recorded, and the retry crashed with PG 42701
"column already exists". Additionally, when hasColumn returned true
the migration early-exited via continue, silently skipping the backfill
and leaving rows with NULL document_id.

- Swallow duplicate-column errors (PG 42701, MySQL 1060, generic
  /duplicate column/i) around ALTER TABLE ADD COLUMN to tolerate
  catalog drift / operator-applied partial fixes.
- Always run the document_id backfill when the column exists; the
  backfill already uses WHERE document_id IS NULL so it is a no-op on
  fully-populated tables and recovery on partially-populated ones.
- Add unit tests covering fresh run, column-already-exists,
  PG 42701, MySQL 1060, and non-duplicate errors.

Fixes CMS-689
2026-04-24 09:12:57 +02:00
nclsndr 14628987b5 release: 5.43.0 2026-04-22 14:30:40 +00:00
jhoward1994 4709832272 release: 5.42.1 2026-04-15 11:13:30 +00:00
dependabot[bot] 68e20493cc chore(deps): bump lodash from 4.17.23 to 4.18.1 (#25919)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.23 to 4.18.1.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.23...4.18.1)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.18.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 10:50:59 +02:00
Mark Kaylor 7d6ce043e0 Merge branch 'main' into develop 2026-04-09 15:36:49 +02:00
markkaylor e86a5190a5 release: 5.42.0 2026-04-08 12:14:52 +00:00
Yohei Yamamoto 12dfbe97c9 chore: fix typos in comments and docs 2026-04-07 14:32:50 +02:00
Bassel Kanso b35ea93f83 Merge branch 'main' into develop 2026-04-01 13:29:10 +03:00
Bassel17 5ae36e382d release: 5.41.1 2026-04-01 09:48:47 +00:00
Bassel Kanso 056df8eaec Merge branch 'main' into develop 2026-04-01 12:30:46 +03:00
Bassel17 967175a13b release: 5.41.0 2026-04-01 09:10:30 +00:00
guoyangzhenandBen Irvin 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 cc6b0c661b fix: use max batch sizes per dialect (#25390) 2026-03-30 09:39:46 +02:00
Adzouz e1cdebd2a5 release: 5.40.0 2026-03-18 13:25:35 +00:00
markkaylor ad0cb5e494 chore(core): parallelize and cache dynamic zone populate (#25685) 2026-03-12 14:43:58 +01:00
Bassel Kanso ea3b700d6d Merge branch 'main' into develop 2026-03-11 16:37:26 +02:00
Bassel17 243c96ff4a release: 5.39.0 2026-03-11 10:13:31 +00:00
Bassel17 cd12da721d release: 5.38.1 2026-03-11 09:56:28 +00:00
Nikolas RimikisandNikolas Rimikis a0a18654b2 chore: use https instead of git url in package.repository.url (#25698)
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
Co-authored-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
2026-03-10 12:42:42 +00:00
Nikolas RimikisandNikolas Rimikis f2a8048761 chore: update package metadata (#25599)
Add homepage, bugs and repository information to every public package

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
Co-authored-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
2026-03-09 15:34:48 +01:00
markkaylor 29f5741e96 release: 5.38.0 2026-03-04 13:09:53 +00:00
Bassel17 e7bb15d0fd release: 5.37.1 2026-02-26 14:50:27 +00:00
innerdvations c18dbf7892 release: 5.37.0 2026-02-26 08:27:53 +00:00
Ben Irvin 90dab7c990 security(deps): upgrade multiple dependencies (#25506)
* security: upgrade minimatch to 10.2.1

* security: update pinned elliptic

* security: update ajv to 8.18.0

* chore: update octokit

* security: upgrade fast-xml-parser
2026-02-24 09:17:24 +01:00
Bassel Kanso 741c748589 Merge branch 'main' into develop 2026-02-19 17:14:36 +02:00
innerdvations 6187e8a9d7 release: 5.36.1 2026-02-18 14:16:09 +00:00
Ben Irvin bebb8af25d ci: add version compare script and workflow (#25451) 2026-02-18 09:16:43 +01:00
markkaylor 23a521fab4 release: 5.36.0 2026-02-11 14:05:28 +00:00