nightingale-react-native-console 11.6.0 → 11.7.3

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/.eslintrc.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "root": true,
3
- "extends": ["@pob/eslint-config/root", "@pob/eslint-config-node"],
3
+ "extends": ["@pob/eslint-config/root-commonjs"],
4
4
  "env": {
5
5
  "browser": true
6
6
  },
package/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
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
+ ## [11.7.3](https://github.com/christophehurpeau/nightingale/compare/v11.7.2...v11.7.3) (2021-11-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **nightingale-react-native-console:** always use console.log ([ad93004](https://github.com/christophehurpeau/nightingale/commit/ad93004db380994a0e378d57a67e64414e02b9bf)), closes [#241](https://github.com/christophehurpeau/nightingale/issues/241)
12
+
13
+
14
+
15
+
16
+
17
+ ## [11.7.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
18
+
19
+ **Note:** Version bump only for package nightingale-react-native-console
20
+
21
+
22
+
23
+
24
+
25
+ ## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * update pob-babel to bring back webpack 4 support ([4887431](https://github.com/christophehurpeau/nightingale/commit/4887431b3b272496511f879af022638723b9056e))
31
+
32
+
33
+
34
+
35
+
36
+ # [11.7.0](https://github.com/christophehurpeau/nightingale/compare/v11.6.0...v11.7.0) (2021-03-29)
37
+
38
+ **Note:** Version bump only for package nightingale-react-native-console
39
+
40
+
41
+
42
+
43
+
6
44
  # [11.6.0](https://github.com/christophehurpeau/nightingale/compare/v11.5.4...v11.6.0) (2021-03-21)
7
45
 
8
46
 
@@ -1,23 +1,22 @@
1
1
  import formatterANSI from 'nightingale-ansi-formatter';
2
2
  import consoleOutput from 'nightingale-console-output';
3
3
 
4
- const createHandle = () => {
5
- return record => {
4
+ var createHandle = function createHandle() {
5
+ return function (record) {
6
6
  return consoleOutput([formatterANSI(record)], record);
7
7
  };
8
8
  };
9
9
 
10
- class ReactNativeConsoleHandler {
11
- constructor(minLevel) {
12
- this.minLevel = 0;
13
- this.minLevel = minLevel;
10
+ var ReactNativeConsoleHandler = function ReactNativeConsoleHandler(minLevel) {
11
+ this.minLevel = 0;
12
+ this.minLevel = minLevel;
14
13
 
15
- this.isHandling = level => level >= minLevel;
16
-
17
- this.handle = createHandle();
18
- }
14
+ this.isHandling = function (level) {
15
+ return level >= minLevel;
16
+ };
19
17
 
20
- }
18
+ this.handle = createHandle();
19
+ };
21
20
 
22
21
  export { ReactNativeConsoleHandler };
23
22
  //# sourceMappingURL=index-browser-dev.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["import formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport type {\n Level,\n Handle,\n IsHandling,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst createHandle = (): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return consoleOutput([formatterANSI(record)], record);\n };\n};\n\nexport class ReactNativeConsoleHandler implements Handler {\n minLevel: Level = 0;\n\n handle: Handle;\n\n isHandling: IsHandling;\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level) => level >= minLevel;\n this.handle = createHandle();\n }\n}\n"],"names":["createHandle","record","consoleOutput","formatterANSI","ReactNativeConsoleHandler","constructor","minLevel","isHandling","level","handle"],"mappings":";;;AAWA,MAAMA,YAAY,GAAG,MAAc;AACjC,SAA4BC,MAArB,IAAoD;AACzD,WAAOC,aAAa,CAAC,CAACC,aAAa,CAACF,MAAD,CAAd,CAAD,EAA0BA,MAA1B,CAApB;AACD,GAFD;AAGD,CAJD;;AAMO,MAAMG,yBAAN,CAAmD;AAOxDC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAAA,SAN7BA,QAM6B,GANX,CAMW;AAC3B,SAAKA,QAAL,GAAgBA,QAAhB;;AACA,SAAKC,UAAL,GAAmBC,KAAD,IAAkBA,KAAK,IAAIF,QAA7C;;AACA,SAAKG,MAAL,GAAcT,YAAY,EAA1B;AACD;;AAXuD;;;;"}
1
+ {"version":3,"file":"index-browser-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["import formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport type {\n Level,\n Handle,\n IsHandling,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst createHandle = (): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return consoleOutput([formatterANSI(record)], record);\n };\n};\n\nexport class ReactNativeConsoleHandler implements Handler {\n minLevel: Level = 0;\n\n handle: Handle;\n\n isHandling: IsHandling;\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level) => level >= minLevel;\n this.handle = createHandle();\n }\n}\n"],"names":["createHandle","record","consoleOutput","formatterANSI","ReactNativeConsoleHandler","minLevel","isHandling","level","handle"],"mappings":";;;AAWA,IAAMA,YAAY,GAAG,SAAfA,YAAe,GAAc;AACjC,SAAO,UAAqBC,MAArB,EAAoD;AACzD,WAAOC,aAAa,CAAC,CAACC,aAAa,CAACF,MAAD,CAAd,CAAD,EAA0BA,MAA1B,CAApB;AACD,GAFD;AAGD,CAJD;;IAMaG,yBAAb,GAOE,mCAAYC,QAAZ,EAA6B;AAAA,OAN7BA,QAM6B,GANX,CAMW;AAC3B,OAAKA,QAAL,GAAgBA,QAAhB;;AACA,OAAKC,UAAL,GAAkB,UAACC,KAAD;AAAA,WAAkBA,KAAK,IAAIF,QAA3B;AAAA,GAAlB;;AACA,OAAKG,MAAL,GAAcR,YAAY,EAA1B;AACD;;;;"}
@@ -1,23 +1,22 @@
1
1
  import formatterANSI from 'nightingale-ansi-formatter';
