@discord/intl-loader-core 0.10.0-rc.2 → 0.10.0-rc.4
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 +5 -2
- package/src/transformer.js +1 -1
- package/types/types.d.ts +2 -0
- package/types.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discord/intl-loader-core",
|
|
3
|
-
"version": "0.10.0-rc.
|
|
3
|
+
"version": "0.10.0-rc.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Core utilities for writing loaders and transformers using @discord/intl",
|
|
6
6
|
"author": "Jon Egeland",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./types/index.d.ts",
|
|
18
18
|
"default": "./index.js"
|
|
19
|
+
},
|
|
20
|
+
"./types": {
|
|
21
|
+
"types": "./types/types.d.ts"
|
|
19
22
|
}
|
|
20
23
|
},
|
|
21
24
|
"repository": {
|
|
@@ -26,7 +29,7 @@
|
|
|
26
29
|
"chokidar": "^3.6.0",
|
|
27
30
|
"debug": "^4.3.6",
|
|
28
31
|
"fast-glob": "^3.3.2",
|
|
29
|
-
"@discord/intl-message-database": "0.10.0-rc.
|
|
32
|
+
"@discord/intl-message-database": "0.10.0-rc.4"
|
|
30
33
|
},
|
|
31
34
|
"devDependencies": {
|
|
32
35
|
"@types/debug": "^4.1.12",
|
package/src/transformer.js
CHANGED
|
@@ -140,7 +140,7 @@ class MessageDefinitionsTransformer {
|
|
|
140
140
|
return [
|
|
141
141
|
this.options.getPrelude?.() ?? '// No additional prelude was configured.',
|
|
142
142
|
`const {createLoader} = require('@discord/intl');`,
|
|
143
|
-
`const _keys = ${JSON.stringify(this.options.messageKeys)};`,
|
|
143
|
+
`const _keys = ${JSON.stringify(Object.keys(this.options.messageKeys))};`,
|
|
144
144
|
`const _locales = ${this.getLocaleRequireMap()};`,
|
|
145
145
|
`const _defaultLocale = ${JSON.stringify(this.options.defaultLocale)};`,
|
|
146
146
|
`const ${this.loaderName} = createLoader(_keys, _locales, _defaultLocale);`,
|
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IntlSourceFile } from '@discord/intl-message-database';
|
|
2
2
|
|
|
3
|
+
export type * from '@discord/intl-message-database';
|
|
4
|
+
|
|
3
5
|
export interface MessageDefinitionsTransformerOptions {
|
|
4
6
|
/**
|
|
5
7
|
* The map of message keys that this file manages to their original values. By default, only the
|
package/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IntlSourceFile } from '@discord/intl-message-database';
|
|
2
2
|
|
|
3
|
+
export type * from '@discord/intl-message-database';
|
|
4
|
+
|
|
3
5
|
export interface MessageDefinitionsTransformerOptions {
|
|
4
6
|
/**
|
|
5
7
|
* The map of message keys that this file manages to their original values. By default, only the
|