nightingale-json-formatter 11.5.2 → 11.7.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/.eslintrc.json CHANGED
@@ -1,5 +1,5 @@
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
  "ignorePatterns": ["*.d.ts", "/dist"]
5
5
  }
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.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
7
+
8
+ **Note:** Version bump only for package nightingale-json-formatter
9
+
10
+
11
+
12
+
13
+
14
+ ## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * update pob-babel to bring back webpack 4 support ([4887431](https://github.com/christophehurpeau/nightingale/commit/4887431b3b272496511f879af022638723b9056e))
20
+
21
+
22
+
23
+
24
+
25
+ # [11.7.0](https://github.com/christophehurpeau/nightingale/compare/v11.6.0...v11.7.0) (2021-03-29)
26
+
27
+ **Note:** Version bump only for package nightingale-json-formatter
28
+
29
+
30
+
31
+
32
+
33
+ # [11.6.0](https://github.com/christophehurpeau/nightingale/compare/v11.5.4...v11.6.0) (2021-03-21)
34
+
35
+
36
+ ### Features
37
+
38
+ * update dependencies and browserlist config ([81d2340](https://github.com/christophehurpeau/nightingale/commit/81d234069412c746ebc99faed778092790f332ca))
39
+
40
+
41
+
42
+
43
+
6
44
  ## [11.5.2](https://github.com/christophehurpeau/nightingale/compare/v11.5.1...v11.5.2) (2021-02-14)
7
45
 
8
46
  **Note:** Version bump only for package nightingale-json-formatter
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+
5
+ module.exports = function babelConfig(api) {
6
+ const isTest = api.env('test');
7
+
8
+ if (!isTest) return {};
9
+
10
+ return {
11
+ only: [path.resolve(__dirname, 'src')],
12
+ presets: [require.resolve('pob-babel/preset')],
13
+ };
14
+ };
@@ -43,5 +43,5 @@ function format(record) {
43
43
  });
44
44
  }
45
45
 
46
- exports.default = format;
46
+ exports["default"] = format;
47
47
  //# sourceMappingURL=index-browser-dev.cjs.js.map
@@ -39,5 +39,5 @@ function format(record) {
39
39
  });
40
40
  }
41
41
 
42
- export default format;
42
+ export { format as default };
43
43
  //# sourceMappingURL=index-browser-dev.es.js.map
@@ -43,5 +43,5 @@ function format(record) {
43
43
  });
44
44
  }
45
45
 
46
- exports.default = format;
46
+ exports["default"] = format;
47
47
  //# sourceMappingURL=index-browser.cjs.js.map
@@ -39,5 +39,5 @@ function format(record) {
39
39
  });
40
40
  }
41
41
 
42
- export default format;
42
+ export { format as default };
43
43
  //# sourceMappingURL=index-browser.es.js.map
@@ -39,5 +39,5 @@ function format(record) {
39
39
  });
40
40
  }
41
41
 
42
- export default format;
42
+ export { format as default };
43
43
  //# sourceMappingURL=index-browsermodern-dev.es.js.map
@@ -39,5 +39,5 @@ function format(record) {
39
39
  });
40
40
  }
41
41
 
42
- export default format;
42
+ export { format as default };
43
43
  //# sourceMappingURL=index-browsermodern.es.js.map
@@ -43,5 +43,5 @@ function format(record) {
43
43
  });
44
44
  }
45
45
 
46
- exports.default = format;
46
+ exports["default"] = format;
47
47
  //# sourceMappingURL=index-node12-dev.cjs.js.map
@@ -39,5 +39,5 @@ function format(record) {
39
39
  });
40
40
  }
41
41
 
42
- export default format;
42
+ export { format as default };
43
43
  //# sourceMappingURL=index-node12-dev.mjs.map
@@ -43,5 +43,5 @@ function format(record) {
43
43
  });
44
44
  }
45
45
 
46
- exports.default = format;
46
+ exports["default"] = format;
47
47
  //# sourceMappingURL=index-node12.cjs.js.map
@@ -39,5 +39,5 @@ function format(record) {
39
39
  });
40
40
  }
41
41
 
42
- export default format;
42
+ export { format as default };
43
43
  //# sourceMappingURL=index-node12.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightingale-json-formatter",
3
- "version": "11.5.2",
3
+ "version": "11.7.2",
4
4
  "description": "Nightingale JSON formatter",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -14,21 +14,23 @@
14
14
  "directory": "packages/nightingale-json-formatter"
15
15
  },
16
16
  "homepage": "https://github.com/christophehurpeau/nightingale",
17
+ "type": "commonjs",
17
18
  "engines": {
18
- "node": ">=12.10.0"
19
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
19
20
  },
20
21
  "browserslist": [
22
+ "defaults",
21
23
  "> 0.2%",
22
- "Firefox ESR",
23
24
  "not ie < 12",
24
- "not dead",
25
- "not op_mini all"
25
+ "not safari < 10",
26
+ "not ios_saf < 10"
26
27
  ],
27
- "main": "./index.js",
28
+ "main": "./dist/index-node12.cjs.js",
28
29
  "types": "./dist/index.d.ts",
29
30
  "module": "./dist/index-browser.es.js",
30
31
  "browser": "./dist/index-browser.es.js",
