Skip to content

Commit 52cd035

Browse files
committed
fix: update Renovate config to properly detect npm and Python packages
- Fix file path patterns to match subdirectories (e.g., npx/*/spec.yaml) - Update regex to handle spec: parent section in YAML structure - Add support for inline comments in YAML files - Fix version capture to include full semantic version strings - Support both .yaml and .yml file extensions This ensures Renovate can properly detect and update package versions in npx/ (npm packages) and uvx/ (Python packages) directories.
1 parent c1c4f23 commit 52cd035

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

renovate.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@
1010
{
1111
"customType": "regex",
1212
"description": "Update npm package versions in npx YAML configurations",
13-
"managerFilePatterns": ["npx/*.yaml"],
13+
"fileMatch": ["^npx/.*/spec\\.ya?ml$"],
1414
"matchStrings": [
15-
"package:\\s*[\"']?(?<depName>[^\"'\\s]+)[\"']?.*\\n\\s*version:\\s*[\"']?(?<currentValue>[^\"'\\s]+)[\"']?"
15+
"spec:\\s*\\n\\s*package:\\s*[\"']?(?<depName>[^\"'\\n]+?)\\s*[\"']?\\s*(?:#.*)?\\n\\s*version:\\s*[\"']?(?<currentValue>[\\d\\.\\w-]+)[\"']?\\s*(?:#.*)?"
1616
],
1717
"datasourceTemplate": "npm"
1818
},
1919
{
2020
"customType": "regex",
2121
"description": "Update Python package versions in uvx YAML configurations",
22-
"managerFilePatterns": ["uvx/*.yaml"],
22+
"fileMatch": ["^uvx/.*/spec\\.ya?ml$"],
2323
"matchStrings": [
24-
"package:\\s*[\"']?(?<depName>[^\"'\\s]+)[\"']?.*\\n\\s*version:\\s*[\"']?(?<currentValue>[^\"'\\s]+)[\"']?"
24+
"spec:\\s*\\n\\s*package:\\s*[\"']?(?<depName>[^\"'\\n]+?)\\s*[\"']?\\s*(?:#.*)?\\n\\s*version:\\s*[\"']?(?<currentValue>[\\d\\.\\w-]+)[\"']?\\s*(?:#.*)?"
2525
],
2626
"datasourceTemplate": "pypi"
2727
},
2828
{
2929
"customType": "regex",
3030
"description": "Update Go package versions in go YAML configurations",
31-
"managerFilePatterns": ["go/*.yaml"],
31+
"fileMatch": ["^go/.*/spec\\.ya?ml$"],
3232
"matchStrings": [
33-
"package:\\s*[\"']?(?<depName>[^\"'\\s]+)[\"']?.*\\n\\s*version:\\s*[\"']?(?<currentValue>[^\"'\\s]+)[\"']?"
33+
"spec:\\s*\\n\\s*package:\\s*[\"']?(?<depName>[^\"'\\n]+?)\\s*[\"']?\\s*(?:#.*)?\\n\\s*version:\\s*[\"']?(?<currentValue>[\\d\\.\\w-]+)[\"']?\\s*(?:#.*)?"
3434
],
3535
"datasourceTemplate": "go"
3636
}

0 commit comments

Comments
 (0)