@electric-sql/pglite
Version:
PGlite is a WASM Postgres build packaged into a TypeScript client library that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It is only 3.7mb gzipped.
178 lines • 5.33 kB
JSON
{
"name": "@electric-sql/pglite",
"version": "0.3.7",
"private": false,
"publishConfig": {
"access": "public"
},
"description": "PGlite is a WASM Postgres build packaged into a TypeScript client library that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It is only 3.7mb gzipped.",
"keywords": [
"postgres",
"sql",
"database",
"wasm",
"client",
"pglite"
],
"author": "Electric DB Limited",
"homepage": "https://pglite.dev",
"license": "Apache-2.0",
"main": "dist/index.cjs",
"module": "dist/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./template": {
"import": {
"types": "./dist/templating.d.ts",
"default": "./dist/templating.js"
},
"require": {
"types": "./dist/templating.d.cts",
"default": "./dist/templating.cjs"
}
},
"./live": {
"import": {
"types": "./dist/live/index.d.ts",
"default": "./dist/live/index.js"
},
"require": {
"types": "./dist/live/index.d.cts",
"default": "./dist/live/index.cjs"
}
},
"./worker": {
"import": {
"types": "./dist/worker/index.d.ts",
"default": "./dist/worker/index.js"
},
"require": {
"types": "./dist/worker/index.d.cts",
"default": "./dist/worker/index.cjs"
}
},
"./vector": {
"import": {
"types": "./dist/vector/index.d.ts",
"default": "./dist/vector/index.js"
},
"require": {
"types": "./dist/vector/index.d.cts",
"default": "./dist/vector/index.cjs"
}
},
"./pg_ivm": {
"import": {
"types": "./dist/pg_ivm/index.d.ts",
"default": "./dist/pg_ivm/index.js"
},
"require": {
"types": "./dist/pg_ivm/index.d.cts",
"default": "./dist/pg_ivm/index.cjs"
}
},
"./nodefs": {
"import": {
"types": "./dist/fs/nodefs.d.ts",
"default": "./dist/fs/nodefs.js"
},
"require": {
"types": "./dist/fs/nodefs.d.cts",
"default": "./dist/fs/nodefs.cjs"
}
},
"./opfs-ahp": {
"import": {
"types": "./dist/fs/opfs-ahp.d.ts",
"default": "./dist/fs/opfs-ahp.js"
},
"require": {
"types": "./dist/fs/opfs-ahp.d.cts",
"default": "./dist/fs/opfs-ahp.cjs"
}
},
"./basefs": {
"import": {
"types": "./dist/fs/base.d.ts",
"default": "./dist/fs/base.js"
},
"require": {
"types": "./dist/fs/base.d.cts",
"default": "./dist/fs/base.cjs"
}
},
"./contrib/*": {
"types": "./dist/contrib/*.d.ts",
"import": "./dist/contrib/*.js",
"require": "./dist/contrib/*.cjs"
}
},
"type": "module",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/electric-sql/pglite",
"directory": "packages/pglite"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.1",
"@types/emscripten": "^1.39.13",
"@types/node": "^20.16.11",
"@types/node-fetch": "^2.6.11",
"async-mutex": "^0.4.1",
"buffer": "^6.0.3",
"bun": "^1.1.30",
"concurrently": "^8.2.2",
"http-server": "^14.1.1",
"playwright": "^1.48.0",
"tinytar": "^0.1.0",
"vitest": "^2.1.2",
"@electric-sql/pg-protocol": "0.0.3"
},
"browser": {
"fs": false,
"fs/promises": false,
"path": false,
"url": false,
"zlib": false,
"stream": false,
"stream/promises": false,
"crypto": false,
"ws": false,
"child_process": false,
"module": false,
"util": false
},
"scripts": {
"check:exports": "attw . --pack --profile node16",
"test": "pnpm test:basic && pnpm test:node",
"test:basic": "pnpm test:clean && vitest tests/*.test.js tests/*.test.ts tests/**/*.test.js tests/**/*.test.ts",
"test:web": "pnpm test:clean && concurrently -s first --hide 1 --prefix none -k \"sleep 2 && vitest --fileParallelism false tests/targets/web/*.test.web.*\" \"npx http-server --port 3334 ./\"",
"test:bun": "pnpm test:clean && pnpm bun test --timeout 15000 tests/basic.test.js tests/pgvector.test.js tests/live.test.js tests/targets/runtimes/node-fs.test.js",
"test:deno": "cd tests/targets/deno && deno task test",
"test:node": "pnpm test:clean && pnpm vitest tests/targets/runtimes/node-*.test.js",
"test:runtimes": "pnpm test:bun && pnpm test:node",
"test:integration": "pnpm test:runtimes && pnpm test:web",
"test:clean": "rm -rf ./pgdata-test",
"build:js": "tsup && tsx scripts/bundle-wasm.ts",
"build": "pnpm build:js",
"dev": "concurrently \"tsup --watch\" \"sleep 1 && tsx scripts/bundle-wasm.ts\" \"pnpm dev-server\"",
"dev-server": "pnpm http-server ../",
"lint": "eslint ./src ./tests --report-unused-disable-directives --max-warnings 0",
"format": "prettier --write ./src ./tests",
"typecheck": "tsc --noEmit",
"stylecheck": "pnpm lint && prettier --check ./src ./tests"
}
}