Skip to content

Releases: fuzdev/tsv

Release list

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 16 Sep 15:13
Immutable release. Only release title and notes can be modified.
  • breaking chore: the three WASM packages are renamed to kebab-case — @fuzdev/tsv_wasm
    @fuzdev/tsv-wasm, @fuzdev/tsv_format_wasm@fuzdev/tsv-format-wasm,
    @fuzdev/tsv_parse_wasm@fuzdev/tsv-parse-wasm — matching the @fuzdev/tsv-<triple> platform
    packages, the tsv-<triple> release assets and the tsv-format VS Code extension, so tsv's whole
    npm surface spells one way; the snake_case names stop at 0.3.x and are deprecated on npm with a
    pointer to their replacement. Exports, options and the tsv bin are unchanged; the Rust crates
    keep their tsv_* names
  • feat: a darwin-x64 platform package joins the native set, so @fuzdev/tsv installs on Intel
    Macs and under x64 Node on Apple Silicon instead of throwing at import; its tsv CLI binary is
    attached to the GitHub Release like the others
    (#1040)
  • fix: a relational chain such as x < y > z no longer prints in a form that re-parses as a
    type-argument instantiation when a line break lands after the > — tsv keeps a paren pair around
    the < operand, so the output reads back as the comparison the author wrote
    (#1039)
  • fix: restore the CSS parse speed lost in 0.3.0 — a declaration value is ruled out for operator
    splitting before its run is tokenized (#1037)

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 19:03
Immutable release. Only release title and notes can be modified.
  • breaking feat: native binaries, both CLI and JS lib — install @fuzdev/tsv (N-API addon plus
    the real native tsv CLI; npx tsv execs the binary) over @fuzdev/tsv-<triple> platform
    packages for Linux (x64 gnu and musl, arm64 gnu), macOS arm64, and Windows x64; API-compatible
    with @fuzdev/tsv_wasm (minus the WASM-only init/init_sync/wasm_module/reinstantiate and
    IgnoreStack's free()), which stays the universal fallback. The same CLI binaries are attached
    to each GitHub Release with a SHA256SUMS, every asset carrying a Sigstore build provenance
    attestation, for use without npm
    (#717, #718,
    #720, #725,
    #726, #1035)
  • breaking chore: every package now requires Node >=22 (was >=20)
    (#725)
  • breaking feat: every parse/format export takes an optional acorn-style options object —
    parse_*(source, {locations?, sourceType?}) and format_*(source, {sourceType?}), replacing the
    flat *_no_locations / *_with_goal names; unknown keys throw, sourceType is TypeScript-only,
    and ParseOptions/FormatOptions (plus their TypeScript* variants) are exported types. The CLI
    flag is --source-type (was --goal), and naming one for a Svelte or CSS input is an error rather
    than ignored (#645,
    #713)
  • breaking feat: the exported IgnoreStack splits push_tsv into push_formatignore /
    push_prettierignore, heuristic_shadow_warning becomes shadow_warning (returning undefined
    when there's nothing to warn), and it gains the per-path queries the CLIs use —
    path_shadow_warning, unsupported_extension_error, excluded_argument_warning,
    gitignore_symlink_warning, unresolvable_root_error — so an embedder reproduces exactly what
    tsv format would touch
  • breaking feat: strictness follows the spec — sourceType: 'script' parses a sloppy script
    (strict only under its own "use strict" prologue, so with and legacy octal literals and
    escapes parse there), a module is always strict (legacy string escapes now reject in one), and
    format with no sourceType parses as a module and retries as a script only if that fails, so
    legacy scripts format from a bare tsv format (.mjs/.mts excepted); with is a reserved word
    in every mode, so it no longer parses as a name
  • breaking fix: the parsers reject what their oracles reject — TypeScript: a raw newline inside
    a string literal, the [no LineTerminator here] positions, for await without of, a definite
    ! on a for header's declaration, typeof 5, a compound operator inside a destructuring or
    for target ([a += b] = xs, which used to parse and drop the operator); Svelte: a duplicate
    {:else}, a block tag in attribute position, an unterminated quoted attribute (each of which used
    to parse and corrupt the document), an unknown <svelte:*> name, a nested <svelte:options>
    and accept what they accept: strict-mode-reserved words as binding names (let, yield,
    implements), let as a reference in for heads, type-asserted for-in/of targets
    (for (a! of xs)), decorator type arguments, ambient generator/async declarations,
    declare module 'x' with no ;, and the tsc corpus's remaining over-rejections
    (#618, #619,
    #621, #628,
    #629, #630,
    #638, #640,
    #673, #705,
    #708, #710,
    #711, #736,
    #737, #776,
    #778, #812,
    #814, #872,
    #877, #878,
    #881, #893,
    #894, #895,
    #912, #915)
  • breaking fix: parse output tracks its canonical oracles — CSS roots gain comments: CSSComment[] and ::part()/::slotted() gain an args: SelectorList
    (#766), Svelte components without lang="ts" emit
    vanilla acorn's wire shape in every expression island, not just <script>
    ImportExpression.options instead of arguments, get/set Property key order
    (#774) — comment attachment reaches every island node
    (#891, #896),
    acorn-typescript alignments through 1.0.13 (#702,
    #764), span, loc and key-order alignments
    (#583, #625,
    #882, #885,
    #888, #889,
    #919), Svelte and CSS offsets counted past a leading
    BOM as their parsers strip it (TypeScript keeps file coordinates, as acorn does), a template
    element's raw/cooked folding a literal <CR><LF> to <LF> per the spec
    (#727), JS-exact numeric literal values
    (#553), and corrected legacy-octal-escape and HTML
    character-reference decoding (#633,
    #635)
  • fix: the bundled tsv_ast.d.ts now types the whole wire outside the CSS subtree and is gated
    against the fixture corpus — Script.content is a Program (was unknown),
    Program.sourceType is 'script' | 'module', LogicalExpression, WithStatement and the
    Svelte-built node shapes are declared, acorn nodes inside a Svelte component carry
    leadingComments/trailingComments, and the never-emitted TSInterfaceHeritage and
    TSMappedTypeParameter are gone
    (#890)
  • breaking fix: a path named on the command line is bounded by the ignore files like a walked
    one — a file or directory a .gitignore rule excludes is skipped with a warning that gives the
    re-include lines, one a .formatignore/.prettierignore rule excludes is skipped quietly (as
    prettier does), and a run whose every argument was an excluded file exits 0; a symlinked argument
    is graded as the link git sees, not its target. Naming a file tsv doesn't format
    (tsv format some.json) is now an upfront argument error instead of being parsed as TypeScript
    (#709)
  • breaking feat: format-ignore / prettier-ignore are honored in many more positions (type
    members, parameters, arguments, declarators, statement and declaration heads, Svelte braced
    heads), and only an own-line directive acts — one sharing its line with code is an ordinary
    comment (#572,
    #913); a frozen statement keeps its ASI semicolon and
    required parens so the output reparses
    (#897), and a -start/-end range no longer prints a
    <script>/<style> inside it twice (#610)
  • feat: more formatting that takes advantage of Svelte 5 whitespace changes
    (#558, #563,
    #600, #601,
    #606, #607,
    #609, #750,
    #768, #905,
    #906, #907,
    #908, #909,
    #910, #911,
    #918, #1006)
  • fix: many formatting fixes
  • fix: no comment is dropped or double-printed, and a // no longer swallows the code after it
    into an output that doesn't reparse; an embedded body in a language tsv doesn't format
    (<script lang="coffee">, <template lang="pug">, type="application/json") is copied verbatim
    instead of being parsed or re-indented (#875,
    #879)
  • feat: the JS CLIs format directories in parallel on node:worker_threads--jobs is no lon...
Read more