@discord/intl-loader-core 0.2.1-canary.d971c43 → 0.2.1-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discord/intl-loader-core",
3
- "version": "0.2.1-canary.d971c43",
3
+ "version": "0.2.1-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "Core utilities for writing loaders and transformers using @discord/intl",
6
6
  "author": "Jon Egeland",
@@ -68,7 +68,6 @@ class MessageDefinitionsTransformer {
68
68
  */
69
69
  constructor(options) {
70
70
  this.options = options;
71
- this.loaderName = 'messagesLoader';
72
71
  }
73
72
 
74
73
  /**
@@ -106,7 +105,7 @@ class MessageDefinitionsTransformer {
106
105
  if (!this.options.debug) return [];
107
106
 
108
107
  return [
109
- `${this.loaderName}.withDebugValues(${JSON.stringify(this.options.messageKeys)}, ${JSON.stringify(this.options.localeMap)})`,
108
+ `loader.withDebugValues(${JSON.stringify(this.options.messageKeys)}, ${JSON.stringify(this.options.localeMap)})`,
110
109
  ];
111
110
  }
112
111
 
@@ -124,9 +123,9 @@ class MessageDefinitionsTransformer {
124
123
  `const _keys = ${JSON.stringify(this.options.messageKeys)};`,
125
124
  `const _locales = ${this.getLocaleRequireMap()};`,
126
125
  `const _defaultLocale = ${JSON.stringify(this.options.defaultLocale)};`,
127
- `export const ${this.loaderName} = createLoader(_keys, _locales, _defaultLocale);`,
126
+ 'export const messagesLoader = createLoader(_keys, _locales, _defaultLocale);',
128
127
  ...this.debugModeSetup(),
129
- `export default ${this.loaderName}.getBinds();`,
128
+ 'export default messagesLoader.getBinds();',
130
129
  ].join('\n');
131
130
  }
132
131
  }