babel-plugin-formatjs 10.5.27 → 10.5.29
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 +2 -2
- package/index.js +4 -2
- package/lib_esnext/index.d.ts +2 -2
- package/lib_esnext/index.js +4 -2
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export type ExtractionResult<M = Record<string, string>> = {
|
|
|
5
5
|
meta: M;
|
|
6
6
|
};
|
|
7
7
|
export declare const DEFAULT_ID_INTERPOLATION_PATTERN = "[sha512:contenthash:base64:6]";
|
|
8
|
-
declare const
|
|
9
|
-
export default
|
|
8
|
+
declare const plugin: (api: object, options: Options | null | undefined, dirname: string) => PluginObj<PluginPass>;
|
|
9
|
+
export default plugin;
|
package/index.js
CHANGED
|
@@ -4,11 +4,12 @@ exports.DEFAULT_ID_INTERPOLATION_PATTERN = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const helper_plugin_utils_1 = require("@babel/helper-plugin-utils");
|
|
6
6
|
const plugin_syntax_jsx_1 = tslib_1.__importDefault(require("@babel/plugin-syntax-jsx"));
|
|
7
|
-
const jsx_opening_element_1 = require("./visitors/jsx-opening-element");
|
|
8
7
|
const call_expression_1 = require("./visitors/call-expression");
|
|
8
|
+
const jsx_opening_element_1 = require("./visitors/jsx-opening-element");
|
|
9
9
|
exports.DEFAULT_ID_INTERPOLATION_PATTERN = '[sha512:contenthash:base64:6]';
|
|
10
|
+
const plugin =
|
|
10
11
|
// @ts-expect-error PluginPass doesn't allow custom state but it actually does
|
|
11
|
-
|
|
12
|
+
(0, helper_plugin_utils_1.declare)((api, options) => {
|
|
12
13
|
api.assertVersion(7);
|
|
13
14
|
if (!options.idInterpolationPattern) {
|
|
14
15
|
options.idInterpolationPattern = exports.DEFAULT_ID_INTERPOLATION_PATTERN;
|
|
@@ -69,3 +70,4 @@ exports.default = (0, helper_plugin_utils_1.declare)((api, options) => {
|
|
|
69
70
|
},
|
|
70
71
|
};
|
|
71
72
|
});
|
|
73
|
+
exports.default = plugin;
|
package/lib_esnext/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export type ExtractionResult<M = Record<string, string>> = {
|
|
|
5
5
|
meta: M;
|
|
6
6
|
};
|
|
7
7
|
export declare const DEFAULT_ID_INTERPOLATION_PATTERN = "[sha512:contenthash:base64:6]";
|
|
8
|
-
declare const
|
|
9
|
-
export default
|
|
8
|
+
declare const plugin: (api: object, options: Options | null | undefined, dirname: string) => PluginObj<PluginPass>;
|
|
9
|
+
export default plugin;
|
package/lib_esnext/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { declare } from '@babel/helper-plugin-utils';
|
|
2
2
|
import babelPluginSyntaxJsx from '@babel/plugin-syntax-jsx';
|
|
3
|
-
import { visitor as JSXOpeningElement } from './visitors/jsx-opening-element';
|
|
4
3
|
import { visitor as CallExpression } from './visitors/call-expression';
|
|
4
|
+
import { visitor as JSXOpeningElement } from './visitors/jsx-opening-element';
|
|
5
5
|
export const DEFAULT_ID_INTERPOLATION_PATTERN = '[sha512:contenthash:base64:6]';
|
|
6
|
+
const plugin =
|
|
6
7
|
// @ts-expect-error PluginPass doesn't allow custom state but it actually does
|
|
7
|
-
|
|
8
|
+
declare((api, options) => {
|
|
8
9
|
api.assertVersion(7);
|
|
9
10
|
if (!options.idInterpolationPattern) {
|
|
10
11
|
options.idInterpolationPattern = DEFAULT_ID_INTERPOLATION_PATTERN;
|
|
@@ -65,3 +66,4 @@ export default declare((api, options) => {
|
|
|
65
66
|
},
|
|
66
67
|
};
|
|
67
68
|
});
|
|
69
|
+
export default plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-formatjs",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.29",
|
|
4
4
|
"description": "Extracts string messages for translation from modules that use formatjs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@types/babel__helper-plugin-utils": "^7.10.3",
|
|
21
21
|
"@types/babel__traverse": "^7.20.6",
|
|
22
22
|
"tslib": "2",
|
|
23
|
-
"@formatjs/
|
|
24
|
-
"@formatjs/
|
|
23
|
+
"@formatjs/ts-transformer": "3.13.26",
|
|
24
|
+
"@formatjs/icu-messageformat-parser": "2.9.7"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"babel-plugin",
|