Repository navigation
Releases: HelgeSverre/zed-applescript
Release list
v1.9.1
Packaging-only release for Zed extension marketplace publishing. No grammar, query, or behavior changes.
Changed
- Renamed
LICENSE.md→LICENSEto satisfy the Zed marketplace license-file requirement (Oct 2025). - README license badge link updated to point at the new filename.
v1.9.0
Tier 1 grammar improvements — 5 small lenient parsing additions sourced from a three-agent stress-file analysis. 22 errors closed across the quarantined stress targets.
Added (grammar)
- Bare
#line comments alongside the existing--and#!forms. Common in shebang scripts and modern AppleScript style. - Leading-dot floats (
.5,-.25) — a number-literal form common in window-manager scripts that compute screen fractions. - Multi-word record key values —
{repetition method: start after completion}. Lenient editor parsing: not valid generic AppleScript perosacompile, only valid when the target app's dictionary defines those words as enumeration constants. AppleScript code that uses OmniFocus / Mail / Calendar / Contacts dictionaries does this routinely. |piped|()no-arg handler calls — supports ASObjC method-call syntax where the selector is a piped identifier.
Changed
- Time-unit names (
seconds,minutes,hours,days,weeks) removed fromapplescript_constant. They now parse as plain identifiers outsidewith timeout(which has its own dedicatedsecondstoken). Letsset hours of theDate to 12and similar property-reference patterns parse correctly. - Grammar pin bumped to
7a5dce5.
Stress-corpus impact
| File | Before | After | Δ |
|---|---|---|---|
omnifocus_library.applescript |
29 | 19 | −10 |
battery_monitor.applescript |
12 | 6 | −6 |
layouts.applescript |
7 | 1 | −6 |
alfred_iterm.applescript |
10 | 10 | 0 (Tier 2: chained tells) |
adium_unittest.applescript |
11 | 11 | 0 (single-app dictionary, intentionally skipped) |
Layouts is one error short of graduating to the active corpus; the remaining error (tell application theApp — a variable reference instead of a string literal) is on the Tier 2 list as part of broadening tell_simple_statement.target to $._expression.
Verified valid AppleScript
The just validate-corpus recipe (added in 6117e9c) confirms all 4 of the additions above target real-AppleScript constructs that osacompile accepts. Fix #3 (multi-word record values) is the one intentional lenient-mode case — the comment in grammar.js explains why.
v1.8.5
Corpus expansion — 9 community-sourced scripts.
Added
-
Active corpus → 40 files (was 36). Four community scripts that already parse cleanly:
community/dmg_finder.applescriptfromindygreg/PyOxidizer— Finder DMG window-styling pattern.community/NV-CopyToNV.applescript,community/NV-LinkAutomation.applescript,community/NV-NewNoteFromDialog.applescriptfromunforswearing/applescript— Notational Velocity automation snippets.
-
Stress targets in
known-limits/community-stress/— 5 substantial files (1,155 LOC total, 69 ERROR nodes) that exercise gaps not yet covered:omnifocus_library.applescript(579 LOC, 29 err) — multi-word record keys, deep ASObjC patterns.battery_monitor.applescript(228, 12) — long mixed-pattern app.layouts.applescript(148, 7) — chained tells, window management.adium_unittest.applescript(106, 11) — Adium app-dictionary specifics.alfred_iterm.applescript(94, 10) —tell X to tell Y to tell Z to <action>chains.
Each is documented in
known-limits/README.mdwith its primary failure mode, so future grammar work can pick the highest-leverage target.
Changed
- Grammar pin bumped to
b523b13. No parser change — corpus addition only.
v1.8.4
Polish pass — four small additions, no behavior changes for end users.
Added
- CI on the grammar repo at HelgeSverre/tree-sitter-applescript. Runs the fixture suite + a real-world corpus scan on every push and PR to grammar
main. Catches regressions before they leave the grammar repo, so a broken grammar can't silently slip in via the nextjust update-grammarhere. just statusrecipe — prints version, grammar pin, last tag, and whether the submodule SHA matches the pin (with a⚠if it doesn't). Useful when context-switching back to the repo.- README badges for CI status, latest version, and license.
Changed
- README's
Documentationsection now lists only user-facing material (CHANGELOG, the references cache). MovedCLAUDE.mdinto a newContributingsection since it's a repo-internal contract for AI agents, not user-facing documentation. - Grammar pin bumped to
0083accto pick up the new CI workflow on the grammar side. No parser change.
v1.8.3
Eight findings from a five-lens swarm review applied as a single batch.
Fixed
$ZED_SYMBOLno longer flows into abash -cstring in the "Run handler" task. It's now passed as an environment variable (HANDLER) and read as a normal shell variable, eliminating the textual-injection risk a maliciously named handler could otherwise exploit. (Security audit.)mktempleak in the handler task closed. The previous one-liner appended.applescriptto$(mktemp …), leaving the original temp file un-deleted on every run. Now usesmktemp+mv+trap … EXITfor guaranteed cleanup. (Code review.)runnables.scmhandler-name capture renamed@_name→@nameso Zed actually populates$ZED_SYMBOLin the task label. The leading-underscore convention marks a capture as internal/unused, which on some Zed builds suppressed the substitution silently. (Code review.)just testno longer truncates its output with| tail -3. CI failures now show which fixture broke and the diff, not just the summary count. (Code review.)just releaseuses explicitgit addpaths (extension.toml,grammars/tree-sitter-applescript,CHANGELOG.md) instead ofgit add -A, so a release commit can't sweep in stray local files. (Security audit.)tree-sitter-cli@0.22pinned in CI (ci.yml+release.yml). The previous unpinnednpm install -g tree-sitter-cliwould have broken silently on a major-version bump. (Maintenance forecast.)
Added
- Comment language injection (
injections.scm): both(comment)and(block_comment)now inject Zed'scommentpseudo-language, activating built-in TODO/FIXME/NOTE/HACK gutter highlighting. (Comparative analysis vs Dart/Haskell/Lua.) - GitHub topics on the extension repo (
zed-editor,zed-extension,osascript,automation,tree-sitter,macos,applescript,zed) and a clearer description that drops the misleading(WIP)prefix at v1.8.3. (Outside-skeptic review.)
v1.8.2
Added
- Grammar repo README + LICENSE at HelgeSverre/tree-sitter-applescript. The grammar previously shipped without a README. Also set its GitHub topics (
tree-sitter,tree-sitter-grammar,tree-sitter-parser,parser,applescript,osascript,macos,automation), updated the description, and set the homepage to point at this extension. - Grammar pin bumped to include the new README/LICENSE (no parser change).
Changed
- CI workflow now runs
just verifyandjust testinstead of an ad-hoc inline parse, so the .scm-against-node-types check gates every push. - Release workflow runs
just verifyas a pre-publish gate. - Both workflows now use
actions/checkout@v4withsubmodules: recursiveso the grammar is available without an extra clone step, and installjustviaextractions/setup-just@v2. - LICENSE.md copyright year bumped to 2026.
v1.0.0
Added
- Initial release
- Tree-sitter grammar for AppleScript (token-based for reliable highlighting)
- Syntax highlighting for keywords, strings, numbers, operators
- Support for
.applescriptand.scptfile extensions - Line comments (
--) and block comments ((* *)) - Case-insensitive keyword matching