From 434982a8693da6a8db38b9a44a7572dd017a791b Mon Sep 17 00:00:00 2001 From: Igor Kamyshev Date: Tue, 16 Apr 2024 12:12:04 +0700 Subject: [PATCH] Runtime deprecation warning in `attachOperation` --- .changeset/pretty-mails-switch.md | 5 +++++ packages/core/src/attach/attach.ts | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/pretty-mails-switch.md diff --git a/.changeset/pretty-mails-switch.md b/.changeset/pretty-mails-switch.md new file mode 100644 index 00000000..2f0d3d5c --- /dev/null +++ b/.changeset/pretty-mails-switch.md @@ -0,0 +1,5 @@ +--- +"@farfetched/core": minor +--- + +Runtime deprecation warning in `attachOperation` diff --git a/packages/core/src/attach/attach.ts b/packages/core/src/attach/attach.ts index 9877abc8..09120638 100644 --- a/packages/core/src/attach/attach.ts +++ b/packages/core/src/attach/attach.ts @@ -106,6 +106,10 @@ export function attachOperation< mapParams?: (params: NewParams, source?: any) => OriginalParams; } ) { + console.error( + 'attachOperation is deprecated since 0.12, please read the migration guide: https://farfetched.pages.dev/adr/attach_operation_deprecation.html' + ); + const { source, mapParams } = config ?? {}; return operation.__.experimentalAPI?.attach({