@electric-sql/pglite

v0.2.12
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.
postgres sql database wasm client pglite

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
npm i @electric-sql/pglite

Metadata

  • Apache-2.0
  • Whatever
  • Electric DB Limited
  • released 10/11/2024

Downloads