@formatjs/intl 1.9.4 → 1.9.5
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/lib/src/message.js +1 -1
- package/package.json +1 -1
- package/src/message.js +1 -1
package/lib/src/message.js
CHANGED
|
@@ -28,7 +28,7 @@ export function formatMessage(_a, state, messageDescriptor, values, opts) {
|
|
|
28
28
|
if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
|
|
29
29
|
var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
|
|
30
30
|
// `id` is a required field of a Message Descriptor.
|
|
31
|
-
invariant(!!msgId,
|
|
31
|
+
invariant(!!msgId, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
|
|
32
32
|
var id = String(msgId);
|
|
33
33
|
var message =
|
|
34
34
|
// In case messages is Object.create(null)
|
package/package.json
CHANGED
package/src/message.js
CHANGED
|
@@ -31,7 +31,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
|
|
|
31
31
|
if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
|
|
32
32
|
var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
|
|
33
33
|
// `id` is a required field of a Message Descriptor.
|
|
34
|
-
ecma402_abstract_1.invariant(!!msgId,
|
|
34
|
+
ecma402_abstract_1.invariant(!!msgId, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
|
|
35
35
|
var id = String(msgId);
|
|
36
36
|
var message =
|
|
37
37
|
// In case messages is Object.create(null)
|