Commit Graph

35 Commits

Author SHA1 Message Date
Pieter Willekens 141e136869 feat(manager/mise): support gitlab backend (#44116)
* feat(manager/mise): support gitlab backend

Maps the mise `gitlab` backend (e.g. `gitlab:gitlab-org/cli`) to the gitlab-releases datasource, mirroring the github backend including version_prefix support.

* refactor(manager/mise): use optional instead of Nullish for tool options

TOML has no null type, so MiseToolOptions values are only ever a string or absent. .optional() models that exactly; Nullish only adds value for sources that can emit explicit null.

* fix(manager/mise): use RegExp.escape in gitlab backend

Main switched `createGithubToolConfig` from the `escapeRegExp` util to
`RegExp.escape` and dropped the import, which left the newly added
`createGitlabToolConfig` referencing an undefined symbol after the merge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Michael Kriese <michael.kriese@mend.io>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 10:04:37 +00:00
github-actions[bot] 1b53e4f712 feat(data): automatic update of static data (#45728)
* feat(data): automatic update of static data

* test(manager/mise): drop stale cargo-backend registry test

The mise registry now lists a github mirror for magika alongside its
cargo backend, so a bare `magika` entry resolves via the
github-prioritised branch (already covered by the
'prioritising the github backend over others' test) instead of cargo.
No tool in the current registry data reaches the cargo case through
the unprefixed lookup path anymore, and the cargo backend itself
stays covered by the explicit `cargo:` prefix test.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2026-09-07 10:35:31 +00:00
Sebastian Poxhofer 05e1271376 test: use expect().resolves instead of awaiting inside expect (#45672)
Enables the vitest/prefer-expect-resolves oxlint rule and applies its
autofix across the spec suite.
2026-09-04 10:40:46 +00:00
Sebastian Poxhofer 41da033756 refactor: remove escapeRegExp and replace with RegExp.escape (#45322) 2026-08-18 06:24:47 +00:00
Sebastian Poxhofer a2d1b8cf0a fix(manager/asdf,mise,proto): use rust-version datasource for rust (#45143)
The `rust` tool was resolved via the `github-tags` datasource on
`rust-lang/rust` with the default (semver) versioning. That meant the
release channel values rustup actually accepts were not understood.

Switch all three managers to the `rust-version` datasource, which
declares `rust-release-channel` as its `defaultVersioning`, matching the
`rust-toolchain` manager and `lib/util/exec/containerbase.ts`.

`packageName` becomes `rust` rather than the `rust-lang/rust` owner/repo
slug, which is meaningless for this datasource. It is set rather than
omitted because mise would otherwise fall back to the backend-prefixed
depName, yielding `core:rust` / `asdf:rust` as the package name.

No explicit `versioning` is set: the datasource default already applies,
and the convention in these files is to set `versioning` only to
override a datasource default.

Behaviour change: `nightly-<date>` pins were previously skipped as
`invalid-value` and now update. `stable`, `beta` and `nightly` are now
recognised as ranges rather than flagged invalid, but still only resolve
to a concrete version under `rangeStrategy: pin`.
2026-08-10 07:54:37 +00:00
cffnpwr 97fcec199b fix(manager/mise): use semver versioning for cargo backend crates (#44966) 2026-07-30 12:22:52 +00:00
Felipe Santos 0ad45c5484 feat(managers/mise): set depType for tools and task tools (#44868)
* feat(manager/mise): set depType for tools and task tools

Allow packageRules to match mise deps via matchDepTypes:
- tools for top-level [tools]
- task-tools for tasks.*.tools

* test(manager/mise): override RUST_197 depType in task extract cases

* Make the task tool dynamic

* Restore formatting

* Restore another formatting
2026-07-27 16:33:42 +00:00
Jacob Asper da3e77cb9d feat(mise): extract task tools (#43721)
* feat(mise): extract task tools

* docs: update mise documentation to include task scoped tools
2026-06-02 13:34:54 +00:00
Sebastian Poxhofer d004b52a91 test: add coverage for lines detected by pnpm check (#43589)
tests: add coverage for lines detected by pnpm check
2026-05-26 07:53:07 +00:00
Gregor Zeitlinger a2b96944f9 feat(mise): add lock file support (#42591)
* feat(mise): add lock file support

- Add lockfile.ts with getLockFileName() for deriving lock file paths
- Add artifacts.ts with updateArtifacts() and updateLockedDependency()
- Add MiseLockFile Zod schema for parsing lock files
- Update extract.ts to be async and extract lockedVersion from lock files
- Export supportsLockFileMaintenance, lockFileNames, updateArtifacts, updateLockedDependency

* refactor(mise): remove redundant comments

Remove comments that simply restate what the code already clearly
communicates. Keep valuable comments that explain non-obvious behavior
(e.g., why temporary errors are rethrown) and move helpful examples
into JSDoc comments.

* fix(mise): improve lock file version lookup and add tests

- Fix lock file key lookup for non-registry tools (aqua:, ubi:, etc.)
  Registry tools use short names (node), non-registry use full names
  (aqua:cli/cli). New getLockedVersion() tries both patterns.

- Add injection prevention test for shell quoting
- Add update-failed test for error handling
- Add comprehensive tests for getLockedVersion()
- Add null check for depName in updateLockedDependency
- Add JSDoc to updateArtifacts and extractPackageFile
- Add lock file support documentation to README
- Remove code duplication by consolidating into lockfile.ts

* fix(mise): pass --local flag and MISE_ENV for env/local config files

When updating mise.local.toml, `mise lock` updates mise.lock, not
mise.local.lock. Add --local flag to target the correct lock file.

For env-specific configs (mise.test.toml), set MISE_ENV=test so mise
reads and locks the correct configuration.

Extracted getConfigType() from getLockFileName() to share the parsing
logic between lock file name derivation and command flag generation.

Builds on #42099 by altendky.

* test(mise): cover tool absent from lock file

* refactor(mise): remove dead branches in extractPackageFile

tools is required by MiseFile schema so if(tools) is always true.
depName is always set by createDependency so if(dep.depName) is always true.

Add test for tool absent from lock file to cover the lockedVersion
assignment branch.

* fix(mise): address review feedback on lock file support

* fix(mise): remove unsupported tool constraint

* fix(mise): add containerbase tool definition

* fix(mise): add typed exec constraint support

* fix(config): restore requireConfig typing

* test(mise): await registry extraction cases

* Update lib/modules/manager/mise/artifacts.ts

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* fix: revert unrelated types cleanup

* fix: drop missing VersioningName import

* fix(mise): use npm versioning string after import removal

* test(mise): set binarySource=global in artifacts spec

GlobalConfig.get now returns defaults; without explicit binarySource the
test fell into containerbase dynamic install and tried to resolve the
mise version via the github-releases datasource, causing missing HTTP
mock errors. Force binarySource=global so the spec only exercises the
mocked exec path.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2026-05-19 15:23:23 +00:00
Jamie Tanna 2bd478fff4 feat(mise): automagically support all tools through Mise Registry (#42783)
* feat(mise): automagically support all tools through Mise Registry

As noted in #42250, we should try and auto-support tools from Mise where
possible.

Similar to other areas of the codebase, we should use the "static data"
pattern, and periodically sync the `mise registry --json` output with
`lib/data/mise-registry.json`, and then auto-detect the tools that we
support through the known backends the tools support.

This takes lower precedence than existing in-code tool definitions, so
we can still provide an "override" if we can support lookups or version
extraction more appropriately.

Because we now have many more tools we (mostly) support out-of-the-box,
we need to provide an improved documentation page, and:

- only link to tools we have an explicit tools URL for
- note where a backend may not be supported

To automate the updating of this data, we:

- make sure we have `mise` in GitHub Actions, before we run
- don't pin the `mise` version to make sure that we're always seeing the
  latest supported tools
- make sure the commits generated are now `feat(...)`, as they introduce
  functionality changes (in the case new tool(s) are supported)

This improves support from ~170 tool short names to just over 1000.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor: use Typescript

As we can now, we should.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor(tools/static-data): use Zod schemas for parsing

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor(mise): use Zod for types

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* chore(mise): prefer the GitHub backend over other sources

As we generally prefer it as a project, we should automagically use that
when looking at a mise registry entry.

With help from GPT-4.1 to write the `sortBackend` function.

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>

* test: ignore else coverage

* docs(mise): preference of `github` backend

* docs(mise): auto-link autogenerated tools

* perf(mise): sort registry only once

* refactor(mise): transform when parsing

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>

* refactor: use `execa`

* perf(mise): read the Mise registry once

* perf(mise): pre-transform

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2026-04-28 08:56:09 +00:00
Michael Miller c1e12558b5 feat(manager/mise): add support for clang-format (#42912) 2026-04-27 14:09:05 +00:00
Michael Miller 203c5fec0b feat(manager/mise): add support for openfga (#42611)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 09:14:09 +00:00
RahulGautamSingh c5e1b14104 feat(manager/mise): add npm upgrade tooling (#42235)
add npm to mise manager
2026-03-30 06:41:44 +00:00
Michael Miller 18c118cf26 feat(manager/mise): add support for tart (#42094)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:38:17 +00:00
Ville Skyttä 20f12d0820 feat(mise): support rumdl short name (#42095) 2026-03-24 07:52:27 +00:00
Michael Miller d2970325e9 feat(manager/mise): add support for packer (#42093)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 07:51:51 +00:00
Justin Rabiller 5429e7c6f9 fix(mise): use semver-partial versioning for short java versions (#41179)
* fix: preserve vendor prefixes in mise manager version updates

* test: cover kafka fallback path for 100% coverage

* test(mise): add failing tests for short java version versioning

Bare major versions like java = "21" or temurin-21 should use
semver-partial versioning to prevent invalid update proposals.
Full versions like "21.0.2" should keep the default versioning.

* fix(mise): use semver-partial versioning for short java versions

Short java versions (bare major like "21" or major.minor like "21.0")
now use semver-partial versioning, which treats them as ranges and
preserves precision in updates (e.g. "21" → "22" on major bump).

This replaces the replaceString/autoReplaceStringTemplate approach
with a versioning-based fix as suggested in discussion #41159.
Full versions (e.g. "21.0.2") keep the default semver-coerced
versioning unchanged.

* test(mise): remove unrelated kafka test

* refactor(mise): inline regex in shortJavaVersioning

* refactor(mise): return empty object instead of undefined

* refactor: use it.each to reduce duplication

* refactor: hardcode semver-partial in it.each test
2026-03-12 08:27:53 +00:00
Michael Miller f2dcc1a388 feat(manager/mise): add support for gh (#41336)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:07:05 +00:00
Gregory Oschwald 4b56523d14 feat(mise): add support for github backend (#40706)
* feat(mise): add support for github backend

* test(mise): remove redundant github backend test

* refactor(mise): flatten nested conditionals in github backend

* refactor(mise): only set extractVersion for custom version_prefix

* refactor(mise): use escapeRegExp and simplify extractVersion spread
2026-02-13 21:58:21 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +00:00
Jordan B 8dc1133ebe fix(mise)!: rename packageName from nodejs to node (#40466)
This aligns with other package managers.
2026-01-29 11:47:11 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
Michael Miller d366df5ac2 feat(manager/mise): add support for caddy (#40276)
feat(manager/mise): add caddy
2026-01-21 08:21:11 +00:00
Christian Katzmann cf3fb29e2c feat(manager/mise): add swiftformat and swiftlint (#40178) 2026-01-03 21:15:08 +00:00
Niko Böckerman e3e7327898 feat(manager/mise): add conan to short tool names (#40246)
* feat(manager): add conan to mise short tool names

* Apply changes requested in review
2026-01-02 12:35:31 +00:00
Michael Miller 86435837f3 fix(manager/mise): fix jq release format (#38248)
feat(manager/mise): fix jq
2025-09-27 07:00:05 +00:00
Tom Pansino 34b395d412 feat(manager): add several mise short tool names (#36970) 2025-07-15 06:16:52 +00:00
Ville Skyttä 95dac96f0d feat(manager/mise): committed, hk, lefthook and ruff shortnames (#36252) 2025-06-06 12:52:30 +00:00
Risu 147fcded9c feat(manager): support mise backends (#33113)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-05-25 06:20:46 +00:00
Michael Miller f187692ab8 feat(manager/mise): support astro, ccache and redis (#35989) 2025-05-17 06:51:06 +00:00
Michael Miller 866cdb391b feat(manager/mise): support assorted mise tools (#35650) 2025-05-08 08:01:07 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Michael Kriese 997c23502e test: migrate to vitest (#34475)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-02-26 09:35:54 +00:00
James Brookes 4a304b8e6d feat(manager): add mise package manager (#29950) 2024-07-08 14:27:31 +00:00