From 78ea00f1671e018f2e62e187d10c4084338def4f Mon Sep 17 00:00:00 2001 From: Himanshu Singh Date: Thu, 4 Sep 2025 23:37:00 +0200 Subject: [PATCH] fix: update exports entry with type mappings for ESM consumers --- package.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 019821d..c663b64 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,16 @@ "url": "https://github.com/mongodb-js/mongodb-connection-string-url/issues" }, "main": "lib/index.js", + "types": "lib/index.d.ts", "exports": { - "require": "./lib/index.js", - "import": "./.esm-wrapper.mjs" + "require": { + "default": "./lib/index.js", + "types": "./lib/index.d.ts" + }, + "import": { + "default": "./.esm-wrapper.mjs", + "types": "./lib/index.d.ts" + } }, "files": [ "LICENSE", @@ -58,4 +65,4 @@ "@types/whatwg-url": "^13.0.0", "whatwg-url": "^14.1.0 || ^13.0.0" } -} \ No newline at end of file +}