@sapphire/plugin-logger 4.0.0-pr-513.cc0467d.0 → 4.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,24 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ # [@sapphire/plugin-logger@4.0.0](https://github.com/sapphiredev/plugins/compare/@sapphire/plugin-logger@4.0.0...@sapphire/plugin-logger@4.0.0) - (2023-12-05)
6
+
7
+ ## 🏠 Refactor
8
+
9
+ - **register:** Cleanup unnecessary side effect imports of index ([dede596](https://github.com/sapphiredev/plugins/commit/dede596ae22ceec2700dd860287a1260f092b502))
10
+
11
+ ## 🐛 Bug Fixes
12
+
13
+ - **logger:** In register load module augments from index to ensure a clean `.d.ts` file ([eed0124](https://github.com/sapphiredev/plugins/commit/eed01248cb5d5d20eb68bb2583c186f6f70b4d84))
14
+ - Update transitive dependencies ([9fd4cfa](https://github.com/sapphiredev/plugins/commit/9fd4cfae031b20044aad8ae1051ade3dd29c69dd))
15
+
16
+ ## 🚀 Features
17
+
18
+ - Split ESM and CJS bundles for proper ESM and CJS loading (#512) ([d9aa006](https://github.com/sapphiredev/plugins/commit/d9aa006ff8c7f78a613dcca605d3353b992b7a46))
19
+ - 💥 **BREAKING CHANGE:** This ensures that the plugins will properly load the
20
+ either only ESM or only CJS files. This is done by outputting
21
+ dist/cjs and dist/esm folders. This requires @sapphire/framework v5.x!
22
+
5
23
  # [@sapphire/plugin-logger@3.0.7](https://github.com/sapphiredev/plugins/compare/@sapphire/plugin-logger@3.0.7...@sapphire/plugin-logger@3.0.7) - (2023-11-16)
6
24
 
7
25
  ## 🐛 Bug Fixes
@@ -6,7 +6,7 @@ var LoggerStyle_cjs = require('./lib/LoggerStyle.cjs');
6
6
  var LoggerTimestamp_cjs = require('./lib/LoggerTimestamp.cjs');
7
7
 
8
8
  // src/index.ts
9
- var version = "4.0.0-pr-513.cc0467d.0";
9
+ var version = "4.0.0";
10
10
 
11
11
  exports.version = version;
12
12
  Object.keys(Logger_cjs).forEach(function (k) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";AAEA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAaP,IAAM,UAAkB","sourcesContent":["import type { LoggerOptions } from './lib/Logger';\n\nexport * from './lib/Logger';\nexport * from './lib/LoggerLevel';\nexport * from './lib/LoggerStyle';\nexport * from './lib/LoggerTimestamp';\n\ndeclare module '@sapphire/framework' {\n\texport interface ClientLoggerOptions extends LoggerOptions {}\n}\n\n/**\n * The [@sapphire/plugin-logger](https://github.com/sapphiredev/plugins/blob/main/packages/logger) 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 = '4.0.0-pr-513.cc0467d.0';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";AAEA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAaP,IAAM,UAAkB","sourcesContent":["import type { LoggerOptions } from './lib/Logger';\n\nexport * from './lib/Logger';\nexport * from './lib/LoggerLevel';\nexport * from './lib/LoggerStyle';\nexport * from './lib/LoggerTimestamp';\n\ndeclare module '@sapphire/framework' {\n\texport interface ClientLoggerOptions extends LoggerOptions {}\n}\n\n/**\n * The [@sapphire/plugin-logger](https://github.com/sapphiredev/plugins/blob/main/packages/logger) 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 = '4.0.0';\n"]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index_cjs = require('./index.cjs');
4
3
  var framework = require('@sapphire/framework');
4
+ var index_cjs = require('./index.cjs');
5
5
 
6
6
  var __defProp = Object.defineProperty;
7
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/register.ts"],"names":[],"mappings":";;;;AAAA,OAAO;AAEP,SAAS,QAAQ,2BAA2B,sBAAsB;AAElE,SAAS,cAAc;AAKhB,IAAM,gBAAN,MAAM,sBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA,EAIxC,QAAe,yBAAyB,EAAwB,SAA8B;AAC7F,YAAQ,WAAW,CAAC;AACpB,YAAQ,OAAO,WAAW,IAAI,OAAO,QAAQ,MAAM;AAAA,EACpD;AACD;AARyC;AAAlC,IAAM,eAAN;AAUP,eAAe,QAAQ,sCAAsC,aAAa,yBAAyB,GAAG,kCAAkC","sourcesContent":["import './index';\n\nimport { Plugin, preGenericsInitialization, SapphireClient } from '@sapphire/framework';\nimport type { ClientOptions } from 'discord.js';\nimport { Logger } from './index';\n\n/**\n * @since 1.0.0\n */\nexport class LoggerPlugin extends Plugin {\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic static [preGenericsInitialization](this: SapphireClient, options: ClientOptions): void {\n\t\toptions.logger ??= {};\n\t\toptions.logger.instance = new Logger(options.logger);\n\t}\n}\n\nSapphireClient.plugins.registerPreGenericsInitializationHook(LoggerPlugin[preGenericsInitialization], 'Logger-PreGenericsInitialization');\n"]}
1
+ {"version":3,"sources":["../../src/register.ts"],"names":[],"mappings":";;;;AAAA,SAAS,QAAQ,2BAA2B,sBAAsB;AAElE,SAAS,cAAc;AAKhB,IAAM,gBAAN,MAAM,sBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA,EAIxC,QAAe,yBAAyB,EAAwB,SAA8B;AAC7F,YAAQ,WAAW,CAAC;AACpB,YAAQ,OAAO,WAAW,IAAI,OAAO,QAAQ,MAAM;AAAA,EACpD;AACD;AARyC;AAAlC,IAAM,eAAN;AAUP,eAAe,QAAQ,sCAAsC,aAAa,yBAAyB,GAAG,kCAAkC","sourcesContent":["import { Plugin, preGenericsInitialization, SapphireClient } from '@sapphire/framework';\nimport type { ClientOptions } from 'discord.js';\nimport { Logger } from './index';\n\n/**\n * @since 1.0.0\n */\nexport class LoggerPlugin extends Plugin {\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic static [preGenericsInitialization](this: SapphireClient, options: ClientOptions): void {\n\t\toptions.logger ??= {};\n\t\toptions.logger.instance = new Logger(options.logger);\n\t}\n}\n\nSapphireClient.plugins.registerPreGenericsInitializationHook(LoggerPlugin[preGenericsInitialization], 'Logger-PreGenericsInitialization');\n"]}
@@ -1,4 +1,3 @@
1
- import './index.cjs';
2
1
  import { Plugin, preGenericsInitialization, SapphireClient } from '@sapphire/framework';
3
2
  import { ClientOptions } from 'discord.js';
4
3
 
@@ -4,7 +4,7 @@ export * from './lib/LoggerLevel.mjs';
4
4
  export * from './lib/LoggerStyle.mjs';
5
5
  export * from './lib/LoggerTimestamp.mjs';
6
6
 
7
- var version = "4.0.0-pr-513.cc0467d.0";
7
+ var version = "4.0.0";
8
8
 
9
9
  export { version };
10
10
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;AAEA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAaP,IAAM,UAAkB","sourcesContent":["import type { LoggerOptions } from './lib/Logger';\n\nexport * from './lib/Logger';\nexport * from './lib/LoggerLevel';\nexport * from './lib/LoggerStyle';\nexport * from './lib/LoggerTimestamp';\n\ndeclare module '@sapphire/framework' {\n\texport interface ClientLoggerOptions extends LoggerOptions {}\n}\n\n/**\n * The [@sapphire/plugin-logger](https://github.com/sapphiredev/plugins/blob/main/packages/logger) 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 = '4.0.0-pr-513.cc0467d.0';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;AAEA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAaP,IAAM,UAAkB","sourcesContent":["import type { LoggerOptions } from './lib/Logger';\n\nexport * from './lib/Logger';\nexport * from './lib/LoggerLevel';\nexport * from './lib/LoggerStyle';\nexport * from './lib/LoggerTimestamp';\n\ndeclare module '@sapphire/framework' {\n\texport interface ClientLoggerOptions extends LoggerOptions {}\n}\n\n/**\n * The [@sapphire/plugin-logger](https://github.com/sapphiredev/plugins/blob/main/packages/logger) 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 = '4.0.0';\n"]}
@@ -1,4 +1,3 @@
1
- import './index.mjs';
2
1
  import { Plugin, preGenericsInitialization, SapphireClient } from '@sapphire/framework';
3
2
  import { ClientOptions } from 'discord.js';
4
3
 
@@ -1,6 +1,6 @@
1
1
  import { __name } from './chunk-6QB3UK4Q.mjs';
2
- import { Logger } from './index.mjs';
3
2
  import { SapphireClient, preGenericsInitialization, Plugin } from '@sapphire/framework';
3
+ import { Logger } from './index.mjs';
4
4
 
5
5
  var _LoggerPlugin = class _LoggerPlugin extends Plugin {
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/register.ts"],"names":[],"mappings":";;;;;AAAA,OAAO;AAEP,SAAS,QAAQ,2BAA2B,sBAAsB;AAElE,SAAS,cAAc;AAKhB,IAAM,gBAAN,MAAM,sBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA,EAIxC,QAAe,yBAAyB,EAAwB,SAA8B;AAC7F,YAAQ,WAAW,CAAC;AACpB,YAAQ,OAAO,WAAW,IAAI,OAAO,QAAQ,MAAM;AAAA,EACpD;AACD;AARyC;AAAlC,IAAM,eAAN;AAUP,eAAe,QAAQ,sCAAsC,aAAa,yBAAyB,GAAG,kCAAkC","sourcesContent":["import './index';\n\nimport { Plugin, preGenericsInitialization, SapphireClient } from '@sapphire/framework';\nimport type { ClientOptions } from 'discord.js';\nimport { Logger } from './index';\n\n/**\n * @since 1.0.0\n */\nexport class LoggerPlugin extends Plugin {\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic static [preGenericsInitialization](this: SapphireClient, options: ClientOptions): void {\n\t\toptions.logger ??= {};\n\t\toptions.logger.instance = new Logger(options.logger);\n\t}\n}\n\nSapphireClient.plugins.registerPreGenericsInitializationHook(LoggerPlugin[preGenericsInitialization], 'Logger-PreGenericsInitialization');\n"]}
1
+ {"version":3,"sources":["../../src/register.ts"],"names":[],"mappings":";;;;;AAAA,SAAS,QAAQ,2BAA2B,sBAAsB;AAElE,SAAS,cAAc;AAKhB,IAAM,gBAAN,MAAM,sBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA,EAIxC,QAAe,yBAAyB,EAAwB,SAA8B;AAC7F,YAAQ,WAAW,CAAC;AACpB,YAAQ,OAAO,WAAW,IAAI,OAAO,QAAQ,MAAM;AAAA,EACpD;AACD;AARyC;AAAlC,IAAM,eAAN;AAUP,eAAe,QAAQ,sCAAsC,aAAa,yBAAyB,GAAG,kCAAkC","sourcesContent":["import { Plugin, preGenericsInitialization, SapphireClient } from '@sapphire/framework';\nimport type { ClientOptions } from 'discord.js';\nimport { Logger } from './index';\n\n/**\n * @since 1.0.0\n */\nexport class LoggerPlugin extends Plugin {\n\t/**\n\t * @since 1.0.0\n\t */\n\tpublic static [preGenericsInitialization](this: SapphireClient, options: ClientOptions): void {\n\t\toptions.logger ??= {};\n\t\toptions.logger.instance = new Logger(options.logger);\n\t}\n}\n\nSapphireClient.plugins.registerPreGenericsInitializationHook(LoggerPlugin[preGenericsInitialization], 'Logger-PreGenericsInitialization');\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/plugin-logger",
3
- "version": "4.0.0-pr-513.cc0467d.0",
3
+ "version": "4.0.0",
4
4
  "description": "Plugin for @sapphire/framework to have pretty console output",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
@@ -58,8 +58,7 @@
58
58
  "directory": "packages/logger"
59
59
  },
60
60
  "files": [
61
- "dist/",
62
- "!dist/.tsbuildinfo"
61
+ "dist/"
63
62
  ],
64
63
  "engines": {
65
64
  "node": ">=v18",