Skip to content

Commit

Permalink
revert some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
buenaflor committed Aug 7, 2024
1 parent 8572d00 commit 5c7f6f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
5 changes: 1 addition & 4 deletions src/targets/__tests__/maven.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,7 @@ describe('upload', () => {
.fn()
.mockResolvedValueOnce('artifact/download/path');
mvnTarget.isBomFile = jest.fn().mockResolvedValueOnce(false);
mvnTarget.getPomFileInDist = jest
.fn()
.mockResolvedValueOnce('pom-default.xml');

mvnTarget.getPomFileInDist = jest.fn().mockResolvedValueOnce('pom-default.xml');
await mvnTarget.upload('r3v1s10n');

expect(retrySpawnProcess).toHaveBeenCalledTimes(1);
Expand Down
18 changes: 5 additions & 13 deletions src/targets/maven.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,7 @@ export class MavenTarget extends BaseTarget {
this.logger.debug('Found POM: ', pomFile);
await this.uploadPomDistribution(distDir);
} else {
this.logger.warn(
`No BOM/POM file found in: ${distDir}, skipping directory`
);
this.logger.warn(`No BOM/POM file found in: ${distDir}, skipping directory`);
}
}

Expand Down Expand Up @@ -347,7 +345,7 @@ export class MavenTarget extends BaseTarget {
} catch (error) {
this.logger.warn(
`Could not determine if path corresponds to a BOM file: ${pomFilepath}\n` +
'Error:\n',
'Error:\n',
error
);
return false;
Expand Down Expand Up @@ -521,15 +519,9 @@ export class MavenTarget extends BaseTarget {
* this function renames module.json to dist.module,
* making it fit for mvn publishing.
*/
public async fixModuleFileName(
distDir: string,
moduleFile: string
): Promise<void> {
public async fixModuleFileName(distDir: string, moduleFile: string): Promise<void> {
const fallbackFile = join(distDir, 'module.json');
if (
!(await this.fileExists(moduleFile)) &&
(await this.fileExists(fallbackFile))
) {
if (!await this.fileExists(moduleFile) && await this.fileExists(fallbackFile)) {
await fsPromises.rename(fallbackFile, moduleFile);
}
}
Expand Down Expand Up @@ -579,7 +571,7 @@ export class MavenTarget extends BaseTarget {
javadocFile: join(distDir, `${moduleName}-javadoc.jar`),
sourcesFile: join(distDir, `${moduleName}-sources.jar`),
pomFile: join(distDir, 'pom-default.xml'),
moduleFile: join(distDir, `${moduleName}.module`),
moduleFile: join(distDir, `${moduleName}.module`)
};
}

Expand Down

0 comments on commit 5c7f6f9

Please sign in to comment.