Commit Graph
152 Commits
Author SHA1 Message Date
zeekay 7844a60aff refactor(pack): modernize to github.com/hanzoai/pack and remove upstream branding
- Migrate module path to github.com/hanzoai/pack across all Go packages
- Remove legacy upstream docs and competitor brand references
- Modernize LLM.md and mise.toml for pristine Hanzo Pack builder
2026-09-04 00:40:42 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4476062fe0 chore: mise update 2026.8.2 (#681)
* fix: update mise to 2026.8.2

* test: update snapshots

* chore: update go, mise, and bun packages

* style: fix formatting

* test: update mise lock with latest version

* docs: updated changelog

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-07 15:22:10 -06:00
Michael BiancoandGitHub 565a802012 feat(node): infer npm from package-lock.json and add recommendation docs (#677)
Generated-by: aiautocommit
2026-08-02 06:54:21 -06:00
Michael BiancoandGitHub f672eb2f54 feat(node): support TanStack Start builds (#672)
* feat: add generation script for latest tanstack example

Generated-by: aiautocommit

* test(examples): add tanstack-latest example project setup

Generated-by: aiautocommit

* feat(node): add helper methods to check production and dev dependencies

Generated-by: aiautocommit

* feat(logger): support absolute URLs in DocsURL and suggestions

Generated-by: aiautocommit

* feat(node): exclude TanStack Start packages from Vite static build

Generated-by: aiautocommit

* feat(node): add support for TanStack Start srvx fallback

Generated-by: aiautocommit

* test(core): update test snapshots for TanStack build plan

Generated-by: aiautocommit

* docs(node): document TanStack Start detection and build behavior

Generated-by: aiautocommit

* feat(node): add TanStack Start framework support and fallback server

Generated-by: aiautocommit
2026-08-02 06:09:11 -06:00
Michael BiancoandGitHub 392d3fef96 feat: respect dockerignore on initial source load (#373)
* docs: add claude ref to agents

* refactor: simplify DockerignoreContext passing and make it required

* refactor: another take at fixing the initial docker ignore load stuff

* style: whitespace formatting tweaks

I'm not sure how it got into this state :/

* fix: apply dockerignore rules when copying local app context, not later in the build process

* fix: merge dockerignore excludes with top-level railpack.json excludes/includes

* test: top-level railpack.json exclude/include

* docs: update excluding files docs

* test: add negation to an existing dockerignore to expand test coverage

* fix: hack to determine if I'm understanding the llb exclude functionality right

* refactor: remove Includes and instead use negation operators and Excludes

* test: respect dockerignore on initial source load

- Apply exclude and include filters during the initial buildkit context load to improve local build performance
- Support top-level exclude and include configurations in railpack.json

Generated-by: aiautocommit

* feat: respect dockerignore on initial source load

- Load local source layers using the plan package directly to ensure .dockerignore patterns are respected at the buildkit level.
- Prevent unnecessary loading of ignored files like node_modules and virtual environments during local builds.

Generated-by: aiautocommit

* style: formatting updates

* docs(config): update documentation for dockerignore and exclude pattern handling

Generated-by: aiautocommit

* feat(plan): respect dockerignore on initial source load

Generated-by: aiautocommit

* refactor(core): access include rules directly from layer struct

Generated-by: aiautocommit

* feat(buildkit): respect exclude patterns on initial source load

- Apply exclude patterns at the buildkit level during local context loading to prevent transferring unnecessary large directories like node_modules or virtual environments.

Generated-by: aiautocommit

* feat: respect dockerignore on initial source load

Generated-by: aiautocommit

* feat(core): respect dockerignore on initial source load

- Expose the parsed dockerignore context via the build generate context
- Ensure build results preserve the correct dockerignore metadata and excludes on initial load

Generated-by: aiautocommit

* style(docs): fix trailing whitespace in CLAUDE.md

Generated-by: aiautocommit

* feat(core): respect dockerignore on initial source load

- Apply exclude and include filters during buildkit context setup to avoid loading large ignored directories locally.
- Support top-level exclude and include configuration in railpack.json.

Generated-by: aiautocommit

* test(plan): assert all expected empty dockerignore examples are found

Generated-by: aiautocommit

* docs(config): fix typo in excluding-files guide

Generated-by: aiautocommit

* feat(dockerignore): respect dockerignore on initial source load

- Apply exclude and include filters during Buildkit context establishment to drastically improve local build performance.
- Support top-level `exclude` and `include` rules directly in `railpack.json`.

Generated-by: aiautocommit

* docs(config): clarify directory matching behavior in excluding-files guide

Generated-by: aiautocommit

* refactor(core): remove dead dockerignore context fields

- Remove unused dockerignore context properties from build plans and options
- Clean up obsolete metadata checks in core tests

Generated-by: aiautocommit

* feat: add top-level exclude option to railpack config

Generated-by: aiautocommit
2026-07-31 07:41:35 -06:00
Michael BiancoandGitHub 60c281787d feat(node): support LTS version queries, use LTS as default node version (#650)
* feat(mise): support LTS version queries and improve version candidates

- Add support for resolving LTS and other non-semver version aliases in mise
- Introduce `versionQueryCandidates` to gracefully fall back from extracted semver to original version strings
- Add unit tests for LTS resolution and version query candidate generation

Generated-by: aiautocommit

* feat(node): update default Node version to lts

Generated-by: aiautocommit

* feat(mise): improve version resolution fallbacks and error messages

- Fallback to unconstrained release age queries when strict minimum age checks fail to respect pinned versions or custom configs.
- Include tried candidate versions in error messages to improve debugging when package lookups fail.

Generated-by: aiautocommit
2026-07-31 06:35:56 -06:00
Michael BiancoandGitHub 94402f3684 feat(node,python): opt-in Playwright browser installation (#653)
* feat: automatically install packages required for playwright, and playwright browser

This reverts commit 2a5567ff09fa044cf391b1d79ecf1fe7846e8828.

* docs: update environment variable test configuration property name

Generated-by: aiautocommit

* docs(node): add production deployment guide link to start command help

Generated-by: aiautocommit

* feat(python-playwright): install playwright only when requested via env

- Enable Playwright browser installation conditionally using `RAILPACK_PYTHON_PLAYWRIGHT_INSTALL`.
- Update python-playwright example to test against example.com.

Generated-by: aiautocommit

* feat(python): make Playwright browser installation opt-in

- Require `RAILPACK_PYTHON_PLAYWRIGHT_INSTALL=1` to install Playwright browsers and their runtime dependencies automatically.
- Prevent unintended deployment size increases and breaking changes for existing users since automatic installation can cause issues.
- Add test coverage verifying opt-in behavior and production dependency resolution.

Generated-by: aiautocommit

* docs(python): document playwright install configuration variable

Generated-by: aiautocommit

* feat(node): add support for checking production-only dependencies

Generated-by: aiautocommit

* feat(node): make Playwright browser installation opt-in

- Restrict automatic Playwright detection to production dependencies and require an explicit environment variable to install browsers, preventing unexpected side effects for existing users.
- Add tests to verify Playwright installation behavior based on environment configuration.

Generated-by: aiautocommit

* docs: add unit testing guideline against testing log output

Generated-by: aiautocommit

* chore(deps): update playwright dependency to v1.60 in node-playwright example

Generated-by: aiautocommit

* feat(node,python): update Playwright runtime dependencies for Debian 12

- Align Playwright runtime dependencies with the official nativeDeps.ts list for Debian 12 Chromium.
- Ensure production runtime images include all required system libraries for Playwright without relying on builder-only installation flags.

Generated-by: aiautocommit

* feat(examples): navigate to example.com in playwright node example

Generated-by: aiautocommit

* docs(node): document opt-in Playwright browser installation

Generated-by: aiautocommit

* test(core): update test snapshots for playwright production-only dependencies

Generated-by: aiautocommit

* docs: add instruction regarding snapshot updates to PR template

Generated-by: aiautocommit

* feat(node): remove libatomic1 requirement for Node.js 25+

Generated-by: aiautocommit

* test(core): update playwright snapshots for mise version and apt caches

Generated-by: aiautocommit
2026-07-28 08:10:48 -06:00
Michael BiancoandGitHub 3a92acc8df refactor(node): avoid duplicate detection log messages (#649)
* refactor(node): remove duplicate log messages in Nx package resolution

Generated-by: aiautocommit

* refactor(node): prevent duplicate custom start log messages

- Move the custom start command log message from `isSPA` to `Plan` so it runs once during provider planning rather than during SPA checks.
- Add log message for Nx app resolution in the build step.

Generated-by: aiautocommit
2026-07-27 12:58:03 -06:00
Michael BiancoandGitHub ac1fbbafa3 feat(node): gracefully handle out of sync package-lock.json (#643)
* feat(node): add out-of-sync package-lock npm example

- Add new example demonstrating npm ci failure with an out-of-sync lockfile
- Include test configuration and documentation for the scenario

Generated-by: aiautocommit

* fix(node): fallback to npm install when lockfile is missing

- Always use `npm install` for npm projects to prevent build failures when `package-lock.json` is missing.
- Log a warning when the lockfile is absent to encourage generating one.
- Clean up outdated comments regarding package manifest parsing.

Generated-by: aiautocommit

* test(core): update test snapshots for npm install changes

Generated-by: aiautocommit

* feat(node): add npm ci recommendation and railpack example

- Document recommendations for preferring `npm ci` over `npm install` for Node.js projects using npm.
- Add a corresponding `railpack.json` example demonstrating how to configure deterministic installs with `npm ci`.

Generated-by: aiautocommit

* refactor(core): use npm ci in build plan for node npm examples

- Switch from `npm install` to `npm ci` for deterministic builds when package-lock.json is present.
- Remove redundant cache directory creation step.

Generated-by: aiautocommit

* feat(node): add suggestions for missing lockfiles

- Log suggestions when `package-lock.json` or `pnpm-lock.yaml` is missing to encourage deterministic installs.
- Update architecture documentation with guidance on committing `package-lock.json`.

Generated-by: aiautocommit

* test(core): update out-of-sync package-lock snapshot for builder changes

Generated-by: aiautocommit

* feat(node): allow overriding npm install command via config variable

Generated-by: aiautocommit

* docs(node): document RAILPACK_NODE_NPM_INSTALL environment variable

Generated-by: aiautocommit

* docs: recommend committing all package manager lockfiles

Generated-by: aiautocommit
2026-07-27 06:50:07 -06:00
Michael BiancoandGitHub 5814dcc0e6 feat(node): support SvelteKit with adapter-auto (#641)
* feat(node): add support for SvelteKit with adapter-auto

- Configure SvelteKit builds to force adapter-node output via GCP_BUILDPACKS variable
- Set appropriate start command for SvelteKit projects using adapter-auto
- Add test coverage for SvelteKit detection and configuration

Generated-by: aiautocommit

* test(examples): replace justBuild flags with specific test assertions

Generated-by: aiautocommit

* docs(guides): remove obsolete justBuild reference from developing-locally guide

Generated-by: aiautocommit

* refactor(tests): remove JustBuild test option and logic

Generated-by: aiautocommit

* refactor(node): update SvelteKit adapter-auto comment reasoning

Generated-by: aiautocommit

* feat(core): add start command and build variables to sveltekit build plan

Generated-by: aiautocommit

* chore: exclude tmp directory when staging updated snapshots

Generated-by: aiautocommit
2026-07-23 13:26:00 -06:00
Michael BiancoandGitHub 14a60ffdf8 feat(node): nx support (#606)
* feat(example): add node-nx-next workspace scaffold

- Initialize an Nx workspace with a Next.js application using pnpm.
- Configure workspace tooling including TypeScript, Prettier, and ESLint.
- Include a generation script to automate the workspace setup process.

Generated-by: aiautocommit

* feat(node): add BuildScriptContains helper to PackageJson

Generated-by: aiautocommit

* feat(node): add support for Nx workspaces with Next.js

- Implement Nx workspace detection and package resolution.
- Enable automatic Nx build commands when no root build script is detected.
- Add RAILPACK_NX_APP environment variable to support selecting specific apps in multi-app workspaces.
- Refactor Next.js detection logic to better support monorepo and Nx-inferred architectures.
- Include unit tests for Nx workspace detection and build/start command generation.

Generated-by: aiautocommit

* docs: add documentation for Nx monorepo support

- Explain how Railpack handles Nx workspaces, including automatic detection and support for inferred tasks.
- Document the new `RAILPACK_NX_APP` configuration variable to target specific apps in multi-app workspaces.
- Detail the build and start behavior for Next.js applications within an Nx context.

Generated-by: aiautocommit

* test: add snapshot for Nx Node.js and Next.js example

Generated-by: aiautocommit

* chore: bump railpack images and set version to dev

- Update builder and runtime images to mise-2026.7.7
- Include RAILPACK_VERSION environment variable in build plan

Generated-by: aiautocommit
2026-07-21 12:50:43 -06:00
Michael BiancoandGitHub 7565917024 fix(node): warn when package manager is inferred (#638) 2026-07-21 10:37:38 -06:00
Michael BiancoandGitHub 55941571b4 fix(node): use mise for idiomatic bun version files (#607)
* feat(node): add bun to idiomatic tools and remove manual version file handling

- Add "bun" to the list of tools managed by idiomatic version files.
- Remove redundant manual parsing of `.bun-version` now that `mise` provides native support.

Generated-by: aiautocommit

* feat(node-bun-workspaces): add Bun version file and update test expectations

- Pin the Bun version in the example workspace.
- Update test expectations to reflect current Bun version output.

Generated-by: aiautocommit

* test(node): include bun in idiomatic version files

- Add "bun" to the list of supported tools in the generated mise configuration.
- Update build plan snapshots to explicitly include the .bun-version file in project generation.

Generated-by: aiautocommit
2026-06-20 08:31:01 +02:00
Michael BiancoandGitHub 88e745d89e refactor(node): consolidate SPA framework detection (#603)
- Introduce `getSPAName` to centralize canonical framework identification.
- Remove redundant framework detection logic in `getRuntime`.
- Clean up metadata handling by removing unnecessary `nodeSPAFramework` entry.
- Improve SPA framework name normalization.

Generated-by: aiautocommit
2026-06-19 08:27:51 +02:00
Michael BiancoandGitHub 1f4a9ad382 fix(node): prioritize RAILPACK_NODE_VERSION over engines.node (#601)
* feat(node): prioritize RAILPACK_NODE_VERSION over engines.node

- Add regression test case to verify environment variable precedence for Node version resolution.
- Add reproduction example for the reported issue where engine constraints override deployment variables.

Generated-by: aiautocommit

* feat(test): rename and update node version precedence example

* Rename `node-subfolder-node-version` to `node-version-precedence` to better reflect its purpose.
* Update `test.json` to allow stderr, accommodating potential output variations during version resolution.
* Replace the README to clarify the expected precedence behavior for environment variables versus engine settings.

Generated-by: aiautocommit

* refactor: improve package version resolution comments

- Clarify that package versions defined in `railpack.json` serve as defaults.
- Clarify that these values are overridden by more specific sources like `package.json` or environment variables.
- Update documentation to reflect that version sources are labeled as "custom config" to accommodate CLI flags and external config files.

Generated-by: aiautocommit

* feat(deps): add bun to idiomatic version resolution

Generated-by: aiautocommit

* refactor(mise): simplify version resolution logic

- Improve readability by removing nested conditional blocks.
- Clarify that UseMiseVersions now supports idiomatic version files and explicitly overwrites existing configuration.
- Enhance variable naming for better intent representation.

Generated-by: aiautocommit

* refactor(node): adjust node version resolution precedence

- Update node version resolution to ensure ENV-level configuration takes precedence over package.json engines.
- Refactor node detection logic for Bun projects to conditionally omit Node.js installation when no dependencies are present.
- Streamline Node.js package installation to reduce redundant configuration checks.

Generated-by: aiautocommit

* feat: add example test for Bun-only apps excluding Node binary

Generated-by: aiautocommit

* docs: simplify README for node version precedence example

Generated-by: aiautocommit

* test: add snapshots for node version precedence and bun examples

Generated-by: aiautocommit

* docs: update project documentation and test guidelines

Generated-by: aiautocommit

* refactor(test): merge node-bun-no-node into node-bun-no-deps

- Remove the redundant node-bun-no-node example.
- Consolidate the "no node binary" verification logic into the node-bun-no-deps example.
- Improve documentation in the readme for the consolidated example.

Generated-by: aiautocommit

* test: remove outdated snapshot for node-bun build plan

Generated-by: aiautocommit
2026-06-18 14:20:22 +02:00
Michael BiancoandGitHub ec1b056ade feat(node): add support for Expo SPA builds (#585)
* feat(expo-spa): scaffold initial expo spa project structure

*   Initialize core directory structure for expo-spa example.
*   Add theme management hooks and components to handle color schemes.
*   Include necessary assets for branding and UI components.
*   Setup initial configuration files and root layout.

Generated-by: aiautocommit

* feat(node): add support for Expo SPA builds

- Detect Expo projects using 'expo' and 'react-native-web' dependencies with static web output configured in 'app.json'.
- Automatically add a build command for 'expo export --platform web' when no build script is defined.
- Configure output directory resolution and runtime categorization for Expo applications.

Generated-by: aiautocommit

* docs: update documentation for Expo Web support and SPA build process

Generated-by: aiautocommit

* refactor(expo): remove default expo export command

- Remove the hardcoded Expo CLI export command.
- Rely on projects defining their own build scripts to maintain flexibility and alignment with standard Node provider patterns.

Generated-by: aiautocommit

* feat(expo): support static and single web output modes

- Update detection logic to include "single" output mode as a valid configuration for Expo SPAs.
- Add case-insensitive comparison for web output mode to ensure robustness.

Generated-by: aiautocommit

* test: add build plan snapshot for expo-spa project

Generated-by: aiautocommit

* docs: update Expo Web SPA mode detection criteria

Generated-by: aiautocommit
2026-06-17 21:47:43 +02:00
Michael BiancoandGitHub 2d4cbcacaa fix(node): increase npm fetch retries for build reliability (#598)
* feat(node): increase npm fetch retries for reliability

- Add NPM_CONFIG_FETCH_RETRIES=5 to environment variables to improve resilience against transient network failures during dependency installation.
- Update node documentation to reflect the new default configuration.

Generated-by: aiautocommit

* test: update snapshot
2026-06-17 19:55:57 +02:00
Michael BiancoandGitHub 58da3e15a3 feat(node): include corepack shims in runtime image for Node 25+ (#568)
* test(node): add node-pnpm-corepack-runtime example

- Introduce a new example project demonstrating Node.js 25+ integration with Corepack and pnpm.
- Includes a test specification to verify runtime version and execution flow.

Generated-by: aiautocommit

* docs(node): document node 25 corepack behaviors and constraints

- Explain the shift in corepack availability and requirement in Node 25+.
- Detail the directory structure for shims and the impact on the build process.
- Update maintenance documentation to include pnpm lockfile version mapping.

Generated-by: aiautocommit

* feat(node): ensure corepack binaries are available in runtime

* Include /mise/installs and /mise/shims in buildIncludeDirs when using corepack.
* This ensures that binaries like pnpm are correctly captured in the final image despite runtime mutations performed by corepack.

Generated-by: aiautocommit

* chore(test): update expectations for Node 25 and pnpm 11 in runtime test

Generated-by: aiautocommit

* feat(test): add mise paths to build plan snapshots

- Include `/mise/installs` and `/mise/shims` in the build plan snapshots to support mise-managed toolchains.
- Update pnpm-corepack-runtime snapshot to reflect current install and build command logic.

Generated-by: aiautocommit

* docs: add architectural documentation for input ordering and layering

Generated-by: aiautocommit

* refactor: rename example directory and bump node version

- Rename node-pnpm-corepack-runtime to pnpm-corepack-runtime-usage to better reflect its purpose.
- Update node engine version to v26 in example configuration.
- Update test expectation to match the new node version.

Generated-by: aiautocommit

* test: rename snapshot file for pnpm-corepack-runtime test

Generated-by: aiautocommit
2026-06-01 09:07:49 +02:00
Michael BiancoandGitHub f99b48a960 feat(node): support package.json5 manifests (#566)
* feat(node): add support for package.json5

- introduce findPackageManifest to prioritize package.json over package.json5
- update dependency detection and installation logic to include package.json5
- ensure local file detection and workspace parsing support the new manifest format

Generated-by: aiautocommit

* feat(example): add node-pnpm-json5 project

* Add a new example project to demonstrate native pnpm support for package.json5 manifests.
* Include a test configuration to verify environment detection and CLI version reporting.

Generated-by: aiautocommit

* chore: bump node and pnpm versions in json5 example

Generated-by: aiautocommit

* test: add build plan snapshot for pnpm-json5 project

Generated-by: aiautocommit

* test: update snapshots

* chore(examples): update engine versions and test expectations

Generated-by: aiautocommit

* chore(deps): update pnpm-lock.yaml

Generated-by: aiautocommit

* docs: update mise configuration documentation and add package resolution notes

* Update the `install_before` setting name to `minimum_release_age` to match current configuration.
* Add clarification on how Railpack handles semver constraints from manifest files by simplifying ranges to major versions.

Generated-by: aiautocommit

* feat(example): log pnpm version in pnpm workspaces example

- Add checks for pnpm version via npm_config_user_agent and the pnpm CLI.
- Update test expectations to verify pnpm version reporting.

Generated-by: aiautocommit

* feat(node): support more pnpm lockfile version mapping

- Add support for pnpm lockfile versions 6.1 and 9.0 to ensure correct tool version detection.
- Refactor the lockfile version check into a switch statement to improve readability and maintainability.
- Add logging for cases where the pnpm lockfile version cannot be identified.

Generated-by: aiautocommit

* test(node): add tests for pnpm version resolution logic

- Verify that pnpm versions are correctly derived from pnpm-lock.yaml versioning.
- Ensure proper precedence hierarchy between lockfile, engines, and packageManager fields.

Generated-by: aiautocommit

* docs: move mise installation instruction to workflow section

Generated-by: aiautocommit

* fix(node): ensure engines.pnpm overrides lockfile version inference

- Reprioritize pnpm version resolution to prefer `engines` over lockfile-based inference.
- Lockfile version parsing can be ambiguous across major versions, whereas `engines` provides an explicit developer intent.

Generated-by: aiautocommit
2026-05-30 13:12:36 +02:00
Michael BiancoandGitHub 76d9036a33 chore: update mise 2026.5.16 (#564)
* fix: update mise to 2026.5.11

* test: update snapshots

* chore: update mise upgrade task to run locally

Use the --local flag for the mise upgrade task to ensure consistency with local environment configurations during dependency updates.

Generated-by: aiautocommit

* chore: update go, mise, and bun packages

* chore: update go, mise, and bun packages

* chore: update mise to 2026.5.15

- Update build plan snapshots to use mise version 2026.5.15 across all test examples.

Generated-by: aiautocommit

* chore: update mise to 2026.5.15

Generated-by: aiautocommit

* chore: ignore .antigravitycli directory

Generated-by: aiautocommit

* chore: update mise 2026.5.11

Generated-by: aiautocommit

* chore: update better-sqlite3 dependency version

Generated-by: aiautocommit

* feat(test): add example for testing npm native dependencies with node-lts

Generated-by: aiautocommit

* fix: do not run rdoc when compiling ruby

this fixes a locale issue which causes the build to fail

* chore: update python version in examples to 3.13.3

no GH attestations for 3.13.1

Generated-by: aiautocommit

* chore: bump better-sqlite3 in examples

Generated-by: aiautocommit

* chore(node): update pnpm path to include bin directory

Generated-by: aiautocommit

* chore: update railpack-builder and runtime to mise 2026.5.16

Generated-by: aiautocommit

* chore: bump mise version to 2026.5.16

Generated-by: aiautocommit

* chore: update mise to 2026.5.16

- Update mise CLI command structure for improved task execution.
- Includes upstream bug fixes and stability improvements.

Generated-by: aiautocommit

* feat(node): update pnpm path layout for version 11+

- Adjust the pnpm binary path detection to account for changes in pnpm v11, which uses a /pnpm/bin directory layout.
- Introduce version checking to ensure backward compatibility for older pnpm versions.
- Add unit tests to verify path resolution for various version scenarios.

Generated-by: aiautocommit

* chore(node): update pnpm home paths and versioning logic

Generated-by: aiautocommit

* chore: update python-freethreaded example configuration

Generated-by: aiautocommit

* feat: add mise-builder-shell task

- Adds a new task to facilitate debugging by spawning a shell inside the published builder container image.

Generated-by: aiautocommit

* test(python): fix fasthtml example

I have no idea why this wasn't caught before...

* chore: update mise configuration to 2026.5.16

- Set MISE_MINIMUM_RELEASE_AGE to match the builder default.
- Correct the mise setting key from `install_before` to `minimum_release_age`.

Generated-by: aiautocommit

* chore: ensure uv is installed when using pipx.uvx in mise

Generated-by: aiautocommit

* chore: update mise 2026.5.16

- Sync environment variables from the Elixir provider to the mise installation step to ensure installation consistency.

Generated-by: aiautocommit

* feat(node): prioritize mise-managed package manager versions

- Allow mise to override inferred package manager versions for pnpm, bun, and yarn.
- Ensure consistent version resolution between Railpack and user-defined mise environment settings.
- Update node provider logic to correctly identify and use package manager tool names from mise.

Generated-by: aiautocommit

* chore: update test configuration for pnpm 11 compatibility

- Enable stderr allowance in tests to accommodate pnpm 11 command logging behavior.

Generated-by: aiautocommit

* chore: update example env configuration for mise compatibility

- Replace python3-venv with dnsutils for build-time apt testing.
- Add python to RAILPACK_PACKAGES to ensure pipx and other requirements function correctly within the mise environment.
- Update build and start commands to verify the availability of the new packages and validate expected scoping.

Generated-by: aiautocommit

* chore: update test snapshots for mise 2026.5.16

- Update snapshot files to reflect changes in build plan generation, including the addition of `uv` to Python environments, corrected pathing for pnpm, and updated environment variables for Elixir configurations.
- Reflect renaming of `install_before` to `minimum_release_age` in configuration settings.

Generated-by: aiautocommit
2026-05-29 14:40:00 +02:00
Michael BiancoandGitHub 72614625c1 feat: use mise.toml not env vars for configuration (#504)
* feat: use mise.toml instead of env vars for configuration

This allows users to easily override defaults

* docs: llm instructions updates

* docs: py example fix

* refactor: cleaner mise.toml output

* test: snapshot update

* chore(deps): update mise.lock

Generated-by: aiautocommit

* docs(mise): document rationale for AddMiseSetting dot-path expansion

- Clarify why dot-path expansion is used for TOML encoding to ensure proper section nesting.
- Explain the merging behavior to prevent independent callers from clobbering existing settings.

Generated-by: aiautocommit
2026-03-23 10:46:02 -06:00
Michael BiancoandGitHub 3355f7feb5 Revert "feat: automatically install packages required for playwright, and playwright browser (#348)" (#447)
This reverts commit c20ada430f.
2026-01-19 15:48:42 -07:00
Michael BiancoandGitHub 1972427448 test: add bun workspace test (#430)
* docs: add note about lockb

ref #386

* test: add bun workspace test

* fix: add bun runtime log when it is selected as the runtime

* test: adding bun with pnpm test

* test: remove stderrAllowed when we can write directly to stdout

* test: update test since we've stopped using console.log

* test: ensure pnpm is used on bun-pnpm example

* test: update snapshots
2026-01-17 12:08:44 -07:00
Michael BiancoandGitHub c20ada430f feat: automatically install packages required for playwright, and playwright browser (#348)
* feat: support playwright on node and python

* test: update snapshot

* fix: log when SPA framework can't be detected

* fix: install playwright headless on node provider

* build: remove node_modules and venv during cleanup process

* refactor(node): cleanup apt package mapping and playwright/puppeteer install

* test: snapshot update

* refactor: simplify playwright install flow
2026-01-17 11:30:14 -07:00
Michael BiancoandGitHub 5e3746a272 fix: handle whitespace in packageManager key (#432)
* docs: maint task list

* refactor: DRY up yarn detection logic

* fix: handle whitespace in packageManager key

this did not originate from a specific issue, but part of overall debugging of bun multi-workspace
2026-01-16 09:11:04 -07:00
Michael BiancoandGitHub 4514ee617c fix: use mise idiomatic version parsing for node (#431)
* test: make sure nvmrc and node-version are tested

* fix: remove custom parsers for nvmrc and node-version in favor of mise idiomatic parsing

* test: update snapshots

* test: removing snapshot that it doesn't look like we need anymore?

* test: update snapshot

* test: increase docker pull timeout
2026-01-16 08:55:11 -07:00
c8ba047c41 fix: use consistent node version resolution when using bun (#359)
* fix: use consistent node version resolution when bun is detected

When Bun is detected as the package manager but Node is still needed
for native module compilation (node-gyp), the Node version was always
set to "latest" instead of following the same version resolution logic
used when Node is the primary runtime.

This change extracts the Node version resolution logic into a reusable
helper function `applyNodeVersionResolution` that checks version sources
in this order:
1. NODE_VERSION environment variable
2. package.json > engines > node
3. .nvmrc file
4. .node-version file

The same logic is now consistently applied whether Node is required in
the final image or just needed during the build process for Bun projects.

Resolves the TODO comment at line 332 in the original code.

* chore: add tmp/ to .gitignore for temporary test files

* docs: document node version resolution consistency

Add comprehensive documentation explaining why consistent Node version
resolution is critical and how it works:

1. Added detailed godoc to applyNodeVersionResolution method explaining:
   - Why the method exists (to ensure consistency)
   - Why consistency matters (Bun projects, user expectations, dev/prod parity)
   - The priority order of version sources

2. Updated Node.js language documentation to:
   - Clarify the version resolution priority order
   - Add .node-version file to the list (was missing)
   - Emphasize that version resolution is consistent across all scenarios
   - Improve the Bun section to explain when Node is installed
   - Add explicit note about version specifications being respected

This documentation ensures users understand that their version
specifications (.nvmrc, package.json engines, etc.) are always
honored, regardless of whether Node is the primary runtime or just
a build-time dependency.

* Revert "chore: add tmp/ to .gitignore for temporary test files"

This reverts commit 45c5e51f57c070740f1afc0e9f391ddf6c3a6b53.

* docs: remove ai slop

* test: specify and assert against specific node version in bun project

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-01-15 07:21:42 -07:00
luo jiyinandGitHub df7bd5c4c3 fix: remove duplicate bun version file read (#412)
Signed-off-by: luojiyin <[email protected]>
2026-01-15 05:39:37 -07:00
Jake RunzerandGitHub e84b5c93f7 perf: optimize plan command for large monorepos (#382)
* perf: optimize plan command for large monorepos

- Add glob result caching to App struct to avoid repeated filesystem scans
- Fix usesLocalFile being called redundantly in a loop (was called per workspace package instead of once)

* perf: use single glob pattern with brace expansion

Replace 16 separate glob operations with a single brace-expanded
pattern for SupportingInstallFiles. This reduces filesystem traversals
from 16 to 1, improving plan command performance from ~12s to ~1.6s
on large monorepos.

Also removes unnecessary sync.RWMutex since parallelization was removed.
2025-12-01 13:46:11 -05:00
092b81dff2 refactor: replace HasMatch with HasFile for specific file paths (#347)
Replace fuzzy matching (HasMatch) with exact file path checks (HasFile)
in all providers where specific files are being checked. This prevents
false positives from glob pattern matching when checking for specific
file names.

Changes:
- PHP provider: index.php, composer.json, artisan
- Go provider: main.go, go.mod, go.work, go.sum, go.work.sum
- Ruby provider: Gemfile, rails, bin/rails, config/environment.rb,
  config.ru, Rakefile
- Node providers: package.json, lock files, config files for Vite,
  Astro, Angular, React Router
- Python providers: main.py, requirements.txt, pyproject.toml, Pipfile,
  poetry.lock, pdm.lock, uv.lock, manage.py
- Rust provider: Cargo.toml, src/main.rs, src/lib.rs
- Elixir provider: mix.exs
- Deno provider: deno.json, deno.jsonc, main.ts/js/mjs/mts
- Java providers: gradlew, mvnw, gradle/maven wrapper properties
- Staticfile provider: index.html, Staticfile config
- Core: template.go and mise_step_builder.go

Directory checks (e.g. src/bin, node_modules, public, script) continue
to use HasMatch as they need pattern/directory matching.

Co-authored-by: Hanzo Dev <[email protected]>
2025-11-23 07:49:16 -07:00
2797ef4423 fix: add libatomic1 for node v25, node-gyp when using pnpm (#364)
* fix: install node-gyp globally for pnpm to support native modules

pnpm (standalone) does not bundle node-gyp like npm does, causing
builds to fail when packages with native dependencies (e.g.,
better-sqlite3, bcrypt, canvas) attempt to compile from source.

This change adds `pnpm add -g node-gyp` before the dependency
installation step to ensure node-gyp is available in $PATH for
packages that need it.

* test: add examples for native dependencies with pnpm and npm

Add two new integration test examples to verify native module
compilation works correctly:

- node-pnpm-native-deps: Uses latest node + pnpm with better-sqlite3
- node-npm-native-deps: Uses latest node + npm with better-sqlite3

These examples verify that:
1. pnpm correctly installs and uses node-gyp for native modules
2. npm continues to work with native modules (baseline comparison)

Both examples use better-sqlite3 to test native module compilation.

* test: explicitly specify npm = latest in npm native deps example

* test: add lockfiles for native dependency examples

* docs: add mise installation and activation instructions to CLAUDE.md

* refactor: rename native deps examples to include 'latest' in name

* fix: set PNPM_HOME environment variable for node-gyp installation

pnpm requires PNPM_HOME to be set before installing global packages.
Without it, `pnpm add -g node-gyp` fails with:
"Unable to find the global bin directory"

Changes:
- Set PNPM_HOME=/pnpm in the install step for pnpm projects
- Add /pnpm to PATH so node-gyp binary is accessible
- Document the pnpm/node-gyp requirement in CLAUDE.md

This ensures packages with native dependencies can compile successfully
when using pnpm as the package manager.

* fix: pin pnpm to 10.22.0 due to asdf-pnpm latest version bug

* docs: simplify CLAUDE.md by removing pnpm section and condensing mise setup

* feat: add separate pnpm examples for mise and corepack installation

- Add node-latest-pnpm-mise-native-deps: Uses mise to install pnpm
- Modify node-latest-pnpm-native-deps: Uses corepack (packageManager field)
- Update provider logic to only install node-gyp when pnpm is via mise

When pnpm is installed via corepack, node-gyp is available from npm
(which comes with Node.js), so we don't need to install it separately.
Only mise-installed pnpm (standalone) requires explicit node-gyp installation.

* refactor: use existing usesCorepack() method instead of duplicating logic

Pass the corepack detection from NodeProvider down to PackageManager
methods to avoid duplicating the detection logic. This ensures we
consistently use the existing usesCorepack() method throughout the
codebase.

* fix: add libatomic1 apt package for Node.js v25+ support

Node.js v25+ requires libatomic.so.1 shared library which is provided
by the libatomic1 apt package. This package is now installed whenever
the Node provider is used to ensure compatibility with Node v25 and
future versions.

Error without this package:
node: error while loading shared libraries: libatomic.so.1: cannot open
shared object file: No such file or directory

* fix: add libatomic1 to the deployment layer

* test: remove new failing pnpm example

* test: snapshot update

* test: latest better-sqlite3

---------

Co-authored-by: Hanzo Dev <[email protected]>
2025-11-18 12:10:28 -07:00
Michael BiancoandGitHub 269d29f774 fix: allow node_modules removal in build phase (#259)
* test: test install in build phase

* fix: detect node_modules removal and avoid caching node_modules/.cache

* test: add new snapshot

* build: adding go debugging tool and helper task

* refactor: node_modules detection is working

* test: test install in build phase

* refactor: pull plan cleansing into a separate file

* refactor: ai cleanup

* refactor: move cleanse to the provider level, stubs for all providers

* refactor: move existing node cleanse logic to a provider-specific implementation

* test: snapshot update

* docs: why we need node cleanse operation

* docs: note on corepack

* docs: on cache handling of node_modules
2025-11-18 10:52:48 -07:00
e96eefaf50 docs: clarify .bun-version as community convention (#355)
Add comments noting that .bun-version is a community convention for
specifying the Bun version and is not officially supported by Bun
itself, though it is recognized by version managers like mise.

Co-authored-by: Hanzo Dev <[email protected]>
2025-11-15 03:50:09 -07:00
2543f736d6 feat: use mise node version when installing node alongside bun (#341)
* Use mise to install Node.js instead of apt packages

When Bun is installed but Node.js is not required in the final image,
the provider now uses mise to install Node.js instead of installing
it via apt packages. This provides better version management and
consistency with the rest of the mise-based tooling.

Key changes:
- Install Node.js via mise with default version "latest"
- Check for version specifications in NODE_VERSION env var, .nvmrc,
  and .node-version files
- Support mise.toml and .tool-versions configuration files
- Remove apt package installation of nodejs in this scenario

This ensures Node.js is available for build steps (e.g., node-gyp for
native modules) while respecting user-specified versions and providing
consistent version management across all tools.

* Simplify Node.js version detection for Bun projects

When Node.js needs to be installed for Bun projects (for build tools
like node-gyp), keep the version detection simple:

- Default to "latest"
- Let UseMiseVersions handle mise.toml and .tool-versions

Added a TODO to implement full version detection logic in the future
(NODE_VERSION env var, package.json engines, .nvmrc, .node-version).

* Only check mise versions for packages that are installed

Instead of unconditionally checking mise versions for both node and bun,
only add packages to the UseMiseVersions check if they were actually
added to the mise step. This is more efficient and makes the intent
clearer.

* Track mise packages as they're added instead of re-checking conditions

Build a list of mise packages as they're added to miseStep, then use
that list for UseMiseVersions. This avoids duplicating the conditional
logic and makes it clear which packages we're checking versions for.

* test: snapshot update

---------

Co-authored-by: Hanzo Dev <[email protected]>
2025-11-12 16:46:34 -07:00
Michael BiancoandGitHub 13873cbc0e docs: can't eliminate sh usage for apt (#342) 2025-11-12 12:49:53 -07:00
Michael BiancoandGitHub 0bc3bce09a feat: support package.json engines for package manager and node versions (#251)
* refactor(node): check engines after file-based detection for package manager

Engines are now considered only if file-based detection keeps default npm,
so lockfiles/configs take precedence over engines as a hint.

* feat: extract yarn version from package.json > engines > yarn

* test: add bun version to bun test assertion

* test: update snapshots

* test: add engines version extraction test

* test: assert against two distinct versions

we couldn't do this before the recent testing harness improvement

* test: snapshot update

* fix: properly handle corepack version definitions

* docs: update docs on node provider detection

* docs: add docs command to claude
2025-10-22 13:12:55 -06:00
24f0a773d8 feat: dockerignore support (#263)
* test: dockerignore test project

* docs: claude.md update

* feat: parse dockerignore files

* fixup! feat: parse dockerignore files

* feat: use revised local layer

* feat: parse dockerfiles and pass includes/excludes to the local layer

* test: snapshot

* refactor: ai cleanup

* test: dockerignore parsing tests

* refactor: remove obvious comment

* test: dockerignore failure tests

* Apply suggestion from @coffee-cup

Co-authored-by: Jake Runzer <[email protected]>

* Apply suggestion from @coffee-cup

Co-authored-by: Jake Runzer <[email protected]>

* docs: always use App for fs ops

* refactor: pass App to dockerignore context instead of a path to the repo

* test: pass app to dockerignore

---------

Co-authored-by: Jake Runzer <[email protected]>
2025-09-24 16:11:40 -06:00
99f4aee94e Update node examples (#266)
* update node-astro example

* use node if using vite

* update vite and node prisma examples

* update node vite react

* update snapshots

---------

Co-authored-by: Jake Runzer <[email protected]>
2025-09-16 16:09:21 -04:00
Jake RunzerandGitHub e9e075e955 feat: add support for .bun-version file (#258)
Railpack now reads .bun-version files to match mise's behavior, preventing version mismatch errors when both tools are used together.
2025-09-10 20:15:54 -04:00
Michael BiancoandGitHub 5af5eb5161 refactor: use consistent local layers entrypoint (#241)
* fix: show-plan not showing json output

regression from $schema addition

* refactor: all providers using a consistent local layer entrypoint

* refactor: add local filesystem through a consistent entrypoint

* fix: improved error message on invalid firstInput

* test: remove path argument from NewLocalLayer test

* test: failing workspace example with uv

* test: passing workspace example

* feat: detect uv workspaces

* test: add packaged uv example

* test: snapshot update
2025-09-03 10:39:48 -06:00
Michael BiancoandGitHub 176945e95b feat: support react router build cache (#244)
* feat: add .react-router to cache path

* test: snapshot update
2025-09-02 20:09:37 -06:00
Michael BiancoandGitHub c5134e99a4 fix: support node projects without dependencies (#242)
* fix: support node projects without any dependencies

* test: node project without any deps

* test: add snapshots
2025-09-02 16:23:15 -06:00
Michael BiancoandGitHub 5ab99ef1f0 fix: stop skipping gpg verification (#220)
this is less secure and with the newer yarn backends this should not be necessary
2025-08-19 21:37:17 -06:00
Michael BiancoandGitHub e642b9010c react router v7 (#221)
* feat: react router support in node provider

* test: SPA tests for react router

* test: adding react router spa example

* test: added scripts to generate RR from the latest templates

* feat: react router ssr

* test: basic build tests for react router SPA

* test: react router snapshots

* add shebang, rerun build
2025-08-18 14:11:42 -04:00
Jake RunzerandGitHub cca22dd633 Move MISE_NODE_VERIFY variable to mise_step_builder.go (#209)
This centralizes the MISE_NODE_VERIFY=false configuration in the mise
step builder where other mise environment variables are set, rather
than having it in the node provider.
2025-08-04 10:53:32 -04:00
Jake RunzerandGitHub 4645c420a6 Disable mise Node.js asset verification (#208)
* Disable mise Node.js asset verification

Recently released Node.js versions don't have a public key to verify against,
causing builds to fail. This sets MISE_NODE_VERIFY=false to skip verification.

Fixes #207

* Update test snapshots for MISE_NODE_VERIFY environment variable

* ignore node verify in correct place

* update snapshots
2025-08-01 04:32:03 -04:00
Jake RunzerandGitHub 72869fabce warn when node_modules is found in project root (#196)
* warn when node_modules is found in project root

* update snapshots
2025-07-07 19:23:25 -04:00
Jake RunzerandGitHub 5673829f92 Fix bun detection to avoid false positives (#188)
* multiple providers

* Fix bun detection to avoid false positives

- Use regex to match bun/bunx as commands, not substrings
- Extract detection logic into packageJsonRequiresBun function
- Add comprehensive tests

* revert multiple providers

* Extract bunCommandRegex to eliminate duplication

* Add comment to requiresBun function
2025-06-25 14:07:55 -04:00
Jake RunzerandGitHub 5fde13c924 Improve Yarn package manager detection and support Yarn Berry (#183)
* Add GetPackageManagerInfo method to PackageJson

Move package manager parsing logic to the PackageJson struct where it
belongs, improving code organization and separation of concerns.

* Rename PackageManagerYarn2 to PackageManagerYarnBerry and refactor parsing

- Rename constant for better clarity
- Remove redundant parsePackageManagerField method
- Use PackageJson.GetPackageManagerInfo() consistently
- Remove unnecessary version validation checks
- Move test to appropriate file

* Prioritize packageManager field for package manager detection

- Check packageManager field first before falling back to file-based detection
- Detect Yarn Berry (2+) based on major version from packageManager field
- Improve logging to show specific package manager version when available

* Update node-yarn-4 example output to reflect Yarn 4

Change output message from "Yarn 2" to "Yarn 4" to match the actual
package manager version being used.

* Add packageManager field to root package.json

Specify [email protected] as the package manager for this project.

* add yarn 3 example

* update snapshots

* remove package manager test

* update yarn snapshots and don't install corepack yarn with mise
2025-06-24 16:33:49 -04:00
Jake RunzerandGitHub c0b9a7342e Skip pnpm mise install if using corepack (#176)
* install pnpm with corepack only

* update snapshot
2025-06-13 19:30:11 -04:00