From 1f2cb383ae1bf04297c988009ff62296cdc3dfde Mon Sep 17 00:00:00 2001 From: ygd58 Date: Thu, 13 Aug 2026 15:55:05 +0200 Subject: [PATCH] fix(did): rename did:pkh test fixtures to remove Windows-invalid colons Fixes #145 The three JSON fixtures under test-fixtures/did-pkh/ used the literal did:pkh:... URI (colons included) as their filename. ':' is a reserved character on Windows/NTFS, so these files failed to check out correctly on Windows, breaking pkh-did-resolver.test.ts for Windows contributors and CI runners. Renamed the three fixtures to replace ':' with '_' and updated the corresponding static imports in pkh-did-resolver.test.ts. File contents are unchanged - confirmed via git mv (tracked as renames) and by rerunning the test, which still resolves all four did:pkh test vectors correctly. Changeset added (patch, @agentcommercekit/did). AI usage disclosure: this fix was developed with Claude (Anthropic) assistance - identifying the fixture files as the root cause, renaming them, updating the import paths, and verifying locally. I reviewed and understand the change: three files were renamed (git mv, content untouched) and three import statements in one test file were updated to match the new filenames. --- .changeset/windows-fixture-filenames.md | 16 ++++++++++++++++ .../src/did-resolvers/pkh-did-resolver.test.ts | 6 +++--- ...9c5714089478a327f09197987f16f9e5d936e8a.json} | 0 ...0ae58da58dfa46fa55c3b86545e7065f90ff011.json} | 0 ...12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json} | 0 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .changeset/windows-fixture-filenames.md rename packages/did/test-fixtures/did-pkh/{did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a.json => did_pkh_eip155_1_0xb9c5714089478a327f09197987f16f9e5d936e8a.json} (100%) rename packages/did/test-fixtures/did-pkh/{did:pkh:eip155:84532:0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json => did_pkh_eip155_84532_0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json} (100%) rename packages/did/test-fixtures/did-pkh/{did:pkh:solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ:CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json => did_pkh_solana_4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ_CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json} (100%) diff --git a/.changeset/windows-fixture-filenames.md b/.changeset/windows-fixture-filenames.md new file mode 100644 index 0000000..8e87798 --- /dev/null +++ b/.changeset/windows-fixture-filenames.md @@ -0,0 +1,16 @@ +--- +"@agentcommercekit/did": patch +--- + +Rename `did:pkh` test fixture files to remove `:` characters, which are +invalid in Windows filenames + +The three JSON fixtures under `test-fixtures/did-pkh/` used the literal +`did:pkh:...` URI (colons included) as their filename. `:` is a reserved +character on Windows/NTFS, so these files failed to check out correctly on +Windows, breaking `pkh-did-resolver.test.ts` for Windows contributors and CI +runners. + +Renamed the three fixtures to replace `:` with `_` (e.g. +`did_pkh_eip155_1_0x....json`) and updated the corresponding static imports +in `pkh-did-resolver.test.ts`. File contents are unchanged. diff --git a/packages/did/src/did-resolvers/pkh-did-resolver.test.ts b/packages/did/src/did-resolvers/pkh-did-resolver.test.ts index b38d401..217695d 100644 --- a/packages/did/src/did-resolvers/pkh-did-resolver.test.ts +++ b/packages/did/src/did-resolvers/pkh-did-resolver.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from "vitest" -import fixtureEthereumMainnet from "../../test-fixtures/did-pkh/did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a.json" -import fixtureBaseSepolia from "../../test-fixtures/did-pkh/did:pkh:eip155:84532:0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json" -import fixtureSolana from "../../test-fixtures/did-pkh/did:pkh:solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ:CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json" +import fixtureEthereumMainnet from "../../test-fixtures/did-pkh/did_pkh_eip155_1_0xb9c5714089478a327f09197987f16f9e5d936e8a.json" +import fixtureBaseSepolia from "../../test-fixtures/did-pkh/did_pkh_eip155_84532_0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json" +import fixtureSolana from "../../test-fixtures/did-pkh/did_pkh_solana_4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ_CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json" import { resolve } from "./pkh-did-resolver" /** diff --git a/packages/did/test-fixtures/did-pkh/did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a.json b/packages/did/test-fixtures/did-pkh/did_pkh_eip155_1_0xb9c5714089478a327f09197987f16f9e5d936e8a.json similarity index 100% rename from packages/did/test-fixtures/did-pkh/did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a.json rename to packages/did/test-fixtures/did-pkh/did_pkh_eip155_1_0xb9c5714089478a327f09197987f16f9e5d936e8a.json diff --git a/packages/did/test-fixtures/did-pkh/did:pkh:eip155:84532:0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json b/packages/did/test-fixtures/did-pkh/did_pkh_eip155_84532_0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json similarity index 100% rename from packages/did/test-fixtures/did-pkh/did:pkh:eip155:84532:0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json rename to packages/did/test-fixtures/did-pkh/did_pkh_eip155_84532_0xa0ae58da58dfa46fa55c3b86545e7065f90ff011.json diff --git a/packages/did/test-fixtures/did-pkh/did:pkh:solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ:CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json b/packages/did/test-fixtures/did-pkh/did_pkh_solana_4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ_CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json similarity index 100% rename from packages/did/test-fixtures/did-pkh/did:pkh:solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ:CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json rename to packages/did/test-fixtures/did-pkh/did_pkh_solana_4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ_CKg5d12Jhpej1JqtmxLJgaFqqeYjxgPqToJ4LBdvG9Ev.json