intl-messageformat 11.0.9 → 11.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/index.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- /*
2
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
3
- Copyrights licensed under the New BSD License.
4
- See the accompanying LICENSE file for terms.
5
- */
6
1
  import { IntlMessageFormat } from "./src/core.js";
7
2
  export * from "./src/core.js";
8
3
  export * from "./src/error.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "intl-messageformat",
3
3
  "description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.",
4
- "version": "11.0.9",
4
+ "version": "11.1.1",
5
5
  "license": "BSD-3-Clause",
6
6
  "author": "Eric Ferraiuolo <eferraiuolo@gmail.com>",
7
7
  "type": "module",
@@ -11,10 +11,10 @@
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"
14
+ "tslib": "^2.8.1",
15
+ "@formatjs/ecma402-abstract": "3.1.0",
16
+ "@formatjs/icu-messageformat-parser": "3.5.0",
17
+ "@formatjs/fast-memoize": "3.1.0"
18
18
  },
19
19
  "bugs": "https://github.com/formatjs/formatjs/issues",
20
20
  "contributors": [
package/src/core.d.ts CHANGED
@@ -22,8 +22,5 @@ export declare class IntlMessageFormat {
22
22
  static get defaultLocale(): string;
23
23
  static resolveLocale: (locales: string | string[]) => Intl.Locale | undefined;
24
24
  static __parse: typeof parse | undefined;
25
- // Default format options used as the prototype of the `formats` provided to the
26
- // constructor. These are used when constructing the internal Intl.NumberFormat
27
- // and Intl.DateTimeFormat instances.
28
25
  static formats: Formats;
29
26
  }
package/src/error.d.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  export declare enum ErrorCode {
2
- // When we have a placeholder but no value to format
3
2
  MISSING_VALUE = "MISSING_VALUE",
4
- // When value supplied is invalid
5
3
  INVALID_VALUE = "INVALID_VALUE",
6
- // When we need specific Intl API but it's not available
7
4
  MISSING_INTL_API = "MISSING_INTL_API"
8
5
  }
9
6
  export declare class FormatError extends Error {
@@ -38,7 +38,6 @@ export interface ObjectPart<T = any> {
38
38
  export type MessageFormatPart<T> = LiteralPart | ObjectPart<T>;
39
39
  export type PrimitiveType = string | number | bigint | boolean | null | undefined | Date;
40
40
  export declare function isFormatXMLElementFn<T>(el: PrimitiveType | T | FormatXMLElementFn<T>): el is FormatXMLElementFn<T>;
41
- // TODO(skeleton): add skeleton support
42
41
  export declare function formatToParts<T>(els: MessageFormatElement[], locales: string | string[], formatters: Formatters, formats: Formats, values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>, currentPluralValue?: number, originalMessage?: string): MessageFormatPart<T>[];
43
42
  export type FormatXMLElementFn<
44
43
  T,