Commit Graph

33 Commits

Author SHA1 Message Date
Sebastian Poxhofer 300e3a616c test: shrink oversized fixtures to representative examples (#45666)
* test: reduce oversized expectation literals to representative examples

* test: shrink oversized fixtures instead of trimming assertions

Cut the real-world fixtures down to a representative set of entries that still covers every parser shape, and assert the complete output again with a single toEqual.
2026-09-04 10:40:45 +00:00
Sebastian Poxhofer 2fc46bdcfa test(manager): replace file snapshots with explicit assertions (#45656)
* test(manager): replace file snapshots with explicit assertions

* test(manager): replace inline snapshots with explicit assertions

* test(manager): assert on relevant sections instead of full bodies

* test(manager): drop assertions implied by full equality

* test(manager): address review feedback

* test(manager): assert depType and versioning in the regex matcher
2026-09-04 06:36:39 +00:00
Sebastian Poxhofer 27cc994470 refactor(oxlint): enable vitest/no-standalone-expect (#44417)
Wrap `expect` calls that sat directly in `describe` bodies in their
own `it` blocks (gomod and haskell-cabal extract/index specs), then
re-enable the rule.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 10:06:16 +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
Jamie Tanna 0e5e384237 feat(manager/gomod): extract the go and toolchain directives as constraints (#42582)
As part of future changes in #42567 to surface the `constraints` of a
given Go module, we should first extract the constraints from the
package file.

To make this simpler for users, we can make sure we extract these at
parse time:

- the `toolchain` directive becomes the `golang` constraint, which
  matches the `golang` tool name already in use for Containerbase
- the `go` directive becomes a new `%goMod` constraint, which keeps it
  separate from the version of the Go toolchain actually used to run, as
  well as clearly not for the Go tooling, or something that
  Containerbase knows about
- we make sure to extract it with a SemVer range that can then be used
  to ensure that, in future changes, using `constraintsFiltering=strict`
  will allow filtering releases from the Go datasource based on this
  constraint.
- because we're now returning the `constraintsVersioning`, we need to
  make sure this is part of our types
2026-04-29 13:20:13 +00:00
Jamie Tanna 01a01f6b88 feat(manager/gomod): improve commitMessageTopic for go/toolchain directive bumps (#42891)
As noted in #42519, the preivous commit/PR title wasn't quite as clear
with what was actually changing.

To make this more explicit, we can override `commitMessageTopic`.
2026-04-27 16:30:52 +00:00
Jamie Tanna 59de755283 fix(gomod): support local module paths in replace directives (#41520)
* fix(gomod): support non-public module paths in `replace` directives

As noted in #41518, we allow extracting `require` directives that
include a module path that's non-public, so we should also support this
for `replace` directives.

* fixup! fix(gomod): support non-public module paths in `replace` directives
2026-02-26 14:56:23 +00:00
Jamie Tanna dcabd52332 fix(gomod): skip placeholder pseudo versions (#41521)
As a follow-up to #41517, when we have a placeholder pseudo version, we
attempt to look up updates for the module.

However, because these are handled by a `replace` directive, there's no
point attempting to look them up.

Especially, as noted in #41517, this could be a non-public module, so
the lookup will fail unnecessarily.

Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
2026-02-26 13:33:17 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +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
Lukas Eipert a345524eec fix(gomod): Exclude multi-line exclude directives from extraction (#35623) 2025-04-30 13:45:58 +00:00
Tobias 52242556e8 fix(manager/gomod): use regex to remove version suffix from name (#35508) 2025-04-23 19:31:52 +00:00
Maxime Brunet 03c4cdbc88 fix(gomod): fix potential false-positive when matching tools (#35135) 2025-04-02 05:14:29 +00:00
Maxime Brunet c4c37a6253 feat(gomod): support tool directive (#35078) 2025-04-01 17:33:55 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Ed Harrod 894250d392 chore(manager/gomod): Update go version to 1.23.3 in tests/examples (#32514)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-11-13 15:45:18 +00:00
Sergei Zharinov 5aa2ebfbcb refactor(gomod): Simplify dependency extraction (#28852) 2024-05-06 17:17:07 +00:00
Sergei Zharinov e8b1beba81 test(gomod): Use "codeBlock" helper (#28874) 2024-05-06 14:56:31 +00:00
Koen van Zuijlen aec0cd8550 feat(manager/gomod): Added support for the gomod toolchain directive (#27279)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-04-10 21:30:32 +00:00
Sebastian Poxhofer e4e3b9bbc8 chore: rename fixture package file and lock files so they do not trigger osv scanner (#24625) 2023-09-23 20:30:51 +00:00
Rhys Arkins 016e647390 feat(config)!: default to rangeStrategy=auto, prefer update-lockfile (#19942)
Changes `rangeStrategy` default value from `'replace'` to `'auto'`. Also changes `auto` behavior so that `update-lockfile` is preferred if the manager
supports the `updateLockedDependency()` function.

Closes #19800

BREAKING CHANGE: Renovate will now default to updating locked dependency versions. To revert to previous behavior, configure rangeStrategy=replace.
2023-03-10 09:25:45 +01:00
Rhys Arkins 719354793f feat(gomod): directive versioning (#19453) 2022-12-17 08:12:57 +01:00
Jamie Tanna 67d1b983bc fix(manager/gomod): resolve multi-line indirect dependencies (#19442) 2022-12-16 11:40:36 +00:00
Jamie Tanna d19effc48d feat(manager/gomod): update indirect dependencies for Go Modules (#19431) 2022-12-15 18:55:08 +00:00
Rhys Arkins 0f2eb5d622 fix(gomod): Revert "fix(gomod): non-0.0.0 digest matching" (#19120) 2022-11-27 09:14:04 +01:00
Omer Cohen 20ba978e4f fix(gomod): non-0.0.0 digest matching (#19085) 2022-11-27 06:53:21 +00:00
Maron 5e5d5b771b feat(manager/gomod): improve go constraints (#17178) 2022-10-06 14:40:31 +00:00
Hasan Awad 3cec44cfa7 fix(manager/gomod): add multi-line replace detection (#17111) 2022-08-11 05:29:53 +00:00
Philip b8c5a87bc4 fix(manage/gomod): Golang fix pin (#16682)
* Add .whitesource configuration file (#3)

Co-authored-by: whitesource-for-github-com[bot] <50673670+whitesource-for-github-com[bot]@users.noreply.github.com>

* Update .whitesource

* build(deps): update dependency simple-git to v3.5.0 (#17)

Co-authored-by: whitesource-for-github-com[bot] <whitesource-for-github-com[bot]@users.noreply.github.com>

* golang fix pin

* golang fix pin

Co-authored-by: whitesource-for-github-com[bot] <50673670+whitesource-for-github-com[bot]@users.noreply.github.com>
Co-authored-by: whitesource-for-github-com[bot] <whitesource-for-github-com[bot]@users.noreply.github.com>
2022-07-21 17:29:15 +02:00
Philip a6e5eefb64 feat(manager/gomod): support updating go version in go.mod files (#16541) 2022-07-18 06:22:50 +00:00
Michael Kriese b4319928f1 refactor: strict manager tests (#16155)
* refactor: strict manager tests

* chore: revert changes

* Update lib/modules/manager/gradle/extract.spec.ts
2022-06-20 17:05:39 +02:00
Michael Kriese 64f5bd5f03 test: enforce lint style rules (#15085) 2022-04-12 14:49:49 +00:00
Rhys Arkins dca3418bbd refactor: lib/modules (#14488)
Moves datasource, manager, platform and versioning code from lib/ into new lib/modules/

BREAKING CHANGE: External tools must update paths to datasource, manager, platform and versioning
2022-03-04 09:04:02 +01:00