nightingale-html-formatter 14.2.0 → 15.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,31 @@
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
+ ## [15.0.0](https://github.com/christophehurpeau/nightingale/compare/v14.2.1...v15.0.0) (2023-12-25)
7
+
8
+
9
+ ### ⚠ BREAKING CHANGES
10
+
11
+ * update babel and drop browser modern version
12
+
13
+ ### Features
14
+
15
+ * update babel and drop browser modern version ([5c76abc](https://github.com/christophehurpeau/nightingale/commit/5c76abc8bfb595a617fc4c8b795dae7e674ea664))
16
+
17
+ Version bump for dependency: nightingale-formatter
18
+ Version bump for dependency: nightingale-types
19
+ Version bump for dependency: nightingale-levels
20
+
21
+
22
+ ## [14.2.1](https://github.com/christophehurpeau/nightingale/compare/v14.2.0...v14.2.1) (2023-11-05)
23
+
24
+ Note: no notable changes
25
+
26
+ Version bump for dependency: nightingale-formatter
27
+ Version bump for dependency: nightingale-types
28
+ Version bump for dependency: nightingale-levels
29
+
30
+
6
31
  ## [14.2.0](https://github.com/christophehurpeau/nightingale/compare/v14.1.0...v14.2.0) (2023-11-04)
7
32
 
8
33
  Note: no notable changes
@@ -4,9 +4,7 @@ function style(styles, string) {
4
4
  if (!styles || styles.length === 0 || !string) {
5
5
  return string;
6
6
  }
7
- return "<span style=\"" + styles.map(function (styleName) {
8
- return styleToHtmlStyleThemeLight[styleName].open;
9
- }).join('; ') + "\">" + string + "</span>";
7
+ return `<span style="${styles.map(styleName => styleToHtmlStyleThemeLight[styleName].open).join('; ')}">${string}</span>`;
10
8
  }
11
9
 
12
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import {\n formatRecordToString,\n styleToHtmlStyleThemeLight,\n} from 'nightingale-formatter';\nimport type { Styles, LogRecord, Metadata } from 'nightingale-types';\n\nexport function style(styles: Styles, string: string): string {\n if (!styles || styles.length === 0 || !string) {\n return string;\n }\n\n return `<span style=\"${styles\n .map((styleName: string) => styleToHtmlStyleThemeLight[styleName].open)\n .join('; ')}\">${string}</span>`;\n}\n\n/**\n * @param {Object} record\n * @returns {string}\n */\nexport default function format<T extends Metadata>(\n record: LogRecord<T>,\n): string {\n return formatRecordToString(record, style);\n}\n"],"names":["style","styles","string","length","map","styleName","styleToHtmlStyleThemeLight","open","join","format","record","formatRecordToString"],"mappings":";;AAMO,SAASA,KAAKA,CAACC,MAAc,EAAEC,MAAc,EAAU;EAC5D,IAAI,CAACD,MAAM,IAAIA,MAAM,CAACE,MAAM,KAAK,CAAC,IAAI,CAACD,MAAM,EAAE;AAC7C,IAAA,OAAOA,MAAM,CAAA;AACf,GAAA;AAEA,EAAA,OAAA,gBAAA,GAAuBD,MAAM,CAC1BG,GAAG,CAAC,UAACC,SAAiB,EAAA;AAAA,IAAA,OAAKC,0BAA0B,CAACD,SAAS,CAAC,CAACE,IAAI,CAAA;AAAA,GAAA,CAAC,CACtEC,IAAI,CAAC,IAAI,CAAC,WAAKN,MAAM,GAAA,SAAA,CAAA;AAC1B,CAAA;;AAEA;AACA;AACA;AACA;AACe,SAASO,MAAMA,CAC5BC,MAAoB,EACZ;AACR,EAAA,OAAOC,oBAAoB,CAACD,MAAM,EAAEV,KAAK,CAAC,CAAA;AAC5C;;;;"}
1
+ {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import {\n formatRecordToString,\n styleToHtmlStyleThemeLight,\n} from 'nightingale-formatter';\nimport type { Styles, LogRecord, Metadata } from 'nightingale-types';\n\nexport function style(styles: Styles, string: string): string {\n if (!styles || styles.length === 0 || !string) {\n return string;\n }\n\n return `<span style=\"${styles\n .map((styleName: string) => styleToHtmlStyleThemeLight[styleName].open)\n .join('; ')}\">${string}</span>`;\n}\n\n/**\n * @param {Object} record\n * @returns {string}\n */\nexport default function format<T extends Metadata>(\n record: LogRecord<T>,\n): string {\n return formatRecordToString(record, style);\n}\n"],"names":["style","styles","string","length","map","styleName","styleToHtmlStyleThemeLight","open","join","format","record","formatRecordToString"],"mappings":";;AAMO,SAASA,KAAKA,CAACC,MAAc,EAAEC,MAAc,EAAU;EAC5D,IAAI,CAACD,MAAM,IAAIA,MAAM,CAACE,MAAM,KAAK,CAAC,IAAI,CAACD,MAAM,EAAE;AAC7C,IAAA,OAAOA,MAAM,CAAA;AACf,GAAA;EAEA,OAAQ,CAAA,aAAA,EAAeD,MAAM,CAC1BG,GAAG,CAAEC,SAAiB,IAAKC,0BAA0B,CAACD,SAAS,CAAC,CAACE,IAAI,CAAC,CACtEC,IAAI,CAAC,IAAI,CAAE,CAAIN,EAAAA,EAAAA,MAAO,CAAQ,OAAA,CAAA,CAAA;AACnC,CAAA;;AAEA;AACA;AACA;AACA;AACe,SAASO,MAAMA,CAC5BC,MAAoB,EACZ;AACR,EAAA,OAAOC,oBAAoB,CAACD,MAAM,EAAEV,KAAK,CAAC,CAAA;AAC5C;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightingale-html-formatter",
3
- "version": "14.2.0",
3
+ "version": "15.0.0",
4
4
  "description": "Nightingale HTML formatter",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -39,9 +39,6 @@
39
39
  "import": "./dist/index-node18.mjs"
40
40
  },
41
41
  "browser": {
42
- "browser:modern": {
43
- "import": "./dist/index-browsermodern.es.js"
44
- },
45
42
  "import": "./dist/index-browser.es.js"
46
43
  }
47
44
  }
@@ -68,10 +65,6 @@
68
65
  "target": "node",
69
66
  "version": "18"
70
67
  },
