pg-boss icon indicating copy to clipboard operation
pg-boss copied to clipboard

Semver issue, breaking change between version 9.0.0 and 9.0.1

Open mikecann opened this issue 2 years ago • 2 comments

Unfortunately, I just upgraded from version 9.0.0 to 9.0.1 and noticed that my code no longer compiles.

This is unexpected as this is only a minor change.

The issue centres around this change: https://github.com/timgit/pg-boss/compare/9.0.0...9.0.1#diff-a150fb53afee945f23f3fe7c176007111f3ba81bb0d188af4077d4a0fc4caa37L127

For example this code used to compile:

await this.services.pgBoss.client.work<GeneralJob>(
      queueName,
      async (job) => {
        return await handler(job.data);
      }
    );

Now it no longer does and instead requires that you don't return anything:

await this.services.pgBoss.client.work<GeneralJob>(queueName, async (job) => {
      await handler(job.data);
    });

Its not a big issue but I thought you should be aware that this might cause others' projects to unexpectadly to no longer compile.

mikecann avatar May 19 '23 03:05 mikecann

Seems related to #393

felipeelias avatar May 29 '23 14:05 felipeelias

Please try this again in 9.0.2 and see if it's resolved

timgit avatar Jul 02 '23 22:07 timgit