@sapphire/plugin-scheduled-tasks 10.0.0-next.4278ab0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ # [@sapphire/plugin-scheduled-tasks@10.0.0](https://github.com/sapphiredev/plugins/compare/@sapphire/plugin-scheduled-tasks@10.0.0...@sapphire/plugin-scheduled-tasks@10.0.0) - (2023-12-27)
6
+
7
+ ## 🚀 Features
8
+
9
+ - Bullmq v5 (#529) ([4278ab0](https://github.com/sapphiredev/plugins/commit/4278ab035989ec99bf0f7233f98e4ff75b57f71d))
10
+ - 💥 **BREAKING CHANGE:** This plugin now uses bullmq v5.1.0 (previously v3.15.8). Refer to the bullmq breaking changes from v4.0.0 onwards for any breaking changes that they have included https://github.com/taskforcesh/bullmq/blob/master/docs/gitbook/changelog.md#400-2023-06-21
11
+ - **scheduled-tasks:** Enforce payload types, clearer Redis/BullMQ errors (#509) ([9fbf980](https://github.com/sapphiredev/plugins/commit/9fbf980e603022c3e1cd61a9ad742cd43a60e7fa))
12
+ - 💥 **BREAKING CHANGE:** Refer to https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks/UPGRADING-v9-v10.md for upgrading instructions.
13
+ - 💥 **BREAKING CHANGE:** payload types are now enforced, you may need to update your code to match.
14
+ - 💥 **BREAKING CHANGE:** The `ScheduledTaskJob` interface has been removed in favor of defining types on `ScheduledTasks`.
15
+ - 💥 **BREAKING CHANGE:** Due to the removal of `ScheduledTaskJob`, the `BullClient` will now be typed as `unknown` since the Job types in the Queue can not _really_ be known. So you will need to do validation when interacting directly with the client.
16
+ - 💥 **BREAKING CHANGE:** The included error listeners are now enabled by default. If you want them to be disabled, just set `loadScheduledTaskErrorListeners` to false in the `SapphireClient` options.
17
+ - 💥 **BREAKING CHANGE:** The internal BullMQ client does not actually throw any errors, it just emits them from the client. As such, those error events will now be sent to the corresponding error listener registered by the plugin.
18
+ - 💥 **BREAKING CHANGE:** The error listeners previously only returned the name of the task when an error was emitted, but now the event will provide the associated Piece.
19
+
5
20
  # [@sapphire/plugin-scheduled-tasks@9.1.0](https://github.com/sapphiredev/plugins/compare/@sapphire/plugin-scheduled-tasks@9.1.0...@sapphire/plugin-scheduled-tasks@9.1.0) - (2023-12-18)
6
21
 
7
22
  ## 🚀 Features
@@ -8,7 +8,7 @@ var ScheduledTaskTypes_cjs = require('./lib/types/ScheduledTaskTypes.cjs');
8
8
  var _load_cjs = require('./listeners/_load.cjs');
9
9
 
10
10
  // src/index.ts
11
- var version = "10.0.0-next.4278ab0.0";
11
+ var version = "10.0.0";
12
12
 
13
13
  Object.defineProperty(exports, 'loadListeners', {
14
14
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,qBAAqB;AA8BvB,IAAM,UAAkB","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.0-next.4278ab0.0';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,qBAAqB;AA8BvB,IAAM,UAAkB","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.0';\n"]}
@@ -6,7 +6,7 @@ export * from './lib/types/ScheduledTaskEvents.mjs';
6
6
  export * from './lib/types/ScheduledTaskTypes.mjs';
7
7
  export { loadListeners } from './listeners/_load.mjs';
8
8
 
9
- var version = "10.0.0-next.4278ab0.0";
9
+ var version = "10.0.0";
10
10
 
11
11
  export { version };
12
12
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,qBAAqB;AA8BvB,IAAM,UAAkB","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.0-next.4278ab0.0';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;AAIA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,qBAAqB;AA8BvB,IAAM,UAAkB","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/plugin-scheduled-tasks",
3
- "version": "10.0.0-next.4278ab0.0",
3
+ "version": "10.0.0",
4
4
  "description": "Plugin for @sapphire/framework to have scheduled tasks",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",