71
- {
72
- "target": "browser",
73
- "version": "modern"
74
- },
75
68
  {
76
69
  "target": "browser"
77
70
  }
@@ -81,14 +74,14 @@
81
74
  ]
82
75
  },
83
76
  "dependencies": {
84
- "nightingale-formatter": "14.2.0",
85
- "nightingale-types": "14.2.0"
77
+ "nightingale-formatter": "15.0.0",
78
+ "nightingale-types": "15.0.0"
86
79
  },
87
80
  "devDependencies": {
88
- "@babel/core": "7.23.2",
89
- "@babel/preset-env": "7.23.2",
90
- "nightingale-levels": "14.2.0",
91
- "pob-babel": "36.4.4",
92
- "typescript": "5.2.2"
81
+ "@babel/core": "7.23.6",
82
+ "@babel/preset-env": "7.23.6",
83
+ "nightingale-levels": "15.0.0",
84
+ "pob-babel": "38.0.0",
85
+ "typescript": "5.3.3"
93
86
  }
94
87
  }
@@ -1,19 +0,0 @@
1
- import { formatRecordToString, styleToHtmlStyleThemeLight } from 'nightingale-formatter';
2
-
3
- function style(styles, string) {
4
- if (!styles || styles.length === 0 || !string) {
5
- return string;
6
- }
7
- return `<span style="${styles.map(styleName => styleToHtmlStyleThemeLight[styleName].open).join('; ')}">${string}</span>`;
8
- }
9
-
10
- /**
11
- * @param {Object} record
12
- * @returns {string}
13
- */
14
- function format(record) {
15
- return formatRecordToString(record, style);
16
- }
17
-
18
- export { format as default, style };
19
- //# sourceMappingURL=index-browsermodern.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["import {\n formatRecordToString,\n styleToHtmlStyleThemeLight,\n} from 'nightingale-formatter';\nimport type { Styles, LogRecord, Metadata } from 'nightingale-types';\n\nexport function style(styles: Styles, string: string): string {\n if (!styles || styles.length === 0 || !string) {\n return string;\n }\n\n return `<span style=\"${styles\n .map((styleName: string) => styleToHtmlStyleThemeLight[styleName].open)\n .join('; ')}\">${string}</span>`;\n}\n\n/**\n * @param {Object} record\n * @returns {string}\n */\nexport default function format<T extends Metadata>(\n record: LogRecord<T>,\n): string {\n return formatRecordToString(record, style);\n}\n"],"names":["style","styles","string","length","map","styleName","styleToHtmlStyleThemeLight","open","join","format","record","formatRecordToString"],"mappings":";;AAMO,SAASA,KAAKA,CAACC,MAAc,EAAEC,MAAc,EAAU;EAC5D,IAAI,CAACD,MAAM,IAAIA,MAAM,CAACE,MAAM,KAAK,CAAC,IAAI,CAACD,MAAM,EAAE;AAC7C,IAAA,OAAOA,MAAM,CAAA;AACf,GAAA;EAEA,OAAQ,CAAA,aAAA,EAAeD,MAAM,CAC1BG,GAAG,CAAEC,SAAiB,IAAKC,0BAA0B,CAACD,SAAS,CAAC,CAACE,IAAI,CAAC,CACtEC,IAAI,CAAC,IAAI,CAAE,CAAIN,EAAAA,EAAAA,MAAO,CAAQ,OAAA,CAAA,CAAA;AACnC,CAAA;;AAEA;AACA;AACA;AACA;AACe,SAASO,MAAMA,CAC5BC,MAAoB,EACZ;AACR,EAAA,OAAOC,oBAAoB,CAACD,MAAM,EAAEV,KAAK,CAAC,CAAA;AAC5C;;;;"}