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 +1 -1
- package/CHANGELOG.md +38 -0
- package/babel.config.cjs +14 -0
- package/dist/index-browser-dev.cjs.js +1 -1
- package/dist/index-browser-dev.es.js +1 -1
- package/dist/index-browser.cjs.js +1 -1
- package/dist/index-browser.es.js +1 -1
- package/dist/index-browsermodern-dev.es.js +1 -1
- package/dist/index-browsermodern.es.js +1 -1
- package/dist/index-node12-dev.cjs.js +1 -1
- package/dist/index-node12-dev.mjs +1 -1
- package/dist/index-node12.cjs.js +1 -1
- package/dist/index-node12.mjs +1 -1
- package/package.json +24 -32
- package/rollup.config.mjs +3 -0
- package/src/.eslintrc.json +1 -1
- package/src/index.test.ts +1 -1
- package/src/index.ts +7 -7
- package/index.js +0 -6
package/.eslintrc.json
CHANGED
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
|
package/babel.config.cjs
ADDED
|
@@ -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
|
+
};
|
package/dist/index-browser.es.js
CHANGED
package/dist/index-node12.cjs.js
CHANGED
package/dist/index-node12.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nightingale-json-formatter",
|
|
3
|
-
"version": "11.
|
|
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": "
|
|
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
|
|
25
|
-
"not
|
|
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": "
|
|
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.
|
|
130
|
-
"nightingale-types": "^11.
|
|
131
|
+
"nightingale-formatter": "^11.7.2",
|
|
132
|
+
"nightingale-types": "^11.7.2"
|
|
131
133
|
},
|
|
132
134
|
"devDependencies": {
|
|
133
|
-
"@babel/core": "7.
|
|
134
|
-
"@babel/preset-env": "7.
|
|
135
|
-
"@
|
|
136
|
-
"
|
|
137
|
-
"
|
|
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
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
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": "
|
|
149
|
+
"gitHead": "00b1ec6c7468b320e268a12eaac70d59a177787b"
|
|
158
150
|
}
|
package/src/.eslintrc.json
CHANGED
|
@@ -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
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,
|
|
22
|
-
if (
|
|
23
|
-
return map2object(
|
|
21
|
+
(key, objectValue) => {
|
|
22
|
+
if (objectValue instanceof Map) {
|
|
23
|
+
return map2object(objectValue);
|
|
24
24
|
}
|
|
25
|
-
if (
|
|
25
|
+
if (objectValue instanceof Error) {
|
|
26
26
|
return {
|
|
27
|
-
message:
|
|
28
|
-
stack:
|
|
27
|
+
message: objectValue.message,
|
|
28
|
+
stack: objectValue.stack,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
return
|
|
32
|
+
return objectValue as unknown;
|
|
33
33
|
},
|
|
34
34
|
space,
|
|
35
35
|
);
|