@lwrjs/label-module-provider 0.17.2-alpha.1 → 0.17.2-alpha.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.
@@ -67,13 +67,11 @@ function getLabels(labelDir, locale, legacyFallbacks) {
67
67
  }
68
68
  }
69
69
  } catch (e) {
70
- let diagnosticError = e;
70
+ let theError = e;
71
71
  if (!(e instanceof import_diagnostics.LwrUnresolvableError)) {
72
- diagnosticError = (0, import_diagnostics.createSingleDiagnosticError)({
73
- description: import_diagnostics.descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message)
74
- }, import_diagnostics.LwrUnresolvableError);
72
+ theError = new import_diagnostics.LwrUnresolvableError(import_diagnostics.descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message), "label");
75
73
  }
76
- import_diagnostics2.logger.error(diagnosticError);
74
+ import_diagnostics2.logger.error(theError);
77
75
  }
78
76
  return void 0;
79
77
  }
@@ -57,8 +57,6 @@ function validateAndParse(localePath) {
57
57
  }
58
58
  throw new Error(ajv.errorsText(validate.errors, {separator: "\n"}));
59
59
  } catch (e) {
60
- throw (0, import_diagnostics.createSingleDiagnosticError)({
61
- description: import_diagnostics.descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message)
62
- }, import_diagnostics.LwrUnresolvableError);
60
+ throw new import_diagnostics.LwrUnresolvableError(import_diagnostics.descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message), "label");
63
61
  }
64
62
  }
package/build/es/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { extname } from 'path';
3
- import { createSingleDiagnosticError, descriptions, LwrUnresolvableError } from '@lwrjs/diagnostics';
3
+ import { descriptions, LwrUnresolvableError } from '@lwrjs/diagnostics';
4
4
  import { validateAndParse } from './validation.js';
5
5
  import { logger } from '@lwrjs/diagnostics';
6
6
  /**
@@ -70,13 +70,11 @@ export function getLabels(labelDir, locale, legacyFallbacks) {
70
70
  }
71
71
  }
72
72
  catch (e) {
73
- let diagnosticError = e;
73
+ let theError = e;
74
74
  if (!(e instanceof LwrUnresolvableError)) {
75
- diagnosticError = createSingleDiagnosticError({
76
- description: descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message),
77
- }, LwrUnresolvableError);
75
+ theError = new LwrUnresolvableError(descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message), 'label');
78
76
  }
79
- logger.error(diagnosticError);
77
+ logger.error(theError);
80
78
  }
81
79
  return undefined;
82
80
  }
@@ -1,6 +1,6 @@
1
1
  import Ajv from 'ajv';
2
2
  import { readFile } from '@lwrjs/shared-utils';
3
- import { createSingleDiagnosticError, descriptions, LwrUnresolvableError } from '@lwrjs/diagnostics';
3
+ import { descriptions, LwrUnresolvableError } from '@lwrjs/diagnostics';
4
4
  /**
5
5
  * Labels must be a JSON object of string values
6
6
  * or a nested (1 level deep) JSON object of string values
@@ -38,9 +38,7 @@ export function validateAndParse(localePath) {
38
38
  throw new Error(ajv.errorsText(validate.errors, { separator: '\n' }));
39
39
  }
40
40
  catch (e) {
41
- throw createSingleDiagnosticError({
42
- description: descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message),
43
- }, LwrUnresolvableError);
41
+ throw new LwrUnresolvableError(descriptions.UNRESOLVABLE.LABEL_MODULE(localePath, e.message), 'label');
44
42
  }
45
43
  }
46
44
  //# sourceMappingURL=validation.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.17.2-alpha.1",
7
+ "version": "0.17.2-alpha.2",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -33,16 +33,16 @@
33
33
  "build": "tsc -b"
34
34
  },
35
35
  "dependencies": {
36
- "@lwrjs/diagnostics": "0.17.2-alpha.1",
37
- "@lwrjs/shared-utils": "0.17.2-alpha.1",
36
+ "@lwrjs/diagnostics": "0.17.2-alpha.2",
37
+ "@lwrjs/shared-utils": "0.17.2-alpha.2",
38
38
  "ajv": "6.12.6"
39
39
  },
40
40
  "devDependencies": {
41
- "@lwrjs/types": "0.17.2-alpha.1",
41
+ "@lwrjs/types": "0.17.2-alpha.2",
42
42
  "memfs": "^4.13.0"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=18.0.0"
46
46
  },
47
- "gitHead": "bba15ca717a242b0375decaa378af06bdee813b5"
47
+ "gitHead": "739b237f5d7f2c1989142cb505a56cc763f21976"
48
48
  }