inline-sql-toolkit 0.4.7
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/CHANGELOG.md +545 -0
- package/LICENSE +21 -0
- package/README.md +224 -0
- package/SECURITY.md +29 -0
- package/SUPPORT.md +43 -0
- package/THIRD_PARTY_NOTICES.md +56 -0
- package/dist/cli.js +22713 -0
- package/package.json +234 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.7 - 2026-09-17
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- CLI: added the `inline-sql-toolkit` command-line executable bundled at `dist/cli.js`, enabling offline Python inline SQL formatting directly from the shell or CI workflows without adding new dependencies.
|
|
8
|
+
- CLI: supports `-w`/`--write` in-place formatting, `--check` validation mode, stdin/stdout streaming, and hierarchical `.inline-sql.json` configuration resolution.
|
|
9
|
+
- Packaging: prepared npm package distribution for the CLI with `.npmignore` scoping the tarball to `dist/cli.js` and documentation, and added an npm publish workflow job (trusted publishing / OIDC, with a token path for the one-time bootstrap).
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Architecture: extracted pure shared modules (`src/format-options.ts`, `src/replacement.ts`, `src/sql-formatter.ts`) so both the VS Code extension and the CLI share identical configuration validation, single-line literal collapsing, and formatting logic.
|
|
14
|
+
- Manifest: updated `package.json` engines to `{ "vscode": "^1.95.0", "node": ">=20" }`, registered the CLI bin entry, and un-privatized the package for npm publishing while keeping `.vscodeignore` excluding the CLI from the VSIX.
|
|
15
|
+
|
|
16
|
+
## 0.4.6 - 2026-09-16
|
|
17
|
+
|
|
18
|
+
- Support documentation: the `SUPPORT.md` diagnostic checklist no longer asks
|
|
19
|
+
for a Python version. The extension never runs a Python interpreter — the
|
|
20
|
+
analyzer is TypeScript and the formatter is the bundled `sql-formatter` — so
|
|
21
|
+
the request was a leftover from the removed helper era; the literal shape that
|
|
22
|
+
actually matters is still requested in the paragraph above the list, and the
|
|
23
|
+
packaged reason-code table is unchanged.
|
|
24
|
+
- Maintenance: drops the dead `.pytest_cache/`, `.ruff_cache/`, and
|
|
25
|
+
`.hypothesis/` entries from `.gitignore`, since pytest, ruff, and hypothesis
|
|
26
|
+
left with the Python test suite and no longer have anything to ignore. The
|
|
27
|
+
lines could only go once the stale cache directories were removed from the
|
|
28
|
+
working copy, because prettier reads `.gitignore` as an ignore path and was
|
|
29
|
+
kept off them by those entries. `__pycache__/` and `*.py[cod]` stay, because
|
|
30
|
+
`uv run python tools/verify_vsix.py` still writes them.
|
|
31
|
+
- No formatting behavior changes and no code changes: this release is
|
|
32
|
+
documentation and repository-configuration hygiene only.
|
|
33
|
+
|
|
34
|
+
## 0.4.5 - 2026-09-15
|
|
35
|
+
|
|
36
|
+
- Licensing: the packaged VSIX now ships the MIT license text of every npm
|
|
37
|
+
package esbuild inlines into `dist/extension.js` — `sql-formatter` 15.8.2 and
|
|
38
|
+
the `nearley` 2.20.1 parser it imports — instead of describing the injected
|
|
39
|
+
grammar as the only packaged component. The bundle sets
|
|
40
|
+
`legalComments: "none"`, so the notices are stripped from the code and have to
|
|
41
|
+
travel in `third_party/` and `THIRD_PARTY_NOTICES.md`.
|
|
42
|
+
- Security/CI: the `osv-packaged-components` report is now derived from the
|
|
43
|
+
`THIRD_PARTY_NOTICES.md` inside the verified VSIX and cross-checked against
|
|
44
|
+
the packaged `third_party/` tree, replacing the hardcoded package list. A
|
|
45
|
+
dependency entering or leaving the bundle can no longer leave the scanner
|
|
46
|
+
input silently stale, and an unreadable or missing notice fails verification
|
|
47
|
+
instead of reporting nothing.
|
|
48
|
+
- Support documentation: the `SUPPORT.md` diagnostic reference lists exactly the
|
|
49
|
+
13 reason codes the extension can emit (`REASON_CODES` in `src/constants.ts`),
|
|
50
|
+
replacing the four helper-era codes (`PYTHON_NOT_FOUND`,
|
|
51
|
+
`PYTHON_VERSION_UNSUPPORTED`, `DOCUMENT_PARSE_FAILED`, `PROCESS_TIMEOUT`) and
|
|
52
|
+
the removed-helper wording; the README troubleshooting bullet no longer names
|
|
53
|
+
`PROCESS_TIMEOUT`.
|
|
54
|
+
- Maintenance: drops the unused `vscode-textmate` and `vscode-oniguruma`
|
|
55
|
+
devDependencies, the stale `ruff` hooks from `.pre-commit-config.yaml` (the uv
|
|
56
|
+
environment has held no Python dependencies since the formatter migration, so
|
|
57
|
+
every `pre-commit run` failed), and the ignore entries for the removed
|
|
58
|
+
`python/vendor` and `test/.grammar-cache` paths.
|
|
59
|
+
- Manifest tests guard both classes of drift: the documented reason codes must
|
|
60
|
+
match `REASON_CODES`, and every `node_modules/` input of the esbuild metafile
|
|
61
|
+
must have a `third_party/` directory linked from the packaged notices, with
|
|
62
|
+
the declared version matching the package actually inlined.
|
|
63
|
+
- No formatting behavior changes: this release is license/notice compliance,
|
|
64
|
+
component-report integrity, documentation alignment, and stale-configuration
|
|
65
|
+
cleanup only.
|
|
66
|
+
|
|
67
|
+
## 0.4.4 - 2026-09-14
|
|
68
|
+
|
|
69
|
+
- Security/CI: the OSV lockfile scan now also runs on every push to `main`
|
|
70
|
+
instead of waiting for a pull request or the weekly scheduled run, so an
|
|
71
|
+
advisory in `bun.lock` / `uv.lock` is reported on the commit that lands it.
|
|
72
|
+
- Pins patched versions of OSV-flagged dev dependencies (`vitest` and
|
|
73
|
+
`@vitest/coverage-v8` 4.1.11, `fast-uri` 3.1.6, `js-yaml` 4.3.2, and a new
|
|
74
|
+
`qs` 6.16.0 override). The shipped runtime dependency (`sql-formatter`) is
|
|
75
|
+
unchanged.
|
|
76
|
+
- CI: the installed-VSIX smoke now actually runs and its result is asserted
|
|
77
|
+
through the shared `testInstalledVsixSmoke` helper (which gained pass/fail
|
|
78
|
+
coverage): the fixture driver declares `onStartupFinished` so VS Code
|
|
79
|
+
activates it, and the job no longer ignores failures, so a broken packaged
|
|
80
|
+
extension fails the build instead of leaving CI green.
|
|
81
|
+
- Documentation: `docs/releasing.md` and `docs/development.md` now describe the
|
|
82
|
+
current toolchain and gates instead of the removed Python helper, vendored
|
|
83
|
+
`sqlparse` tree, vendor verifier, and container-based offline smoke;
|
|
84
|
+
`SECURITY.md` and `THIRD_PARTY_NOTICES.md` no longer claim the removed
|
|
85
|
+
`sqlparse` and `@vscode/python-extension` components, and `.vscodeignore`
|
|
86
|
+
drops its stale `python/` allowlist rules. The manifest tests guard the
|
|
87
|
+
notices against `third_party/` and every allowlist entry against the
|
|
88
|
+
repository.
|
|
89
|
+
- No formatting behavior changes: this release is CI, dependency, test, and
|
|
90
|
+
documentation maintenance only.
|
|
91
|
+
|
|
92
|
+
## 0.4.3 - 2026-09-13
|
|
93
|
+
|
|
94
|
+
- Removes the redundant `onCommand:` activation events from the extension
|
|
95
|
+
manifest: VS Code synthesizes them from `contributes.commands`, so the three
|
|
96
|
+
format commands keep working and the extension still activates only for
|
|
97
|
+
Python and marimo Python documents.
|
|
98
|
+
- Pins patched versions of OSV-flagged transitive dependencies
|
|
99
|
+
(`brace-expansion`, `fast-uri`, `js-yaml`, `nanoid`, `postcss`, `undici`)
|
|
100
|
+
through `overrides`; the shipped runtime dependency is unchanged.
|
|
101
|
+
- Packaging: agent tool configuration (`.claude/`, `.cursor/`, `.mcp.json`,
|
|
102
|
+
`opencode.jsonc`, and related files) and the root documentation diagram PNGs
|
|
103
|
+
are excluded from the VSIX, keeping the verified file inventory exact.
|
|
104
|
+
- Documentation: adds overview diagrams and an architecture diagram to the
|
|
105
|
+
README, and publishes the architecture diagram to GitHub Pages.
|
|
106
|
+
- Internal/CI with no formatting behavior changes: adds the automated Publish
|
|
107
|
+
workflow (VS Code Marketplace and Open VSX on tag), downloads the integration
|
|
108
|
+
test VS Code build with a resume-capable curl instead of the flaky streaming
|
|
109
|
+
downloader, pins uv 0.12.1, raises the integration test timeout to 60s, and
|
|
110
|
+
removes the legacy Cursor/Kiro/Qoder/CodeBuddy/Gemini/Serena artifacts.
|
|
111
|
+
|
|
112
|
+
This is the first tagged release since v0.4.1: the 0.4.2 fixes documented below
|
|
113
|
+
were published to the marketplaces without a tag and are contained in this
|
|
114
|
+
release as well.
|
|
115
|
+
|
|
116
|
+
## 0.4.2 - 2026-08-06
|
|
117
|
+
|
|
118
|
+
- Updates the error messages shown when formatting fails or produces an
|
|
119
|
+
invalid response: they no longer reference the removed helper process
|
|
120
|
+
and describe the failure directly.
|
|
121
|
+
- The `Inline SQL Toolkit` output channel's format summary now lists the
|
|
122
|
+
dialect and every layout setting (keyword case, indent width, wrap
|
|
123
|
+
width, operator spacing, ordinal replacement) exactly once.
|
|
124
|
+
- Internal cleanup with no formatting behavior changes: drops the dead
|
|
125
|
+
grammar test glob, renames the Python project metadata to match the
|
|
126
|
+
extension, and excludes local agent tool configuration from formatting
|
|
127
|
+
checks.
|
|
128
|
+
|
|
129
|
+
## 0.4.1 - 2026-08-05
|
|
130
|
+
|
|
131
|
+
- Fixes SQL corruption when a query contains a Python `%`-style
|
|
132
|
+
placeholder: `%s`, `%(name)s`, `%04d`, and `%%` were reformatted as
|
|
133
|
+
`% s` etc. and broke the query. Placeholders are now kept intact
|
|
134
|
+
exactly as written. The modulo operator (`a % 2`) still formats
|
|
135
|
+
normally.
|
|
136
|
+
- Fixes `GROUP BY`/`ORDER BY` ordinal replacement duplicating a
|
|
137
|
+
`%`-placeholder when the referenced column expression contained one;
|
|
138
|
+
the ordinal now stays in place.
|
|
139
|
+
|
|
140
|
+
## 0.4.0 - 2026-08-05
|
|
141
|
+
|
|
142
|
+
- Removes the no-op `inlineSql.format.expandSelectList` and
|
|
143
|
+
`inlineSql.format.trimBlankBoundaries` settings: they were read and
|
|
144
|
+
validated but never applied by the formatter. Existing user
|
|
145
|
+
configurations for these settings are ignored without error.
|
|
146
|
+
- Internal cleanup with no formatting behavior changes: drops the
|
|
147
|
+
code-action locate cache, unused `SourceMap` AST/token offset
|
|
148
|
+
conversions, the dead helper-process fixture loader and protocol
|
|
149
|
+
fields, and the never-fired process-spawn test hooks.
|
|
150
|
+
|
|
151
|
+
## 0.3.38 - 2026-08-04
|
|
152
|
+
|
|
153
|
+
- Fixes `FORMATTER_FAILED (not idempotent)` skips caused by sql-formatter
|
|
154
|
+
toggling between one-line and expanded layouts (e.g. `CASE` expressions
|
|
155
|
+
next to comments): formatting now converges to the stable layout instead of
|
|
156
|
+
rejecting the candidate.
|
|
157
|
+
- Fixes `GROUP BY` ordinal replacement emitting invalid SQL when the select
|
|
158
|
+
column has a comment after its alias (e.g. `END AS label /* テキスト */`):
|
|
159
|
+
the alias is now detected, so `GROUP BY label` is used.
|
|
160
|
+
- The debug output channel now logs the full line-by-line diff when
|
|
161
|
+
convergence fails, and the format summary includes the dialect and layout
|
|
162
|
+
settings.
|
|
163
|
+
|
|
164
|
+
## 0.3.37 - 2026-08-04
|
|
165
|
+
|
|
166
|
+
- Adds an `Inline SQL Toolkit` output channel that logs why a candidate was
|
|
167
|
+
skipped: the skip reason, the failing detail (parse error, field-text
|
|
168
|
+
mismatch, idempotency diff), and the literal content. Open it via
|
|
169
|
+
View -> Output after a format to diagnose `FORMATTER_FAILED` /
|
|
170
|
+
`UNSAFE_FSTRING_RESTORE` skips.
|
|
171
|
+
|
|
172
|
+
## 0.3.36 - 2026-08-04
|
|
173
|
+
|
|
174
|
+
- Fixes formatting being skipped entirely (`FORMATTER_FAILED` /
|
|
175
|
+
`UNSAFE_FSTRING_RESTORE`) when a `GROUP BY` ordinal referenced a select
|
|
176
|
+
column containing an f-string field (e.g. `ci.{parameter} /* テキスト */`):
|
|
177
|
+
the field is no longer copied into the clause, so it is not duplicated and
|
|
178
|
+
the f-string safety gate passes. The ordinal stays in place; columns
|
|
179
|
+
without fields (or with an alias) still resolve as before.
|
|
180
|
+
|
|
181
|
+
## 0.3.35 - 2026-08-04
|
|
182
|
+
|
|
183
|
+
- Stops comments from leaking into `GROUP BY` / `ORDER BY` when ordinals are
|
|
184
|
+
replaced: a trailing comment on a select expression (e.g. `userid /* テキスト */`)
|
|
185
|
+
is no longer copied into the clause, a comment between an expression and its
|
|
186
|
+
implicit alias no longer blocks alias detection, and an ordinal followed by a
|
|
187
|
+
comment (e.g. `GROUP BY 1 /* c */`) still resolves.
|
|
188
|
+
|
|
189
|
+
## 0.3.34 - 2026-08-04
|
|
190
|
+
|
|
191
|
+
- Resolves `GROUP BY` / `ORDER BY` ordinals in more real-world queries:
|
|
192
|
+
`QUALIFY` and `WITH ROLLUP` no longer swallow trailing ordinals, direction
|
|
193
|
+
suffixes (`DESC`, `ASC`, `NULLS LAST`) stay on the replaced column, each
|
|
194
|
+
`UNION ALL` branch resolves against its own select list, fully qualified
|
|
195
|
+
column names (`project.dataset.table.col`) keep their qualification, and
|
|
196
|
+
quoted aliases are copied verbatim.
|
|
197
|
+
|
|
198
|
+
## 0.3.33 - 2026-08-02
|
|
199
|
+
|
|
200
|
+
- Treats `DISTRIBUTE` as a clause end so a trailing `GROUP BY` ordinal still
|
|
201
|
+
resolves, and breaks `DISTRIBUTE RANDOM` onto its own line.
|
|
202
|
+
|
|
203
|
+
## 0.3.32 - 2026-08-02
|
|
204
|
+
|
|
205
|
+
- Moves a comma that the formatter placed on its own line back before a
|
|
206
|
+
trailing line comment (e.g. `order_id --テキスト` followed by a lone `,`).
|
|
207
|
+
|
|
208
|
+
## 0.3.31 - 2026-08-02
|
|
209
|
+
|
|
210
|
+
- Fixes ordinal replacement for SQL that begins with an f-string field
|
|
211
|
+
(e.g. `{write_clause}` before `SELECT`), and moves a field that ends the
|
|
212
|
+
formatted SQL onto its own line (e.g. `{distribution_clause}` after
|
|
213
|
+
`GROUP BY`).
|
|
214
|
+
|
|
215
|
+
## 0.3.30 - 2026-08-02
|
|
216
|
+
|
|
217
|
+
- Fixes f-string fields attached to identifiers (e.g. `id_{table_id}`) gaining
|
|
218
|
+
a space when formatted: field markers are now bare identifiers instead of
|
|
219
|
+
quoted strings, so the formatter keeps them joined.
|
|
220
|
+
|
|
221
|
+
## 0.3.29 - 2026-08-02
|
|
222
|
+
|
|
223
|
+
- Fixes ordinal replacement corrupting `SELECT *` queries: a star column is
|
|
224
|
+
never copied into GROUP BY / ORDER BY, and commas are tokenized separately
|
|
225
|
+
so columns like `*, a` are not merged into one expression.
|
|
226
|
+
|
|
227
|
+
## 0.3.28 - 2026-08-02
|
|
228
|
+
|
|
229
|
+
- Replaces `GROUP BY` / `ORDER BY` ordinal numbers with the referenced column
|
|
230
|
+
names when formatting (alias preferred, expression otherwise). Disable with
|
|
231
|
+
`inlineSql.format.replaceOrdinals: false`. Aggregate columns without an
|
|
232
|
+
alias and unresolvable ordinals are left untouched.
|
|
233
|
+
|
|
234
|
+
## 0.3.27 - 2026-08-02
|
|
235
|
+
|
|
236
|
+
- Switches SQL highlighting to an injected TextMate grammar (the same
|
|
237
|
+
approach as `inline-sql-syntax`), replacing the semantic tokens provider.
|
|
238
|
+
SQL strings starting with `-- sql` or a leading SQL keyword are embedded
|
|
239
|
+
as `meta.embedded.sql` and colored with the theme's SQL rules in both
|
|
240
|
+
plain files and notebook cells. If a language server's semantic tokens
|
|
241
|
+
override the grammar, disable semantic highlighting for that server.
|
|
242
|
+
|
|
243
|
+
## 0.3.26 - 2026-08-02
|
|
244
|
+
|
|
245
|
+
- Drops the fixed colors for `inlineSqlIdentifier` and `inlineSqlOperator`
|
|
246
|
+
so columns and operators use the theme's base color and stand out from
|
|
247
|
+
SQL keywords.
|
|
248
|
+
|
|
249
|
+
## 0.3.25 - 2026-08-02
|
|
250
|
+
|
|
251
|
+
- Provides default colors for the `inlineSql*` semantic token types so
|
|
252
|
+
highlighting stays consistent on themes that do not define them.
|
|
253
|
+
|
|
254
|
+
## 0.3.24 - 2026-08-02
|
|
255
|
+
|
|
256
|
+
- Returns every semantic token from the range provider instead of clipping
|
|
257
|
+
to the visible range, so notebook cells no longer show blank (unstyled)
|
|
258
|
+
gaps for off-screen SQL tokens.
|
|
259
|
+
|
|
260
|
+
## 0.3.23 - 2026-08-02
|
|
261
|
+
|
|
262
|
+
- Adds an `Inline SQL Toolkit: Debug Semantic Tokens` command that dumps the
|
|
263
|
+
active cell's language, text, and SQL tokens to the output panel.
|
|
264
|
+
|
|
265
|
+
## 0.3.22 - 2026-08-02
|
|
266
|
+
|
|
267
|
+
- Splits the semantic tokens providers: full-document tokens for notebook
|
|
268
|
+
cells only, range tokens for plain Python files only, so the two never
|
|
269
|
+
merge and cells render a stable token stream.
|
|
270
|
+
|
|
271
|
+
## 0.3.21 - 2026-08-02
|
|
272
|
+
|
|
273
|
+
- Provides full-document semantic tokens for every notebook cell so focused
|
|
274
|
+
and unfocused cells render the same token stream instead of mixing ours
|
|
275
|
+
with Pylance's or marimo-lsp's tokens.
|
|
276
|
+
|
|
277
|
+
## 0.3.20 - 2026-08-02
|
|
278
|
+
|
|
279
|
+
- Adds semantic tokens for marimo SQL cells, whose language id is `sql`, so
|
|
280
|
+
they keep the SQL highlights instead of the marimo-lsp token stream.
|
|
281
|
+
|
|
282
|
+
## 0.3.19 - 2026-08-02
|
|
283
|
+
|
|
284
|
+
- Scopes full-document semantic tokens to the `mo-python` cell language so
|
|
285
|
+
they reach marimo cells regardless of the notebook type.
|
|
286
|
+
|
|
287
|
+
## 0.3.18 - 2026-08-02
|
|
288
|
+
|
|
289
|
+
- Re-registers semantic tokens while any notebook is open (not only marimo),
|
|
290
|
+
and extends the re-registration window to 60 seconds for slow first starts.
|
|
291
|
+
|
|
292
|
+
## 0.3.17 - 2026-08-02
|
|
293
|
+
|
|
294
|
+
- Re-registers semantic tokens only while a marimo notebook is open, and
|
|
295
|
+
re-registers immediately whenever one opens, instead of on a fixed timer.
|
|
296
|
+
|
|
297
|
+
## 0.3.16 - 2026-08-02
|
|
298
|
+
|
|
299
|
+
- Aligns the closing triple-quote of a formatted literal with its base indent
|
|
300
|
+
(e.g. inside loops) instead of leaving it at the left edge.
|
|
301
|
+
|
|
302
|
+
## 0.3.15 - 2026-08-02
|
|
303
|
+
|
|
304
|
+
- Indents the first SQL line too when a triple-quoted literal has no `--sql`
|
|
305
|
+
marker, so a leading `SELECT` lines up with the rest of the query.
|
|
306
|
+
|
|
307
|
+
## 0.3.14 - 2026-08-02
|
|
308
|
+
|
|
309
|
+
- Restricts full-document semantic tokens to notebook cells so plain Python
|
|
310
|
+
files keep using Pylance's tokens (fixes blank highlighting on Windows).
|
|
311
|
+
|
|
312
|
+
## 0.3.13 - 2026-08-02
|
|
313
|
+
|
|
314
|
+
- Re-registers the semantic tokens provider on a timer after activation so it
|
|
315
|
+
stays the most recent provider once marimo-lsp finishes starting up.
|
|
316
|
+
|
|
317
|
+
## 0.3.12 - 2026-08-02
|
|
318
|
+
|
|
319
|
+
- Provides semantic tokens as a full-document provider and registers after
|
|
320
|
+
the marimo extension activates, so notebook cells keep the SQL highlights
|
|
321
|
+
instead of falling back to another provider's tokens.
|
|
322
|
+
|
|
323
|
+
## 0.3.11 - 2026-08-02
|
|
324
|
+
|
|
325
|
+
- Unifies the `--sql` marker position: markers on their own line move to sit
|
|
326
|
+
directly after the opening quote, and SQL indents from the literal's line.
|
|
327
|
+
|
|
328
|
+
## 0.3.10 - 2026-08-02
|
|
329
|
+
|
|
330
|
+
- Indents SQL body one level below the literal's base indent, keeping nested
|
|
331
|
+
lines one level deeper than `SELECT` for readable paragraph formatting.
|
|
332
|
+
|
|
333
|
+
## 0.2.5 - 2026-08-01
|
|
334
|
+
|
|
335
|
+
- Removes dark square background box for a 100% transparent background logo icon.
|
|
336
|
+
|
|
337
|
+
## 0.2.4 - 2026-08-01
|
|
338
|
+
|
|
339
|
+
- Fixes white corner artifacts in icon PNG by rendering a full-tile dark background with Playwright Chrome.
|
|
340
|
+
|
|
341
|
+
## 0.2.3 - 2026-08-01
|
|
342
|
+
|
|
343
|
+
- Fixes SVG comment syntax error (`--`) that caused XML rendering error text in icon PNG.
|
|
344
|
+
|
|
345
|
+
## 0.3.9 - 2026-08-01
|
|
346
|
+
|
|
347
|
+
- Indents SQL one level even when the `--sql` marker sits directly after the
|
|
348
|
+
opening quote, so f-string and plain literals format consistently.
|
|
349
|
+
|
|
350
|
+
## 0.3.8 - 2026-08-01
|
|
351
|
+
|
|
352
|
+
- Keeps a `--sql` marker adjacent to the opening quote (`"""--sql`) on its
|
|
353
|
+
own line so SQL indentation is preserved.
|
|
354
|
+
|
|
355
|
+
## 0.3.7 - 2026-08-01
|
|
356
|
+
|
|
357
|
+
- Indents formatted SQL one level below the `--sql` marker line so SQL lines
|
|
358
|
+
are clearly nested under the surrounding Python code.
|
|
359
|
+
|
|
360
|
+
## 0.3.6 - 2026-08-01
|
|
361
|
+
|
|
362
|
+
- Keeps CRLF frame boundaries idempotent so formatting does not add blank
|
|
363
|
+
lines above `--sql` markers on Windows.
|
|
364
|
+
|
|
365
|
+
## 0.3.5 - 2026-08-01
|
|
366
|
+
|
|
367
|
+
- Preserves the base indentation of indented SQL literals so formatted SQL
|
|
368
|
+
stays aligned with the surrounding Python code.
|
|
369
|
+
|
|
370
|
+
## 0.3.4 - 2026-08-01
|
|
371
|
+
|
|
372
|
+
- Formats every code cell when `inlineSql.formatAll` runs in a notebook; the
|
|
373
|
+
cursor commands keep formatting only the active cell.
|
|
374
|
+
|
|
375
|
+
## 0.3.3 - 2026-08-01
|
|
376
|
+
|
|
377
|
+
- Restores the original TextMate grammar selector and semantic token tests;
|
|
378
|
+
highlighting is handled solely by semantic tokens that also cover Python.
|
|
379
|
+
|
|
380
|
+
## 0.3.2 - 2026-08-01
|
|
381
|
+
|
|
382
|
+
- Provides Python semantic tokens alongside SQL tokens so the extension
|
|
383
|
+
replaces the Python language server's tokens without disabling semantic
|
|
384
|
+
highlighting.
|
|
385
|
+
|
|
386
|
+
## 0.3.1 - 2026-08-01
|
|
387
|
+
|
|
388
|
+
- Switches SQL highlighting from semantic tokens to TextMate grammar injection
|
|
389
|
+
so it cannot be overwritten by the Python language server.
|
|
390
|
+
|
|
391
|
+
## 0.3.0 - 2026-08-01
|
|
392
|
+
|
|
393
|
+
- Registers the SQL semantic token provider after Pylance activates so SQL
|
|
394
|
+
highlighting stays visible instead of being overwritten by the Python
|
|
395
|
+
language server.
|
|
396
|
+
|
|
397
|
+
## 0.2.9 - 2026-08-01
|
|
398
|
+
|
|
399
|
+
- Fixes false concatenation detection: comment separators and Python code
|
|
400
|
+
between string literals no longer mark SQL candidates as unsupported.
|
|
401
|
+
|
|
402
|
+
## 0.2.8 - 2026-08-01
|
|
403
|
+
|
|
404
|
+
- Reports skip reasons (e.g. FORMATTER_FAILED) in the formatting summary so
|
|
405
|
+
skipped candidates are diagnosable.
|
|
406
|
+
|
|
407
|
+
## 0.2.7 - 2026-08-01
|
|
408
|
+
|
|
409
|
+
- Registers only the range semantic tokens provider so SQL highlighting is
|
|
410
|
+
not overwritten by the Python language server.
|
|
411
|
+
|
|
412
|
+
## 0.2.6 - 2026-08-01
|
|
413
|
+
|
|
414
|
+
- Registers semantic tokens as a range provider so SQL highlighting wins over
|
|
415
|
+
the Python language server without disabling semantic highlighting.
|
|
416
|
+
|
|
417
|
+
## 0.2.2 - 2026-08-01
|
|
418
|
+
|
|
419
|
+
- Updates extension icon to a clean, minimalist developer logo without Python branding or AI effects.
|
|
420
|
+
|
|
421
|
+
## 0.3.9 - 2026-08-01
|
|
422
|
+
|
|
423
|
+
- Indents SQL one level even when the `--sql` marker sits directly after the
|
|
424
|
+
opening quote, so f-string and plain literals format consistently.
|
|
425
|
+
|
|
426
|
+
## 0.3.8 - 2026-08-01
|
|
427
|
+
|
|
428
|
+
- Keeps a `--sql` marker adjacent to the opening quote (`"""--sql`) on its
|
|
429
|
+
own line so SQL indentation is preserved.
|
|
430
|
+
|
|
431
|
+
## 0.3.7 - 2026-08-01
|
|
432
|
+
|
|
433
|
+
- Indents formatted SQL one level below the `--sql` marker line so SQL lines
|
|
434
|
+
are clearly nested under the surrounding Python code.
|
|
435
|
+
|
|
436
|
+
## 0.3.6 - 2026-08-01
|
|
437
|
+
|
|
438
|
+
- Keeps CRLF frame boundaries idempotent so formatting does not add blank
|
|
439
|
+
lines above `--sql` markers on Windows.
|
|
440
|
+
|
|
441
|
+
## 0.3.5 - 2026-08-01
|
|
442
|
+
|
|
443
|
+
- Preserves the base indentation of indented SQL literals so formatted SQL
|
|
444
|
+
stays aligned with the surrounding Python code.
|
|
445
|
+
|
|
446
|
+
## 0.3.4 - 2026-08-01
|
|
447
|
+
|
|
448
|
+
- Formats every code cell when `inlineSql.formatAll` runs in a notebook; the
|
|
449
|
+
cursor commands keep formatting only the active cell.
|
|
450
|
+
|
|
451
|
+
## 0.3.3 - 2026-08-01
|
|
452
|
+
|
|
453
|
+
- Restores the original TextMate grammar selector and semantic token tests;
|
|
454
|
+
highlighting is handled solely by semantic tokens that also cover Python.
|
|
455
|
+
|
|
456
|
+
## 0.3.2 - 2026-08-01
|
|
457
|
+
|
|
458
|
+
- Provides Python semantic tokens alongside SQL tokens so the extension
|
|
459
|
+
replaces the Python language server's tokens without disabling semantic
|
|
460
|
+
highlighting.
|
|
461
|
+
|
|
462
|
+
## 0.3.1 - 2026-08-01
|
|
463
|
+
|
|
464
|
+
- Switches SQL highlighting from semantic tokens to TextMate grammar injection
|
|
465
|
+
so it cannot be overwritten by the Python language server.
|
|
466
|
+
|
|
467
|
+
## 0.3.0 - 2026-08-01
|
|
468
|
+
|
|
469
|
+
- Registers the SQL semantic token provider after Pylance activates so SQL
|
|
470
|
+
highlighting stays visible instead of being overwritten by the Python
|
|
471
|
+
language server.
|
|
472
|
+
|
|
473
|
+
## 0.2.9 - 2026-08-01
|
|
474
|
+
|
|
475
|
+
- Fixes false concatenation detection: comment separators and Python code
|
|
476
|
+
between string literals no longer mark SQL candidates as unsupported.
|
|
477
|
+
|
|
478
|
+
## 0.2.8 - 2026-08-01
|
|
479
|
+
|
|
480
|
+
- Reports skip reasons (e.g. FORMATTER_FAILED) in the formatting summary so
|
|
481
|
+
skipped candidates are diagnosable.
|
|
482
|
+
|
|
483
|
+
## 0.2.7 - 2026-08-01
|
|
484
|
+
|
|
485
|
+
- Registers only the range semantic tokens provider so SQL highlighting is
|
|
486
|
+
not overwritten by the Python language server.
|
|
487
|
+
|
|
488
|
+
## 0.2.6 - 2026-08-01
|
|
489
|
+
|
|
490
|
+
- Registers semantic tokens as a range provider so SQL highlighting wins over
|
|
491
|
+
the Python language server without disabling semantic highlighting.
|
|
492
|
+
|
|
493
|
+
## 0.2.2 - 2026-08-01
|
|
494
|
+
|
|
495
|
+
- Registers semantic tokens as a range provider so SQL highlighting wins over
|
|
496
|
+
the Python language server without disabling semantic highlighting.
|
|
497
|
+
|
|
498
|
+
## 0.2.1 - 2026-08-01
|
|
499
|
+
|
|
500
|
+
- Normalizes triple-quoted frame boundaries so the opening and closing `"""`
|
|
501
|
+
stay on their own lines.
|
|
502
|
+
- Protects escaped brace pairs (`{{...}}`) as one fragment so their spacing
|
|
503
|
+
survives formatting.
|
|
504
|
+
|
|
505
|
+
## 0.2.0 - 2026-08-01
|
|
506
|
+
|
|
507
|
+
- Switches the formatter engine from `sqlparse` to the bundled `sql-formatter`
|
|
508
|
+
(JS), which lays out nested function calls and long expressions correctly.
|
|
509
|
+
- Adds `inlineSql.format.dialect` (default `postgresql`; `sql`, `mysql`, and
|
|
510
|
+
`sqlite` also supported) for dialect-aware formatting.
|
|
511
|
+
- Adds `inlineSql.format.trimBlankBoundaries` (default `true`) to collapse
|
|
512
|
+
extra blank lines at the start and end of triple-quoted SQL to a single line
|
|
513
|
+
ending.
|
|
514
|
+
- Ports the entire analysis pipeline (detection, protection, restore,
|
|
515
|
+
validation, and target selection) from the Python helper to TypeScript and
|
|
516
|
+
removes the Python runtime, bundled `sqlparse`, `inlineSql.pythonPath`, and
|
|
517
|
+
the helper bootstrap. The VSIX drops from ~58 to 16 files.
|
|
518
|
+
|
|
519
|
+
## 0.1.1 - 2026-08-01
|
|
520
|
+
|
|
521
|
+
- Adds official extension icon for VS Code Marketplace and Open VSX listings.
|
|
522
|
+
|
|
523
|
+
## 0.1.0 - 2026-08-01
|
|
524
|
+
|
|
525
|
+
- Highlights SQL embedded in supported Python strings and in Jupyter and
|
|
526
|
+
marimo Python cells.
|
|
527
|
+
- Provides the manual commands `Format at Cursor`, `Format Selection`, and
|
|
528
|
+
`Format All`; it does not register format-on-save or another formatter
|
|
529
|
+
provider.
|
|
530
|
+
- Formats with the bundled, offline `sqlparse` 0.5.5 engine without executing
|
|
531
|
+
or validating SQL or inferring a dialect.
|
|
532
|
+
- Preserves Python source and f-string replacement fields, skips unsafe or
|
|
533
|
+
unsupported literal shapes, and shows highlighting only in untrusted
|
|
534
|
+
workspaces.
|
|
535
|
+
- Includes the project MIT license and third-party sqlparse BSD-3-Clause and
|
|
536
|
+
Microsoft Python Extension API facade MIT notices.
|
|
537
|
+
- Adds SQL semantic tokens so the SQL portion keeps its highlighting even when
|
|
538
|
+
a Python language server classifies the whole f-string as a string token.
|
|
539
|
+
- Disables `editor.semanticHighlighting.enabled` for Python and Marimo Python
|
|
540
|
+
by default; Python language servers would otherwise override the SQL
|
|
541
|
+
highlighting contributed by the TextMate grammar.
|
|
542
|
+
- Adds `inlineSql.format.expandSelectList` (default `true`) to place every
|
|
543
|
+
SELECT column on its own indented line in triple-quoted SQL.
|
|
544
|
+
- Formats f-string fields that appear inside SQL string literals, for example
|
|
545
|
+
`WHERE status = '{value}'`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hidenobu Nagai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|