{"id":15434,"library":"estrella","title":"Estrella Build Tool","description":"Estrella is a versatile and lightweight build tool leveraging the speed of esbuild for TypeScript and JavaScript projects. It distinguishes itself by eschewing traditional configuration files in favor of a user-defined JavaScript or TypeScript build script, providing full programmatic control over the build process. Key features include automatic rebuilds on file changes, parallel project building, and integrated TypeScript diagnostics which can be optionally enabled and customized, allowing remapping of diagnostic severity levels. The current stable version is 1.4.1, with releases occurring periodically to incorporate esbuild updates and introduce new features or fixes. Its minimal dependency footprint (primarily esbuild itself) and single-file design contribute to its fast startup times, aiming to retain esbuild's blazing performance.","status":"active","version":"1.4.1","language":"javascript","source_language":"en","source_url":"https://github.com/rsms/estrella","tags":["javascript","typescript"],"install":[{"cmd":"npm install estrella","lang":"bash","label":"npm"},{"cmd":"yarn add estrella","lang":"bash","label":"yarn"},{"cmd":"pnpm add estrella","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core compiler dependency for all build operations.","package":"esbuild","optional":false},{"reason":"Used for TypeScript diagnostics when `tsc` is enabled or a `tsconfig.json` is present.","package":"typescript","optional":true},{"reason":"Optional dependency for improved file watch tracking on macOS.","package":"fsevents","optional":true}],"imports":[{"note":"While CommonJS `require` is shown in examples, ESM `import` is the modern approach for modules. Both are supported for the main `build` function.","wrong":"const build = require('estrella')","symbol":"build","correct":"import { build } from 'estrella'"},{"note":"The `watch` function API changed in v1.4.0. Direct use of `watch` as a function should follow the updated API; previously, `build({ watch: true })` might have been sufficient for basic watching behavior.","wrong":"build({ watch: true })","symbol":"watch","correct":"import { watch } from 'estrella'"},{"note":"Import types separately using `import type` for clarity and to avoid runtime overhead.","symbol":"BuildConfig","correct":"import type { BuildConfig } from 'estrella'"}],"quickstart":{"code":"#!/usr/bin/env node\nconst { build } = require(\"estrella\")\n\n// A basic build script compiling a TypeScript entry point\n// and bundling it to a specified output file.\n// TypeScript diagnostics are explicitly enabled.\nbuild({\n  entry: \"src/main.ts\",\n  outfile: \"out/foo.js\",\n  bundle: true,\n  // Pass any options to esbuild here, e.g., minify, sourcemap, platform.\n  // This also explicitly enables TypeScript diagnostics during the build.\n  tsc: true\n})\n\n// To run this script: chmod +x build.js && ./build.js -watch","lang":"typescript","description":"This quickstart demonstrates how to set up a basic build script using Estrella to compile a TypeScript entry point, bundle it, output it to a specified file, and explicitly enable TypeScript diagnostics."},"warnings":[{"fix":"Consult the `estrella.d.ts` API documentation or `examples` directory for the correct `watch` function signature and usage patterns for versions 1.4.0 and later.","message":"The API for the `watch` function underwent a breaking change in v1.4.0. Users explicitly calling `watch` directly should review the updated API documentation or examples.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Thoroughly test existing build configurations that use `define` options when upgrading to v1.4.0 or newer. Consult esbuild documentation for current `define` behavior.","message":"Changes in internal handling of `define` entries within `BuildConfig` in v1.4.0 might subtly alter build behavior if relying on specific `define` configurations.","severity":"gotcha","affected_versions":">=1.4.0"},{"fix":"Review the build script's `run` related logic and test its behavior when upgrading to v1.4.1 or later. Adjust program execution commands or `run` options as necessary.","message":"Behavior when `run`ning a program after building it might have changed in v1.4.1. This could affect scripts that automate execution post-build.","severity":"gotcha","affected_versions":">=1.4.1"},{"fix":"To enable full TypeScript type checking and diagnostics, ensure a `tsconfig.json` is configured correctly, or add `tsc: true` to your `build` configuration object.","message":"TypeScript diagnostics are optional and only run if a `tsconfig.json` file is present in the project directory or if `build({ tsc: true })` is explicitly set in the build script. Without these, only esbuild's basic transpilation occurs.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Estrella allows remapping TS diagnostic severities. Add a `tsrules` entry to your `build` options, e.g., `tsrules: { '7006': 'warn' }`, to treat this specific error as a warning instead of an error, or explicitly type the parameter (e.g., `ev: MouseEvent`).","cause":"This TypeScript error indicates that a parameter's type could not be inferred and 'noImplicitAny' is enabled in your `tsconfig.json`.","error":"Parameter 'ev' implicitly has an 'any' type. TS7006"},{"fix":"Run `npm install -D estrella` or `yarn add -D estrella` in your project's root directory. Ensure your build script is run from a location where `node_modules` is accessible.","cause":"The 'estrella' package is not installed or not resolvable from the current working directory.","error":"Error: Cannot find module 'estrella'"}],"ecosystem":"npm"}