2
2
  import consoleOutput from 'nightingale-console-output';
3
3
 
4
- const createHandle = () => {
5
- return record => {
4
+ var createHandle = function createHandle() {
5
+ return function (record) {
6
6
  return consoleOutput([formatterANSI(record)], record);
7
7
  };
8
8
  };
9
9
 
10
- class ReactNativeConsoleHandler {
11
- constructor(minLevel) {
12
- this.minLevel = 0;
13
- this.minLevel = minLevel;
10
+ var ReactNativeConsoleHandler = function ReactNativeConsoleHandler(minLevel) {
11
+ this.minLevel = 0;
12
+ this.minLevel = minLevel;
14
13
 
15
- this.isHandling = level => level >= minLevel;
16
-
17
- this.handle = createHandle();
18
- }
14
+ this.isHandling = function (level) {
15
+ return level >= minLevel;
16
+ };
19
17
 
20
- }
18
+ this.handle = createHandle();
19
+ };
21
20
 
22
21
  export { ReactNativeConsoleHandler };
23
22
  //# sourceMappingURL=index-browser.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport type {\n Level,\n Handle,\n IsHandling,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst createHandle = (): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return consoleOutput([formatterANSI(record)], record);\n };\n};\n\nexport class ReactNativeConsoleHandler implements Handler {\n minLevel: Level = 0;\n\n handle: Handle;\n\n isHandling: IsHandling;\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level) => level >= minLevel;\n this.handle = createHandle();\n }\n}\n"],"names":["createHandle","record","consoleOutput","formatterANSI","ReactNativeConsoleHandler","constructor","minLevel","isHandling","level","handle"],"mappings":";;;AAWA,MAAMA,YAAY,GAAG,MAAc;AACjC,SAA4BC,MAArB,IAAoD;AACzD,WAAOC,aAAa,CAAC,CAACC,aAAa,CAACF,MAAD,CAAd,CAAD,EAA0BA,MAA1B,CAApB;AACD,GAFD;AAGD,CAJD;;AAMO,MAAMG,yBAAN,CAAmD;AAOxDC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAAA,SAN7BA,QAM6B,GANX,CAMW;AAC3B,SAAKA,QAAL,GAAgBA,QAAhB;;AACA,SAAKC,UAAL,GAAmBC,KAAD,IAAkBA,KAAK,IAAIF,QAA7C;;AACA,SAAKG,MAAL,GAAcT,YAAY,EAA1B;AACD;;AAXuD;;;;"}
1
+ {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport type {\n Level,\n Handle,\n IsHandling,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst createHandle = (): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return consoleOutput([formatterANSI(record)], record);\n };\n};\n\nexport class ReactNativeConsoleHandler implements Handler {\n minLevel: Level = 0;\n\n handle: Handle;\n\n isHandling: IsHandling;\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level) => level >= minLevel;\n this.handle = createHandle();\n }\n}\n"],"names":["createHandle","record","consoleOutput","formatterANSI","ReactNativeConsoleHandler","minLevel","isHandling","level","handle"],"mappings":";;;AAWA,IAAMA,YAAY,GAAG,SAAfA,YAAe,GAAc;AACjC,SAAO,UAAqBC,MAArB,EAAoD;AACzD,WAAOC,aAAa,CAAC,CAACC,aAAa,CAACF,MAAD,CAAd,CAAD,EAA0BA,MAA1B,CAApB;AACD,GAFD;AAGD,CAJD;;IAMaG,yBAAb,GAOE,mCAAYC,QAAZ,EAA6B;AAAA,OAN7BA,QAM6B,GANX,CAMW;AAC3B,OAAKA,QAAL,GAAgBA,QAAhB;;AACA,OAAKC,UAAL,GAAkB,UAACC,KAAD;AAAA,WAAkBA,KAAK,IAAIF,QAA3B;AAAA,GAAlB;;AACA,OAAKG,MAAL,GAAcR,YAAY,EAA1B;AACD;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightingale-react-native-console",
3
- "version": "11.6.0",
3
+ "version": "11.7.3",
4
4
  "description": "React Native and Expo handler for nightingale",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -16,23 +16,19 @@
