Commit Graph

30 Commits

Author SHA1 Message Date
y.takahashi ff0e5eed24 feat(npm): support devEngines.runtime and devEngines.packageManager (#43369)
* feat(npm): extract devEngines.runtime and devEngines.packageManager

Adds extraction for the npm devEngines field
(https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines)
covering both single-object and array forms. Uses dot-notated depTypes
("devEngines.runtime", "devEngines.packageManager") consistent with
"pnpm.overrides", and reuses the existing engines/packageManager
datasource resolution. Items without a version are skipped.

Refs #38067.

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

* feat(npm): update devEngines.runtime and devEngines.packageManager versions

Adds an update path for the new devEngines depTypes. Handles both the
single-object form and the array form (the array element is identified
via managerData.devEnginesIndex set at extraction time). Uses the same
anchored search-and-verify approach as the existing replaceAsString
(indexOf("devEngines") + dequal check), so unrelated occurrences of the
same version string elsewhere in the file are not touched.

Refs #38067.

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

* fix(npm): skip lockedVersion and apply @yarnpkg/cli for devEngines deps

Extends the locked-versions post-extract step to cover the new
devEngines depTypes:

- devEngines.runtime and devEngines.packageManager are added to the
  npm-lock skip list (mirrors the engines/packageManager/volta handling
  added in #38598)
- devEngines.packageManager with depName "yarn" gets the @yarnpkg/cli
  packageName fallback when the project is on Yarn 2+, matching the
  existing behavior for engines / packageManager

Refs #38067.

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

* fix(npm): harden devEngines handling against malformed input

- Register devEngines.runtime and devEngines.packageManager in
  knownDepTypes (matches the existing pnpm.overrides pattern)
- Guard against null/non-object array elements in devEngines.* during
  extraction so malformed JSON does not throw
- Use JSON.stringify when interpolating versions into the source search
  string, so any future versions containing JSON-escaped characters are
  matched correctly
- Add an extraction test for a mixed array containing a null item, a
  valid entry, and a version-less entry

Refs #38067.

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

* fix(npm): set hasPackageManager when devEngines.packageManager is an array

The previous hasPackageManager check used isNonEmptyObject which returns
false for arrays. Now that the array form of devEngines.packageManager
is actually extractable and updatable, the corepack post-update step
needs to be triggered for those users as well. Introduces a shared
hasDevEnginesPackageManager helper and uses it from both
extractPackageJson and extractPackageFile.

Refs #38067.

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

* fix(npm): require at least one non-empty array item for hasPackageManager

Align the array branch of hasDevEnginesPackageManager with the
single-object branch by requiring at least one non-empty object item.
Previously, an array containing only null/empty entries would set
hasPackageManager to true and trigger corepack post-update even though
no usable item exists. Add coverage for the empty-array and
only-invalid-items cases.

Refs #38067.

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

* test(npm): document hasPackageManager semantics for stray-key array items

Make the chosen semantic explicit: an array element with arbitrary keys
but no `name` (e.g. `[{ foo: 'bar' }]`) still sets hasPackageManager to
true, mirroring the pre-existing single-object behavior. The extract
step independently filters out items lacking `name`/`version`.

Refs #38067.

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

* test(npm): cover dequal rejection in devEngines array update

Adds a test where two devEngines.packageManager array items share the
same version string. The first source-level match belongs to the wrong
index, so the dequal verification rejects it and the loop continues to
the correct occurrence. This exercises the false branch of the dequal
check in updateDevEnginesDependency.

Refs #38067.

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

* docs(node): list devEngines.runtime as a supported field for Node.js

The npm manager now updates the version inside devEngines.runtime in
package.json, so include it in the file-support list alongside engines
and volta.

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

* Apply the comment changes suggested in the code review

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

* test(npm): cover devEngines update error path instead of ignoring it

Remove the v8 ignore on the updateDevEnginesDependency catch and add a
test that reaches it with invalid JSON, matching how the main
updateDependency catch is covered.

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

* fix(npm): drop unnecessary spread fallback in devEngines managerData

Object spread ignores null/undefined, so the `?? {}` fallback is
redundant. Removing it satisfies the oxlint no-unnecessary-spread-fallback
rule that now runs in CI.

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

* refactor(npm): type devEnginesIndex on NpmManagerData

Declare devEnginesIndex on NpmManagerData so the value no longer needs a
`as number | undefined` cast when reading it back during update.

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

* docs(node): document package manager version fields

List packageManager and devEngines.packageManager separately from the Node.js runtime file support entries.

Co-authored-by: Codex <noreply@openai.com>

* feat(npm): support Bun and Deno devEngines runtimes

* fix(npm): preserve Corepack hashes in devEngines

* test(npm): use partial helper for devEngines fixture

Co-authored-by: Codex <noreply@openai.com>

* fix(npm): warn on invalid devEngines update state

Co-authored-by: Codex <noreply@openai.com>

* fix(npm): include devEngines in extracted tool constraints

Co-authored-by: Codex <noreply@openai.com>

* fix(npm): prefer devEngines over volta for package manager versions

Co-authored-by: Codex <noreply@openai.com>

* fix(npm): update Yarn binaries for devEngines package manager upgrades

Co-authored-by: Codex <noreply@openai.com>

* fix(npm): recognize devEngines package managers for Yarn catalogs

Co-authored-by: Codex <noreply@openai.com>

* fix(npm): exclude devEngines from Yarn locked versions

Co-authored-by: Codex <noreply@openai.com>

* refactor(npm): reuse Bun extraction for devEngines runtime

Co-authored-by: Codex <noreply@openai.com>

* test(npm): cover Yarn devEngines manifest preservation and grouped updates

Co-authored-by: Codex <noreply@openai.com>

* refactor(npm): pass packageJsonResult directly to hasDevEnginesPackageManager

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

* test(npm): simplify malformed devEngines fixture

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Codex <noreply@openai.com>
2026-10-01 11:25:52 +00:00
Jamie Tanna b62fe59594 fix: remove references to "bot" (#39305)
We dropped the "bot" from our terminology long ago, but it looks like
we've got some outdated docs + code that reference it.

We should remove this to keep things consistent.

A `fix`, as we're changing the commit author's name, and log lines.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-02 08:56:20 +00:00
Jamie Tanna 783002c7de docs: correct references to binarySource=install for Mend-hosted (#40740) 2026-01-28 11:38:18 +00:00
Sharon Yogev ace27f8675 fix(manager/mise): expand file patterns to match mise's config search (#40094)
* fix(manager/mise): expand file patterns to match mise's config search

Updates mise manager file patterns to align with the official mise configuration file search patterns. The patterns now include:
- Additional config locations (.config/mise/, .config/mise.toml)
- Legacy rtx.toml files
- Environment-specific configs (e.g., mise.production.toml)
- Local configs (e.g., mise.local.toml)

This ensures Renovate detects all mise configuration files that mise itself recognizes.

* CR

* Use brace expansions in the patterns

* Fix stupid typo
2026-01-23 13:14:10 +00:00
Anne Stellingwerf 9fae0192a1 docs: introduce JSON schema validation and migration checks (#38145)
* docs: introduce JSON schema validation and migration checks

* refactor(tools): enhance code clarity with additional typings, comments, and optional chaining

* ci(workflows): add build steps to lint and type-check jobs

* Update tools/check-fenced-code.mjs

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Partial revert

* docs(jsonata): fix wording in code block title in readme

* ci(workflows): remove redundant build steps from workflows

* ci(workflows): remove redundant build steps from workflows

* refactor(tools): simplify error reporting

* Incorporate feedback

* Incorporate feedback

* Incorporate feedback

---------

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2025-10-07 10:54:48 +00:00
James Brookes 4a304b8e6d feat(manager): add mise package manager (#29950) 2024-07-08 14:27:31 +00:00
HonkingGoose b58322920c docs: use titles for more code blocks (#25526) 2023-11-02 16:04:33 +00:00
HonkingGoose 124c1e636c docs: refer to the app as the Mend Renovate app (#23336)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-07-13 14:24:43 +00:00
Daniel Shuy 48fbac67eb docs: document asdf .tool-versions support for Node.js (#22604) 2023-06-06 18:15:18 +00:00
HonkingGoose 71d082d16f docs: use relative URLs in more places (#22516) 2023-05-31 15:52:30 +00:00
Rhys Arkins afd96e7b8a fix: whitesource -> mend (#15729) 2022-05-25 15:23:28 +02:00
Shane O'Grady 40b919cbc7 docs: Add Nodenv and .node-version to Node page (#14719) 2022-03-18 11:54:09 +01:00
Martin Herndl 72ade5f6c8 docs(node): add info about constraints option (#14576) 2022-03-08 17:08:37 +01:00
Florian Greinacher 5376bb6375 feat(versioning/node): add support for Node.js codenames (#13466)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2022-01-19 10:48:52 +01:00
HonkingGoose 920d27a625 docs: bump npm version used in example (#12660) 2021-11-15 11:44:25 +01:00
Rhys Arkins 123dc4444e feat(travis): remove supportPolicy (#11176) 2021-08-17 07:57:45 +02:00
HonkingGoose 9f2e761b4f docs: update supportPolicy table (#10367) 2021-06-09 13:19:38 +02:00
Michael Kriese 54b99bd101 docs: fix links (#9734) 2021-04-27 08:44:30 +02:00
HonkingGoose ef447c7ab9 docs: update supportPolicy table (#9680) 2021-04-22 11:34:37 +00:00
HonkingGoose 58dc33b4be docs: explain how to specify which npm version Renovate bot uses (#8559) 2021-02-28 07:06:11 +01:00
HonkingGoose 82c3be1e67 docs: update supportPolicy table (#8507) 2021-02-03 07:04:52 +01:00
HonkingGoose f72fb854be docs: improve Node.js documentation (#7822)
* split up long sentence

* use active voice

* use 1's for ordered list, fix whitespace

* split sentence, and rewrite in active voice

* Implement review suggestion

Co-authored-by: Rhys Arkins <rhys@arkins.net>

Co-authored-by: Rhys Arkins <rhys@arkins.net>
2020-11-29 17:00:16 +01:00
HonkingGoose 1d15279def docs: update Node.js supportPolicy table (#7782) 2020-11-22 15:03:02 +01:00
HonkingGoose 8560b5d657 docs: remove punctuation from end of (un)ordered lists (#7669)
* fix bad indentation

* remove punctuation from end of (un)ordered lists
2020-11-06 12:00:57 +01:00
HonkingGoose 89346338cb docs: fix capitalization/style errors (#7532)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2020-10-23 17:42:57 +02:00
HonkingGoose b1d474e033 docs: update node.js version supportPolicy table (#7501) 2020-10-20 08:50:11 +02:00
Jamie Magee 682b68c2ed docs: fix spelling on node help page (#7496)
fixed #7495
2020-10-18 22:09:37 +02:00
Rhys Arkins 908dd63fdc docs: fix absolute internal links 2020-01-28 06:40:14 +01:00
Nihal 5964c29bbd docs: describe npm depTypes (#4648) 2019-10-14 13:01:04 +02:00
Rhys Arkins 8e97958dd1 docs: relocate website docs 2019-09-09 04:28:25 +02:00