From 513a31e2fe45fcbe4f71af4c6cff426d8946d9a6 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Thu, 18 Apr 2024 12:39:02 +0100 Subject: [PATCH] fix(core): Fix `@ts-ignore` directive on TS import in type declaration output --- .changeset/lucky-timers-hear.md | 5 +++++ scripts/rollup/cleanup-plugin.mjs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lucky-timers-hear.md diff --git a/.changeset/lucky-timers-hear.md b/.changeset/lucky-timers-hear.md new file mode 100644 index 0000000000..484238b46b --- /dev/null +++ b/.changeset/lucky-timers-hear.md @@ -0,0 +1,5 @@ +--- +'@urql/core': patch +--- + +Fix `@ts-ignore` on TypeScript peer dependency import in typings not being applied due to a leading `!` character. diff --git a/scripts/rollup/cleanup-plugin.mjs b/scripts/rollup/cleanup-plugin.mjs index d922b96023..e6eca48dc4 100644 --- a/scripts/rollup/cleanup-plugin.mjs +++ b/scripts/rollup/cleanup-plugin.mjs @@ -12,7 +12,7 @@ function cleanup() { if (dtsFilter(chunk.fileName)) { return input .replace(emptyImportRe, '') - .replace(gqlImportRe, x => '/*!@ts-ignore*/\n' + x); + .replace(gqlImportRe, x => '/*@ts-ignore*/\n' + x); } }, };