16
16
  "directory": "packages/nightingale-react-native-console"
17
17
  },
18
18
  "homepage": "https://github.com/christophehurpeau/nightingale",
19
+ "type": "commonjs",
19
20
  "browserslist": [
21
+ "defaults",
20
22
  "> 0.2%",
21
- "Firefox ESR",
22
- "last 2 Chrome versions",
23
- "last 2 iOS versions",
24
- "last 2 Edge versions",
25
- "last 2 Safari versions",
26
23
  "not ie < 12",
27
- "not ios_saf < 10",
28
- "not dead",
29
- "not op_mini all"
24
+ "not safari < 10",
25
+ "not ios_saf < 10"
30
26
  ],
31
- "main": "./dist/index-browser.es.js",
32
27
  "types": "./dist/index.d.ts",
33
28
  "module": "./dist/index-browser.es.js",
34
29
  "browser": "./dist/index-browser.es.js",
35
30
  "exports": {
31
+ "./package.json": "./package.json",
36
32
  ".": {
37
33
  "browser": {
38
34
  "browser:modern": {
@@ -58,7 +54,7 @@
58
54
  "build:definitions": "tsc -p tsconfig.build.json",
59
55
  "clean": "rm -Rf docs dist test/node6 coverage",
60
56
  "lint": "yarn run lint:eslint",
61
- "lint:eslint": "yarn --cwd ../.. run eslint --ext .js,.mjs,.ts --report-unused-disable-directives --quiet packages/nightingale-react-native-console",
57
+ "lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-react-native-console",
62
58
  "watch": "pob-watch"
63
59
  },
64
60
  "prettier": {
@@ -87,27 +83,16 @@
87
83
  ]
88
84
  },
89
85
  "dependencies": {
90
- "nightingale-ansi-formatter": "^11.6.0",
91
- "nightingale-console-output": "^11.6.0",
92
- "nightingale-types": "^11.6.0"
86
+ "nightingale-ansi-formatter": "^11.7.2",
87
+ "nightingale-types": "^11.7.2"
93
88
  },
94
89
  "devDependencies": {
95
- "@babel/core": "7.13.10",
96
- "@babel/preset-env": "7.13.10",
97
- "@pob/eslint-config": "43.0.0",
98
- "@pob/eslint-config-node": "43.1.0",
99
- "@pob/eslint-config-typescript": "43.0.0",
100
- "@typescript-eslint/eslint-plugin": "4.18.0",
101
- "@typescript-eslint/parser": "4.18.0",
90
+ "@babel/core": "7.16.0",
91
+ "@babel/preset-env": "7.16.4",
102
92
  "babel-preset-modern-browsers": "15.0.2",
103
- "eslint": "7.22.0",
104
- "eslint-import-resolver-node": "0.3.4",
105
- "eslint-plugin-import": "2.22.1",
106
- "eslint-plugin-node": "11.1.0",
107
- "eslint-plugin-unicorn": "25.0.1",
108
- "pob-babel": "26.8.0",
109
- "rollup": "2.42.1",
110
- "typescript": "4.2.3"
93
+ "pob-babel": "28.5.0",
94
+ "rollup": "2.60.1",
95
+ "typescript": "4.5.2"
111
96
  },
112
- "gitHead": "56849d6762e917f29c20f932569973046a24f602"
97
+ "gitHead": "0dabc3c418b42f63ac53ce014291398e5f030af4"
113
98
  }
@@ -0,0 +1,3 @@
1
+ import createRollupConfig from 'pob-babel/createRollupConfig.js';
2
+
3
+ export default createRollupConfig({});
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import formatterANSI from 'nightingale-ansi-formatter';
2
- import consoleOutput from 'nightingale-console-output';
3
2
  import type {
4
3
  Level,
5
4
  Handle,
@@ -9,9 +8,17 @@ import type {
9
8
  Handler,
10
9
  } from 'nightingale-types';
11
10
 
11
+ function consoleOutput<T extends Metadata>(
12
+ param: string | string[],
13
+ record: LogRecord<T>,
14
+ ): void {
15
+ // eslint-disable-next-line no-console
16
+ console.log(...param);
17
+ }
18
+
12
19
  const createHandle = (): Handle => {
13
20
  return <T extends Metadata>(record: LogRecord<T>): void => {
14
- return consoleOutput([formatterANSI(record)], record);
21
+ consoleOutput([formatterANSI(record)], record);
15
22
  };
16
23
  };
17
24