Skip to content

Commit af3ad04

Browse files
feat(renovate): custom managers for jekyll configs and front matter (#731)
1 parent 443d1eb commit af3ad04

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

renovate-config.json5

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,31 @@
108108
},
109109
],
110110
"customManagers": [
111+
// cdnjs URLs in Jekyll config files and front matter, with optional adjacent SRI hashes.
112+
{
113+
"customType": "regex",
114+
"managerFilePatterns": [
115+
"/^(?:_config(?:_[^/]+)?[.]ya?ml|_layouts/.*[.]html|[^/]+[.](?:html|md)|blog/.*[.]html|_posts/.*[.]md|docs/.*[.]md)$/",
116+
],
117+
"matchStrings": [
118+
"(?:href:\\s*[\"']|-\\s*[\"'])(?:https?:)?//cdnjs\\.cloudflare\\.com/ajax/libs/(?<depName>[^/\"'\\s]+)/(?<currentValue>[^/\"'\\s]+)/(?<asset>[^\"'\\s?#]+)(?:\\?[^\"'\\s]*)?[\"'](?:\\s*\\r?\\n\\s*sri:\\s*[\"'](?<currentDigest>sha(?:256|384|512)-[^\"']+)[\"'])?",
119+
],
120+
"datasourceTemplate": "cdnjs",
121+
"packageNameTemplate": "{{depName}}/{{asset}}",
122+
"versioningTemplate": "semver",
123+
},
124+
// Versioned npm CDN scalar entries in Jekyll config files and front matter without SRI.
125+
{
126+
"customType": "regex",
127+
"managerFilePatterns": [
128+
"/^(?:_config(?:_[^/]+)?[.]ya?ml|_layouts/.*[.]html|[^/]+[.](?:html|md)|blog/.*[.]html|_posts/.*[.]md|docs/.*[.]md)$/",
129+
],
130+
"matchStrings": [
131+
"(?:^|\\r?\\n)[ \\t]*-[ \\t]*[\"']https://(?:cdn\\.jsdelivr\\.net/npm|unpkg\\.com)/(?<depName>(?:@[^@/\"'\\s]+/)?[^@/\"'\\s]+)@(?<currentValue>[^/\"'\\s?#]+)",
132+
],
133+
"datasourceTemplate": "npm",
134+
"versioningTemplate": "npm",
135+
},
111136
// CPM Package Lock
112137
{
113138
"customType": "regex",

0 commit comments

Comments
 (0)