@crvouga/postgres-mem 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +159 -0
- package/COMPATIBILITY-AUDIT.md +155 -0
- package/COMPATIBILITY.md +87 -0
- package/LICENSE +21 -0
- package/README.md +325 -0
- package/compat/coverage.json +1081 -0
- package/compat/divergences.json +191 -0
- package/compat/gate-report.json +80 -0
- package/compat/requirements.json +1105 -0
- package/compat/requirements.raw.html +484 -0
- package/compat/scenario-types.ts +98 -0
- package/compat/scenarios.ts +98 -0
- package/compat/sections/agg.ts +45 -0
- package/compat/sections/api.ts +28 -0
- package/compat/sections/arr.ts +45 -0
- package/compat/sections/cat.ts +47 -0
- package/compat/sections/con.ts +32 -0
- package/compat/sections/cpy.ts +24 -0
- package/compat/sections/cte.ts +29 -0
- package/compat/sections/dat.ts +60 -0
- package/compat/sections/ddl.ts +55 -0
- package/compat/sections/det.ts +20 -0
- package/compat/sections/dml.ts +37 -0
- package/compat/sections/eco.ts +16 -0
- package/compat/sections/err.ts +16 -0
- package/compat/sections/exp.ts +53 -0
- package/compat/sections/fun.ts +58 -0
- package/compat/sections/fzz.ts +36 -0
- package/compat/sections/guc.ts +27 -0
- package/compat/sections/joi.ts +33 -0
- package/compat/sections/jsn.ts +46 -0
- package/compat/sections/lim.ts +13 -0
- package/compat/sections/par.ts +61 -0
- package/compat/sections/pre.ts +26 -0
- package/compat/sections/sch.ts +31 -0
- package/compat/sections/sel.ts +43 -0
- package/compat/sections/seq.ts +31 -0
- package/compat/sections/snp.ts +21 -0
- package/compat/sections/tok.ts +53 -0
- package/compat/sections/trg.ts +57 -0
- package/compat/sections/tsr.ts +37 -0
- package/compat/sections/txn.ts +39 -0
- package/compat/sections/typ.ts +55 -0
- package/compat/sections/uni.ts +13 -0
- package/compat/sections/win.ts +43 -0
- package/compat/smoke-baseline.json +3 -0
- package/compat/unsupported-register.json +2526 -0
- package/dist/api/bind.d.ts +10 -0
- package/dist/api/database.d.ts +69 -0
- package/dist/api/statement.d.ts +51 -0
- package/dist/ast/nodes.d.ts +810 -0
- package/dist/constraints/enforce.d.ts +39 -0
- package/dist/errors/error.d.ts +24 -0
- package/dist/executor/ddl.d.ts +23 -0
- package/dist/executor/dml.d.ts +10 -0
- package/dist/executor/execute.d.ts +11 -0
- package/dist/executor/relation.d.ts +60 -0
- package/dist/executor/select.d.ts +41 -0
- package/dist/executor/session.d.ts +21 -0
- package/dist/executor/triggers-exec.d.ts +1 -0
- package/dist/executor/triggers.d.ts +16 -0
- package/dist/executor/window.d.ts +13 -0
- package/dist/expressions/context.d.ts +23 -0
- package/dist/expressions/eval.d.ts +38 -0
- package/dist/expressions/operators.d.ts +8 -0
- package/dist/expressions/pattern.d.ts +20 -0
- package/dist/functions/aggregates.d.ts +17 -0
- package/dist/functions/array-fns.d.ts +2 -0
- package/dist/functions/datetime-fns.d.ts +26 -0
- package/dist/functions/datetime-registry.d.ts +2 -0
- package/dist/functions/json-fns.d.ts +7 -0
- package/dist/functions/math-fns.d.ts +2 -0
- package/dist/functions/misc-fns.d.ts +8 -0
- package/dist/functions/scalar.d.ts +10 -0
- package/dist/functions/srf.d.ts +12 -0
- package/dist/functions/string-fns.d.ts +4 -0
- package/dist/functions/tsearch-fns.d.ts +2 -0
- package/dist/functions/util.d.ts +14 -0
- package/dist/functions/window.d.ts +7 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +19591 -0
- package/dist/index.js.map +7 -0
- package/dist/lexer/tokenize.d.ts +8 -0
- package/dist/parser/index.d.ts +1 -0
- package/dist/parser/parser.d.ts +96 -0
- package/dist/runtime/clock.d.ts +14 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/options.d.ts +25 -0
- package/dist/runtime/prng.d.ts +48 -0
- package/dist/schema/catalog-tables.d.ts +1 -0
- package/dist/schema/catalog.d.ts +12 -0
- package/dist/serialization/codec.d.ts +29 -0
- package/dist/serialization/index.d.ts +1 -0
- package/dist/storage/database-state.d.ts +216 -0
- package/dist/transactions/manager.d.ts +25 -0
- package/dist/tsearch/stem.d.ts +5 -0
- package/dist/tsearch/tsearch.d.ts +59 -0
- package/dist/types/cast.d.ts +26 -0
- package/dist/types/compare.d.ts +18 -0
- package/dist/types/datetime.d.ts +68 -0
- package/dist/types/jsonb.d.ts +45 -0
- package/dist/types/numeric.d.ts +69 -0
- package/dist/types/resolve.d.ts +15 -0
- package/dist/types/timezone.d.ts +9 -0
- package/dist/types/value.d.ts +99 -0
- package/dist/unstable.d.ts +15 -0
- package/dist/unstable.js +19153 -0
- package/dist/unstable.js.map +7 -0
- package/package.json +120 -0
package/package.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@crvouga/postgres-mem",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Pure TypeScript in-memory PostgreSQL implementation with zero WASM/native dependencies",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./unstable": {
|
|
18
|
+
"types": "./dist/unstable.d.ts",
|
|
19
|
+
"import": "./dist/unstable.js",
|
|
20
|
+
"default": "./dist/unstable.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"AGENTS.md",
|
|
26
|
+
"COMPATIBILITY.md",
|
|
27
|
+
"COMPATIBILITY-AUDIT.md",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"compat"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/crvouga/postgres-mem.git"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/crvouga/postgres-mem#readme",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/crvouga/postgres-mem/issues"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"provenance": false
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"prepare": "husky",
|
|
46
|
+
"build": "bun run scripts/build.ts",
|
|
47
|
+
"test": "bun test tests/contract tests/fuzz tests/harness",
|
|
48
|
+
"test:contract": "bun test tests/contract",
|
|
49
|
+
"test:fuzz": "bun test tests/fuzz",
|
|
50
|
+
"test:fuzz:soak": "POSTGRES_MEM_STATEFUL_STEPS=${POSTGRES_MEM_STATEFUL_STEPS:-48} POSTGRES_MEM_FUZZ_RUNS=${POSTGRES_MEM_FUZZ_RUNS:-40} bun test tests/fuzz/stateful.test.ts tests/fuzz/metamorphic tests/fuzz/robustness.test.ts tests/fuzz/corpus.test.ts",
|
|
51
|
+
"test:metamorphic": "bun test tests/fuzz/metamorphic",
|
|
52
|
+
"test:dst": "bun test tests/fuzz/stateful.test.ts tests/fuzz/corpus.test.ts",
|
|
53
|
+
"example": "bun run --cwd examples/react-vite dev",
|
|
54
|
+
"benchmark": "bun run benchmarks/run.ts --tier default --engine mem",
|
|
55
|
+
"benchmark:compare": "bun run benchmarks/run.ts --tier default --engine both",
|
|
56
|
+
"benchmark:ci": "bun run benchmarks/run.ts --tier ci --engine mem --out benchmarks/results/ci-latest.json && bun run benchmarks/compare-ci.ts && bun run benchmarks/check-budgets.ts",
|
|
57
|
+
"benchmark:memory": "bun run benchmarks/check-budgets.ts",
|
|
58
|
+
"benchmark:bundle": "bun run build && bun run benchmarks/bundle.ts",
|
|
59
|
+
"test:browser-sql": "bun run build && bun run scripts/browser-sql-smoke.ts",
|
|
60
|
+
"test:canaries": "bun run scripts/run-canaries.ts",
|
|
61
|
+
"test:postgres-compat": "bun run scripts/postgres-compat-gate.ts && bun run scripts/check-skip-register.ts && bun test tests/contract tests/fuzz tests/harness",
|
|
62
|
+
"divergences": "bun run scripts/generate-divergences.ts",
|
|
63
|
+
"fixtures:browser": "bun run scripts/generate-browser-fixtures.ts",
|
|
64
|
+
"inventory": "bun run scripts/postgres-inventory.ts",
|
|
65
|
+
"scenarios": "bun run scripts/postgres-scenarios.ts",
|
|
66
|
+
"requirements": "bun run scripts/postgres-requirements.ts",
|
|
67
|
+
"typecheck": "tsc --noEmit",
|
|
68
|
+
"typecheck:package": "tsc --noEmit -p tsconfig.package.json",
|
|
69
|
+
"format": "biome format --write .",
|
|
70
|
+
"format:check": "biome format .",
|
|
71
|
+
"lint": "biome lint --error-on-warnings .",
|
|
72
|
+
"lint:fix": "biome lint --write --error-on-warnings .",
|
|
73
|
+
"clean": "rm -rf dist",
|
|
74
|
+
"check": "bun run format:check && bun run lint && bun run typecheck && bun run test:postgres-compat",
|
|
75
|
+
"ci:local": "bun run scripts/ci-local.ts",
|
|
76
|
+
"commitlint": "commitlint --edit",
|
|
77
|
+
"verify-package": "bun run scripts/verify-package.ts",
|
|
78
|
+
"release:preflight": "bun run scripts/release-preflight.ts",
|
|
79
|
+
"release": "semantic-release",
|
|
80
|
+
"release:dry-run": "semantic-release --dry-run",
|
|
81
|
+
"secrets:doctor": "bun run scripts/secrets/doctor.ts",
|
|
82
|
+
"secrets:check": "bun run scripts/secrets/check-vault.ts && bun run scripts/secrets/check-github.ts",
|
|
83
|
+
"secrets:sync": "bun run scripts/secrets/sync-github.ts",
|
|
84
|
+
"npm:seed": "bun run scripts/seed-npm.ts",
|
|
85
|
+
"gh": "open https://github.com/crvouga/postgres-mem/actions",
|
|
86
|
+
"example:react-vite": "cd examples/react-vite && bun install && bun run dev",
|
|
87
|
+
"fc": "clear && bun format && bun ci:local"
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
91
|
+
"@biomejs/biome": "^2.5.8",
|
|
92
|
+
"@commitlint/cli": "^21.2.2",
|
|
93
|
+
"@commitlint/config-conventional": "^21.2.2",
|
|
94
|
+
"@electric-sql/pglite": "^0.5.5",
|
|
95
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
96
|
+
"@semantic-release/github": "^12.0.9",
|
|
97
|
+
"@semantic-release/npm": "^13.1.5",
|
|
98
|
+
"@semantic-release/release-notes-generator": "^14.1.1",
|
|
99
|
+
"@types/bun": "latest",
|
|
100
|
+
"conventional-changelog-conventionalcommits": "^10.3.0",
|
|
101
|
+
"esbuild": "^0.28.2",
|
|
102
|
+
"fast-check": "^4.1.1",
|
|
103
|
+
"husky": "^9.1.7",
|
|
104
|
+
"publint": "^0.3.23",
|
|
105
|
+
"semantic-release": "^25.0.9",
|
|
106
|
+
"typescript": "^5.8.3"
|
|
107
|
+
},
|
|
108
|
+
"engines": {
|
|
109
|
+
"bun": ">=1.1.0",
|
|
110
|
+
"node": ">=20"
|
|
111
|
+
},
|
|
112
|
+
"keywords": [
|
|
113
|
+
"postgres",
|
|
114
|
+
"postgresql",
|
|
115
|
+
"typescript",
|
|
116
|
+
"in-memory",
|
|
117
|
+
"database",
|
|
118
|
+
"sql"
|
|
119
|
+
]
|
|
120
|
+
}
|