Skip to content

Commit fabcb38

Browse files
committed
add esm build for wrapper
1 parent 4df6082 commit fabcb38

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ All notable changes to this project will be documented in this file.
55

66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77

8-
## [0.2.13] 2023-09-04
8+
## [0.2.14] 2023-09-04
99

1010
- add cjs to extension for otel extension so it loads in all node environments
11-
-
11+
- add esm build for wrapper
1212
## [0.2.10] 2023-09-03
1313

1414
- fix manual setup build

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "@baselime/lambda-node-opentelemetry",
3-
"version": "0.2.13",
3+
"version": "0.2.14",
44
"description": "OpenTelemetry auto tracer for Node.JS based AWS Lambda functions",
55
"types": "index.d.ts",
66
"main": "index.js",
7+
"module": "index.mjs",
78
"keywords": [
89
"nodejs",
910
"aws-lambda",
@@ -12,7 +13,8 @@
1213
],
1314
"files": [
1415
"lambda-wrapper.cjs",
15-
"index.js",
16+
"index.mjs",
17+
"index.cjs",
1618
"index.d.ts"
1719
],
1820
"type": "module",
@@ -23,8 +25,9 @@
2325
"build:cjs": "esbuild src/handler.cjs --bundle --minify --platform=node --target=node18 --outfile=dist/handler.cjs --metafile=meta.json --format=cjs",
2426
"distribute": "mkdir -p layer-dir/nodejs/node_modules/@baselime/lambda-node-opentelemetry && cp -r dist/* layer-dir/nodejs/node_modules/@baselime/lambda-node-opentelemetry && cp -r dist/* .",
2527
"build:tracer": "esbuild src/lambda-wrapper.ts --bundle --minify --platform=node --target=node18 --format=cjs --outfile=dist/lambda-wrapper.cjs --metafile=meta.json",
26-
"build:wrapper": "esbuild src/index.ts --bundle --minify --platform=node --target=node18 --format=cjs --outfile=dist/index.js --metafile=meta.json",
27-
"build": "npm run build:handler && npm run build:tracer && npm run build:wrapper && npm run tsc && npm run distribute",
28+
"build:wrappercjs": "esbuild src/index.ts --bundle --minify --platform=node --target=node18 --format=cjs --outfile=dist/index.cjs --metafile=meta.json",
29+
"build:wrapperesm": "esbuild src/index.ts --bundle --minify --platform=node --target=node18 --format=esm --outfile=dist/index.mjs --metafile=meta.json",
30+
"build": "npm run build:handler && npm run build:tracer && npm run build:wrappercjs && npm run build:wrapperesm && npm run tsc && npm run distribute",
2831
"deploy": "sst deploy",
2932
"deploy:uat": "npm run build && npx tsx multi-region-deploy.ts uat",
3033
"deploy:prod": "npm run build && npx tsx multi-region-deploy.ts prod",

0 commit comments

Comments
 (0)