Skip to content

Commit 367ad55

Browse files
committed
Avoid bundlers where possible (#1011)
1 parent 45f4d61 commit 367ad55

10 files changed

Lines changed: 32 additions & 277 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@powersync/kysely-driver': major
3+
'@powersync/attachments': major
4+
'@powersync/drizzle-driver': minor
5+
'@powersync/attachments-storage-react-native': patch
6+
---
7+
8+
Remove CommonJS distribution.

packages/attachments-storage-react-native/package.json

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,24 @@
1717
},
1818
"description": "React Native file system storage adapters for PowerSync attachments",
1919
"type": "module",
20-
"main": "./dist/index.cjs",
21-
"module": "./lib/index.js",
20+
"main": "./lib/index.js",
2221
"types": "./lib/index.d.ts",
2322
"exports": {
2423
".": {
25-
"import": {
26-
"default": "./lib/index.js",
27-
"types": "./lib/index.d.ts"
28-
},
29-
"require": {
30-
"default": "./dist/index.cjs",
31-
"types": "./dist/index.d.cts"
32-
}
24+
"types": "./lib/index.d.ts",
25+
"default": "./lib/index.js"
3326
}
3427
},
3528
"files": [
3629
"lib",
37-
"dist",
3830
"src"
3931
],
4032
"scripts": {
41-
"build": "tsc -b && rollup --config",
42-
"build:prod": "tsc -b --sourceMap false && rollup --config",
33+
"build": "tsc -b",
34+
"build:prod": "tsc -b",
4335
"clean": "rm -rf lib dist tsconfig.tsbuildinfo",
4436
"watch": "tsc -b -w",
45-
"test:exports": "attw --pack ."
37+
"test:exports": "attw --pack . --ignore-rules cjs-resolves-to-esm"
4638
},
4739
"peerDependencies": {
4840
"@powersync/common": "workspace:^1.57.0",

packages/attachments-storage-react-native/rollup.config.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

packages/attachments/package.json

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,32 @@
1818
},
1919
"description": "An PowerSync library to manage attachments for TypeScript and React Native apps",
2020
"type": "module",
21-
"main": "./dist/index.cjs",
22-
"module": "./lib/index.js",
21+
"main": "./lib/index.js",
2322
"types": "./lib/index.d.ts",
2423
"exports": {
2524
".": {
26-
"import": {
27-
"types": "./lib/index.d.ts",
28-
"default": "./lib/index.js"
29-
},
30-
"require": {
31-
"types": "./dist/index.d.cts",
32-
"default": "./dist/index.cjs"
33-
}
25+
"types": "./lib/index.d.ts",
26+
"default": "./lib/index.js"
3427
}
3528
},
3629
"files": [
3730
"lib",
38-
"dist",
3931
"src"
4032
],
4133
"scripts": {
42-
"build": "tsc -b && rollup --config",
43-
"build:prod": "tsc -b --sourceMap false && rollup --config",
34+
"build": "tsc -b",
35+
"build:prod": "tsc -b",
4436
"clean": "rm -rf lib dist tsconfig.tsbuildinfo",
4537
"watch": "tsc -b -w",
4638
"test": "pnpm build && vitest",
47-
"test:exports": "attw --pack ."
39+
"test:exports": "attw --pack . --ignore-rules cjs-resolves-to-esm"
4840
},
4941
"peerDependencies": {
5042
"@powersync/common": "workspace:^1.57.0"
5143
},
5244
"devDependencies": {
5345
"@powersync/common": "workspace:*",
54-
"@rollup/plugin-commonjs": "catalog:",
55-
"@rollup/plugin-node-resolve": "catalog:",
56-
"@rollup/plugin-typescript": "catalog:",
5746
"@types/node": "catalog:",
58-
"rollup": "catalog:",
59-
"rollup-plugin-dts": "catalog:",
6047
"vite": "catalog:"
6148
}
6249
}

packages/attachments/rollup.config.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

