Skip to content

Commit 015556a

Browse files
authored
Call finalizeBuildEntry for exportEntries generated from asteriskPath objects (#1162)
1 parent 47be1db commit 015556a

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

server/build_resolver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ func (ctx *BuildContext) resolveEntry(esm EsmPath) (entry BuildEntry) {
174174
}
175175
*/
176176
exportEntry = ctx.resolveConditionExportEntry(resloveAsteriskPathMapping(obj, diff), pkgJson.Type)
177+
ctx.finalizeBuildEntry(&exportEntry)
177178
if !exportEntry.isEmpty() {
178179
break
179180
}

test/issue-1161/test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { assert, assertEquals, assertStringIncludes } from "jsr:@std/assert";
2+
3+
// change the import path to the module you want to test
4+
import {Client} from "http://localhost:8080/@modelcontextprotocol/sdk@1.15.0/client/index.js";
5+
6+
// related issue: https://github.com/esm-dev/esm.sh/issues/1161
7+
Deno.test("testing name", async () => {
8+
const client = new Client({name: 'test', version: '1.0.0'});
9+
assert("connect" in client);
10+
assertEquals(typeof client.connect, "function");
11+
});

0 commit comments

Comments
 (0)