Skip to content

Commit

Permalink
fix(update-types): updateTypesOnFileSystem ends before writing the fi…
Browse files Browse the repository at this point in the history
…le (#1031)
  • Loading branch information
Scra3 committed Feb 20, 2024
1 parent 69cb088 commit 8a7386c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion packages/agent/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class Agent<S extends TSchema = TSchema> extends FrameworkMounter
async updateTypesOnFileSystem(typingsPath: string, typingsMaxDepth: number): Promise<void> {
const { logger } = this.options;
await this.customizer.getDataSource(logger);
this.customizer.updateTypesOnFileSystem(typingsPath, typingsMaxDepth);
await this.customizer.updateTypesOnFileSystem(typingsPath, typingsMaxDepth);
}

/**
Expand Down
5 changes: 0 additions & 5 deletions packages/forest-cloud/test/commands/update-typings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ describe('update-typings command', () => {
cmd.start('Updating typings'),
cmd.succeed('Your typings have been updated'),
]);
// TODO: agent does not have an await ! It's a bug but fixed on main.
// remove this sleep when merging on main
await new Promise(resolve => {
setTimeout(resolve, 500);
});

await expect(fs.access(setup.bootstrapPathManager.typings)).resolves.not.toThrow();

Expand Down

0 comments on commit 8a7386c

Please sign in to comment.