@formatjs/intl 4.0.9 → 4.1.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@formatjs/intl",
3
3
  "description": "Internationalize JS apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.",
4
- "version": "4.0.9",
4
+ "version": "4.1.1",
5
5
  "license": "MIT",
6
6
  "author": "Long Ho <holevietlong@gmail.com>",
7
7
  "type": "module",
@@ -11,11 +11,11 @@
11
11
  ".": "./index.js"
12
12
  },
13
13
  "dependencies": {
14
- "tslib": "^2.8.0",
15
- "@formatjs/ecma402-abstract": "3.0.8",
16
- "@formatjs/fast-memoize": "3.0.3",
17
- "@formatjs/icu-messageformat-parser": "3.3.0",
18
- "intl-messageformat": "11.0.9"
14
+ "tslib": "^2.8.1",
15
+ "@formatjs/ecma402-abstract": "3.1.0",
16
+ "@formatjs/fast-memoize": "3.1.0",
17
+ "@formatjs/icu-messageformat-parser": "3.5.0",
18
+ "intl-messageformat": "11.1.1"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "typescript": "^5.6.0"
package/src/message.js CHANGED
@@ -51,10 +51,6 @@ to autofix this issue`);
51
51
  if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE.literal) {
52
52
  return message[0].value;
53
53
  }
54
- // IMPORTANT: Hot path straight lookup for performance
55
- if (!values && message && typeof message === "string" && !defaultRichTextElements) {
56
- return message.replace(/'\{(.*?)\}'/gi, `{$1}`);
57
- }
58
54
  values = {
59
55
  ...defaultRichTextElements,
60
56
  ...values
package/src/types.d.ts CHANGED
@@ -8,9 +8,6 @@ export interface Part<T = string> {
8
8
  type: "element" | "literal";
9
9
  value: T;
10
10
  }
11
- // Note: FormatjsIntl is defined as a global namespace so the library user can
12
- // override the default types of Message.ids (e.g. as string literal unions from extracted strings)
13
- // or IntlConfig.locale (e.g. to a list of supported locales).
14
11
  declare global {
15
12
  namespace FormatjsIntl {
16
13
  interface Message {}