Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ auto-generated per-PR notes; this file is the curated, human-readable history.

## [Unreleased]

### Fixed
- Declared Node.js 22 as the minimum source-development runtime, kept the
committed `.nvmrc` as the version-manager default, and enabled strict npm
engine checks so unsupported local installs fail before the test runner
reaches incompatible dependencies (#383).

### Changed
- Consolidated the non-Iceberg examples into three responsive flagship
dashboards: On-time flights, Shop analytics, and ClickHouse Operations.
Expand Down
8 changes: 5 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ all bundled — see hard rule 4). Quality is held by tests.
(see README "Configuring OAuth").
4. **The build is esbuild only; runtime deps are rare and deliberate.** Source
files are the tested files; esbuild bundles `src/main.ts` → `dist/sql.html`.
`package-lock.json` is committed; use `npm ci` for a reproducible dependency
graph in local, CI, and release builds, and update the lock only with an
intentional dependency change.
Source development requires Node.js 22 or newer; `.nvmrc` selects Node 22,
`package.json` declares the minimum, and `.npmrc` makes unsupported installs
fail clearly. `package-lock.json` is committed; use `npm ci` for a
reproducible dependency graph in local, CI, and release builds, and update
the lock only with an intentional dependency change.
There are **six** bundled runtime dependencies — **CodeMirror 6** (the SQL
editor, saved-query Spec JSON editor, and read-only source viewer, behind
injected seams — #21/#212/#213),
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,12 @@ FROM ontime

## Quick start (development)

Source development requires **Node.js 22 or newer**. The committed `.nvmrc`
selects Node 22 for version managers such as `nvm`; `npm ci` exits with an
unsupported-engine error on older Node releases.

```bash
nvm use # optional; reads Node 22 from .nvmrc
npm ci # exact dependency tree from the committed lockfile
npm test # vitest + 100% coverage gate
npm run build # → dist/sql.html (single file)
Expand Down Expand Up @@ -634,7 +639,7 @@ different interface. The probe **prints a reachability table** and skips any hos
with no HTTP interface on any port (e.g. a native-only endpoint) so it isn't a dead
pick. Set `SQL_BROWSER_PROBE=0` to skip probing and keep all hosts (`8443`/`8123`).

**From a checkout** (also builds the SPA, needs Node):
**From a checkout** (also builds the SPA, requires Node.js 22 or newer):

```bash
npm run local # build + serve → open http://localhost:8900/sql
Expand Down
4 changes: 3 additions & 1 deletion docs/deployment.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>Four deployment modes</h1>
<tbody>
<tr><td class="feat">Who it's for</td><td>A whole team, shared URL</td><td>One developer, your laptop</td><td>Local/shared testing</td><td>Contributors</td></tr>
<tr><td class="feat">Served from</td><td>ClickHouse <code class="k">/sql</code></td><td><code class="k">localhost:8900/sql</code></td><td><code class="k">localhost:8900/sql</code></td><td><code class="k">localhost:8900/sql</code></td></tr>
<tr><td class="feat">Prerequisites</td><td>Cluster admin + an IdP</td><td><code class="k">python3</code> + curl</td><td>Docker</td><td>Node.js + npm</td></tr>
<tr><td class="feat">Prerequisites</td><td>Cluster admin + an IdP</td><td><code class="k">python3</code> + curl</td><td>Docker</td><td>Node.js 22+ + npm</td></tr>
<tr><td class="feat">Auth</td><td class="yes">SSO (OIDC) or Basic</td><td>Your saved connections</td><td>Your saved connections</td><td>Your saved connections</td></tr>
<tr><td class="feat">Connects to</td><td>That cluster</td><td>Any cluster in your config</td><td>Any cluster in your config</td><td>Any cluster in your config</td></tr>
<tr><td class="feat">Install</td><td><code class="k">deploy/install.sh</code></td><td>one <code class="k">curl | sh</code></td><td><code class="k">docker compose up --build</code></td><td><code class="k">npm run local</code></td></tr>
Expand Down Expand Up @@ -137,6 +137,8 @@ <h2>Run the existing local app in a container</h2>
<div class="wrap narrow">
<div class="eyebrow">Mode 4 · From source</div>
<h2>Build and develop</h2>
<p>Source builds require Node.js 22 or newer. With <code class="k">nvm</code>, run
<code class="k">nvm use</code> in the checkout to select the committed version.</p>
<pre class="code">git clone https://github.com/Altinity/altinity-sql-browser
cd altinity-sql-browser
npm ci
Expand Down
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"description": "A self-contained, OAuth-gated SQL browser for any ClickHouse cluster. Vanilla ES modules, served from ClickHouse itself as one HTML file with zero third-party requests.",
"type": "module",
"license": "Apache-2.0",
"engines": {
"node": ">=22"
},
"scripts": {
"prebuild": "npm run check:schemas",
"build": "node build/build.mjs",
Expand Down
Loading