Skip to content

Commit 15d9dc5

Browse files
committed
fix: update package exports to support CommonJS require
1 parent 731ba24 commit 15d9dc5

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.changeset/pretty-worlds-scream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@squarecloud/api": patch
3+
---
4+
5+
Fix CommonJS require not working.

package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@
22
"name": "@squarecloud/api",
33
"version": "3.7.6",
44
"description": "A NodeJS wrapper for Square Cloud API",
5-
"main": "lib/index.js",
6-
"types": "lib/index.d.ts",
7-
"module": "lib/index.mjs",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./lib/index.d.ts",
9+
"default": "./lib/index.js"
10+
},
11+
"require": {
12+
"types": "./lib/index.d.cts",
13+
"default": "./lib/index.cjs"
14+
},
15+
"default": "./lib/index.js"
16+
}
17+
},
818
"packageManager": "pnpm@10.9.0",
919
"type": "module",
1020
"scripts": {

0 commit comments

Comments
 (0)