Skip to content

Commit 2742861

Browse files
fix(renovate): extend customManagers for Jekyll sites
1 parent 71e1e2e commit 2742861

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

renovate-config.json5

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,32 +114,43 @@
114114
},
115115
],
116116
"customManagers": [
117-
// cdnjs URLs in Jekyll config files and front matter, with optional adjacent SRI hashes.
117+
// cdnjs URLs in Jekyll config files, front matter, data YAML, and simple HTML attrs, with optional adjacent SRI hashes.
118118
{
119119
"customType": "regex",
120120
"managerFilePatterns": [
121-
"/^(?:_config(?:_[^/]+)?[.]ya?ml|_layouts/.*[.]html|[^/]+[.](?:html|md)|blog/.*[.]html|_posts/.*[.]md|docs/.*[.]md)$/",
121+
"/^(?:_config(?:_[^/]+)?[.]ya?ml|_data/.*[.]ya?ml|_layouts/.*[.]html|[^/]+[.](?:html|md)|blog/.*[.]html|_posts/.*[.]md|docs/.*[.]md|gh-pages-template/(?:_data/.*[.]ya?ml|.*[.](?:html|md)))$/",
122122
],
123123
"matchStrings": [
124-
"(?: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)-[^\"']+)[\"'])?",
124+
"(?:(?:href|src):\\s*[\"']?|-\\s*[\"']?|(?:href|src)=[\"'])(?:https?:)?//cdnjs\\.cloudflare\\.com/ajax/libs/(?<depName>[^/\"'\\s]+)/(?<currentValue>[^/\"'\\s]+)/(?<asset>[^\"'\\s?#]+)(?:\\?[^\"'\\s]*)?[\"']?(?:\\s*\\r?\\n\\s*sri:\\s*[\"'](?<currentDigest>sha(?:256|384|512)-[^\"']+)[\"'])?",
125125
],
126126
"datasourceTemplate": "cdnjs",
127127
"packageNameTemplate": "{{depName}}/{{asset}}",
128128
"versioningTemplate": "semver",
129129
},
130-
// Versioned npm CDN href/scalar entries in Jekyll config files and front matter without SRI.
130+
// Versioned npm CDN href/src/scalar entries in Jekyll config files, front matter, data YAML, and simple HTML attrs without SRI.
131131
{
132132
"customType": "regex",
133133
"managerFilePatterns": [
134-
"/^(?:_config(?:_[^/]+)?[.]ya?ml|_layouts/.*[.]html|[^/]+[.](?:html|md)|blog/.*[.]html|_posts/.*[.]md|docs/.*[.]md)$/",
134+
"/^(?:_config(?:_[^/]+)?[.]ya?ml|_data/.*[.]ya?ml|_layouts/.*[.]html|[^/]+[.](?:html|md)|blog/.*[.]html|_posts/.*[.]md|docs/.*[.]md|gh-pages-template/(?:_data/.*[.]ya?ml|.*[.](?:html|md)))$/",
135135
],
136136
"matchStrings": [
137-
"href:\\s*[\"']https://(?:cdn\\.jsdelivr\\.net/npm|unpkg\\.com)/(?<depName>(?:@[^@/\"'\\s]+/)?[^@/\"'\\s]+)@(?<currentValue>[^/\"'\\s?#]+)",
138-
"(?:^|\\r?\\n)[ \\t]*-[ \\t]*[\"']https://(?:cdn\\.jsdelivr\\.net/npm|unpkg\\.com)/(?<depName>(?:@[^@/\"'\\s]+/)?[^@/\"'\\s]+)@(?<currentValue>[^/\"'\\s?#]+)",
137+
"(?:(?:href|src):\\s*[\"']?|(?:href|src)=[\"'])https://(?:cdn\\.jsdelivr\\.net/npm|unpkg\\.com)/(?<depName>(?:@[^@/\"'\\s]+/)?[^@/\"'\\s]+)@(?<currentValue>[^/\"'\\s?#]+)",
138+
"(?:^|\\r?\\n)[ \\t]*-[ \\t]*[\"']?https://(?:cdn\\.jsdelivr\\.net/npm|unpkg\\.com)/(?<depName>(?:@[^@/\"'\\s]+/)?[^@/\"'\\s]+)@(?<currentValue>[^/\"'\\s?#]+)",
139139
],
140140
"datasourceTemplate": "npm",
141141
"versioningTemplate": "npm",
142142
},
143+
// Annotated YAML version fields such as _data/licenses.yml in LizardByte.github.io
144+
{
145+
"customType": "regex",
146+
"managerFilePatterns": [
147+
"/^(?:_data/.*[.]ya?ml|gh-pages-template/_data/.*[.]ya?ml)$/",
148+
],
149+
"matchStrings": [
150+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?:(?:[ \\t]+|\\s*\\r?\\n\\s*#\\s*)packageName=(?<packageName>[^\\s]+?))?(?:(?:[ \\t]+|\\s*\\r?\\n\\s*#\\s*)versioning=(?<versioning>[^\\s]+?))?\\s+version:\\s*[\"']?(?<currentValue>[^\"'\\s]+)[\"']?",
151+
],
152+
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{/if}}",
153+
},
143154
// CPM Package Lock
144155
{
145156
"customType": "regex",

0 commit comments

Comments
 (0)