Skip to content

Commit

Permalink
Merge pull request #91 from mareklibra/unify.prettier
Browse files Browse the repository at this point in the history
chore: unify prettier version
  • Loading branch information
batzionb authored Nov 28, 2024
2 parents ed4917c + 8b934a3 commit dacc7ff
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 38 deletions.
2 changes: 1 addition & 1 deletion workspaces/orchestrator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@spotify/prettier-config": "^12.0.0",
"knip": "^5.27.4",
"node-gyp": "^9.0.0",
"prettier": "^2.3.2",
"prettier": "3.3.3",
"typescript": "~5.3.0"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion workspaces/orchestrator/packages/app/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ export class DataIndexService {

public async initInputProcessDefinitionArgs(): Promise<IntrospectionField[]> {
if (this.processDefinitionArguments.length === 0) {
this.processDefinitionArguments = await this.inspectInputArgument(
'ProcessDefinition',
);
this.processDefinitionArguments =
await this.inspectInputArgument('ProcessDefinition');
}
return this.processDefinitionArguments; // For testing purposes
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export class DevModeService {
private readonly connection: DevModeConnectionConfig;
private readonly gitService;

constructor(config: Config, private readonly logger: LoggerService) {
constructor(
config: Config,
private readonly logger: LoggerService,
) {
this.connection = this.extractConnectionConfig(config);
this.gitService = new GitService(logger, config);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ export class SonataFlowService {
public async fetchWorkflowDefinition(
definitionId: string,
): Promise<WorkflowDefinition | undefined> {
const source = await this.dataIndexService.fetchWorkflowSource(
definitionId,
);
const source =
await this.dataIndexService.fetchWorkflowSource(definitionId);
if (source) {
return fromWorkflowSource(source);
}
Expand Down Expand Up @@ -157,9 +156,8 @@ export class SonataFlowService {
public async fetchWorkflowOverview(
definitionId: string,
): Promise<WorkflowOverview | undefined> {
const source = await this.dataIndexService.fetchWorkflowSource(
definitionId,
);
const source =
await this.dataIndexService.fetchWorkflowSource(definitionId);
if (!source) {
this.logger.debug(`Workflow source not found: ${definitionId}`);
return undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,8 @@ describe('getWorkflowOverviewById', () => {
).mockResolvedValue(mockOverviewsV1);

// Act
const result: WorkflowOverviewDTO = await v2.getWorkflowOverviewById(
'test_workflowId',
);
const result: WorkflowOverviewDTO =
await v2.getWorkflowOverviewById('test_workflowId');

// Assert
expect(result).toEqual(mapToWorkflowOverviewDTO(mockOverviewsV1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ function replaceSparseArrayElementsdWithEmptyObject(value: any): any {
return item ? replaceSparseArrayElementsdWithEmptyObject(item) : {};
});
} else if (value && typeof value === 'object') {
return Object.keys(value).reduce((acc, key) => {
acc[key] = replaceSparseArrayElementsdWithEmptyObject(value[key]);
return acc;
}, {} as Record<string, any>);
return Object.keys(value).reduce(
(acc, key) => {
acc[key] = replaceSparseArrayElementsdWithEmptyObject(value[key]);
return acc;
},
{} as Record<string, any>,
);
}
return value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,8 @@ describe('OrchestratorClient', () => {
jest.spyOn(axios, 'request').mockResolvedValueOnce(mockResponse);

// When
const result = await orchestratorClient.listWorkflowOverviews(
paginationInfo,
);
const result =
await orchestratorClient.listWorkflowOverviews(paginationInfo);

// Then
expect(result).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const RefForwardingWorkflowEditor: ForwardRefRenderFunction<
endLineNumber: lsDiagnostic.range.end.line + 1,
endColumn: lsDiagnostic.range.end.character + 1,
},
} as Notification),
}) as Notification,
);
}, [editor, embeddedFile, languageService]);

Expand Down Expand Up @@ -215,18 +215,14 @@ const RefForwardingWorkflowEditor: ForwardRefRenderFunction<
});
}, [editorMode, embeddedFile, languageService, stateControl]);

useImperativeHandle(
forwardedRef,
() => {
return {
validate,
getContent,
workflowDefinition: workflowDefinitionPromise.data,
isReady: ready,
};
},
[validate, getContent, workflowDefinitionPromise.data, ready],
);
useImperativeHandle(forwardedRef, () => {
return {
validate,
getContent,
workflowDefinition: workflowDefinitionPromise.data,
isReady: ready,
};
}, [validate, getContent, workflowDefinitionPromise.data, ready]);

useCancelableEffect(
useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const useStyles = makeStyles(
[ProcessInstanceStatusDTO.Pending]: {
color: theme.palette.grey[500],
},
} as const),
}) as const,
);

export const useWorkflowInstanceStateColors = (
Expand Down
4 changes: 2 additions & 2 deletions workspaces/orchestrator/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7364,7 +7364,7 @@ __metadata:
"@spotify/prettier-config": ^12.0.0
knip: ^5.27.4
node-gyp: ^9.0.0
prettier: ^2.3.2
prettier: 3.3.3
typescript: ~5.3.0
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -30122,7 +30122,7 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^2.0.0, prettier@npm:^2.3.2, prettier@npm:^2.7.1":
"prettier@npm:^2.0.0, prettier@npm:^2.7.1":
version: 2.8.8
resolution: "prettier@npm:2.8.8"
bin:
Expand Down

0 comments on commit dacc7ff

Please sign in to comment.