Skip to content

Commit

Permalink
refactor: improve regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Omochice committed Oct 24, 2023
1 parent 419ca62 commit 1574277
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,51 @@
"customType": "regex",
"fileMatch": ["^import_map.json$", "^deno.jsonc?$"],
"matchStrings": [
"\".+?\"\\s*:\\s*\"(?<depName>https://deno.land/.+?)@v?(?<currentValue>\\d+?\\.\\d+?\\.\\d+?).*?\""
"([\"']).+?\\1\\s*:\\s*([\"'])(?<depName>https://deno.land/.+?)@v?(?<currentValue>\\d+?\\.\\d+?\\.\\d+?).*?\\2"
],
"datasourceTemplate": "deno"
},
{
"customType": "regex",
"fileMatch": ["^import_map.json$", "^deno.jsonc?$"],
"matchStrings": [
"['\"].+?['\"]\\s*:\\s*['\"]https://esm.sh/(?<depName>.+?)@v?(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?['\"]",
"['\"].+?['\"]\\s*:\\s*['\"]npm:(?<depName>.+?)@(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?['\"]"
"([\"']).+?\\1\\s*:\\s*([\"'])https://esm.sh/(?<depName>.+?)@v?(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?\\2",
"([\"']).+?\\1\\s*:\\s*([\"'])npm:(?<depName>.+?)@(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?\\2"
],
"datasourceTemplate": "npm"
},
{
"customType": "regex",
"fileMatch": ["\\.[jt]sx?$"],
"matchStrings": [
"(?:im|ex)port(?:.|\\s)+?from\\s*['\"](?<depName>https://deno.land/.+?)@v?(?<currentValue>\\d+?\\.\\d+?\\.\\d+?).*?['\"]"
"(?:im|ex)port(?:.|\\s)+?from\\s*([\"'])(?<depName>https://deno.land/.+?)@v?(?<currentValue>\\d+?\\.\\d+?\\.\\d+?).*?\\1"
],
"datasourceTemplate": "deno"
},
{
"customType": "regex",
"fileMatch": ["\\.[jt]sx?$"],
"matchStrings": [
"(?:im|ex)port(?:.|\\s)+?from\\s*['\"]https://esm.sh/(?<depName>.+?)@v?(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?['\"]",
"(?:im|ex)port(?:.|\\s)+?from\\s*['\"]npm:(?<depName>.+?)@(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?['\"]"
"(?:im|ex)port(?:.|\\s)+?from\\s*([\"'])https://esm.sh/(?<depName>.+?)@v?(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?\\1",
"(?:im|ex)port(?:.|\\s)+?from\\s*([\"'])npm:(?<depName>.+?)@(?<currentValue>\\d+?(?:\\.\\d+?){0,2}).*?\\1"
],
"datasourceTemplate": "npm"
},
{
"customType": "regex",
"fileMatch": [
"^import_map.json$",
"^deno.jsonc?$"
],
"fileMatch": ["^import_map.json$", "^deno.jsonc?$"],
"matchStrings": [
"\".+?\"\\s*:\\s*['\"]https://pax.deno.dev/(?<depName>.+?/.+?)@(?<currentValue>.+?)[/'\"]",
"\".+?\"\\s*:\\s*['\"]https://raw.githubusercontent.com/(?<depName>.+?/.+?)/(?<currentValue>.+?)[/'\"]"
"([\"']).+?\\1\\s*:\\s*([\"'])https://pax.deno.dev/(?<depName>.+?/.+?)@(?<currentValue>.+?)(?:/.+)*\\2",
"([\"']).+?\\1\\s*:\\s*([\"'])https://raw.githubusercontent.com/(?<depName>.+?/.+?)/(?<currentValue>.+?)(?:/.+)*\\2"
],
"datasourceTemplate": "github-tags"
},
{
"customType": "regex",
"fileMatch": [
"\\.[jt]sx?$"
],
"fileMatch": ["\\.[jt]sx?$"],
"matchStrings": [
"(?:im|ex)port(?:.|\\s)+?from\\s*['\"]https://pax.deno.dev/(?<depName>.+?/.+?)@(?<currentValue>.+?)[/'\"]",
"(?:im|ex)port(?:.|\\s)+?from\\s*['\"]https://raw.githubusercontent.com/(?<depName>.+?/.+?)/(?<currentValue>.+?)[/'\"]"
"(?:im|ex)port(?:.|\\s)+?from\\s*([\"'])https://pax.deno.dev/(?<depName>.+?/.+?)@(?<currentValue>.+?)(?:/.+)*\\1",
"(?:im|ex)port(?:.|\\s)+?from\\s*([\"'])https://raw.githubusercontent.com/(?<depName>.+?/.+?)/(?<currentValue>.+?)(?:/.+)*\\1"
],
"datasourceTemplate": "github-tags"
}
Expand Down

0 comments on commit 1574277

Please sign in to comment.