@formatjs/cli 6.2.15 → 6.3.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/bin/formatjs +43 -37
- package/package.json +2 -2
package/bin/formatjs
CHANGED
|
@@ -2754,7 +2754,7 @@ var require_loud_rejection = __commonJS({
|
|
|
2754
2754
|
}
|
|
2755
2755
|
});
|
|
2756
2756
|
|
|
2757
|
-
// node_modules/.aspect_rules_js/tslib@2.
|
|
2757
|
+
// node_modules/.aspect_rules_js/tslib@2.8.0/node_modules/tslib/tslib.es6.mjs
|
|
2758
2758
|
var tslib_es6_exports = {};
|
|
2759
2759
|
__export(tslib_es6_exports, {
|
|
2760
2760
|
__addDisposableResource: () => __addDisposableResource,
|
|
@@ -2782,6 +2782,7 @@ __export(tslib_es6_exports, {
|
|
|
2782
2782
|
__propKey: () => __propKey,
|
|
2783
2783
|
__read: () => __read,
|
|
2784
2784
|
__rest: () => __rest,
|
|
2785
|
+
__rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,
|
|
2785
2786
|
__runInitializers: () => __runInitializers,
|
|
2786
2787
|
__setFunctionName: () => __setFunctionName,
|
|
2787
2788
|
__spread: () => __spread,
|
|
@@ -3244,9 +3245,17 @@ function __disposeResources(env) {
|
|
|
3244
3245
|
}
|
|
3245
3246
|
return next();
|
|
3246
3247
|
}
|
|
3248
|
+
function __rewriteRelativeImportExtension(path, preserveJsx) {
|
|
3249
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3250
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
3251
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
3252
|
+
});
|
|
3253
|
+
}
|
|
3254
|
+
return path;
|
|
3255
|
+
}
|
|
3247
3256
|
var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default;
|
|
3248
3257
|
var init_tslib_es6 = __esm({
|
|
3249
|
-
"node_modules/.aspect_rules_js/tslib@2.
|
|
3258
|
+
"node_modules/.aspect_rules_js/tslib@2.8.0/node_modules/tslib/tslib.es6.mjs"() {
|
|
3250
3259
|
extendStatics = function(d, b) {
|
|
3251
3260
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
3252
3261
|
d2.__proto__ = b2;
|
|
@@ -3299,6 +3308,10 @@ var init_tslib_es6 = __esm({
|
|
|
3299
3308
|
__rest,
|
|
3300
3309
|
__decorate,
|
|
3301
3310
|
__param,
|
|
3311
|
+
__esDecorate,
|
|
3312
|
+
__runInitializers,
|
|
3313
|
+
__propKey,
|
|
3314
|
+
__setFunctionName,
|
|
3302
3315
|
__metadata,
|
|
3303
3316
|
__awaiter,
|
|
3304
3317
|
__generator,
|
|
@@ -3320,7 +3333,8 @@ var init_tslib_es6 = __esm({
|
|
|
3320
3333
|
__classPrivateFieldSet,
|
|
3321
3334
|
__classPrivateFieldIn,
|
|
3322
3335
|
__addDisposableResource,
|
|
3323
|
-
__disposeResources
|
|
3336
|
+
__disposeResources,
|
|
3337
|
+
__rewriteRelativeImportExtension
|
|
3324
3338
|
};
|
|
3325
3339
|
}
|
|
3326
3340
|
});
|
|
@@ -3896,6 +3910,12 @@ var require_time_data_generated = __commonJS({
|
|
|
3896
3910
|
"H",
|
|
3897
3911
|
"h"
|
|
3898
3912
|
],
|
|
3913
|
+
"419": [
|
|
3914
|
+
"h",
|
|
3915
|
+
"H",
|
|
3916
|
+
"hB",
|
|
3917
|
+
"hb"
|
|
3918
|
+
],
|
|
3899
3919
|
"AC": [
|
|
3900
3920
|
"H",
|
|
3901
3921
|
"h",
|
|
@@ -3944,8 +3964,8 @@ var require_time_data_generated = __commonJS({
|
|
|
3944
3964
|
"hB"
|
|
3945
3965
|
],
|
|
3946
3966
|
"AR": [
|
|
3947
|
-
"H",
|
|
3948
3967
|
"h",
|
|
3968
|
+
"H",
|
|
3949
3969
|
"hB",
|
|
3950
3970
|
"hb"
|
|
3951
3971
|
],
|
|
@@ -4035,9 +4055,9 @@ var require_time_data_generated = __commonJS({
|
|
|
4035
4055
|
"H"
|
|
4036
4056
|
],
|
|
4037
4057
|
"BO": [
|
|
4058
|
+
"h",
|
|
4038
4059
|
"H",
|
|
4039
4060
|
"hB",
|
|
4040
|
-
"h",
|
|
4041
4061
|
"hb"
|
|
4042
4062
|
],
|
|
4043
4063
|
"BQ": [
|
|
@@ -4114,8 +4134,8 @@ var require_time_data_generated = __commonJS({
|
|
|
4114
4134
|
"hB"
|
|
4115
4135
|
],
|
|
4116
4136
|
"CL": [
|
|
4117
|
-
"H",
|
|
4118
4137
|
"h",
|
|
4138
|
+
"H",
|
|
4119
4139
|
"hB",
|
|
4120
4140
|
"hb"
|
|
4121
4141
|
],
|
|
@@ -4140,14 +4160,14 @@ var require_time_data_generated = __commonJS({
|
|
|
4140
4160
|
"H"
|
|
4141
4161
|
],
|
|
4142
4162
|
"CR": [
|
|
4143
|
-
"H",
|
|
4144
4163
|
"h",
|
|
4164
|
+
"H",
|
|
4145
4165
|
"hB",
|
|
4146
4166
|
"hb"
|
|
4147
4167
|
],
|
|
4148
4168
|
"CU": [
|
|
4149
|
-
"H",
|
|
4150
4169
|
"h",
|
|
4170
|
+
"H",
|
|
4151
4171
|
"hB",
|
|
4152
4172
|
"hb"
|
|
4153
4173
|
],
|
|
@@ -4216,9 +4236,9 @@ var require_time_data_generated = __commonJS({
|
|
|
4216
4236
|
"hb"
|
|
4217
4237
|
],
|
|
4218
4238
|
"EC": [
|
|
4239
|
+
"h",
|
|
4219
4240
|
"H",
|
|
4220
4241
|
"hB",
|
|
4221
|
-
"h",
|
|
4222
4242
|
"hb"
|
|
4223
4243
|
],
|
|
4224
4244
|
"EE": [
|
|
@@ -4354,8 +4374,8 @@ var require_time_data_generated = __commonJS({
|
|
|
4354
4374
|
"hB"
|
|
4355
4375
|
],
|
|
4356
4376
|
"GT": [
|
|
4357
|
-
"H",
|
|
4358
4377
|
"h",
|
|
4378
|
+
"H",
|
|
4359
4379
|
"hB",
|
|
4360
4380
|
"hb"
|
|
4361
4381
|
],
|
|
@@ -4382,8 +4402,8 @@ var require_time_data_generated = __commonJS({
|
|
|
4382
4402
|
"H"
|
|
4383
4403
|
],
|
|
4384
4404
|
"HN": [
|
|
4385
|
-
"H",
|
|
4386
4405
|
"h",
|
|
4406
|
+
"H",
|
|
4387
4407
|
"hB",
|
|
4388
4408
|
"hb"
|
|
4389
4409
|
],
|
|
@@ -4697,8 +4717,8 @@ var require_time_data_generated = __commonJS({
|
|
|
4697
4717
|
"hB"
|
|
4698
4718
|
],
|
|
4699
4719
|
"MX": [
|
|
4700
|
-
"H",
|
|
4701
4720
|
"h",
|
|
4721
|
+
"H",
|
|
4702
4722
|
"hB",
|
|
4703
4723
|
"hb"
|
|
4704
4724
|
],
|
|
@@ -4738,8 +4758,8 @@ var require_time_data_generated = __commonJS({
|
|
|
4738
4758
|
"hB"
|
|
4739
4759
|
],
|
|
4740
4760
|
"NI": [
|
|
4741
|
-
"H",
|
|
4742
4761
|
"h",
|
|
4762
|
+
"H",
|
|
4743
4763
|
"hB",
|
|
4744
4764
|
"hb"
|
|
4745
4765
|
],
|
|
@@ -4787,9 +4807,9 @@ var require_time_data_generated = __commonJS({
|
|
|
4787
4807
|
"hb"
|
|
4788
4808
|
],
|
|
4789
4809
|
"PE": [
|
|
4810
|
+
"h",
|
|
4790
4811
|
"H",
|
|
4791
4812
|
"hB",
|
|
4792
|
-
"h",
|
|
4793
4813
|
"hb"
|
|
4794
4814
|
],
|
|
4795
4815
|
"PF": [
|
|
@@ -4847,8 +4867,8 @@ var require_time_data_generated = __commonJS({
|
|
|
4847
4867
|
"H"
|
|
4848
4868
|
],
|
|
4849
4869
|
"PY": [
|
|
4850
|
-
"H",
|
|
4851
4870
|
"h",
|
|
4871
|
+
"H",
|
|
4852
4872
|
"hB",
|
|
4853
4873
|
"hb"
|
|
4854
4874
|
],
|
|
@@ -4961,8 +4981,8 @@ var require_time_data_generated = __commonJS({
|
|
|
4961
4981
|
"hB"
|
|
4962
4982
|
],
|
|
4963
4983
|
"SV": [
|
|
4964
|
-
"H",
|
|
4965
4984
|
"h",
|
|
4985
|
+
"H",
|
|
4966
4986
|
"hB",
|
|
4967
4987
|
"hb"
|
|
4968
4988
|
],
|
|
@@ -5084,8 +5104,8 @@ var require_time_data_generated = __commonJS({
|
|
|
5084
5104
|
"hB"
|
|
5085
5105
|
],
|
|
5086
5106
|
"UY": [
|
|
5087
|
-
"H",
|
|
5088
5107
|
"h",
|
|
5108
|
+
"H",
|
|
5089
5109
|
"hB",
|
|
5090
5110
|
"hb"
|
|
5091
5111
|
],
|
|
@@ -5193,24 +5213,12 @@ var require_time_data_generated = __commonJS({
|
|
|
5193
5213
|
"H",
|
|
5194
5214
|
"hB"
|
|
5195
5215
|
],
|
|
5196
|
-
"es-BO": [
|
|
5197
|
-
"H",
|
|
5198
|
-
"h",
|
|
5199
|
-
"hB",
|
|
5200
|
-
"hb"
|
|
5201
|
-
],
|
|
5202
5216
|
"es-BR": [
|
|
5203
5217
|
"H",
|
|
5204
5218
|
"h",
|
|
5205
5219
|
"hB",
|
|
5206
5220
|
"hb"
|
|
5207
5221
|
],
|
|
5208
|
-
"es-EC": [
|
|
5209
|
-
"H",
|
|
5210
|
-
"h",
|
|
5211
|
-
"hB",
|
|
5212
|
-
"hb"
|
|
5213
|
-
],
|
|
5214
5222
|
"es-ES": [
|
|
5215
5223
|
"H",
|
|
5216
5224
|
"h",
|
|
@@ -5223,12 +5231,6 @@ var require_time_data_generated = __commonJS({
|
|
|
5223
5231
|
"hB",
|
|
5224
5232
|
"hb"
|
|
5225
5233
|
],
|
|
5226
|
-
"es-PE": [
|
|
5227
|
-
"H",
|
|
5228
|
-
"h",
|
|
5229
|
-
"hB",
|
|
5230
|
-
"hb"
|
|
5231
|
-
],
|
|
5232
5234
|
"fr-CA": [
|
|
5233
5235
|
"H",
|
|
5234
5236
|
"h",
|
|
@@ -221975,7 +221977,7 @@ var init_pseudo_locale = __esm({
|
|
|
221975
221977
|
// packages/cli-lib/src/compile.ts
|
|
221976
221978
|
async function compile7(inputFiles, opts = {}) {
|
|
221977
221979
|
debug("Compiling files:", inputFiles);
|
|
221978
|
-
const { ast, format: format8, pseudoLocale, skipErrors } = opts;
|
|
221980
|
+
const { ast, format: format8, pseudoLocale, skipErrors, ignoreTag } = opts;
|
|
221979
221981
|
const formatter = await resolveBuiltinFormatter(format8);
|
|
221980
221982
|
const messages = {};
|
|
221981
221983
|
const messageAsts = {};
|
|
@@ -221997,7 +221999,7 @@ Message from ${inputFile}: ${compiled[id]}
|
|
|
221997
221999
|
`);
|
|
221998
222000
|
}
|
|
221999
222001
|
try {
|
|
222000
|
-
const msgAst = (0, import_icu_messageformat_parser3.parse)(compiled[id]);
|
|
222002
|
+
const msgAst = (0, import_icu_messageformat_parser3.parse)(compiled[id], { ignoreTag });
|
|
222001
222003
|
messages[id] = compiled[id];
|
|
222002
222004
|
switch (pseudoLocale) {
|
|
222003
222005
|
case "xx-LS":
|
|
@@ -227722,6 +227724,10 @@ for more information`
|
|
|
227722
227724
|
"--pseudo-locale <pseudoLocale>",
|
|
227723
227725
|
`Whether to generate pseudo-locale files. See https://formatjs.io/docs/tooling/cli#--pseudo-locale-pseudolocale for possible values.
|
|
227724
227726
|
"--ast" is required for this to work.`
|
|
227727
|
+
).option(
|
|
227728
|
+
"--ignore-tag",
|
|
227729
|
+
`Whether the parser to treat HTML/XML tags as string literal instead of parsing them as tag token. When this is false we only allow
|
|
227730
|
+
simple tags without any attributes.`
|
|
227725
227731
|
).action(async (filePatterns, opts) => {
|
|
227726
227732
|
debug("File pattern:", filePatterns);
|
|
227727
227733
|
debug("Options:", opts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.1",
|
|
4
4
|
"description": "A CLI for formatjs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"url": "https://github.com/formatjs/formatjs/issues"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@formatjs/cli-lib": "6.
|
|
36
|
+
"@formatjs/cli-lib": "6.5.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@glimmer/env": "^0.1.7",
|