From b444139efa4ea5adf5cf0bb3e41bdf3612dbbd6c Mon Sep 17 00:00:00 2001 From: Roberto Saliola Date: Wed, 11 Nov 2026 19:34:24 +0100 Subject: [PATCH 1/2] feat: add tree-shakeable ESM build (module + sideEffects) --- index.ts | 2 ++ package.json | 6 ++++-- tsconfig.esm.json | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tsconfig.esm.json diff --git a/index.ts b/index.ts index 355abe85..e96bf042 100644 --- a/index.ts +++ b/index.ts @@ -15,5 +15,7 @@ export { ConfigurationOptions, AdditionalOptions, BasePath } from "./client/clie export { Fireblocks } from "./client/client" export { FireblocksResponse } from "./response/fireblocksResponse" export { FireblocksError } from "./error/fireblocksError" +export { AxiosManager } from "./network/axiosManager" +export { Configuration, ConfigurationParameters } from "./configuration" export * from "./api"; export * from "./models"; diff --git a/package.json b/package.json index 6f4ab0e8..cca2587a 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,11 @@ "license": "MIT License", "main": "./dist/index.js", "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, "scripts": { - "build": "tsc && npm run copy:package", - "copy:package": "cp package.json dist/", + "build": "tsc && tsc -p tsconfig.esm.json && npm run copy:package", + "copy:package": "cp package.json dist/ && cp package.json dist/esm/", "prepare": "npm run build", "postversion": "if [ \"$SKIP_POSTVERSION\" != \"true\" ]; then git push && git push --tags; fi", "test": "jest --coverage --passWithNoTests --runInBand --detectOpenHandles --forceExit", diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 00000000..fcae4c79 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "moduleResolution": "node", + "outDir": "dist/esm", + "declaration": false + }, + "exclude": [ + "dist", + "node_modules", + "tests" + ] +} From 243b90182b78e17587625f1e2537e24d5e58e6e4 Mon Sep 17 00:00:00 2001 From: Roberto Saliola Date: Wed, 11 Nov 2026 19:36:44 +0100 Subject: [PATCH 2/2] feat: publish only dist/ (drop docs and .ts sources) --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index cca2587a..1158a63f 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,9 @@ "typings": "./dist/index.d.ts", "module": "./dist/esm/index.js", "sideEffects": false, + "files": [ + "dist" + ], "scripts": { "build": "tsc && tsc -p tsconfig.esm.json && npm run copy:package", "copy:package": "cp package.json dist/ && cp package.json dist/esm/",