inline-sql-toolkit 0.5.3 → 0.5.4

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.4 - 2026-10-10
4
+
5
+ - Docs: a skip pragma applies to every literal on its line (README).
6
+ - Internal: drop an unreachable check in skip pragma matching.
7
+ - Dependencies: bump the dev-only transitive `source-map-js` to 1.2.2 (GHSA-68fv-2mgg-jv7q).
8
+
3
9
  ## 0.5.3 - 2026-10-10
4
10
 
5
11
  - Feature: a "# inline-sql: skip" comment excludes a specific SQL literal from formatting (as a trailing comment on the closing quote line or on a dedicated line directly preceding the literal).
package/README.md CHANGED
@@ -277,6 +277,7 @@ Notes on skipping behavior:
277
277
 
278
278
  - On triple-quoted strings, any text after the opening quotes (such as `"""--sql # inline-sql: skip`) is part of the string body, not a Python comment, so a pragma placed there has no effect.
279
279
  - A trailing comment on a preceding statement (e.g. `a = "select 1" # inline-sql: skip`) does not affect a literal starting on the next line (`b = "select 2"`). Dedicated comment lines must consist only of whitespace and the comment.
280
+ - A pragma applies per line, not per literal: a trailing pragma skips every literal that ends on that line, and a dedicated pragma line skips every literal that starts on the next line. For example, `a, b = "select 1", "select 2" # inline-sql: skip` skips both literals; put them on separate lines to skip only one.
280
281
  - Syntax highlighting is powered by TextMate grammar and is not affected by `# inline-sql: skip`. Only formatting excludes the literal.
281
282
  - When running **Format at Cursor** on a skipped literal, the command reports `NO_SQL_CANDIDATE`.
282
283
  - Both CLI `--check` and `--write` honor `# inline-sql: skip` with the exact same rules: skipped literals are never formatted, never reported on stderr as skipped candidates, and do not cause `--check` to fail.
package/dist/cli.js CHANGED
@@ -2237,7 +2237,7 @@ function isSkippedByPragma(literal, analysis) {
2237
2237
  const startLine = analysis.sourceMap.vscodeFromOffset(literal.span.start).line;
2238
2238
  const endLine = analysis.sourceMap.vscodeFromOffset(literal.span.end).line;
2239
2239
  const { trailing, ownLine } = analysis.skipPragmaLines;
2240
- return ownLine.has(startLine - 1) || trailing.has(endLine) || ownLine.has(endLine);
2240
+ return ownLine.has(startLine - 1) || trailing.has(endLine);
2241
2241
  }
2242
2242
  function discover(analysis) {
2243
2243
  const literals = [
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/hidenobunagai/inline-sql-toolkit/issues"
13
13
  },
14
- "version": "0.5.3",
14
+ "version": "0.5.4",
15
15
  "icon": "icon.png",
16
16
  "type": "module",
17
17
  "bin": {