Skip to content

Commit

Permalink
fix(manager): correctly escape the dot character in fileMatch (#17048)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesyo committed Aug 8, 2022
1 parent 6f324e4 commit c8ca426
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/config/index.spec.ts
Expand Up @@ -95,7 +95,7 @@ describe('config/index', () => {
const configParser = await import('./index');
const config = configParser.getManagerConfig(parentConfig, 'npm');
expect(config).toContainEntries([
['fileMatch', ['(^|/)package.json$']],
['fileMatch', ['(^|/)package\\.json$']],
['rollbackPrs', true],
]);
expect(
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/cargo/index.ts
Expand Up @@ -11,7 +11,7 @@ export { extractPackageFile, updateArtifacts };

export const defaultConfig = {
commitMessageTopic: 'Rust crate {{depName}}',
fileMatch: ['(^|/)Cargo.toml$'],
fileMatch: ['(^|/)Cargo\\.toml$'],
versioning: cargoVersioning.id,
rangeStrategy: 'bump',
};
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/circleci/index.ts
Expand Up @@ -8,7 +8,7 @@ export const displayName = 'CircleCI';
export const url = 'https://circleci.com/docs/configuration-reference';

export const defaultConfig = {
fileMatch: ['(^|/).circleci/config.yml$'],
fileMatch: ['(^|/)\\.circleci/config\\.yml$'],
};

export const supportedDatasources = [DockerDatasource.id, OrbDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/cloudbuild/index.ts
Expand Up @@ -4,7 +4,7 @@ import { extractPackageFile } from './extract';
export { extractPackageFile };

export const defaultConfig = {
fileMatch: ['(^|/)cloudbuild.ya?ml'],
fileMatch: ['(^|/)cloudbuild\\.ya?ml'],
};

export const supportedDatasources = [DockerDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/composer/index.ts
Expand Up @@ -18,7 +18,7 @@ export {
};

export const defaultConfig = {
fileMatch: ['(^|/)([\\w-]*)composer.json$'],
fileMatch: ['(^|/)([\\w-]*)composer\\.json$'],
versioning: composerVersioningId,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/droneci/index.ts
Expand Up @@ -7,7 +7,7 @@ export const language = ProgrammingLanguage.Docker;
export { extractPackageFile };

export const defaultConfig = {
fileMatch: ['(^|/).drone.yml$'],
fileMatch: ['(^|/)\\.drone\\.yml$'],
};

export const supportedDatasources = [DockerDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/fleet/index.ts
Expand Up @@ -4,7 +4,7 @@ import { HelmDatasource } from '../../datasource/helm';
export { extractPackageFile } from './extract';

export const defaultConfig = {
fileMatch: ['(^|/)fleet.ya?ml'],
fileMatch: ['(^|/)fleet\\.ya?ml'],
};

export const supportedDatasources = [GitTagsDatasource.id, HelmDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/git-submodules/index.ts
Expand Up @@ -8,7 +8,7 @@ export { default as updateArtifacts } from './artifacts';
export const defaultConfig = {
enabled: false,
versioning: gitVersioning.id,
fileMatch: ['(^|/).gitmodules$'],
fileMatch: ['(^|/)\\.gitmodules$'],
};

export const supportedDatasources = [GitRefsDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/gomod/index.ts
Expand Up @@ -13,7 +13,7 @@ export const url = 'https://go.dev/ref/mod';
export const language = ProgrammingLanguage.Golang;

export const defaultConfig = {
fileMatch: ['(^|/)go.mod$'],
fileMatch: ['(^|/)go\\.mod$'],
};

export const supportedDatasources = [
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/gradle-wrapper/index.ts
Expand Up @@ -5,7 +5,7 @@ export { extractPackageFile } from './extract';
export { updateArtifacts } from './artifacts';

export const defaultConfig = {
fileMatch: ['(^|/)gradle/wrapper/gradle-wrapper.properties$'],
fileMatch: ['(^|/)gradle/wrapper/gradle-wrapper\\.properties$'],
versioning,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/helm-values/index.ts
Expand Up @@ -3,7 +3,7 @@ export { extractPackageFile } from './extract';

export const defaultConfig = {
commitMessageTopic: 'helm values {{depName}}',
fileMatch: ['(^|/)values.yaml$'],
fileMatch: ['(^|/)values\\.yaml$'],
pinDigests: false,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/helmfile/index.ts
Expand Up @@ -7,7 +7,7 @@ export const defaultConfig = {
stable: 'https://charts.helm.sh/stable',
},
commitMessageTopic: 'helm chart {{depName}}',
fileMatch: ['(^|/)helmfile.yaml$'],
fileMatch: ['(^|/)helmfile\\.yaml$'],
};

export const supportedDatasources = [HelmDatasource.id, DockerDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/helmv3/index.ts
Expand Up @@ -11,7 +11,7 @@ export const defaultConfig = {
stable: 'https://charts.helm.sh/stable',
},
commitMessageTopic: 'helm chart {{depName}}',
fileMatch: ['(^|/)Chart.yaml$'],
fileMatch: ['(^|/)Chart\\.yaml$'],
};

export const supportedDatasources = [DockerDatasource.id, HelmDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/jsonnet-bundler/index.ts
Expand Up @@ -5,7 +5,7 @@ export { extractPackageFile } from './extract';
export const supportsLockFileMaintenance = true;

export const defaultConfig = {
fileMatch: ['(^|/)jsonnetfile.json$'],
fileMatch: ['(^|/)jsonnetfile\\.json$'],
datasource: GitTagsDatasource.id,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/meteor/index.ts
Expand Up @@ -6,7 +6,7 @@ export { extractPackageFile } from './extract';
export const language = ProgrammingLanguage.JavaScript;

export const defaultConfig = {
fileMatch: ['(^|/)package.js$'],
fileMatch: ['(^|/)package\\.js$'],
};

export const supportedDatasources = [NpmDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/nodenv/index.ts
Expand Up @@ -10,7 +10,7 @@ export const url = 'https://github.com/nodenv/nodenv';
export const language = ProgrammingLanguage.NodeJS;

export const defaultConfig = {
fileMatch: ['(^|/).node-version$'],
fileMatch: ['(^|/)\\.node-version$'],
versioning: nodeVersioning.id,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/npm/index.ts
Expand Up @@ -16,7 +16,7 @@ export const language = ProgrammingLanguage.JavaScript;
export const supportsLockFileMaintenance = true;

export const defaultConfig = {
fileMatch: ['(^|/)package.json$'],
fileMatch: ['(^|/)package\\.json$'],
rollbackPrs: true,
versioning: npmVersioning.id,
digest: {
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/pip_setup/index.ts
Expand Up @@ -6,7 +6,7 @@ export { extractPackageFile } from './extract';
export const language = ProgrammingLanguage.Python;

export const defaultConfig = {
fileMatch: ['(^|/)setup.py$'],
fileMatch: ['(^|/)setup\\.py$'],
};

export const supportedDatasources = [PypiDatasource.id];
2 changes: 1 addition & 1 deletion lib/modules/manager/pyenv/index.ts
Expand Up @@ -9,6 +9,6 @@ export const language = ProgrammingLanguage.Python;
export const supportedDatasources = [DockerDatasource.id];

export const defaultConfig = {
fileMatch: ['(^|/).python-version$'],
fileMatch: ['(^|/)\\.python-version$'],
versioning: dockerVersioning.id,
};
2 changes: 1 addition & 1 deletion lib/modules/manager/travis/index.ts
Expand Up @@ -9,7 +9,7 @@ export const language = ProgrammingLanguage.NodeJS;
export const supportedDatasources = [GithubTagsDatasource.id];

export const defaultConfig = {
fileMatch: ['^.travis.yml$'],
fileMatch: ['^\\.travis\\.yml$'],
major: {
enabled: false,
},
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/velaci/index.ts
Expand Up @@ -3,7 +3,7 @@ import { DockerDatasource } from '../../datasource/docker';
export { extractPackageFile } from './extract';

export const defaultConfig = {
fileMatch: ['(^|/).vela.ya?ml$'],
fileMatch: ['(^|/)\\.vela\\.ya?ml$'],
};

export const supportedDatasources = [DockerDatasource.id];
2 changes: 1 addition & 1 deletion lib/workers/repository/extract/file-match.spec.ts
Expand Up @@ -53,7 +53,7 @@ describe('workers/repository/extract/file-match', () => {
includePaths: [],
ignorePaths: [],
manager: 'npm',
fileMatch: ['(^|/)package.json$'],
fileMatch: ['(^|/)package\\.json$'],
};

it('returns npm files', () => {
Expand Down

0 comments on commit c8ca426

Please sign in to comment.