Single source of truth for the CodeMirror setup: SQLiteDialect,
createSqlEditor() (delegable history with host undo/redo forwarding,
hostChange annotation for echo suppression, submit/escape callbacks,
fixed-tooltip mode, per-editor Compartment updateSchema), and
datasetteSchema() which fetches /-/editor-schema.json and maps it to a
lang-sql SQLNamespace identical to the server-inlined shape.
cm-editor.js is now a thin consumer; rollup emits both the IIFE and an
importable ESM bundle. Submit key is Mod-Enter (Cmd on mac as before,
now also Ctrl elsewhere) plus Shift-Enter.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per-view Compartment wraps the sql() extension; window.editor.updateSchema(
{schema, defaultTable, defaultSchema}) reconfigures autocomplete live.
Declares @codemirror/state as a direct dependency since it is now
imported directly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cm-editor-6.0.1.{js,bundle.js} -> cm-editor.{js,bundle.js}; new
npm run build:codemirror replaces the documented rollup one-liner.
Cache busting already handled by the static() template helper's
?_hash= content hash.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
codemirror 6.0.1 -> 6.0.2, @codemirror/lang-sql 6.3.3 -> 6.10.0
(autocomplete 6.20.3, view 6.43.6, state 6.7.1).
defaultTableName/defaultSchemaName were never valid SQLConfig options;
the real names are defaultTable/defaultSchema. Also enables
caseInsensitiveIdentifiers on the SQLite dialect.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Reformat JavaScript files with Prettier
Ran `npm run fix` to apply consistent code formatting across JavaScript
files using the project's Prettier configuration (2 spaces, no tabs).
Files reformatted:
- datasette/static/datasette-manager.js
- datasette/static/json-format-highlight-1.0.1.js
- datasette/static/table.js
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Upgrade Prettier from 2.2.1 to 3.6.2
Updated package.json and package-lock.json to use Prettier 3.6.2,
ensuring consistent formatting between local development and CI.
The existing JavaScript files are already formatted with Prettier 3.x
style from the previous commit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Error if Prettier isn't already installed
* Temporarily run Prettier check on every commit
* Install and run Prettier via package.json
* Trigger another prettier check on CI