mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
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
This commit is contained in:
@@ -69,6 +69,10 @@
|
||||
{
|
||||
"path": "/mise/shims"
|
||||
},
|
||||
{
|
||||
"dest": ".bun-version",
|
||||
"src": ".bun-version"
|
||||
},
|
||||
{
|
||||
"customName": "create mise config",
|
||||
"name": "generated-mise-toml",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"steps": [
|
||||
{
|
||||
"assets": {
|
||||
"generated-mise-toml": "[tools]\n go = \"1.23.5\"\n node = \"20.18.2\"\n python = \"3.13.1\"\n\n[settings]\n idiomatic_version_file_enable_tools = [\"python\", \"node\", \"ruby\", \"elixir\", \"go\", \"java\", \"yarn\"]\n minimum_release_age = \"14d\"\n paranoid = true\n trusted_config_paths = [\"/app\"]\n [settings.node]\n verify = false\n"
|
||||
"generated-mise-toml": "[tools]\n go = \"1.23.5\"\n node = \"20.18.2\"\n python = \"3.13.1\"\n\n[settings]\n idiomatic_version_file_enable_tools = [\"python\", \"node\", \"ruby\", \"elixir\", \"go\", \"java\", \"yarn\", \"bun\"]\n minimum_release_age = \"14d\"\n paranoid = true\n trusted_config_paths = [\"/app\"]\n [settings.node]\n verify = false\n"
|
||||
},
|
||||
"commands": [
|
||||
{
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import (
|
||||
const (
|
||||
InstallDir = "/tmp/railpack/mise"
|
||||
TestInstallDir = "/tmp/railpack/mise-test"
|
||||
IdiomaticVersionFileTools = "python,node,ruby,elixir,go,java,yarn"
|
||||
IdiomaticVersionFileTools = "python,node,ruby,elixir,go,java,yarn,bun"
|
||||
// applied only to the first GetLatestVersion check to skip very recent releases
|
||||
MinimumReleaseAge = "14d"
|
||||
)
|
||||
|
||||
@@ -352,13 +352,6 @@ func (p *NodeProvider) InstallMisePackages(ctx *generate.GenerateContext, miseSt
|
||||
miseStep.Version(bun, envVersion, varName)
|
||||
}
|
||||
|
||||
// TODO mise supports bun-version now, so we should be able to remove this
|
||||
// .bun-version is a community convention for specifying the Bun version.
|
||||
// It is not officially supported by Bun itself, but is recognized by version managers like mise.
|
||||
if bunVersionFile, err := ctx.App.ReadFile(".bun-version"); err == nil {
|
||||
miseStep.Version(bun, string(bunVersionFile), ".bun-version")
|
||||
}
|
||||
|
||||
// Bun projects without declared dependencies don't need node-gyp during install, so we can omit Node entirely.
|
||||
if !requiresNode && p.needsNodeForBunInstall() {
|
||||
requiresNode = true
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1.3.14
|
||||
@@ -1,5 +1,8 @@
|
||||
[
|
||||
{
|
||||
"expectedOutput": "pkg-b depends on: pkg-a"
|
||||
"expectedOutput": [
|
||||
"hello from Bun 1.3.14",
|
||||
"pkg-b depends on: pkg-a"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user