Skip to content

Commit 16b588f

Browse files
committed
esm-only, node 20+
1 parent d815ecd commit 16b588f

File tree

4 files changed

+11
-21
lines changed

4 files changed

+11
-21
lines changed

.changeset/fair-spoons-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"esbuild-cf-functions-plugin": major
3+
---
4+
5+
Package is now ESM-only and requires Node 20.19+ to import with `require`

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
2626
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
2727
with:
28-
node-version: 18
28+
node-version: 20
2929

3030
- name: find pnpm cache path
3131
id: cache
@@ -54,7 +54,7 @@ jobs:
5454
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
5555
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
5656
with:
57-
node-version: 18
57+
node-version: 20
5858

5959
- name: find pnpm cache path
6060
id: cache

package.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,13 @@
2323
],
2424
"packageManager": "pnpm@10.30.0",
2525
"engines": {
26-
"node": ">=18"
26+
"node": ">=20.19"
2727
},
2828
"files": [
29-
"CHANGELOG.md",
3029
"dist"
3130
],
32-
"main": "./dist/plugin.cjs",
33-
"module": "./dist/plugin.js",
34-
"types": "./dist/plugin.d.ts",
3531
"exports": {
36-
".": {
37-
"require": {
38-
"types": "./dist/plugin.d.cts",
39-
"default": "./dist/plugin.cjs"
40-
},
41-
"import": {
42-
"types": "./dist/plugin.d.ts",
43-
"default": "./dist/plugin.js"
44-
}
45-
},
32+
".": "./dist/plugin.js",
4633
"./package.json": "./package.json"
4734
},
4835
"simple-git-hooks": {

tsup.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ export default defineConfig({
44
entry: ["src/plugin.ts"],
55

66
clean: true,
7-
minify: true,
87
splitting: false,
98

109
platform: "node",
11-
target: "node18",
12-
format: ["cjs", "esm"],
13-
sourcemap: true,
10+
target: "node20",
11+
format: "esm",
1412
dts: true,
1513
})

0 commit comments

Comments
 (0)