Skip to content

Commit 18213e7

Browse files
committed
ESM builds fail for node environments #259
Ensure build produces esm and correctly references exports resolves #259
1 parent 4ca954e commit 18213e7

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 6.2.1
4+
5+
July 7, 2025
6+
7+
- Updated build scripts to ensure esm build works correctly. (#259)
8+
39
## 6.2.0
410

511
May 8, 2025

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@
33
"version": "6.1.0",
44
"description": "Salesforce.com SOQL parser and composer",
55
"main": "dist/cjs/index.js",
6-
"module": "dist/esm/index.js",
6+
"module": "dist/esm/index.mjs",
77
"types": "dist/types/index.d.ts",
8+
"exports": {
9+
".": {
10+
"require": "./dist/cjs/index.js",
11+
"import": "./dist/esm/index.mjs"
12+
}
13+
},
814
"scripts": {
915
"clean": "rm -rf ./dist/*",
1016
"prebuild": "npm run clean",
1117
"build": "npm-run-all build:esm build:cjs build:cli build:declarations",
12-
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/esm/index.js --minify --format=esm --target=es2022",
18+
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/esm/index.mjs --minify --format=esm --target=es2022",
1319
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/cjs/index.js --minify --format=cjs --target=es2022",
1420
"build:cli": "esbuild cli/index.ts --bundle --outfile=dist/cli/index.js --minify --format=cjs --target=es2022 --platform=node",
1521
"build:declarations": "tsc --project tsconfig.json",

0 commit comments

Comments
 (0)