GitHub - unstablebuild/rune-language-typescript · GitHub
Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

rune-language-typescript

Rune language packages for TypeScript and JavaScript, built from one repo and released with one tag:

  • typescript: the TypeScript 7 native compiler (tsgo), which also serves LSP; extension_typescript; and the TypeScript grammar. It requires the other two packages.
  • javascript: the JavaScript grammar, JSX included.
  • tsx: the TSX grammar.

To install TypeScript and JavaScript support in Rune, run this command in the Rune console:

pkg install typescript

The release instructions below are for Rune maintainers.

Release runbook

  1. Prepare the build host. A Mac builds all four platforms; a Linux host builds only the Linux ones, so release-all and dist-<env>-all fail on Linux. Install Go, Xcode command line tools (macOS), zig, wget, GNU tar (gtar on macOS), objdump, perl and bluectl. extension_typescript is pure Go, the compiler is a prebuilt npm download, and the Linux grammars are cross-compiled by zig cc against glibc 2.28, so no other toolchain is needed. The macOS tree-sitter.so files are signed with the Developer ID Application: Unstable Build, LLC. (YYZRWD888J) identity, so the Mac needs that identity in its keychain. Rune.app runs with the hardened runtime, which refuses to load a tree-sitter.so signed by any other team. The other binaries run as separate processes and keep their linker or vendor signatures; Microsoft signs the compiler. Packages are not notarized: Rune installs them without the quarantine attribute, so Gatekeeper never assesses them.

  2. Prepare the release. Fetch tags and submodules (git fetch --tags && git submodule update --init --recursive), then check out a clean, tagged release commit, tagged above every version already published for the three packages (see check-release-tag.sh). The dist-* targets reject untagged, dirty, or non-semver releases. Authenticate bluectl via gcloud Application Default Credentials and set BLUE_PGP_KEY and BLUE_PGP_KEYRING (see bluectl release upload -h). Set BLUE_PGP_PASSPHRASE too, or bluectl prompts for it on every upload, twelve times for dist-<env>-all.

  3. Publish every platform to an environment:

    make dist-staging-all
    make dist-prod-all

    dist-<env>-all builds and tests all four platforms into build/<os>-<arch>/{javascript,tsx,typescript}.tar.gz and uploads only if every one passes. Each platform uploads javascript and tsx before typescript, which requires them. Packages already released from the same commit are skipped, so an interrupted upload can be rerun with the same target; a version released from another commit fails the platform before it uploads anything. dist-<env>-<os>-<arch> (e.g. dist-prod-linux-amd64) releases a single platform, and release-all / release-<os>-<arch> build and test without uploading. make test checks for .go source leaks, the payload of each package, that typescript requires the other two, that the compiler and its lib.*.d.ts cannot be published onto PATH, that every binary is built for the target OS and architecture within the glibc 2.28 and macOS 13.3 floors, OS-only library dependencies, and that extension_typescript is built from the pinned rune commit with a clean tree. For macOS it checks that Rune.app can load each package: every tree-sitter.so is Developer ID-signed and loads into a process signed like Rune.app, x86_64 under Rosetta, and every binary is intact and validly signed (scripts/macos-signing.sh, shared by every language repo). For the host platform it also runs the compiler through both shim locations: it type-checks a project against the packaged lib.*.d.ts and completes an LSP handshake (scripts/lsp-smoke.pl). Downloads are cached in downloads/ (make distclean removes them). Each upload selects the pinned project and per-platform release bucket from deploy/bluectl/; do not run dist.sh directly.

To move to a new TypeScript release, bump TS_VERSION in the Makefile. To move the grammars, update the tree-sitter-javascript and tree-sitter-typescript submodules together with the rune submodule: the queries ship from Rune's syntax test fixtures (rune/internal/ide/syntax/syntaxtest/<lang>/). Rune's syntax suite tests them against the prebuilt tree-sitter.so fixtures next to them, not against the grammars built here, so after moving either run the suite against the built grammars: copy each build/darwin-arm64/pkg/<lang>/lib/tree-sitter.so over its fixture, run go test -run TestTypeScript ./internal/ide/syntax/syntaxtest/ in rune, then restore the fixtures with git -C rune checkout -- internal.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages