From b856d587afb895fa99a5f27ca25354021c1b758e Mon Sep 17 00:00:00 2001 From: Ze-Zheng Wu Date: Sun, 29 Dec 2024 01:08:35 +0800 Subject: [PATCH] chore: add `typesVersions` for `moduleResolution: node` --- .changeset/healthy-mugs-dress.md | 5 +++++ package.json | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .changeset/healthy-mugs-dress.md diff --git a/.changeset/healthy-mugs-dress.md b/.changeset/healthy-mugs-dress.md new file mode 100644 index 00000000..99d46634 --- /dev/null +++ b/.changeset/healthy-mugs-dress.md @@ -0,0 +1,5 @@ +--- +"zxing-wasm": patch +--- + +Add `typesVersions` field for `moduleResolution: node` diff --git a/package.json b/package.json index 0e61c9d6..1d26ca77 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,22 @@ "./writer/zxing_writer.wasm": "./dist/writer/zxing_writer.wasm", "./full/zxing_full.wasm": "./dist/full/zxing_full.wasm" }, + "typesVersions": { + "*": { + "full": [ + "./dist/es/full/index.d.ts", + "./dist/cjs/full/index.d.ts" + ], + "reader": [ + "./dist/es/reader/index.d.ts", + "./dist/cjs/reader/index.d.ts" + ], + "writer": [ + "./dist/es/writer/index.d.ts", + "./dist/cjs/writer/index.d.ts" + ] + } + }, "repository": { "type": "git", "url": "git+https://github.com/Sec-ant/zxing-wasm.git" @@ -124,6 +140,9 @@ "@types/emscripten": "^1.39.13", "type-fest": "^4.31.0" }, + "peerDependencies": { + "@types/emscripten": ">=1.39.6" + }, "pnpm": { "overrides": { "vite": "$vite"