Skip to content

Commit

Permalink
fix(logger): fix ESM compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Mar 14, 2024
1 parent 088804e commit da25c58
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 12 deletions.
3 changes: 3 additions & 0 deletions packages/connect/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/file/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/insight/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/logentries/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/logger/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
18 changes: 9 additions & 9 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"name": "Romain Lenzotti"
},
"license": "MIT",
"source": "./src/node/index.ts",
"main": "./lib/cjs/node/index.js",
"module": "./lib/esm/node/index.js",
"source": "./src/index.ts",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"browser": "./lib/browser/logger.umd.js",
"typings": "./lib/types/node/index.d.ts",
"typings": "./lib/types/index.d.ts",
"exports": {
"types": "./lib/types/node/index.d.ts",
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/logger.umd.js",
"import": "./lib/esm/node/index.js",
"require": "./lib/cjs/node/index.js",
"default": "./lib/esm/node/index.js"
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js",
"default": "./lib/esm/index.js"
},
"scripts": {
"build": "yarn barrels && yarn run build:esm && yarn run build:cjs && yarn run build:browser",
Expand Down Expand Up @@ -52,4 +52,4 @@
"vite": "5.1.6"
},
"peerDependencies": {}
}
}
2 changes: 2 additions & 0 deletions packages/logger/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./common/index";
export * from "./node/index";
2 changes: 1 addition & 1 deletion packages/logger/src/logger.integration.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Logger} from "./node";
import {Logger} from "./index";

describe("Logger integration", () => {
it("should log only on trace", () => {
Expand Down
2 changes: 0 additions & 2 deletions packages/logger/src/node/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {LayoutReplacer, Logger} from "../common/index";
import "./appenders/StdoutAppender";
import "./appenders/StderrAppender";

export * from "../common/index";

export const $log: Logger = new Logger("default");

$log.appenders
Expand Down
3 changes: 3 additions & 0 deletions packages/loggly/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/logstash-http/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/logstash-udp/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/rabbitmq/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/seq/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/slack/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo
3 changes: 3 additions & 0 deletions packages/smtp/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ tsconfig.compile.json
tsconfig.esm.json
tsconfig.json
*.spec.js
*.spec.js.map
*.spec.d.ts
*.tsbuildinfo

0 comments on commit da25c58

Please sign in to comment.