@formatjs/intl-supportedvaluesof 2.1.2 → 2.2.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/index.d.ts +8 -0
- package/index.js +2 -0
- package/package.json +5 -5
- package/polyfill-force.d.ts +1 -0
- package/polyfill-force.js +7 -0
- package/polyfill.d.ts +1 -0
- package/polyfill.iife.js +6105 -0
- package/polyfill.js +10 -0
- package/should-polyfill.d.ts +1 -0
- package/should-polyfill.js +3 -0
- package/src/calendars.generated.d.ts +2 -0
- package/src/calendars.generated.js +23 -0
- package/src/collations.generated.d.ts +2 -0
- package/src/collations.generated.js +23 -0
- package/src/currencies.generated.d.ts +2 -0
- package/src/currencies.generated.js +311 -0
- package/src/get-supported-calendars.d.ts +8 -0
- package/src/get-supported-calendars.js +27 -0
- package/src/get-supported-collations.d.ts +8 -0
- package/src/get-supported-collations.js +23 -0
- package/src/get-supported-currencies.d.ts +8 -0
- package/src/get-supported-currencies.js +50 -0
- package/src/get-supported-numbering-systems.d.ts +7 -0
- package/src/get-supported-numbering-systems.js +28 -0
- package/src/get-supported-timezones.d.ts +8 -0
- package/src/get-supported-timezones.js +25 -0
- package/src/get-supported-units.d.ts +7 -0
- package/src/get-supported-units.js +28 -0
- package/src/index.d.ts +33 -0
- package/src/index.js +34 -0
- package/src/memoize.d.ts +9 -0
- package/src/memoize.js +10 -0
- package/src/numbering-systems.generated.d.ts +1 -0
- package/src/numbering-systems.generated.js +99 -0
- package/src/timezones.generated.d.ts +2 -0
- package/src/timezones.generated.js +431 -0
- package/src/units.generated.d.ts +2 -0
- package/src/units.generated.js +47 -0
- package/BUILD.bazel +0 -135
- package/CHANGELOG.md +0 -249
- package/index.ts +0 -9
- package/polyfill-force.ts +0 -8
- package/polyfill.ts +0 -11
- package/scripts/calendars.ts +0 -21
- package/scripts/collations.ts +0 -21
- package/scripts/currencies.ts +0 -21
- package/scripts/timezones.ts +0 -22
- package/scripts/units.ts +0 -23
- package/should-polyfill.ts +0 -3
- package/src/calendars.generated.ts +0 -4
- package/src/collations.generated.ts +0 -4
- package/src/currencies.generated.ts +0 -4
- package/src/get-supported-calendars.ts +0 -32
- package/src/get-supported-collations.ts +0 -30
- package/src/get-supported-currencies.ts +0 -62
- package/src/get-supported-numbering-systems.ts +0 -35
- package/src/get-supported-timezones.ts +0 -29
- package/src/get-supported-units.ts +0 -73
- package/src/index.ts +0 -75
- package/src/memoize.ts +0 -19
- package/src/numbering-systems.generated.ts +0 -99
- package/src/timezones.generated.ts +0 -4
- package/src/units.generated.ts +0 -4
- package/tests/index.test.ts +0 -155
- package/tsconfig.json +0 -5
package/BUILD.bazel
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
|
|
2
|
-
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
|
|
3
|
-
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
|
|
4
|
-
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
|
|
5
|
-
load("@npm//:defs.bzl", "npm_link_all_packages")
|
|
6
|
-
load("//packages/intl-datetimeformat:defs.bzl", "ZONES")
|
|
7
|
-
load("//tools:index.bzl", "generate_ide_tsconfig_json", "generate_src_file", "ts_compile")
|
|
8
|
-
load("//tools:vitest.bzl", "vitest")
|
|
9
|
-
|
|
10
|
-
npm_link_all_packages()
|
|
11
|
-
|
|
12
|
-
PACKAGE_NAME = "intl-supportedvaluesof"
|
|
13
|
-
|
|
14
|
-
npm_package(
|
|
15
|
-
name = "pkg",
|
|
16
|
-
srcs = [
|
|
17
|
-
"LICENSE.md",
|
|
18
|
-
"README.md",
|
|
19
|
-
"package.json",
|
|
20
|
-
":dist",
|
|
21
|
-
# polyfill-library uses this
|
|
22
|
-
"polyfill.iife.js",
|
|
23
|
-
],
|
|
24
|
-
package = "@formatjs/%s" % PACKAGE_NAME,
|
|
25
|
-
visibility = ["//visibility:public"],
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
SRCS = glob([
|
|
29
|
-
"src/**/*.ts",
|
|
30
|
-
"*.ts",
|
|
31
|
-
])
|
|
32
|
-
|
|
33
|
-
SRC_DEPS = [
|
|
34
|
-
":node_modules/@formatjs/ecma402-abstract",
|
|
35
|
-
":node_modules/@formatjs/fast-memoize",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
TESTS = glob([
|
|
39
|
-
"tests/*.test.ts",
|
|
40
|
-
])
|
|
41
|
-
|
|
42
|
-
ts_compile(
|
|
43
|
-
name = "dist",
|
|
44
|
-
srcs = [":srcs"],
|
|
45
|
-
deps = SRC_DEPS,
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
vitest(
|
|
49
|
-
name = "unit_test",
|
|
50
|
-
srcs = SRCS + TESTS,
|
|
51
|
-
deps = SRC_DEPS,
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
# Test262
|
|
55
|
-
# Generate tsconfig.json with correct extends path
|
|
56
|
-
generate_ide_tsconfig_json()
|
|
57
|
-
|
|
58
|
-
# calendars
|
|
59
|
-
generate_src_file(
|
|
60
|
-
name = "calendars",
|
|
61
|
-
src = "src/calendars.generated.ts",
|
|
62
|
-
data = [
|
|
63
|
-
"//:node_modules/cldr-bcp47",
|
|
64
|
-
],
|
|
65
|
-
entry_point = "scripts/calendars.ts",
|
|
66
|
-
tags = ["cldr"],
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
# timezones
|
|
70
|
-
generate_src_file(
|
|
71
|
-
name = "timezones",
|
|
72
|
-
src = "src/timezones.generated.ts",
|
|
73
|
-
args = ["--zone %s" % z for z in ZONES],
|
|
74
|
-
data = [
|
|
75
|
-
],
|
|
76
|
-
entry_point = "scripts/timezones.ts",
|
|
77
|
-
tags = ["cldr"],
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
# numbering-systems
|
|
81
|
-
write_source_files(
|
|
82
|
-
name = "numbering-systems",
|
|
83
|
-
files = {
|
|
84
|
-
"src/numbering-systems.generated.ts": "//packages/intl-numberformat:src/numbering-systems.generated.ts",
|
|
85
|
-
},
|
|
86
|
-
visibility = ["//:__pkg__"],
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
# currencies
|
|
90
|
-
generate_src_file(
|
|
91
|
-
name = "currencies",
|
|
92
|
-
src = "src/currencies.generated.ts",
|
|
93
|
-
data = [
|
|
94
|
-
"//:node_modules/cldr-numbers-full",
|
|
95
|
-
],
|
|
96
|
-
entry_point = "scripts/currencies.ts",
|
|
97
|
-
tags = ["cldr"],
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
# collations
|
|
101
|
-
generate_src_file(
|
|
102
|
-
name = "collations",
|
|
103
|
-
src = "src/collations.generated.ts",
|
|
104
|
-
data = [
|
|
105
|
-
"//:node_modules/cldr-bcp47",
|
|
106
|
-
],
|
|
107
|
-
entry_point = "scripts/collations.ts",
|
|
108
|
-
tags = ["cldr"],
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
# units
|
|
112
|
-
generate_src_file(
|
|
113
|
-
name = "units",
|
|
114
|
-
src = "src/units.generated.ts",
|
|
115
|
-
data = [
|
|
116
|
-
":node_modules/@formatjs/ecma402-abstract",
|
|
117
|
-
"//:node_modules/cldr-bcp47",
|
|
118
|
-
],
|
|
119
|
-
entry_point = "scripts/units.ts",
|
|
120
|
-
tags = ["cldr"],
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
esbuild(
|
|
124
|
-
name = "polyfill.iife",
|
|
125
|
-
srcs = [":srcs"],
|
|
126
|
-
entry_point = "polyfill.ts",
|
|
127
|
-
deps = [
|
|
128
|
-
"//:node_modules/tslib",
|
|
129
|
-
] + SRC_DEPS,
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
copy_to_bin(
|
|
133
|
-
name = "srcs",
|
|
134
|
-
srcs = SRCS,
|
|
135
|
-
)
|
package/CHANGELOG.md
DELETED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [2.1.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.1.1...@formatjs/intl-supportedvaluesof@2.1.2) (2026-01-06)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
9
|
-
|
|
10
|
-
## [2.1.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.1.0...@formatjs/intl-supportedvaluesof@2.1.1) (2026-01-02)
|
|
11
|
-
|
|
12
|
-
### Bug Fixes
|
|
13
|
-
|
|
14
|
-
* **@formatjs/intl-datetimeformat:** add America/Coyhaique, fix [#5111](https://github.com/formatjs/formatjs/issues/5111) ([#5741](https://github.com/formatjs/formatjs/issues/5741)) ([edd2f94](https://github.com/formatjs/formatjs/commit/edd2f94ab780e82702a1017e3ca38d41bde325ed)) - by @longlho
|
|
15
|
-
|
|
16
|
-
# [2.1.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.0.5...@formatjs/intl-supportedvaluesof@2.1.0) (2025-12-26)
|
|
17
|
-
|
|
18
|
-
### Features
|
|
19
|
-
|
|
20
|
-
* upgrade cldr to v48 ([#5678](https://github.com/formatjs/formatjs/issues/5678)) ([54ef319](https://github.com/formatjs/formatjs/commit/54ef31940172467889be64907e9fbbf567ea3f4b)) - by @longlho
|
|
21
|
-
|
|
22
|
-
## [2.0.5](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.0.4...@formatjs/intl-supportedvaluesof@2.0.5) (2025-12-23)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
25
|
-
|
|
26
|
-
## [2.0.4](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.0.3...@formatjs/intl-supportedvaluesof@2.0.4) (2025-12-23)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
29
|
-
|
|
30
|
-
## [2.0.3](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.0.2...@formatjs/intl-supportedvaluesof@2.0.3) (2025-12-18)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
33
|
-
|
|
34
|
-
## [2.0.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.0.1...@formatjs/intl-supportedvaluesof@2.0.2) (2025-12-17)
|
|
35
|
-
|
|
36
|
-
### Bug Fixes
|
|
37
|
-
|
|
38
|
-
* **@formatjs/cli-lib:** fix fs-extra imports, fix [#5569](https://github.com/formatjs/formatjs/issues/5569) ([76c8793](https://github.com/formatjs/formatjs/commit/76c8793bf8a0744ad9a7c64ab3adbe5c1434898f)) - by @longlho
|
|
39
|
-
|
|
40
|
-
## [2.0.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.0.0...@formatjs/intl-supportedvaluesof@2.0.1) (2025-12-15)
|
|
41
|
-
|
|
42
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
43
|
-
|
|
44
|
-
## [2.0.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.12...@formatjs/intl-supportedvaluesof@2.0.0) (2025-12-15)
|
|
45
|
-
|
|
46
|
-
### ⚠ BREAKING CHANGES
|
|
47
|
-
|
|
48
|
-
* **@formatjs/intl-supportedvaluesof:** convert to esm (#5458)
|
|
49
|
-
|
|
50
|
-
### Features
|
|
51
|
-
|
|
52
|
-
* **@formatjs/intl-supportedvaluesof:** convert to esm ([#5458](https://github.com/formatjs/formatjs/issues/5458)) ([04fdc7d](https://github.com/formatjs/formatjs/commit/04fdc7d5dd6b731e8de0c87c5a20d1df584cee96)) - by @longlho
|
|
53
|
-
|
|
54
|
-
## [1.8.12](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.11...@formatjs/intl-supportedvaluesof@1.8.12) (2025-10-09)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
57
|
-
|
|
58
|
-
## [1.8.11](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.10...@formatjs/intl-supportedvaluesof@1.8.11) (2025-10-03)
|
|
59
|
-
|
|
60
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
61
|
-
|
|
62
|
-
## [1.8.10](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.9...@formatjs/intl-supportedvaluesof@1.8.10) (2025-03-23)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
65
|
-
|
|
66
|
-
## [1.8.9](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.8...@formatjs/intl-supportedvaluesof@1.8.9) (2025-02-09)
|
|
67
|
-
|
|
68
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
69
|
-
|
|
70
|
-
## [1.8.8](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.7...@formatjs/intl-supportedvaluesof@1.8.8) (2025-01-02)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
73
|
-
|
|
74
|
-
## [1.8.7](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.6...@formatjs/intl-supportedvaluesof@1.8.7) (2024-12-09)
|
|
75
|
-
|
|
76
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
77
|
-
|
|
78
|
-
## [1.8.6](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.5...@formatjs/intl-supportedvaluesof@1.8.6) (2024-12-09)
|
|
79
|
-
|
|
80
|
-
### Bug Fixes
|
|
81
|
-
|
|
82
|
-
* turn on isolatedDeclarations and specify explicit types everywhere ([4d855c2](https://github.com/formatjs/formatjs/commit/4d855c2324426633eb84c346c76a5fd1ac854780)) - by @longlho
|
|
83
|
-
|
|
84
|
-
## [1.8.5](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.4...@formatjs/intl-supportedvaluesof@1.8.5) (2024-12-08)
|
|
85
|
-
|
|
86
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
87
|
-
|
|
88
|
-
## [1.8.4](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.3...@formatjs/intl-supportedvaluesof@1.8.4) (2024-11-18)
|
|
89
|
-
|
|
90
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
91
|
-
|
|
92
|
-
## [1.8.3](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.2...@formatjs/intl-supportedvaluesof@1.8.3) (2024-11-04)
|
|
93
|
-
|
|
94
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
95
|
-
|
|
96
|
-
## [1.8.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.1...@formatjs/intl-supportedvaluesof@1.8.2) (2024-11-02)
|
|
97
|
-
|
|
98
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
99
|
-
|
|
100
|
-
## [1.8.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.8.0...@formatjs/intl-supportedvaluesof@1.8.1) (2024-10-25)
|
|
101
|
-
|
|
102
|
-
### Bug Fixes
|
|
103
|
-
|
|
104
|
-
* relax tslib req to 2 instead of 2.7 ([930c3e8](https://github.com/formatjs/formatjs/commit/930c3e8ddcc160fde7466449575455f135f78ca6)) - by @longlho
|
|
105
|
-
|
|
106
|
-
# [1.8.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.7.0...@formatjs/intl-supportedvaluesof@1.8.0) (2024-10-25)
|
|
107
|
-
|
|
108
|
-
### Features
|
|
109
|
-
|
|
110
|
-
* upgrade cldr to v46 ([daafb44](https://github.com/formatjs/formatjs/commit/daafb449ba2fc4553f5a484b969affa1529752db)) - by @longlho
|
|
111
|
-
|
|
112
|
-
# [1.7.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.6.0...@formatjs/intl-supportedvaluesof@1.7.0) (2024-10-21)
|
|
113
|
-
|
|
114
|
-
### Features
|
|
115
|
-
|
|
116
|
-
* upgrade cldr to v45 ([#4620](https://github.com/formatjs/formatjs/issues/4620)) ([fbb2bbf](https://github.com/formatjs/formatjs/commit/fbb2bbf6e038d5833c1f2752b805002436480948)) - by @longlho
|
|
117
|
-
|
|
118
|
-
# [1.6.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.7...@formatjs/intl-supportedvaluesof@1.6.0) (2024-10-12)
|
|
119
|
-
|
|
120
|
-
### Features
|
|
121
|
-
|
|
122
|
-
* **@formatjs/intl-supportedvaluesof:** use memoized constructor creation for perf ([8949482](https://github.com/formatjs/formatjs/commit/89494821d7f346d7a6803fe5cc0bf987e3d34324)) - by @longlho
|
|
123
|
-
|
|
124
|
-
# [1.5.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.7...@formatjs/intl-supportedvaluesof@1.5.0) (2024-10-09)
|
|
125
|
-
|
|
126
|
-
### Features
|
|
127
|
-
|
|
128
|
-
* **@formatjs/intl-supportedvaluesof:** use memoized constructor creation for perf ([8949482](https://github.com/formatjs/formatjs/commit/89494821d7f346d7a6803fe5cc0bf987e3d34324)) - by @longlho
|
|
129
|
-
|
|
130
|
-
## [1.4.7](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.6...@formatjs/intl-supportedvaluesof@1.4.7) (2024-05-19)
|
|
131
|
-
|
|
132
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
133
|
-
|
|
134
|
-
## [1.4.6](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.5...@formatjs/intl-supportedvaluesof@1.4.6) (2024-05-18)
|
|
135
|
-
|
|
136
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
137
|
-
|
|
138
|
-
## [1.4.5](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.4...@formatjs/intl-supportedvaluesof@1.4.5) (2024-01-16)
|
|
139
|
-
|
|
140
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
141
|
-
|
|
142
|
-
## [1.4.4](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.3...@formatjs/intl-supportedvaluesof@1.4.4) (2024-01-16)
|
|
143
|
-
|
|
144
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
145
|
-
|
|
146
|
-
## [1.4.3](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.2...@formatjs/intl-supportedvaluesof@1.4.3) (2023-11-14)
|
|
147
|
-
|
|
148
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
149
|
-
|
|
150
|
-
## [1.4.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.1...@formatjs/intl-supportedvaluesof@1.4.2) (2023-11-12)
|
|
151
|
-
|
|
152
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
153
|
-
|
|
154
|
-
## [1.4.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.4.0...@formatjs/intl-supportedvaluesof@1.4.1) (2023-11-06)
|
|
155
|
-
|
|
156
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
157
|
-
|
|
158
|
-
# [1.4.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.3.4...@formatjs/intl-supportedvaluesof@1.4.0) (2023-10-16)
|
|
159
|
-
|
|
160
|
-
### Features
|
|
161
|
-
|
|
162
|
-
* **@formatjs/intl-supportedvaluesof:** update CLDR to v43 ([ee6d972](https://github.com/formatjs/formatjs/commit/ee6d972365b73b6fbfc312defb05a853eb51e5f0))
|
|
163
|
-
|
|
164
|
-
## [1.3.4](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.3.3...@formatjs/intl-supportedvaluesof@1.3.4) (2023-09-10)
|
|
165
|
-
|
|
166
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
167
|
-
|
|
168
|
-
## [1.3.3](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.3.2...@formatjs/intl-supportedvaluesof@1.3.3) (2023-09-07)
|
|
169
|
-
|
|
170
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
171
|
-
|
|
172
|
-
## [1.3.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.3.1...@formatjs/intl-supportedvaluesof@1.3.2) (2023-06-12)
|
|
173
|
-
|
|
174
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
175
|
-
|
|
176
|
-
## [1.3.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.3.0...@formatjs/intl-supportedvaluesof@1.3.1) (2023-06-06)
|
|
177
|
-
|
|
178
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
179
|
-
|
|
180
|
-
# [1.3.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.2.1...@formatjs/intl-supportedvaluesof@1.3.0) (2023-05-01)
|
|
181
|
-
|
|
182
|
-
### Features
|
|
183
|
-
|
|
184
|
-
* **@formatjs/intl-datetimeformat:** updated `tzdata` to `2023c` and fixed missing and changed TimeZone ([1b4856b](https://github.com/formatjs/formatjs/commit/1b4856b11c32c6ac99aa8795ee487c92b4d9d9c9))
|
|
185
|
-
|
|
186
|
-
## [1.2.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.2.0...@formatjs/intl-supportedvaluesof@1.2.1) (2023-02-20)
|
|
187
|
-
|
|
188
|
-
### Bug Fixes
|
|
189
|
-
|
|
190
|
-
* **@formatjs/intl-supportedvaluesof:** fix package.json ([67180d1](https://github.com/formatjs/formatjs/commit/67180d11f09c62005b1fd1f6b3d59f3af005a785))
|
|
191
|
-
|
|
192
|
-
# [1.2.0](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.10...@formatjs/intl-supportedvaluesof@1.2.0) (2023-02-20)
|
|
193
|
-
|
|
194
|
-
### Features
|
|
195
|
-
|
|
196
|
-
* **@formatjs/intl-locale:** implement new proposal features for Intl.Locale ([#3955](https://github.com/formatjs/formatjs/issues/3955)) ([984f923](https://github.com/formatjs/formatjs/commit/984f923f298c578d7c138ca5ad9f12965d73a7d0))
|
|
197
|
-
|
|
198
|
-
## [1.1.10](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.9...@formatjs/intl-supportedvaluesof@1.1.10) (2022-12-02)
|
|
199
|
-
|
|
200
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
201
|
-
|
|
202
|
-
## [1.1.9](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.7...@formatjs/intl-supportedvaluesof@1.1.9) (2022-12-01)
|
|
203
|
-
|
|
204
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
205
|
-
|
|
206
|
-
## [1.1.8](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.7...@formatjs/intl-supportedvaluesof@1.1.8) (2022-12-01)
|
|
207
|
-
|
|
208
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
209
|
-
|
|
210
|
-
## [1.1.7](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.6...@formatjs/intl-supportedvaluesof@1.1.7) (2022-11-29)
|
|
211
|
-
|
|
212
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
213
|
-
|
|
214
|
-
## [1.1.6](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.5...@formatjs/intl-supportedvaluesof@1.1.6) (2022-10-13)
|
|
215
|
-
|
|
216
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
217
|
-
|
|
218
|
-
## [1.1.5](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.4...@formatjs/intl-supportedvaluesof@1.1.5) (2022-08-27)
|
|
219
|
-
|
|
220
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
221
|
-
|
|
222
|
-
## [1.1.4](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.3...@formatjs/intl-supportedvaluesof@1.1.4) (2022-08-21)
|
|
223
|
-
|
|
224
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
225
|
-
|
|
226
|
-
## [1.1.3](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.2...@formatjs/intl-supportedvaluesof@1.1.3) (2022-08-21)
|
|
227
|
-
|
|
228
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
229
|
-
|
|
230
|
-
## [1.1.2](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.1...@formatjs/intl-supportedvaluesof@1.1.2) (2022-08-18)
|
|
231
|
-
|
|
232
|
-
**Note:** Version bump only for package @formatjs/intl-supportedvaluesof
|
|
233
|
-
|
|
234
|
-
## [1.1.1](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@1.1.0...@formatjs/intl-supportedvaluesof@1.1.1) (2022-07-16)
|
|
235
|
-
|
|
236
|
-
### Bug Fixes
|
|
237
|
-
|
|
238
|
-
* **@formatjs/cli-lib:** introduce @formatjs/cli-lib as @formatjs/cli Node API ([7c4ebef](https://github.com/formatjs/formatjs/commit/7c4ebef00a6ac2a197b5007e328306bc8e00b445)), closes [#3625](https://github.com/formatjs/formatjs/issues/3625)
|
|
239
|
-
|
|
240
|
-
# 1.1.0 (2022-07-11)
|
|
241
|
-
|
|
242
|
-
### Bug Fixes
|
|
243
|
-
|
|
244
|
-
* **@formatjs/intl-supportedvaluesof:** fix intl-enumerator build ([a1d95e1](https://github.com/formatjs/formatjs/commit/a1d95e13e21fddf8f13475254daf13d86dd34b6a))
|
|
245
|
-
* **@formatjs/intl-supportedvaluesof:** fixes intl.supportedValuesOf units ([#3699](https://github.com/formatjs/formatjs/issues/3699)) ([23c642c](https://github.com/formatjs/formatjs/commit/23c642c31996f6cbad59b374d59b5bb54d5dc6a2))
|
|
246
|
-
|
|
247
|
-
### Features
|
|
248
|
-
|
|
249
|
-
* **@formatjs/intl-supportedvaluesof:** porting of proposal-intl-enumeration to typescript ([#3694](https://github.com/formatjs/formatjs/issues/3694)) ([8c95643](https://github.com/formatjs/formatjs/commit/8c95643ca3128f4e0d0c4cd196dd8773467f7db8))
|
package/index.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type {SupportedValuesOf} from './src/index.js'
|
|
2
|
-
export type {Calendar} from './src/calendars.generated.js'
|
|
3
|
-
export type {Collation} from './src/collations.generated.js'
|
|
4
|
-
export type {Currency} from './src/currencies.generated.js'
|
|
5
|
-
export type {Timezone} from './src/timezones.generated.js'
|
|
6
|
-
export type {Unit} from './src/units.generated.js'
|
|
7
|
-
|
|
8
|
-
export {shouldPolyfill} from './should-polyfill.js'
|
|
9
|
-
export {supportedValuesOf} from './src/index.js'
|
package/polyfill-force.ts
DELETED
package/polyfill.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {shouldPolyfill} from './should-polyfill.js'
|
|
2
|
-
import {supportedValuesOf} from './src'
|
|
3
|
-
|
|
4
|
-
if (shouldPolyfill()) {
|
|
5
|
-
Object.defineProperty(Intl, 'supportedValuesOf', {
|
|
6
|
-
value: supportedValuesOf,
|
|
7
|
-
enumerable: true,
|
|
8
|
-
writable: false,
|
|
9
|
-
configurable: false,
|
|
10
|
-
})
|
|
11
|
-
}
|
package/scripts/calendars.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra/esm'
|
|
3
|
-
import {keyword} from 'cldr-bcp47/bcp47/calendar.json'
|
|
4
|
-
function main(args: minimist.ParsedArgs) {
|
|
5
|
-
const {out} = args
|
|
6
|
-
const calendars = Object.keys(keyword.u.ca).filter(k => !k.startsWith('_'))
|
|
7
|
-
|
|
8
|
-
// Output numbering systems file
|
|
9
|
-
outputFileSync(
|
|
10
|
-
out,
|
|
11
|
-
`/* @generated */
|
|
12
|
-
// prettier-ignore
|
|
13
|
-
export const calendars = ${JSON.stringify(calendars)} as const
|
|
14
|
-
export type Calendar = typeof calendars[number]
|
|
15
|
-
`
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (require.main === module) {
|
|
20
|
-
main(minimist(process.argv))
|
|
21
|
-
}
|
package/scripts/collations.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra/esm'
|
|
3
|
-
import {keyword} from 'cldr-bcp47/bcp47/collation.json'
|
|
4
|
-
function main(args: minimist.ParsedArgs) {
|
|
5
|
-
const {out} = args
|
|
6
|
-
const collations = Object.keys(keyword.u.co).filter(k => !k.startsWith('_'))
|
|
7
|
-
|
|
8
|
-
// Output numbering systems file
|
|
9
|
-
outputFileSync(
|
|
10
|
-
out,
|
|
11
|
-
`/* @generated */
|
|
12
|
-
// prettier-ignore
|
|
13
|
-
export const collations = ${JSON.stringify(collations)} as const
|
|
14
|
-
export type Collation = typeof collations[number]
|
|
15
|
-
`
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (require.main === module) {
|
|
20
|
-
main(minimist(process.argv))
|
|
21
|
-
}
|
package/scripts/currencies.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra/esm'
|
|
3
|
-
import {main as data} from 'cldr-numbers-full/main/en/currencies.json'
|
|
4
|
-
function main(args: minimist.ParsedArgs) {
|
|
5
|
-
const {out} = args
|
|
6
|
-
const currencies = Object.keys(data.en.numbers.currencies)
|
|
7
|
-
|
|
8
|
-
// Output numbering systems file
|
|
9
|
-
outputFileSync(
|
|
10
|
-
out,
|
|
11
|
-
`/* @generated */
|
|
12
|
-
// prettier-ignore
|
|
13
|
-
export const currencies = ${JSON.stringify(currencies)} as const
|
|
14
|
-
export type Currency = typeof currencies[number]
|
|
15
|
-
`
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (require.main === module) {
|
|
20
|
-
main(minimist(process.argv))
|
|
21
|
-
}
|
package/scripts/timezones.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra/esm'
|
|
3
|
-
interface Args extends minimist.ParsedArgs {
|
|
4
|
-
zone: string[]
|
|
5
|
-
}
|
|
6
|
-
function main(args: Args) {
|
|
7
|
-
const {out, zone: timezones} = args
|
|
8
|
-
|
|
9
|
-
// Output numbering systems file
|
|
10
|
-
outputFileSync(
|
|
11
|
-
out,
|
|
12
|
-
`/* @generated */
|
|
13
|
-
// prettier-ignore
|
|
14
|
-
export const timezones = ${JSON.stringify(timezones)} as const
|
|
15
|
-
export type Timezone = typeof timezones[number]
|
|
16
|
-
`
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (require.main === module) {
|
|
21
|
-
main(minimist<Args>(process.argv))
|
|
22
|
-
}
|
package/scripts/units.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import minimist from 'minimist'
|
|
2
|
-
import {outputFileSync} from 'fs-extra/esm'
|
|
3
|
-
import {SIMPLE_UNITS} from '@formatjs/ecma402-abstract'
|
|
4
|
-
|
|
5
|
-
interface Args extends minimist.ParsedArgs {
|
|
6
|
-
zone: string[]
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function main(args: Args) {
|
|
10
|
-
const {out} = args
|
|
11
|
-
|
|
12
|
-
outputFileSync(
|
|
13
|
-
out,
|
|
14
|
-
`/* @generated */
|
|
15
|
-
// prettier-ignore
|
|
16
|
-
export const units = ${JSON.stringify(SIMPLE_UNITS)} as const
|
|
17
|
-
export type Unit = typeof units[number]`
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (require.main === module) {
|
|
22
|
-
main(minimist<Args>(process.argv))
|
|
23
|
-
}
|
package/should-polyfill.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/* @generated */
|
|
2
|
-
// prettier-ignore
|
|
3
|
-
export const calendars = ["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-civil","islamic-rgsa","islamic-tbla","islamic-umalqura","islamicc","iso8601","japanese","persian","roc"] as const
|
|
4
|
-
export type Calendar = (typeof calendars)[number]
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/* @generated */
|
|
2
|
-
// prettier-ignore
|
|
3
|
-
export const collations = ["big5han","compat","dict","direct","ducet","emoji","eor","gb2312","phonebk","phonetic","pinyin","reformed","search","searchjl","standard","stroke","trad","unihan","zhuyin"] as const
|
|
4
|
-
export type Collation = (typeof collations)[number]
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/* @generated */
|
|
2
|
-
// prettier-ignore
|
|
3
|
-
export const currencies = ["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLE","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VED","VEF","VES","VND","VNN","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XCG","XDR","XEU","XFO","XFU","XOF","XPD","XPF","XPT","XRE","XSU","XTS","XUA","XXX","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWG","ZWL","ZWR"] as const
|
|
4
|
-
export type Currency = (typeof currencies)[number]
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {createMemoizedDateTimeFormat} from './memoize.js'
|
|
2
|
-
import type {Calendar} from './calendars.generated.js'
|
|
3
|
-
import {calendars} from './calendars.generated.js'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Implementation: Tests if a calendar is supported by attempting to create
|
|
7
|
-
* a DateTimeFormat with that calendar and verifying it was accepted.
|
|
8
|
-
*
|
|
9
|
-
* CLDR Data: Candidate values come from CLDR calendar types
|
|
10
|
-
*/
|
|
11
|
-
function isSupportedCalendar(item: Calendar): boolean {
|
|
12
|
-
try {
|
|
13
|
-
// Always use 'en' for testing
|
|
14
|
-
const dateTimeFormat = createMemoizedDateTimeFormat(`en-u-ca-${item}`)
|
|
15
|
-
const options = dateTimeFormat.resolvedOptions().calendar
|
|
16
|
-
|
|
17
|
-
// Verify the calendar was actually accepted (resolved calendar matches requested)
|
|
18
|
-
return options === item
|
|
19
|
-
} catch {}
|
|
20
|
-
|
|
21
|
-
return false
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* ECMA-402 Spec: Returns supported calendar identifiers
|
|
26
|
-
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
27
|
-
*
|
|
28
|
-
* Implementation: Filters CLDR list against actual runtime support
|
|
29
|
-
*/
|
|
30
|
-
export function getSupportedCalendars(): Calendar[] {
|
|
31
|
-
return calendars.filter(isSupportedCalendar).sort()
|
|
32
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type {Collation} from './collations.generated.js'
|
|
2
|
-
import {collations} from './collations.generated.js'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Implementation: Tests if a collation is supported by attempting to create
|
|
6
|
-
* a Collator with that collation and verifying it was accepted.
|
|
7
|
-
*
|
|
8
|
-
* CLDR Data: Candidate values come from CLDR collation types
|
|
9
|
-
*/
|
|
10
|
-
function isSupportedCollation(collation: Collation): boolean {
|
|
11
|
-
try {
|
|
12
|
-
// Always use 'en' for testing
|
|
13
|
-
return (
|
|
14
|
-
Intl.Collator(`en-u-co-${collation}`).resolvedOptions().collation ===
|
|
15
|
-
collation
|
|
16
|
-
)
|
|
17
|
-
} catch {}
|
|
18
|
-
|
|
19
|
-
return false
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* ECMA-402 Spec: Returns supported collation identifiers
|
|
24
|
-
* ECMA-402 Spec: Results must be sorted lexicographically
|
|
25
|
-
*
|
|
26
|
-
* Implementation: Filters CLDR list against actual runtime support
|
|
27
|
-
*/
|
|
28
|
-
export function getSupportedCollations(): Collation[] {
|
|
29
|
-
return collations.filter(isSupportedCollation).sort()
|
|
30
|
-
}
|