nightingale-console-output 14.2.1 → 16.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
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [16.0.0](https://github.com/christophehurpeau/nightingale/compare/v15.0.0...v16.0.0) (2025-03-30)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * drop node 18
11
+
12
+ ### Features
13
+
14
+ * drop node 18 ([1b11a55](https://github.com/christophehurpeau/nightingale/commit/1b11a55dd24c9435be50519a748316079f554414))
15
+
16
+ ### Bug Fixes
17
+
18
+ * fix lib exports ([5b562b2](https://github.com/christophehurpeau/nightingale/commit/5b562b245aac1aa86b728a9433f3c9d28c62fe04))
19
+
20
+ Version bump for dependency: nightingale
21
+
22
+
23
+ ## [15.0.0](https://github.com/christophehurpeau/nightingale/compare/v14.2.1...v15.0.0) (2023-12-25)
24
+
25
+
26
+ ### ⚠ BREAKING CHANGES
27
+
28
+ * update babel and drop browser modern version
29
+
30
+ ### Features
31
+
32
+ * update babel and drop browser modern version ([5c76abc](https://github.com/christophehurpeau/nightingale/commit/5c76abc8bfb595a617fc4c8b795dae7e674ea664))
33
+
34
+ Version bump for dependency: nightingale-levels
35
+ Version bump for dependency: nightingale-types
36
+
37
+
6
38
  ## [14.2.1](https://github.com/christophehurpeau/nightingale/compare/v14.2.0...v14.2.1) (2023-11-05)
7
39
 
8
40
  Note: no notable changes
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
- <h3 align="center">
1
+ <h1 align="center">
2
2
  nightingale-console-output
3
- </h3>
3
+ </h1>
4
4
 
5
5
  <p align="center">
6
6
  Nightingale console output
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/npm/v/nightingale-console-output.svg?style=flat-square"></a>
11
- <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/npm/dw/nightingale-console-output.svg?style=flat-square"></a>
12
- <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/node/v/nightingale-console-output.svg?style=flat-square"></a>
13
- <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/npm/types/nightingale-console-output.svg?style=flat-square"></a>
10
+ <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/npm/v/nightingale-console-output.svg?style=flat-square" alt="npm version"></a>
11
+ <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/npm/dw/nightingale-console-output.svg?style=flat-square" alt="npm downloads"></a>
12
+ <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/node/v/nightingale-console-output.svg?style=flat-square" alt="node version"></a>
13
+ <a href="https://npmjs.org/package/nightingale-console-output"><img src="https://img.shields.io/npm/types/nightingale-console-output.svg?style=flat-square" alt="types"></a>
14
14
  </p>
15
15
 
16
16
  ## Install
@@ -22,7 +22,7 @@ npm install --save nightingale-console-output
22
22
  ## Usage
23
23
 
24
24
  ```js
25
- import nightingaleConsoleOutput from 'nightingale-console-output';
25
+ import nightingaleConsoleOutput from "nightingale-console-output";
26
26
 
27
27
  console.log(nightingaleConsoleOutput);
28
28
  ```
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ export { consoleOutput as default } from "nightingale";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightingale-console-output",
3
- "version": "14.2.1",
3
+ "version": "16.0.0",
4
4
  "description": "Nightingale console output",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -16,78 +16,27 @@
16
16
  "homepage": "https://github.com/christophehurpeau/nightingale",
17
17
  "type": "module",
18
18
  "engines": {
19
- "node": ">=18.12.0"
19
+ "node": ">=20.9.0"
20
20
  },
21
- "browserslist": {
22
- "production": [
23
- "defaults",
24
- "> 0.2%",
25
- "not ie < 12",
26
- "not safari < 10",
27
- "not ios_saf < 10"
28
- ]
29
- },
30
- "main": "./dist/index-node18.mjs",
31
- "types": "./dist/definitions/index.d.ts",
32
- "module": "./dist/index-browser.es.js",
33
- "browser": "./dist/index-browser.es.js",
21
+ "sideEffects": false,
22
+ "main": "./lib/index.js",
23
+ "types": "./lib/index.d.ts",
34
24
  "exports": {
35
25
  "./package.json": "./package.json",
36
- ".": {
37
- "types": "./dist/definitions/index.d.ts",
38
- "node": {
39
- "import": "./dist/index-node18.mjs"
40
- },
41
- "browser": {
42
- "browser:modern": {
43
- "import": "./dist/index-browsermodern.es.js"
44
- },
45
- "import": "./dist/index-browser.es.js"
46
- }
47
- }
26
+ ".": "./lib/index.js"
48
27
  },
49
- "sideEffects": false,
50
28
  "files": [
51
- "src",
52
- "dist"
29
+ "lib"
53
30
  ],
54
31
  "scripts": {
55
- "build": "yarn clean:build && rollup --config rollup.config.mjs && yarn run build:definitions",
56
- "build:definitions": "tsc -p tsconfig.json",
57
32
  "clean": "yarn clean:build",
58
- "clean:build": "pob-babel-clean-out dist",
59
33
  "lint": "yarn run lint:eslint",
60
- "lint:eslint": "yarn ../.. run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-console-output",
34
+ "lint:eslint": "yarn ../.. run eslint --quiet packages/nightingale-console-output",
61
35
  "watch": "yarn clean:build && rollup --config rollup.config.mjs --watch"
62
36
  },
37
+ "pob": {},
63
38
  "prettier": "@pob/root/prettier-config",
64
- "pob": {
65
- "babelEnvs": [
66
- {
67
- "target": "node",
68
- "version": "18"
69
- },
70
- {
71
- "target": "browser",
72
- "version": "modern"
73
- },
74
- {
75
- "target": "browser"
76
- }
77
- ],
78
- "entries": [
79
- "index"
80
- ]
81
- },
82
39
  "dependencies": {
83
- "@types/node": ">=18.0.0",
84
- "nightingale-levels": "14.2.1",
85
- "nightingale-types": "14.2.1"
86
- },
87
- "devDependencies": {
88
- "@babel/core": "7.23.2",
89
- "@babel/preset-env": "7.23.2",
90
- "pob-babel": "36.6.1",
91
- "typescript": "5.2.2"
40
+ "nightingale": "16.0.0"
92
41
  }
93
42
  }
@@ -1,3 +0,0 @@
1
- import type { LogRecord, Metadata } from 'nightingale-types';
2
- export default function consoleOutput<T extends Metadata>(param: string[] | string, record: LogRecord<T>): void;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ,EACtD,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EACxB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACnB,IAAI,CAON"}
@@ -1,11 +0,0 @@
1
- import { Level } from 'nightingale-levels';
2
-
3
- /* eslint-disable no-console */
4
-
5
- function consoleOutput(param, record) {
6
- var _console;
7
- (_console = console)[record.level >= Level.ERROR ? 'error' : 'log'].apply(_console, param);
8
- }
9
-
10
- export { consoleOutput as default };
11
- //# sourceMappingURL=index-browser.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string[] | string,\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","_console","console","level","Level","ERROR","apply"],"mappings":";;AAAA;;AAKe,SAASA,aAAaA,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AAAA,EAAA,IAAAC,QAAA,CAAA;EAKJ,CAAAA,QAAA,GAAAC,OAAO,EAACF,MAAM,CAACG,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAAC,KAAA,CAAAL,QAAA,EAAIF,KAAK,CAAC,CAAA;AAEpE;;;;"}
@@ -1,10 +0,0 @@
1
- import { Level } from 'nightingale-levels';
2
-
3
- /* eslint-disable no-console */
4
-
5
- function consoleOutput(param, record) {
6
- console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
7
- }
8
-
9
- export { consoleOutput as default };
10
- //# sourceMappingURL=index-browsermodern.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string[] | string,\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;;AAKe,SAASA,aAAaA,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC,GAAGL,KAAK,CAAC,CAAA;AAEpE;;;;"}
@@ -1,13 +0,0 @@
1
- import { Level } from 'nightingale-levels';
2
-
3
- /* eslint-disable no-console */
4
-
5
- function consoleOutput(param, record) {
6
- {
7
- const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';
8
- process[outKey].write(`${param}\n`);
9
- }
10
- }
11
-
12
- export { consoleOutput as default };
13
- //# sourceMappingURL=index-node18.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-node18.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string[] | string,\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;;AAKe,SAASA,aAAaA,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AACwB,EAAA;AAC5B,IAAA,MAAMC,MAAM,GAAGD,MAAM,CAACE,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAChEC,OAAO,CAACJ,MAAM,CAAC,CAACK,KAAK,CAAE,CAAA,EAAEP,KAAgB,CAAA,EAAA,CAAG,CAAC,CAAA;AAC/C,GAAA;AAGF;;;;"}
@@ -1,27 +0,0 @@
1
- {
2
- "root": true,
3
- "parser": "@typescript-eslint/parser",
4
- "parserOptions": {
5
- "project": "packages/nightingale-console-output/tsconfig.json"
6
- },
7
- "plugins": ["@typescript-eslint"],
8
- "extends": ["@pob/eslint-config-typescript"],
9
- "ignorePatterns": ["*.d.ts"],
10
- "overrides": [
11
- {
12
- "files": ["**/*.test.ts", "__tests__/**/*.ts"],
13
- "extends": ["@pob/eslint-config-typescript/test"],
14
- "env": {
15
- "jest": true
16
- },
17
- "rules": {
18
- "import/no-extraneous-dependencies": [
19
- "error",
20
- {
21
- "devDependencies": true
22
- }
23
- ]
24
- }
25
- }
26
- ]
27
- }
package/src/index.ts DELETED
@@ -1,16 +0,0 @@
1
- /* eslint-disable no-console */
2
- import { POB_TARGET } from 'pob-babel';
3
- import { Level } from 'nightingale-levels';
4
- import type { LogRecord, Metadata } from 'nightingale-types';
5
-
6
- export default function consoleOutput<T extends Metadata>(
7
- param: string[] | string,
8
- record: LogRecord<T>,
9
- ): void {
10
- if (POB_TARGET !== 'browser') {
11
- const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';
12
- process[outKey].write(`${param as string}\n`);
13
- } else {
14
- console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
15
- }
16
- }