Skip to content

- New collections/operations/utilities/runCollectionHooks.ts — share… - #17887

Open
HotupanSandra wants to merge 1 commit into
payloadcms:mainfrom
HotupanSandra:refactor/dedupe-collection-operations
Open

- New collections/operations/utilities/runCollectionHooks.ts — share…#17887
HotupanSandra wants to merge 1 commit into
payloadcms:mainfrom
HotupanSandra:refactor/dedupe-collection-operations

Conversation

@HotupanSandra

Copy link
Copy Markdown

…d sequential hook runner, used to replace ~14 duplicated hook loops across create.ts,

operations/utilities/update.ts, delete.ts, deleteByID.ts, find.ts, findByID.ts
  • New collections/operations/utilities/getOperationSelect.ts — replaces 7 duplicated sanitizeSelect(resolveSelect(...)) blocks
  • New utilities/compileEndpoints.ts — precompiles REST endpoint matchers once per collection/global instead of per request, wired into handleEndpoints.ts
  • Two small @ts-expect-error additions in delete.ts, matching the codebase's existing "vestiges of when tsconfig was not strict" pattern already used identically in update.ts — a compile-time-only artifact of the refactor, not a runtime behavior change

…d sequential hook runner, used to replace ~14 duplicated hook loops across create.ts,

    operations/utilities/update.ts, delete.ts, deleteByID.ts, find.ts, findByID.ts
  - New collections/operations/utilities/getOperationSelect.ts — replaces 7 duplicated sanitizeSelect(resolveSelect(...)) blocks
  - New utilities/compileEndpoints.ts — precompiles REST endpoint matchers once per collection/global instead of per request, wired into handleEndpoints.ts
  - Two small @ts-expect-error additions in delete.ts, matching the codebase's existing "vestiges of when tsconfig was not strict" pattern already used identically in
    update.ts — a compile-time-only artifact of the refactor, not a runtime behavior change
@github-actions

Copy link
Copy Markdown
Contributor

Pull Request titles must follow the Conventional Commits specification and have valid scopes.

No release type found in pull request title " - New collections/operations/utilities/runCollectionHooks.ts — share…". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:

  • build
  • chore
  • ci
  • docs
  • examples
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • templates
  • test
feat(ui): add Button component
^    ^    ^
|    |    |__ Subject
|    |_______ Scope
|____________ Type

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