refactor: include op-patch from json-patch#2823
Merged
Lisa White (whitelisab) merged 7 commits intonew-betafrom Feb 17, 2026
Merged
refactor: include op-patch from json-patch#2823Lisa White (whitelisab) merged 7 commits intonew-betafrom
Lisa White (whitelisab) merged 7 commits intonew-betafrom
Conversation
…tch as regualr dependency for typescript projects
| makeRequest: MakeRequestWithUserAgent | ||
| } | ||
|
|
||
| export type OpPatch = AddPatch | RemovePatch | ReplacePatch | MovePatch | CopyPatch | TestPatch |
There was a problem hiding this comment.
Just a nit:
By definition, a Patch Document is a list of Operations. Operations can have different Operation types. Operation can be mixed within a Patch.
Contributor
Author
There was a problem hiding this comment.
It is a 1to1 copy of the type in the depdencency, I would not change it now. It worked fine for many years.
We can still adjust then if we feel like its needed in a later version!
Ely Lucas (elylucasctfl)
approved these changes
Dec 19, 2025
Lisa White (whitelisab)
approved these changes
Feb 17, 2026
Benedikt Rötsch (axe312ger)
added a commit
that referenced
this pull request
Mar 13, 2026
* refactor: include op-patch from json-patch to avoid including json-patch as regualr dependency for typescript projects * Remove unused Stream import from common-types.ts * fix: extra import from merge --------- Co-authored-by: Lisa White <lisa.white@contentful.com>
Chase Poirier (chasepoirier)
added a commit
that referenced
this pull request
Mar 26, 2026
BREAKING CHANGE * feat!: new esm builds * chore: remove errant deprecation notice * chore: fix imports in tests * chore: fix size limit check * chore: remove browser test app run * chore: fix test imports * chore: fix format * chore: update .nvmrc to v22 * chore: cleanup rollup and tsconfig * chore: remove leftover babel and webpack artifacts * chore: fix cjs dist folder name * chore: fix new-beta branch name in workflow file * chore: revert back to sdk core latest * fix: change to kickoff release * fix: turn on cjs module interop in rollup * chore: add browser build back in * fix: bump build * fix: replace node stream type with ReadableStream for better browser compatibility * chore: only polyfil util lib * chore: update browser list * chore: update readme * chore: add migration guide * chore: change target to 2021 for better support * chore: reenable checks * chore: update needs * chore: ignore no-undef in test * feat!: bump to update major * feat: bump to update major BREAKING CHANGE: This is a breaking change and changes might need to be made to your project. See the MIGRATION.md guide for more info. * chore: fix path * fix: bump build * fix: revert ReadableStream change * fix: bump build * chore: import type stream as named export * chore: some cleanup * fix: make version param required for entry patch method of plain client [DX-34] (#2610) * chore: update migration guide for patch change * fix: remove browser export (#2851) Co-authored-by: Ely Lucas <ely.lucas@contentful.com> * fix: export TagSysProps type * chore: update readme * fix: update to contentful-sdk-core dev build * fix: new core sdk build * chore: fix build * chore: putting process back in cause i just dont wanna anymore * fix: add latest sdk core dev build * chore: update to latest sdk core * feat: taxonomy changes cherry picked [DX-671] (#2862) * feat: align taxonomy update methods with standard [NONE] (#2478) * chore: migration doc updated with breaking changes --------- Co-authored-by: LiamStokingerContentful <109533364+LiamStokingerContentful@users.noreply.github.com> * docs: update migration guide with entry.patch version param breaking change [DX-672] (#2863) * fix: make version param required for entry patch method of plain client [DX-34] (#2610) * docs: update migration guide with entry.patch version param breaking change * chore: fix formatting * fix: update import paths in agent test files to use lib/index * chore: update imports for integration tests --------- Co-authored-by: Lisa White <lisa.white@contentful.com> * chore: deprecate waterfall client [DX-674] (#2865) * chore: deprecation warnings added * chore: type deprecation warning * chore: wording changed --------- Co-authored-by: Chase Poirier <chase@chasepoirier.com> * feat!: Default to plain client instead of waterfall client [DX-690] (#2867) * feat!: default to plain client instead of waterfall client BREAKING CHANGE: The createClient function now defaults to the plain client instead of the legacy waterfall client. - No type option or type: 'plain' now returns PlainClientAPI (was ClientAPI) - Added type: 'legacy' option to explicitly use waterfall client with deprecation warning - Updated user agent to use contentful-management-plain.js for plain client - Updated MIGRATION.md with breaking change documentation Closes DX-690 * docs: update README examples for new plain client default - Remove { type: 'plain' } from examples since it's now the default - Rename plainClient to client in examples - Add { type: 'legacy' } to legacy client example - Update deprecation message for legacy client * docs: rename 'waterfall' terminology to 'nested' for legacy client Updated all references to use consistent 'nested (legacy)' terminology instead of 'waterfall (legacy)' to better describe the client's API structure. * fix: include op-patch from json-patch [DX-725] (#2823) * refactor: include op-patch from json-patch to avoid including json-patch as regualr dependency for typescript projects * Remove unused Stream import from common-types.ts * fix: extra import from merge --------- Co-authored-by: Lisa White <lisa.white@contentful.com> * feat: clean up code structure for better docs (#2827) * refactor: remove entities barrels file to improve import structure and help with docs generation * refactor: ensure export types barrel file is used to export types only * refactor: rename plain/common-types to actually describe what the file contains * fix: remove confusing outdated ClientParams type and finally export the type for the client creation options * refactor: rename params to clientOptions in createClient function to ensure naming of variable matches naming of type * refactor: remove deprecated, unsupported and unused alphaFeatures * style: remove outdated ts-error comments and add details to still valid ones * refactor: rename DefaultParams to PlainClientDefaultParams to avoid confusion with legacy client params * fix: restore non-enumerable toPlainObject compatibility and __VERSION__ ts-expect-error after rebase * refactor: standardize @private/@internal convention and tag internal types - Add @internal to ~80 internal Params types in common-types.ts - Switch exported-but-internal symbols from @Private to @internal (MakeRequest, MRActions, MROpts, MRReturn, XOR, WrapParams, WrapFn, wrap, createPlainClient, all create-*-api types and functions) - Add missing @internal to environment template API type and function - Fix OptionalDefaults: remove incorrect @Private, add proper JSDoc - Mark deprecated type aliases in export-types.ts (AccessTokenProp, CreatePATProps, UIExtension, UIExtensionProps, CreateUIExtensionProps) * refactor: standardize API type naming (Api -> API) and fix duplicate name - Rename ContentfulEntryApi to ContentfulEntryAPI - Rename ContentfulEnvironmentTemplateApi to ContentfulEnvironmentTemplateAPI - Rename ContentfulUIConfigApi to ContentfulUIConfigAPI (create-ui-config-api.ts) - Rename ContentfulUIConfigApi to ContentfulUserUIConfigAPI (create-user-ui-config-api.ts), fixing duplicate type name bug * chore: update migration doc with breaking changes * style: use @returns instead of @return across all JSDoc comments to match TypeDoc standard * refactor: standardize all @Private tags to @internal across codebase --------- Co-authored-by: Chase Poirier <chase.poirier@contentful.com> * chore: add optional dep * fix: missing type from merge * chore: update linter * chore: add optional dep for esbuild * fix: import paths for unit tests * chore: fix pkg lock pointing to github pkgs * chore: pin prettier to 3.6.2 * fix: add timeout for space-membership integration tests --------- Co-authored-by: Ely Lucas <ely.lucas@contentful.com> Co-authored-by: Lisa White <lisa.white@contentful.com> Co-authored-by: Ely Lucas <ely.lucas+github@contentful.com> Co-authored-by: Tyler Pina <tyler.pina@contentful.com> Co-authored-by: LiamStokingerContentful <109533364+LiamStokingerContentful@users.noreply.github.com> Co-authored-by: Benedikt Rötsch <axe312ger@users.noreply.github.com>
Benedikt Rötsch (axe312ger)
added a commit
that referenced
this pull request
Mar 30, 2026
* refactor: include op-patch from json-patch to avoid including json-patch as regualr dependency for typescript projects * Remove unused Stream import from common-types.ts * fix: extra import from merge --------- Co-authored-by: Lisa White <lisa.white@contentful.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the current state of the new-beta branch, typescript projects using the new beta would complain about the missing dependency, as it won't be installed there as a devDependency.
I chose in my variant to include it simply as a regular dependency and continue, but I felt now it might be better to include that one type we use everywhere in our own project, avoiding having this dependency + types completely.
See: https://github.com/contentful/contentful-management.js/blob/beta/package.json#L81
Just a suggestion, but we need that type available for projects similar to https://github.com/axe312ger/contentful-compatibility-cda/tree/main/environments/node-ts-mjs