10 Commits
Author SHA1 Message Date
Michael BiancoandGitHub fb756462a3 docs: install bin builder step (#468)
* fix: remove custom bin install step builder

* test: snapshot update

* Revert "fix: remove custom bin install step builder"

This reverts commit eee63373c86360e05ae9b0dc2bc302424bd072fd.

* Revert "test: snapshot update"

This reverts commit fa506b4e959265ed90d8720d5079c768eb19a5ef.

* docs: explain why the bin builder exists

* build: ensure mise versions go first in dev

* test: bad `env` key in node-bun test

* test: fail loudly if unexpected keys are found in test.json

* build: task to build an example project

* test: snapshot update
2026-03-08 06:44:19 -06: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
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
652698eecb fix: assert empty stderr, trust mise in app dir (#352)
* test: assert empty stderr on successful integration tests

Add assertion to check that stderr is empty when integration tests pass
successfully. This helps catch unexpected warnings or error messages that
might indicate issues even when the test technically succeeds.

The check is added to runContainerWithTimeout which runs containers that
output expected strings. HTTP check tests are not affected since they
already validate correctness via HTTP requests and separating stderr
from detached containers is more complex.

* fix: add private field to example package.json files

Add "private": true to all example package.json files to suppress
package manager warnings about missing license fields. These are
test/example projects not meant to be published to npm registries.

This prevents stderr warnings like "warning package.json: No license
field" which were causing the new stderr assertion in integration tests
to fail even though the applications were running correctly.

Affected examples:
- All node-yarn-* examples
- node-npm, node-pnpm, node-bun examples
- config-file, mise-config examples
- Other node-based examples

* fix: trust mise config files in app directory

Add MISE_TRUSTED_CONFIG_PATHS=/app to automatically trust mise
configuration files in the application directory during builds.

This prevents trust warnings when MISE_PARANOID mode is enabled:
  "Trust them with \`mise trust\`. See https://mise.jdx.dev/cli/trust.html"

Since the app directory (/app) is the user's code being built,
it's safe to trust mise configuration files located there.

* test: add stderrAllowed option to skip stderr assertion

Add optional "stderrAllowed" field to test.json that defaults to false.
When set to true, skips the stderr empty assertion for tests where
stderr output is expected and normal.

This is useful for applications that log to stderr by default, such as
gunicorn which outputs info logs to stderr:
  [2025-11-18 18:13:50 +0000] [1] [INFO] Starting gunicorn 23.0.0
  [2025-11-18 18:13:50 +0000] [1] [INFO] Listening at: http://0.0.0.0:3333 (1)

Updated python-uv test to set stderrAllowed: true since it uses
gunicorn which logs to stderr.

* test: allow stderr for node-latest-npm-native-deps temporarily

Add stderrAllowed: true to node-latest-npm-native-deps test to handle
the NPM_CONFIG_PRODUCTION deprecation warning:
  "npm warn config production Use \`--omit=dev\` instead"

This is temporary and should be removed once NPM_CONFIG_PRODUCTION is
removed from core/providers/node/node.go:241 in a separate PR.

* test: allow stderr for npm production warning in additional tests

Add stderrAllowed: true to node-prisma, node-remix, and
node-npm-install-in-build test cases to temporarily allow the
npm warning about NPM_CONFIG_PRODUCTION being deprecated.

This is a temporary workaround until NPM_CONFIG_PRODUCTION is
removed from node.go in a separate PR.

* test: allow stderr for Bun console output

Bun routes console.log/console.error to stderr by default in
script mode. Add stderrAllowed: true to all Bun example tests
to allow this expected behavior.

* test: allow stderr for TanStack Start output

TanStack Start outputs to stderr during server startup.
Add stderrAllowed: true to allow this expected behavior.

* test: add approved builds to fix better-sqlite3 error

* test: snapshot update

* test: fix build warning, allow stderr for --omit warning for now

* docs: note that test.json are jsonc for AI

* test: snapshot update

* test: allow stderr for omit usage

---------

Co-authored-by: Hanzo Dev <[email protected]>
2025-11-20 15:33:10 -07: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 Runzer 5a45c4a1e0 fix snapshot tests 2025-03-04 11:57:47 -05:00
Jake Runzer 0222e25163 test and check 2025-02-23 22:05:25 -05:00
Jake Runzer e83839c47a docker run tests 2025-02-05 17:55:33 -08:00
Jake Runzer 9c7408065d node start commands 2025-01-22 21:50:48 -05:00
Jake Runzer 73f03de56f init 2025-01-14 18:49:46 -05:00