@geekmidas/logger 1.0.0 → 1.0.2

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
@@ -1,5 +1,17 @@
1
1
  # @geekmidas/logger
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 🐛 [`d70c6c0`](https://github.com/geekmidas/toolbox/commit/d70c6c0aeb8a79da2473ac77dbd8255a4a2f5651) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix `package.json` exports so TypeScript declarations resolve correctly under NodeNext/Bundler module resolution. Each subpath export now nests `types` inside its `import`/`require` condition, pointing at the `.d.mts` and `.d.cts` files that `tsdown` actually emits (previously the exports referenced non-existent `.d.ts` files, causing type-resolution failures for consumers). Both ESM (`.mjs`) and CJS (`.cjs`) runtime entry points are preserved. Additionally, `@geekmidas/ui` had `import` paths pointing at `.js` files that were never emitted — those are corrected to `.mjs`.
8
+
9
+ ## 1.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - ✨ [`0830c6e`](https://github.com/geekmidas/toolbox/commit/0830c6e0d60842526788e0e1f0e78827514ea7b3) Thanks [@geekmidas](https://github.com/geekmidas)! - Add optional sniff support
14
+
3
15
  ## 1.0.0
4
16
 
5
17
  ### Major Changes
package/package.json CHANGED
@@ -1,29 +1,49 @@
1
1
  {
2
2
  "name": "@geekmidas/logger",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A simple and flexible logging library for Node.js and the browser",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
9
+ "import": {
10
+ "types": "./dist/index.d.mts",
11
+ "default": "./dist/index.mjs"
12
+ },
13
+ "require": {
14
+ "types": "./dist/index.d.cts",
15
+ "default": "./dist/index.cjs"
16
+ }
12
17
  },
13
18
  "./pino": {
14
- "types": "./dist/pino.d.ts",
15
- "import": "./dist/pino.mjs",
16
- "require": "./dist/pino.cjs"
19
+ "import": {
20
+ "types": "./dist/pino.d.mts",
21
+ "default": "./dist/pino.mjs"
22
+ },
23
+ "require": {
24
+ "types": "./dist/pino.d.cts",
25
+ "default": "./dist/pino.cjs"
26
+ }
17
27
  },
18
28
  "./console": {
19
- "types": "./dist/console.d.ts",
20
- "import": "./dist/console.mjs",
21
- "require": "./dist/console.cjs"
29
+ "import": {
30
+ "types": "./dist/console.d.mts",
31
+ "default": "./dist/console.mjs"
32
+ },
33
+ "require": {
34
+ "types": "./dist/console.d.cts",
35
+ "default": "./dist/console.cjs"
36
+ }
22
37
  },
23
38
  "./redact": {
24
- "types": "./dist/redact-paths.d.ts",
25
- "import": "./dist/redact-paths.mjs",
26
- "require": "./dist/redact-paths.cjs"
39
+ "import": {
40
+ "types": "./dist/redact-paths.d.mts",
41
+ "default": "./dist/redact-paths.mjs"
42
+ },
43
+ "require": {
44
+ "types": "./dist/redact-paths.d.cts",
45
+ "default": "./dist/redact-paths.cjs"
46
+ }
27
47
  }
28
48
  },
29
49
  "repository": {
@@ -1,5 +1,5 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2
- import { ConsoleLogger, createLogger } from '../console';
2
+ import { ConsoleLogger, createLogger, DEFAULT_LOGGER } from '../console';
3
3
  import { LogLevel } from '../types';
4
4
 
5
5
  describe('ConsoleLogger', () => {
@@ -623,8 +623,6 @@ describe('ConsoleLogger', () => {
623
623
 
624
624
  describe('DEFAULT_LOGGER', () => {
625
625
  it('should export default logger instance', () => {
626
- const { DEFAULT_LOGGER } = require('../console');
627
-
628
626
  expect(DEFAULT_LOGGER).toBeDefined();
629
627
  expect(DEFAULT_LOGGER.data).toBeDefined();
630
628
  });