Skip to content

Jig 0.7.0

Choose a tag to compare

@timessuman timessuman released this 11 Sep 04:54
· 384 commits to main since this release
f363d3a

A silent no-op fixed, plus the missing half of 0.6.0's token-layer move.

Fixed

jig init without --yes exited 0 having written nothing when stdin was not a terminal.

It printed the first prompt, read EOF, and stopped. That is every CI step, every piped invocation, and every agent shelling out without a TTY. Exit 0 having done nothing is the worst outcome available: the caller cannot tell it from success, and the next thing they do is act on a token layer that was never created.

Confirmed identical in 0.5.0, so this predates the prompts added since.

$ printf '\n' | jig init
'jig init' asks questions and stdin is not a terminal, so it cannot. Re-run with
--yes to accept the derived defaults, or run it in a terminal. (To choose the
mode without a terminal, write jig.config.json first — init honours it.)
$ echo $?
1

Added

init offers to move a legacy .jig/tokens/ layout to the location your project's own structure suggests.

0.6.0 deliberately left an upgraded project where it was — a silent relocation could break an import you wrote that init knows nothing about — but that meant the improvement only ever reached new projects, and the way out was one line of output that is easy to miss.

BEFORE  @import "../../.jig/tokens/brand.acme.css";
        @import "../../.jig/tokens/mode.product.css";
AFTER   @import "./jig/theme.css";

Interactively it asks; under --yes it declines and says how. Moving is all four halves or none: write at the new location, remove the old copies, strip the stale import before wiring the new one, and update jig.config.json so the next run does not go back for them. A file you have edited is never removed — it is named and left for you to clear.

Upgrading

npx jig-ui@latest update
npx jig-ui@latest init        # in a terminal, to be offered the move

On the number

Minor rather than patch, and arguable. The non-TTY fix is a correction; the relocation offer is new behaviour that can move files, though only on consent — under --yes nothing changes. Taking the higher reading is the one that does not understate the change.

Full changelog: https://github.com/timessuman/jig/blob/main/CHANGELOG.md