From 44ab75bc9d039504227372f521fc82965fede3bf Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Thu, 2 May 2024 12:35:03 -0400 Subject: [PATCH 1/3] add reference types from dwn-sdk-js to avoid pnpm build error https://github.com/microsoft/TypeScript/issues/47663\#issuecomment-1962129199 --- packages/api/src/protocol.ts | 2 ++ packages/api/src/record.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/api/src/protocol.ts b/packages/api/src/protocol.ts index 98985fdd3..b0b4637a1 100644 --- a/packages/api/src/protocol.ts +++ b/packages/api/src/protocol.ts @@ -1,3 +1,5 @@ +/// + import type { DwnMessage, DwnResponseStatus, Web5Agent } from '@web5/agent'; import { DwnInterface } from '@web5/agent'; diff --git a/packages/api/src/record.ts b/packages/api/src/record.ts index 9358ddf8a..06c9f49fc 100644 --- a/packages/api/src/record.ts +++ b/packages/api/src/record.ts @@ -1,3 +1,5 @@ +/// + import type { Readable } from '@web5/common'; import type { Web5Agent, From 6005992c403500e24c2de5ce92053deff9c32c79 Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Thu, 2 May 2024 12:37:12 -0400 Subject: [PATCH 2/3] add changesets --- .changeset/beige-tools-yawn.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/beige-tools-yawn.md diff --git a/.changeset/beige-tools-yawn.md b/.changeset/beige-tools-yawn.md new file mode 100644 index 000000000..f0e0bb362 --- /dev/null +++ b/.changeset/beige-tools-yawn.md @@ -0,0 +1,7 @@ +--- +"@web5/api": patch +--- + +add reference types from dwn-sdk-js to avoid pnpm build error + +https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1962129199 From facd2f7f30320d9f01faa5093b8564041542fe3d Mon Sep 17 00:00:00 2001 From: Liran Cohen Date: Thu, 2 May 2024 12:51:24 -0400 Subject: [PATCH 3/3] add comment and link to PR explaining why the refence type is there --- packages/api/src/protocol.ts | 4 ++++ packages/api/src/record.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/api/src/protocol.ts b/packages/api/src/protocol.ts index b0b4637a1..63ba4a866 100644 --- a/packages/api/src/protocol.ts +++ b/packages/api/src/protocol.ts @@ -1,3 +1,7 @@ +/** + * NOTE: Added reference types here to avoid a `pnpm` bug during build. + * https://github.com/TBD54566975/web5-js/pull/507 + */ /// import type { DwnMessage, DwnResponseStatus, Web5Agent } from '@web5/agent'; diff --git a/packages/api/src/record.ts b/packages/api/src/record.ts index 06c9f49fc..540bd8d50 100644 --- a/packages/api/src/record.ts +++ b/packages/api/src/record.ts @@ -1,3 +1,7 @@ +/** + * NOTE: Added reference types here to avoid a `pnpm` bug during build. + * https://github.com/TBD54566975/web5-js/pull/507 + */ /// import type { Readable } from '@web5/common';