mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
fix: Maven-based update functions (#5405)
This commit is contained in:
parent
0b61cfc171
commit
b6d84a2775
4 changed files with 23 additions and 4 deletions
|
@ -18,7 +18,7 @@ describe('manager/deps-edn/update', () => {
|
|||
newValue: `${dep.currentValue}-9999`,
|
||||
};
|
||||
const { currentValue, newValue } = upgrade;
|
||||
const newFileContent = updateDependency(depsEdn, upgrade);
|
||||
const newFileContent = updateDependency({ fileContent: depsEdn, upgrade });
|
||||
const cmpContent = depsEdn.replace(currentValue, newValue);
|
||||
expect(newFileContent).toEqual(cmpContent);
|
||||
});
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
export { updateAtPosition as updateDependency } from '../maven/update';
|
||||
import { UpdateDependencyConfig } from '../common';
|
||||
import { updateAtPosition } from '../maven/update';
|
||||
|
||||
export function updateDependency({
|
||||
fileContent,
|
||||
upgrade,
|
||||
}: UpdateDependencyConfig): string | null {
|
||||
return updateAtPosition(fileContent, upgrade);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,10 @@ describe('manager/leiningen/update', () => {
|
|||
newValue: `${dep.currentValue}-9999`,
|
||||
};
|
||||
const { currentValue, newValue } = upgrade;
|
||||
const newFileContent = updateDependency(leinProjectClj, upgrade);
|
||||
const newFileContent = updateDependency({
|
||||
fileContent: leinProjectClj,
|
||||
upgrade,
|
||||
});
|
||||
const cmpContent = leinProjectClj.replace(currentValue, newValue);
|
||||
expect(newFileContent).toEqual(cmpContent);
|
||||
});
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
export { updateAtPosition as updateDependency } from '../maven/update';
|
||||
import { UpdateDependencyConfig } from '../common';
|
||||
import { updateAtPosition } from '../maven/update';
|
||||
|
||||
export function updateDependency({
|
||||
fileContent,
|
||||
upgrade,
|
||||
}: UpdateDependencyConfig): string | null {
|
||||
return updateAtPosition(fileContent, upgrade);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue