Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: renovatebot/renovate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 39.215.2
Choose a base ref
...
head repository: renovatebot/renovate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 39.216.0
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 25, 2025

  1. feat(scalafmt): parse version when enclosed in quotes (#35001)

    gaeljw authored Mar 25, 2025
    Copy the full SHA
    e63820b View commit details
Showing with 20 additions and 1 deletion.
  1. +19 −0 lib/modules/manager/scalafmt/extract.spec.ts
  2. +1 −1 lib/modules/manager/scalafmt/extract.ts
19 changes: 19 additions & 0 deletions lib/modules/manager/scalafmt/extract.spec.ts
Original file line number Diff line number Diff line change
@@ -22,6 +22,25 @@ describe('modules/manager/scalafmt/extract', () => {
});
});

it('extracts version correctly if enclosed in quotes', () => {
const scalafmtConf = codeBlock`
version = "3.8.0"
`;
const packages = extractPackageFile(scalafmtConf);
expect(packages).toMatchObject({
deps: [
{
datasource: 'github-releases',
packageName: 'scalameta/scalafmt',
depName: 'scalafmt',
currentValue: '3.8.0',
versioning: 'semver',
extractVersion: '^v(?<version>\\S+)',
},
],
});
});

it('ignore file if no version specified', () => {
const scalafmtConf = codeBlock`
maxColumn = 80
2 changes: 1 addition & 1 deletion lib/modules/manager/scalafmt/extract.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import * as semverVersioning from '../../versioning/semver';
import type { PackageDependency, PackageFileContent } from '../types';

const scalafmtVersionRegex = regEx(
'version *= *(?<version>\\d+\\.\\d+\\.\\d+)',
'version *= *"?(?<version>\\d+\\.\\d+\\.\\d+)"?',
);

export function extractPackageFile(content: string): PackageFileContent | null {