packages/drizzle-driver/package.json

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,19 @@
33
"version": "0.7.4",
44
"description": "Drizzle driver for PowerSync",
55
"type": "module",
6-
"main": "dist/index.cjs",
6+
"main": "lib/src/index.js",
77
"module": "lib/src/index.js",
88
"types": "lib/src/index.d.ts",
99
"exports": {
1010
".": {
11-
"import": {
12-
"types": "./lib/src/index.d.ts",
13-
"default": "./lib/src/index.js"
14-
},
15-
"require": {
16-
"types": "./dist/index.d.cts",
17-
"default": "./dist/index.cjs"
18-
}
11+
"types": "./lib/src/index.d.ts",
12+
"default": "./lib/src/index.js"
1913
}
2014
},
2115
"author": "PowerSync",
2216
"license": "Apache-2.0",
2317
"files": [
2418
"lib",
25-
"dist",
2619
"src"
2720
],
2821
"repository": "https://github.com/powersync-ja/powersync-js",
@@ -35,12 +28,12 @@
3528
},
3629
"homepage": "https://docs.powersync.com",
3730
"scripts": {
38-
"build": "tsc -b && rollup --config",
39-
"build:prod": "tsc -b && rollup --config",
31+
"build": "tsc -b",
32+
"build:prod": "tsc -b",
4033
"clean": "rm -rf lib dist tsconfig.tsbuildinfo",
4134
"watch": "tsc --build -w",
4235
"test": "vitest",
43-
"test:exports": "attw --pack ."
36+
"test:exports": "attw --pack . --ignore-rules cjs-resolves-to-esm"
4437
},
4538
"dependencies": {
4639
"tslib": "^2.8.1"
@@ -52,13 +45,8 @@
5245
"devDependencies": {
5346
"@journeyapps/wa-sqlite": "catalog:",
5447
"@powersync/web": "workspace:*",
55-
"@rollup/plugin-commonjs": "catalog:",
56-
"@rollup/plugin-node-resolve": "catalog:",
57-
"@rollup/plugin-typescript": "catalog:",
5848
"@types/node": "catalog:",
5949
"drizzle-orm": "catalog:",
60-
"rollup": "catalog:",
61-
"rollup-plugin-dts": "catalog:",
6250
"vite": "catalog:"
6351
}
6452
}

packages/drizzle-driver/rollup.config.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

packages/kysely-driver/package.json

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,18 @@
33
"version": "1.3.3",
44
"description": "Kysely driver for PowerSync",
55
"type": "module",
6-
"main": "dist/index.cjs",
7-
"module": "lib/src/index.js",
6+
"main": "lib/src/index.js",
87
"types": "lib/src/index.d.ts",
98
"exports": {
109
".": {
11-
"import": {
12-
"types": "./lib/src/index.d.ts",
13-
"default": "./lib/src/index.js"
14-
},
15-
"require": {
16-
"types": "./dist/index.d.cts",
17-
"default": "./dist/index.cjs"
18-
}
10+
"types": "./lib/src/index.d.ts",
11+
"default": "./lib/src/index.js"
1912
}
2013
},
2114
"author": "PowerSync",
2215
"license": "Apache-2.0",
2316
"files": [
2417
"lib",
25-
"dist",
2618
"src"
2719
],
2820
"repository": "https://github.com/powersync-ja/powersync-js",
@@ -35,12 +27,12 @@
3527
},
3628
"homepage": "https://docs.powersync.com",
3729
"scripts": {
38-
"build": "tsc -b && rollup --config",
39-
"build:prod": "tsc -b && rollup --config",
30+
"build": "tsc -b",
31+
"build:prod": "tsc -b",
4032
"clean": "rm -rf lib dist tsconfig.tsbuildinfo",
4133
"watch": "tsc --build -w",
4234
"test": "pnpm build && vitest",
43-
"test:exports": "attw --pack ."
35+
"test:exports": "attw --pack . --ignore-rules cjs-resolves-to-esm"
4436
},
4537
"peerDependencies": {
4638
"@powersync/common": "workspace:^1.57.0"
@@ -51,12 +43,7 @@
5143
"devDependencies": {
5244
"@journeyapps/wa-sqlite": "catalog:",
5345
"@powersync/web": "workspace:*",
54-
"@rollup/plugin-commonjs": "catalog:",
55-
"@rollup/plugin-node-resolve": "catalog:",
56-
"@rollup/plugin-typescript": "catalog:",
5746
"@types/node": "catalog:",
58-
"rollup": "catalog:",
59-
"rollup-plugin-dts": "catalog:",
6047
"vite": "catalog:"
6148
}
6249
}

packages/kysely-driver/rollup.config.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)