Skip to content

Commit fec3697

Browse files
committed
fix: move destinations to its own CJS export
1 parent 5bccb3e commit fec3697

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
export { Logger } from './src/logger.ts'
1111
export { targets } from './src/targets/main.ts'
1212
export { defineConfig } from './src/define_config.ts'
13-
export { destinations } from './src/destinations.cts'
1413
export { LoggerManager } from './src/logger_manager.ts'
1514
export {
1615
transport,

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"exports": {
1313
".": "./build/index.js",
1414
"./types": "./build/src/types.js",
15+
"./destinations": "./build/src/destinations.cjs",
1516
"./factories": "./build/factories/main.js"
1617
},
1718
"engines": {
@@ -25,7 +26,7 @@
2526
"typecheck": "tsc --noEmit",
2627
"clean": "del-cli build",
2728
"precompile": "npm run lint && npm run clean ",
28-
"compile": "tsup-node && tsc --emitDeclarationOnly --declaration",
29+
"compile": "tsup-node && tsc --emitDeclarationOnly --declaration && tsc src/destinations.cts --outDir build/src",
2930
"build": "npm run compile",
3031
"docs": "typedoc",
3132
"version": "npm run build",

src/destinations.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* file that was distributed with this source code.
88
*/
99

10-
import { type PrettyTargetOptions } from './types.ts'
10+
import { type PrettyTargetOptions } from './types.js'
1111

1212
/**
1313
* Collection of destination helpers for logger transport targets

tests/logger.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { test } from '@japa/runner'
1111
import { levels } from '../src/pino.ts'
1212
import { Logger } from '../src/logger.ts'
1313
import { getFakeStream } from '../factories/logger.ts'
14-
import { destinations } from '../index.ts'
14+
import { destinations } from '../src/destinations.cts'
1515

1616
test.group('Logger', () => {
1717
test('log message at all log levels', ({ assert }) => {

0 commit comments

Comments
 (0)