@atlaspack/logger 2.12.1-dev.3450 → 2.12.1-dev.3466

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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/Logger.js +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/logger",
3
- "version": "2.12.1-dev.3450+58845ef87",
3
+ "version": "2.12.1-dev.3466+9a12fb8bd",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "publishConfig": {
@@ -16,8 +16,8 @@
16
16
  "node": ">= 16.0.0"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.12.1-dev.3450+58845ef87",
20
- "@atlaspack/events": "2.12.1-dev.3450+58845ef87"
19
+ "@atlaspack/diagnostic": "2.12.1-dev.3466+9a12fb8bd",
20
+ "@atlaspack/events": "2.12.1-dev.3466+9a12fb8bd"
21
21
  },
22
- "gitHead": "58845ef87446fcedb7d7d8876440c64184645cbb"
22
+ "gitHead": "9a12fb8bd1b72e407ed043e20337dc60fbec9cbe"
23
23
  }
package/src/Logger.js CHANGED
@@ -54,7 +54,7 @@ class Logger {
54
54
  let diagnostic = anyToDiagnostic(input);
55
55
  if (typeof realOrigin === 'string') {
56
56
  diagnostic = Array.isArray(diagnostic)
57
- ? diagnostic.map(d => {
57
+ ? diagnostic.map((d) => {
58
58
  return {...d, origin: realOrigin};
59
59
  })
60
60
  : {
@@ -101,7 +101,7 @@ export class PluginLogger implements IPluginLogger {
101
101
  diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,
102
102
  ): Diagnostic | Array<Diagnostic> {
103
103
  return Array.isArray(diagnostic)
104
- ? diagnostic.map(d => {
104
+ ? diagnostic.map((d) => {
105
105
  return {...d, origin: this.origin};
106
106
  })
107
107
  : {...diagnostic, origin: this.origin};
@@ -218,7 +218,7 @@ function messagesToDiagnostic(
218
218
  let diagnostic = errorToDiagnostic(error);
219
219
 
220
220
  if (Array.isArray(diagnostic)) {
221
- return diagnostic.map(d => {
221
+ return diagnostic.map((d) => {
222
222
  return {
223
223
  ...d,
224
224
  skipFormatting: true,
@@ -240,5 +240,7 @@ function messagesToDiagnostic(
240
240
  }
241
241
 
242
242
  function joinLogMessages(messages: Array<mixed>): string {
243
- return messages.map(m => (typeof m === 'string' ? m : inspect(m))).join(' ');
243
+ return messages
244
+ .map((m) => (typeof m === 'string' ? m : inspect(m)))
245
+ .join(' ');
244
246
  }