Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lowercase first word of commit message #12440

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/datasource/crate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as memCache from '../../util/cache/memory';
import { cache } from '../../util/cache/package/decorator';
import { privateCacheDir, readFile } from '../../util/fs';
import { simpleGitConfig } from '../../util/git/config';
import { regEx } from '../../util/regex';
import * as cargoVersioning from '../../versioning/cargo';
import { Datasource } from '../datasource';
import type { GetReleasesConfig, Release, ReleaseResult } from '../types';
Expand Down Expand Up @@ -143,7 +144,7 @@ export class CrateDatasource extends Datasource {
* clone the repository.
*/
private static cacheDirFromUrl(url: URL): string {
const proto = url.protocol.replace(/:$/, ''); // TODO #12070
const proto = url.protocol.replace(regEx(/:$/), '');
const host = url.hostname;
const hash = hasha(url.pathname, {
algorithm: 'sha256',
Expand Down
14 changes: 8 additions & 6 deletions lib/datasource/go/goproxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ export function parseGoproxy(
}

let result: GoproxyItem[] = input
.split(/([^,|]*(?:,|\|))/) // TODO: #12070
.split(regEx(/([^,|]*(?:,|\|))/))
.filter(Boolean)
.map((s) => s.split(/(?=,|\|)/)) // TODO: #12070
.map((s) =>
[',', '|'].includes(s.slice(-1)) ? [s.slice(0, -1), s.slice(-1)] : [s]
)
.map(([url, separator]) => ({
url,
fallback:
Expand All @@ -63,7 +65,7 @@ export function parseGoproxy(
const lexer = moo.states({
main: {
separator: {
match: /\s*?,\s*?/, // TODO #12070
match: /\s*?,\s*?/, // TODO #12070 moo uses .toString() which creates problem when using RE2
value: (_: string) => '|',
},
asterisk: {
Expand All @@ -84,14 +86,14 @@ const lexer = moo.states({
value: (s: string) => s.replace(regEx('\\.', 'g'), '\\.'),
},
escapedChar: {
match: /\\./, // TODO #12070
match: /\\./, // TODO #12070 moo uses .toString() which creates problem when using RE2
value: (s: string) => s.slice(1),
},
},
characterRange: {
char: /[^\\\]\n]/, // TODO #12070
char: /[^\\\]\n]/, // TODO #12070 moo uses .toString() which creates problem when using RE2
escapedChar: {
match: /\\./, // TODO #12070
match: /\\./, // TODO #12070 moo uses .toString() which creates problem when using RE2
value: (s: string) => s.slice(1),
},
characterRangeEnd: {
Expand Down
2 changes: 1 addition & 1 deletion lib/datasource/maven/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export async function getReleases({
const dependency = getDependencyParts(lookupName);
let releases: Release[] = null;
const repoForVersions = {};
const repoUrl = registryUrl.replace(/\/?$/, '/'); // TODO #12070
const repoUrl = registryUrl.replace(/\/?$/, '/');
logger.debug(`Looking up ${dependency.display} in repository ${repoUrl}`);
const metadataVersions = await getVersionsFromMetadata(dependency, repoUrl);
if (metadataVersions) {
Expand Down
2 changes: 1 addition & 1 deletion lib/datasource/npm/npmrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function resolvePackage(packageName: string): PackageResolution {
npmrc &&
npmrc._authToken &&
registryUrl.replace(regEx(/\/?$/), '/') ===
npmrc.registry?.replace(/\/?$/, '/') // TODO #12070
npmrc.registry?.replace(regEx(/\/?$/), '/')
) {
authInfo = { type: 'Bearer', token: npmrc._authToken };
}
Expand Down
5 changes: 3 additions & 2 deletions lib/datasource/packagist/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as memCache from '../../util/cache/memory';
import * as packageCache from '../../util/cache/package';
import * as hostRules from '../../util/host-rules';
import { Http, HttpOptions } from '../../util/http';
import { regEx } from '../../util/regex';
import * as composerVersioning from '../../versioning/composer';
import type { GetReleasesConfig, ReleaseResult } from '../types';
import type {
Expand Down Expand Up @@ -38,7 +39,7 @@ function getHostOpts(url: string): HttpOptions {
}

async function getRegistryMeta(regUrl: string): Promise<RegistryMeta | null> {
const url = URL.resolve(regUrl.replace(/\/?$/, '/'), 'packages.json'); // TODO #12070
const url = URL.resolve(regUrl.replace(/\/?$/, '/'), 'packages.json'); // TODO #12070 asked to leave it for now
const opts = getHostOpts(url);
const res = (await http.getJson<PackageMeta>(url, opts)).body;
const meta: RegistryMeta = {
Expand Down Expand Up @@ -124,7 +125,7 @@ function extractDepReleases(versions: RegistryFile): ReleaseResult {
dep.sourceUrl = release.source.url;
}
return {
version: version.replace(/^v/, ''), // TODO #12070
version: version.replace(regEx(/^v/), ''),
gitRef: version,
releaseTimestamp: release.time,
};
Expand Down
2 changes: 1 addition & 1 deletion lib/datasource/sbt-package/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const defaultRegistryUrls = [MAVEN_REPO];
export const defaultVersioning = ivyVersioning.id;
export const registryStrategy = 'hunt';

const ensureTrailingSlash = (str: string): string => str.replace(/\/?$/, '/'); // TODO #12070
const ensureTrailingSlash = (str: string): string => str.replace(/\/?$/, '/'); // TODO #12070 asked to leave it for now

export async function getArtifactSubdirs(
searchRoot: string,
Expand Down
2 changes: 1 addition & 1 deletion lib/logger/cmd-serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default function cmdSerializer(
cmd: string | string[]
): string | string[] {
if (typeof cmd === 'string') {
return cmd.replace(/https:\/\/[^@]*@/g, 'https://**redacted**@'); // TODO #12070
return cmd.replace(/https:\/\/[^@]*@/g, 'https://**redacted**@'); // TODO #12070 using RE2 here causes cyclic dependency
}
return cmd;
}
2 changes: 1 addition & 1 deletion lib/logger/err-serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function errSerializer(err: Error): any {
const val = response[field];
if (is.string(val)) {
response[field] = val.replace(
/https:\/\/[^@]*?@/g, // TODO #12070 #12071
/https:\/\/[^@]*?@/g, // TODO #12071 #12070 using RE2 here causes cyclic dependency
'https://**redacted**@'
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/logger/pretty-stdout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const levels: Record<number, string> = {

export function indent(str: string, leading = false): string {
const prefix = leading ? ' ' : '';
return prefix + str.split(/\r?\n/).join('\n '); // TODO #12070
return prefix + str.split(/\r?\n/).join('\n '); // TODO #12070 using RE2 here causes cyclic dependency
}

export function getMeta(rec: BunyanRecord): string {
Expand Down
2 changes: 1 addition & 1 deletion lib/logger/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function withSanitizer(streamConfig: bunyan.Stream): bunyan.Stream {
const result =
streamConfig.type === 'raw'
? raw
: JSON.stringify(raw, bunyan.safeCycles()).replace(/\n?$/, '\n'); // TODO #12070
: JSON.stringify(raw, bunyan.safeCycles()).replace(/\n?$/, '\n'); // TODO #12070 using RE2 here causes cyclic dependency
stream.write(result, enc, cb);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/manager/bazel/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function parseUrl(urlString: string): UrlParsedResult | null {

const lexer = moo.states({
main: {
lineComment: { match: /#.*?$/ }, // TODO #12070
lineComment: { match: /#.*?$/ }, // TODO #12070 moo state doesn't work properly with RE2 due to .toString() used inside it
leftParen: { match: '(' },
rightParen: { match: ')' },
longDoubleQuoted: {
Expand Down
5 changes: 3 additions & 2 deletions lib/manager/bundler/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export async function extractPackageFile(
if (rubyMatch) {
res.constraints = { ruby: rubyMatch[1] };
}
const gemMatchRegex =
/^\s*gem\s+(['"])(?<depName>[^'"]+)\1(\s*,\s*(?<currentValue>(['"])[^'"]+\5(\s*,\s*\5[^'"]+\5)?))?/; // TODO #12070 #12071
const gemMatchRegex = regEx(
`^\\s*gem\\s+(['"])(?P<depName>[^'"]+)(['"])(\\s*,\\s*(?P<currentValue>(['"])[^'"]+(['"])(\\s*,\\s*(['"])[^'"]+(['"]))?))?`
); // TODO #12071
const gemMatch = gemMatchRegex.exec(line);
if (gemMatch) {
const dep: PackageDependency = {
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/bundler/locked-version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { logger } from '../../logger';
import { isVersion } from '../../versioning/ruby';

const DEP_REGEX = new RegExp('(?<=\\().*(?=\\))'); // TODO #12070
const DEP_REGEX = new RegExp('(?<=\\().*(?=\\))'); // TODO #12070 (?<=re) after text matching re (NOT SUPPORTED) in RE2
export function extractLockFileEntries(
lockFileContent: string
): Map<string, string> {
Expand Down
8 changes: 4 additions & 4 deletions lib/manager/cake/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export const defaultConfig = {

const lexer = moo.states({
main: {
lineComment: { match: /\/\/.*?$/ }, // TODO #12070
multiLineComment: { match: /\/\*[^]*?\*\//, lineBreaks: true }, // TODO #12070
lineComment: { match: /\/\/.*?$/ }, // TODO #12070 RE2 incompatbile with moo state
multiLineComment: { match: /\/\*[^]*?\*\//, lineBreaks: true }, // TODO #12070 RE2 incompatbile with moo state
dependency: {
match: /^#(?:addin|tool|module|load|l)\s+(?:nuget|dotnet):.*$/, // TODO #12070
match: /^#(?:addin|tool|module|load|l)\s+(?:nuget|dotnet):.*$/, // TODO #12070 RE2 incompatbile with moo state
},
dependencyQuoted: {
match: /^#(?:addin|tool|module|load|l)\s+"(?:nuget|dotnet):[^"]+"\s*$/, // TODO #12070
match: /^#(?:addin|tool|module|load|l)\s+"(?:nuget|dotnet):[^"]+"\s*$/, // TODO #12070 RE2 incompatbile with moo state
value: (s: string) => s.trim().slice(1, -1),
},
unknown: moo.fallback,
Expand Down
7 changes: 2 additions & 5 deletions lib/manager/cocoapods/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ import { getRepoStatus } from '../../util/git';
import { regEx } from '../../util/regex';
import type { UpdateArtifact, UpdateArtifactsResult } from '../types';

const pluginRegex = /^\s*plugin\s*(['"])(?<plugin>[^'"]+)\1/; // TODO #12070

function getPluginCommands(content: string): string[] {
const result = new Set<string>();
const lines: string[] = content.split('\n');
lines.forEach((line) => {
const match = pluginRegex.exec(line);
if (match) {
const { plugin } = match.groups;
const plugin = line.split('plugin')[1]?.trim().slice(1, -1);
if (plugin) {
result.add(`gem install ${quote(plugin)}`);
}
});
Expand Down
14 changes: 8 additions & 6 deletions lib/manager/cocoapods/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import type { PackageDependency, PackageFile } from '../types';
import type { ParsedLine } from './types';

const regexMappings = [
/^\s*pod\s+(['"])(?<spec>[^'"/]+)(\/(?<subspec>[^'"]+))?\1/, // TODO #12070
/^\s*pod\s+(['"])[^'"]+\1\s*,\s*(['"])(?<currentValue>[^'"]+)\2\s*$/, // TODO #12070
/,\s*:git\s*=>\s*(['"])(?<git>[^'"]+)\1/, // TODO #12070
/,\s*:tag\s*=>\s*(['"])(?<tag>[^'"]+)\1/, // TODO #12070
/,\s*:path\s*=>\s*(['"])(?<path>[^'"]+)\1/, // TODO #12070
/^\s*source\s*(['"])(?<source>[^'"]+)\1/, // TODO #12070
regEx(`^\\s*pod\\s+(['"])(?<spec>[^'"/]+)(\\/(?P<subspec>[^'"]+))?(['"])`),
regEx(
`^\\s*pod\\s+(['"])[^'"]+(['"])\\s*,\\s*(['"])(?P<currentValue>[^'"]+)(['"])\\s*$`
),
regEx(`,\\s*:git\\s*=>\\s*(['"])(?P<git>[^'"]+)(['"])`),
regEx(`,\\s*:tag\\s*=>\\s*(['"])(?P<tag>[^'"]+)(['"])`),
regEx(`,\\s*:path\\s*=>\\s*(['"])(?P<path>[^'"]+)(['"])`),
regEx(`^\\s*source\\s*(['"])(?P<source>[^'"]+)(['"])`),
];

export function parseLine(line: string): ParsedLine {
Expand Down
4 changes: 2 additions & 2 deletions lib/manager/dockerfile/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function extractPackageFile(content: string): PackageFile | null {
const stageNames: string[] = [];

const fromMatches = content.matchAll(
/^[ \t]*FROM(?:\\\r?\n| |\t|#.*?\r?\n|[ \t]--[a-z]+=\S+?)*[ \t](?<image>\S+)(?:(?:\\\r?\n| |\t|#.*\r?\n)+as[ \t]+(?<name>\S+))?/gim // TODO #12070
/^[ \t]*FROM(?:\\\r?\n| |\t|#.*?\r?\n|[ \t]--[a-z]+=\S+?)*[ \t](?<image>\S+)(?:(?:\\\r?\n| |\t|#.*\r?\n)+as[ \t]+(?<name>\S+))?/gim // TODO #12070 complex for RE2 conversion
);

for (const fromMatch of fromMatches) {
Expand All @@ -117,7 +117,7 @@ export function extractPackageFile(content: string): PackageFile | null {
}

const copyFromMatches = content.matchAll(
/^[ \t]*COPY(?:\\\r?\n| |\t|#.*\r?\n|[ \t]--[a-z]+=\w+?)*[ \t]--from=(?<image>\S+)/gim // TODO #12070
/^[ \t]*COPY(?:\\\r?\n| |\t|#.*\r?\n|[ \t]--[a-z]+=\w+?)*[ \t]--from=(?<image>\S+)/gim // TODO #12070 complex for RE2 conversion
);

for (const copyFromMatch of copyFromMatches) {
Expand Down
22 changes: 13 additions & 9 deletions lib/manager/gitlabci/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ import is from '@sindresorhus/is';
import { load } from 'js-yaml';
import { logger } from '../../logger';
import { readLocalFile } from '../../util/fs';
import { regEx } from '../../util/regex';
import { getDep } from '../dockerfile/extract';
import type { ExtractConfig, PackageDependency, PackageFile } from '../types';
import type { GitlabPipeline } from './types';
import { replaceReferenceTags } from './utils';

const commentsRe = /^\s*#/; // TODO #12070
const whitespaceRe = /^(?<whitespace>\s*)/; // TODO #12070
const imageRe =
/^(?<whitespace>\s*)image:(?:\s+['"]?(?<image>[^\s'"]+)['"]?)?\s*$/; // TODO #12070
const nameRe = /^\s*name:\s+['"]?(?<depName>[^\s'"]+)['"]?\s*$/; // TODO #12070
const serviceRe = /^\s*-\s*(?:name:\s+)?['"]?(?<depName>[^\s'"]+)['"]?\s*$/; // TODO #12070
const commentsRe = regEx(/^\s*#/);
const whitespaceRe = regEx('^(?<whitespace>\\s*)');
const imageRe = regEx(
`^(?P<whitespace>\\s*)image:(?:\\s+['"]?(?P<image>[^\\s'"]+)['"]?)?\\s*$`
);
const nameRe = regEx(`^\\s*name:\\s+['"]?(?P<depName>[^\\s'"]+)['"]?\\s*$`);
const serviceRe = regEx(
`^\\s*-\\s*(?:name:\\s+)?['"]?(?P<depName>[^\\s'"]+)['"]?\\s*$`
);
function skipCommentLines(
lines: string[],
lineNumber: number
Expand Down Expand Up @@ -61,7 +65,7 @@ export function extractPackageFile(content: string): PackageFile | null {
}
}
}
const services = /^\s*services:\s*$/.test(line); // TODO #12071 #12070
const services = regEx(/^\s*services:\s*$/).test(line); // TODO #12071
if (services) {
logger.trace(`Matched services on line ${lineNumber}`);
let foundImage: boolean;
Expand Down Expand Up @@ -120,15 +124,15 @@ export async function extractAllPackageFiles(
if (is.array(doc?.include)) {
for (const includeObj of doc.include) {
if (is.string(includeObj.local)) {
const fileObj = includeObj.local.replace(/^\//, ''); // TODO #12071 #12070
const fileObj = includeObj.local.replace(regEx(/^\//), ''); // TODO #12071
if (!seen.has(fileObj)) {
seen.add(fileObj);
filesToExamine.push(fileObj);
}
}
}
} else if (is.string(doc?.include)) {
const fileObj = doc.include.replace(/^\//, ''); // TODO #12071 #12070
const fileObj = doc.include.replace(regEx(/^\//), ''); // TODO #12071
if (!seen.has(fileObj)) {
seen.add(fileObj);
filesToExamine.push(fileObj);
Expand Down
18 changes: 9 additions & 9 deletions lib/manager/gradle/shallow/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { regEx } from '../../../util/regex';
import { TokenType } from './common';
import type { StringInterpolation, Token } from './types';

const escapedCharRegex = /\\['"bfnrt\\]/; // TODO #12070
const escapedCharRegex = /\\['"bfnrt\\]/; // TODO #12070 used in moo state which is incompatible with RE2
const escapedChars = {
[TokenType.EscapedChar]: {
match: escapedCharRegex,
Expand All @@ -24,17 +24,17 @@ const escapedChars = {
const lexer = moo.states({
// Top-level Groovy lexemes
main: {
[TokenType.LineComment]: { match: /\/\/.*?$/ }, // TODO #12070
[TokenType.MultiComment]: { match: /\/\*[^]*?\*\//, lineBreaks: true }, // TODO #12070
[TokenType.Newline]: { match: /\r?\n/, lineBreaks: true }, // TODO #12070
[TokenType.Space]: { match: /[ \t\r]+/ }, // TODO #12070
[TokenType.LineComment]: { match: /\/\/.*?$/ }, // TODO #12070 moo state is incompatible with RE2
[TokenType.MultiComment]: { match: /\/\*[^]*?\*\//, lineBreaks: true }, // TODO #12070 moo state is incompatible with RE2
[TokenType.Newline]: { match: /\r?\n/, lineBreaks: true }, // TODO #12070 moo state is incompatible with RE2
[TokenType.Space]: { match: /[ \t\r]+/ }, // TODO #12070 moo state is incompatible with RE2
[TokenType.Semicolon]: ';',
[TokenType.Colon]: ':',
[TokenType.Dot]: '.',
[TokenType.Comma]: ',',
[TokenType.Operator]: /(?:==|\+=?|-=?|\/=?|\*\*?|\.+|:)/, // TODO #12070
[TokenType.Operator]: /(?:==|\+=?|-=?|\/=?|\*\*?|\.+|:)/, // TODO #12070 moo state is incompatible with RE2
[TokenType.Assignment]: '=',
[TokenType.Word]: { match: /[a-zA-Z$_][a-zA-Z0-9$_]+/ }, // TODO #12070
[TokenType.Word]: { match: /[a-zA-Z$_][a-zA-Z0-9$_]+/ }, // TODO #12070 moo state is incompatible with RE2
[TokenType.LeftParen]: { match: '(' },
[TokenType.RightParen]: { match: ')' },
[TokenType.LeftBracket]: { match: '[' },
Expand Down Expand Up @@ -86,12 +86,12 @@ const lexer = moo.states({
variable: {
// Supported: ${foo}, $foo, ${ foo.bar.baz }, $foo.bar.baz
match:
/\${\s*[a-zA-Z_][a-zA-Z0-9_]*(?:\s*\.\s*[a-zA-Z_][a-zA-Z0-9_]*)*\s*}|\$[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*/, // TODO #12070
/\${\s*[a-zA-Z_][a-zA-Z0-9_]*(?:\s*\.\s*[a-zA-Z_][a-zA-Z0-9_]*)*\s*}|\$[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*/, // TODO #12070 moo state is incompatible with RE2
value: (x: string): string =>
x.replace(regEx(/^\${?\s*/), '').replace(regEx(/\s*}$/), ''),
},
[TokenType.IgnoredInterpolationStart]: {
match: /\${/, // TODO #12070
match: /\${/, // TODO #12070 moo state is incompatible with RE2
push: TokenType.IgnoredInterpolationStart,
},
[TokenType.Chars]: moo.fallback,
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/helmv3/update.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ReleaseType, inc } from 'semver';
import { logger } from '../../logger';
import { regEx } from '../../util/regex';
import type { BumpPackageVersionResult } from '../types';

export function bumpPackageVersion(
Expand All @@ -20,7 +21,7 @@ export function bumpPackageVersion(
}
logger.debug({ newChartVersion });
bumpedContent = content.replace(
/^(?<version>version:\s*).*$/m, // TODO #12070
regEx(`^(?P<version>version:\\s*).*$`, 'm'),
`$<version>${newChartVersion}`
);
if (bumpedContent === content) {
Expand Down
8 changes: 5 additions & 3 deletions lib/manager/leiningen/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { PackageDependency, PackageFile } from '../types';
import type { ExtractContext, ExtractedVariables } from './types';

export function trimAtKey(str: string, kwName: string): string | null {
const regex = new RegExp(`:${kwName}(?=\\s)`); // TODO #12070
const regex = new RegExp(`:${kwName}(?=\\s)`); // TODO #12070 RE2 doesn't support lookahead assesrtion will have to change functionality
const keyOffset = str.search(regex);
if (keyOffset < 0) {
return null;
Expand Down Expand Up @@ -103,7 +103,7 @@ function extractLeinRepos(content: string): string[] {
const result = [];

const repoContent = trimAtKey(
content.replace(/;;.*(?=[\r\n])/g, ''), // get rid of comments // TODO #12070
content.replace(/;;.*(?=[\r\n])/g, ''), // get rid of comments // TODO #12070 need to change functionality due to lookahead assertion
'repositories'
);

Expand All @@ -123,7 +123,9 @@ function extractLeinRepos(content: string): string[] {
}
}
const repoSectionContent = repoContent.slice(0, endIdx);
const matches = repoSectionContent.match(/"https?:\/\/[^"]*"/g) || []; // TODO #12070
const matches =
// eslint-disable-next-line @typescript-eslint/prefer-regexp-exec
repoSectionContent.match(regEx(/"https?:\/\/[^"]*"/g)) || []; // using .exec gives diff results than expected
const urls = matches.map((x) =>
x.replace(regEx(/^"/), '').replace(regEx(/"$/), '')
); // TODO #12071
Expand Down