31
32
  "exports": {
33
+ "./package.json": "./package.json",
32
34
  ".": {
33
35
  "node": {
34
36
  "development": {
@@ -67,9 +69,9 @@
67
69
  "clean": "rm -Rf docs dist",
68
70
  "generate:test-coverage": "rm -Rf docs/coverage/ ; NODE_ENV=production BABEL_ENV=test jest --coverage --coverageReporters=pob-lcov-reporter --coverageDirectory=docs/coverage/",
69
71
  "lint": "yarn run lint:eslint",
70
- "lint:eslint": "yarn --cwd ../.. run eslint --ext .js,.mjs,.ts --report-unused-disable-directives --quiet packages/nightingale-json-formatter",
72
+ "lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-json-formatter",
71
73
  "test": "jest",
72
- "test:watch": "jest",
74
+ "test:watch": "jest --watch",
73
75
  "watch": "pob-watch"
74
76
  },
75
77
  "prettier": {
@@ -126,33 +128,23 @@
126
128
  ]
127
129
  },
128
130
  "dependencies": {
129
- "nightingale-formatter": "^11.5.2",
130
- "nightingale-types": "^11.5.2"
131
+ "nightingale-formatter": "^11.7.2",
132
+ "nightingale-types": "^11.7.2"
131
133
  },
132
134
  "devDependencies": {
133
- "@babel/core": "7.12.16",
134
- "@babel/preset-env": "7.12.16",
135
- "@pob/eslint-config": "43.0.0",
136
- "@pob/eslint-config-node": "43.1.0",
137
- "@pob/eslint-config-typescript": "43.0.0",
138
- "@types/jest": "26.0.20",
139
- "@typescript-eslint/eslint-plugin": "4.15.0",
140
- "@typescript-eslint/parser": "4.15.0",
141
- "babel-jest": "26.6.3",
142
- "babel-preset-latest-node": "5.4.0",
135
+ "@babel/core": "7.16.0",
136
+ "@babel/preset-env": "7.16.4",
137
+ "@types/jest": "27.0.3",
138
+ "babel-jest": "27.3.1",
139
+ "babel-preset-latest-node": "5.5.1",
143
140
  "babel-preset-modern-browsers": "15.0.2",
144
- "eslint": "7.20.0",
145
- "eslint-import-resolver-node": "0.3.4",
146
- "eslint-plugin-import": "2.22.1",
147
- "eslint-plugin-node": "11.1.0",
148
- "eslint-plugin-unicorn": "25.0.1",
149
- "jest": "26.6.3",
150
- "nightingale-levels": "^11.5.2",
151
- "pob-babel": "26.5.0",
152
- "pob-lcov-reporter": "4.0.1",
153
- "rollup": "2.39.0",
154
- "typescript": "4.1.5",
141
+ "jest": "27.3.1",
142
+ "nightingale-levels": "^11.7.2",
143
+ "pob-babel": "28.5.0",
144
+ "pob-lcov-reporter": "5.4.0",
145
+ "rollup": "2.60.1",
146
+ "typescript": "4.5.2",
155
147
  "xunit-file": "1.0.0"
156
148
  },
157
- "gitHead": "58ce357b0da36ed6df584ab8af6d3d87cded628f"
149
+ "gitHead": "00b1ec6c7468b320e268a12eaac70d59a177787b"
158
150
  }
@@ -0,0 +1,3 @@
1
+ import createRollupConfig from 'pob-babel/createRollupConfig.js';
2
+
3
+ export default createRollupConfig({});
@@ -10,10 +10,10 @@
10
10
  "overrides": [
11
11
  {
12
12
  "files": ["**/*.test.ts", "__tests__/**/*.ts"],
13
+ "extends": ["@pob/eslint-config-typescript/test"],
13
14
  "env": {
14
15
  "jest": true
15
16
  },
16
- "extends": ["@pob/eslint-config-typescript/test"],
17
17
  "rules": {
18
18
  "import/no-extraneous-dependencies": [
19
19
  "error",
package/src/index.test.ts CHANGED
@@ -1,4 +1,4 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
  import format from '.';
3
3
 
4
4
  test('format record', () => {
package/src/index.ts CHANGED
@@ -18,18 +18,18 @@ function map2object(map: Map<unknown, unknown>): unknown {
18
18
  function stringify(value: unknown, space?: string | number): string {
19
19
  return JSON.stringify(
20
20
  value,
21
- (key, value) => {
22
- if (value instanceof Map) {
23
- return map2object(value);
21
+ (key, objectValue) => {
22
+ if (objectValue instanceof Map) {
23
+ return map2object(objectValue);
24
24
  }
25
- if (value instanceof Error) {
25
+ if (objectValue instanceof Error) {
26
26
  return {
27
- message: value.message,
28
- stack: value.stack,
27
+ message: objectValue.message,
28
+ stack: objectValue.stack,
29
29
  };
30
30
  }
31
31
 
32
- return value as unknown;
32
+ return objectValue as unknown;
33
33
  },
34
34
  space,
35
35
  );
package/index.js DELETED
@@ -1,6 +0,0 @@
1
- /* eslint-disable import/no-dynamic-require */
2
-
3
- 'use strict';
4
-
5
- const production = process.env.NODE_ENV === 'production';
6
- module.exports = require(`./dist/index-node12${production ? '' : '-dev'}.cjs`);