chore(twenty-server): upgrade typeorm to 0.3.29 (#21957)

## Summary

Upgrades **typeorm `0.3.26` → `0.3.29`** and adapts the twenty-orm
`update`/`upsert` overrides to typeorm's newly-added
`options.returning`. Upgrading to resolve
[this](https://github.com/twentyhq/twenty/security/dependabot/1573)
alert.

## Why

`0.3.29` is the latest release compatible with
`@ptc-org/nestjs-query-typeorm` (peers `typeorm@^0.3.15`; the `1.x` line
has no compatible release, so it's blocked until that dependency moves).

## Changes

**`chore` — bump**
- `typeorm` patch descriptor `0.3.26 → 0.3.29` + `yarn.lock`.
- Local patch carried over **unchanged** (pure rename) — both hunks
(`PickKeysByType` nullable-awareness, `DeleteResult.generatedMaps`) are
still absent upstream in `0.3.29`, so it remains load-bearing.

**`refactor` — adapt overrides**
- `0.3.29` adds `options?: UpdateOptions` (carrying `returning`) to
`EntityManager`/`Repository` `update()`. The override must accept it at
the base-mandated position, so it's added as its **own dedicated
parameter** (not hidden inside `permissionOptions`), honoring
`options.returning` with a fallback to Twenty's permission-aware
`selectedColumns` (`'*'` default).
- The same merge is applied to `upsert()`, which already received
`UpsertOptions` but was dropping its `returning` field — so both write
methods now treat the option identically.
- Internal call sites + specs updated for the new parameter slot.

## Verification

- `nx typecheck twenty-server` — **0 errors**
- twenty-orm unit tests — **191 / 191 pass**
- `oxlint` / `oxfmt` — clean
This commit is contained in:
Abdullah.
2026-06-22 19:08:09 +05:00
committed by GitHub
parent 6eb60f8a49
commit c171c62099
10 changed files with 83 additions and 43 deletions
@@ -408,6 +408,7 @@ export class WorkflowCommonWorkspaceService {
await workflowRepository.update(
workflowId,
{ statuses: newStatuses },
undefined,
queryRunner.manager,
);
}
@@ -417,6 +418,7 @@ export class WorkflowCommonWorkspaceService {
await workflowVersionRepository.update(
workflowVersion.id,
{ status: WorkflowVersionStatus.DEACTIVATED },
undefined,
queryRunner.manager,
);
}
@@ -438,6 +438,7 @@ export class WorkflowRunWorkspaceService {
workflowRunToUpdate.id,
partialUpdate,
undefined,
undefined,
['id'],
);
}, authContext);
@@ -283,6 +283,7 @@ export class WorkflowTriggerWorkspaceService {
await workflowVersionRepository.update(
{ id: workflow.lastPublishedVersionId },
{ status: WorkflowVersionStatus.ARCHIVED },
undefined,
queryRunner.manager,
);
}
@@ -290,6 +291,7 @@ export class WorkflowTriggerWorkspaceService {
await workflowRepository.update(
{ id: workflow.id },
{ lastPublishedVersionId: workflowVersion.id },
undefined,
queryRunner.manager,
);
}
@@ -317,6 +319,7 @@ export class WorkflowTriggerWorkspaceService {
await workflowVersionRepository.update(
{ id: workflowVersion.id },
{ status: WorkflowVersionStatus.ACTIVE },
undefined,
queryRunner.manager,
);
@@ -374,6 +377,7 @@ export class WorkflowTriggerWorkspaceService {
await workflowVersionRepository.update(
{ id: workflowVersion.id },
{ status: WorkflowVersionStatus.DEACTIVATED },
undefined,
queryRunner.manager,
);