Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bun): add bun sqlite support #71

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e07ec80
feat: bun sqlite implementation
Hebilicious Aug 27, 2023
12990e6
test: add bun sqlite tests
Hebilicious Aug 27, 2023
111d6df
feat: add bun entrypoint
Hebilicious Aug 27, 2023
a9fa380
chore: fix build errors
Hebilicious Aug 28, 2023
f3c3552
chore: rename to bun_sqlite
Hebilicious Aug 28, 2023
3343782
chore: rename bun_sqlite classes
Hebilicious Aug 28, 2023
c59d208
chore: rename private to closed
Hebilicious Aug 28, 2023
9aaf631
refactor: use ArrayBuffer.isView
Hebilicious Aug 28, 2023
4d9cc78
refactor: use booleans
Hebilicious Aug 28, 2023
f3e1d2a
refactor: rename index to node
Hebilicious Aug 28, 2023
0dd1069
test: fix imports
Hebilicious Aug 28, 2023
7d1a444
refactor: bun tests helpers
Hebilicious Aug 28, 2023
86306ae
feat: batch statements according to line breaks
Hebilicious Aug 28, 2023
de51092
chore: test comments
Hebilicious Aug 28, 2023
0ac69f4
chore: fix node import map
Hebilicious Aug 28, 2023
5943e37
chore: specify node export
Hebilicious Aug 28, 2023
0f297b3
Merge branch 'main' into feat/add-bun-support
Hebilicious Aug 28, 2023
20df841
chore: add prettier config file
Hebilicious Aug 29, 2023
3125b88
chore: add jest types to tsconfig
Hebilicious Aug 29, 2023
4a9d9ab
refactor: extract common utilities
Hebilicious Aug 29, 2023
c4e45e7
feat: throw error on executeMultiple
Hebilicious Aug 29, 2023
b24e43c
feat: bunsqlite only support number intMode
Hebilicious Aug 29, 2023
816163f
refactor: extract integer values
Hebilicious Aug 29, 2023
0c7b827
refactor: validate file config
Hebilicious Aug 29, 2023
2a06b1e
test: fix expectBunSqliteError
Hebilicious Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"Jan Plhak <[email protected]>"
],
"license": "MIT",

"type": "module",
"main": "lib-cjs/index.js",
"types": "lib-esm/index.d.ts",
Expand All @@ -33,6 +32,7 @@
"deno": "./lib-esm/web.js",
"edge-light": "./lib-esm/web.js",
"netlify": "./lib-esm/web.js",
"bun": "./lib-esm/bun.js",
Hebilicious marked this conversation as resolved.
Show resolved Hide resolved
"default": "./lib-esm/index.js"
},
"require": "./lib-cjs/index.js"
Expand All @@ -56,21 +56,39 @@
"types": "./lib-esm/web.d.ts",
"import": "./lib-esm/web.js",
"require": "./lib-cjs/web.js"
},
"./bun-sqlite": {
"types": "./lib-esm/bun-sqlite.d.ts",
"import": "./lib-esm/bun-sqlite.js",
"require": "./lib-cjs/bun-sqlite.js"
}
},
"typesVersions": {
"*": {
"http": ["./lib-esm/http.d.ts"],
"hrana": ["./lib-esm/hrana.d.ts"],
"sqlite3": ["./lib-esm/sqlite3.d.ts"],
"web": ["./lib-esm/web.d.ts"]
"http": [
"./lib-esm/http.d.ts"
],
"hrana": [
"./lib-esm/hrana.d.ts"
],
"sqlite3": [
"./lib-esm/sqlite3.d.ts"
],
"web": [
"./lib-esm/web.d.ts"
],
"bun": [
"./lib-esm/bun.d.ts"
],
"bun-sqlite": [
"./lib-esm/bun-sqlite.d.ts"
]
}
},
"files": [
"lib-cjs/**",
"lib-esm/**"
],

"scripts": {
"prepublishOnly": "npm run build",
"prebuild": "rm -rf ./lib-cjs ./lib-esm",
Expand All @@ -79,10 +97,10 @@
"build:esm": "tsc -p tsconfig.build-esm.json",
"postbuild": "cp package-cjs.json ./lib-cjs/package.json",
"test": "jest --runInBand",
"test:bun": "bun test bun",
"typecheck": "tsc --noEmit",
"typedoc": "rm -rf ./docs && typedoc"
},

"dependencies": {
"@libsql/hrana-client": "^0.5.0-pre.2",
"better-sqlite3": "^8.0.1",
Expand All @@ -92,6 +110,7 @@
"@types/better-sqlite3": "^7.6.3",
"@types/jest": "^29.2.5",
"@types/node": "^18.15.5",
"bun-types": "^0.8.1",
"jest": "^29.3.1",
"ts-jest": "^29.0.5",
"typedoc": "^0.23.28",
Expand Down
Loading
Loading