@wuchale/jsx 0.8.0 → 0.8.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/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Adapter, AdapterArgs } from 'wuchale';
|
|
1
|
+
import type { HeuristicFunc, Adapter, AdapterArgs } from 'wuchale';
|
|
2
2
|
import { type JSXLib } from "./transformer.js";
|
|
3
|
+
export declare const jsxDefaultHeuristic: HeuristicFunc;
|
|
3
4
|
type JSXArgs = AdapterArgs & {
|
|
4
5
|
variant?: JSXLib;
|
|
5
6
|
};
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defaultGenerateLoadID, defaultHeuristic, deepMergeObjects } from 'wucha
|
|
|
2
2
|
import { pluralPattern, adapter as vanillaAdapter } from 'wuchale/adapter-vanilla';
|
|
3
3
|
import { JSXTransformer } from "./transformer.js";
|
|
4
4
|
import { getDependencies, loaderPathResolver } from 'wuchale/adapter-utils';
|
|
5
|
-
const
|
|
5
|
+
export const jsxDefaultHeuristic = msg => {
|
|
6
6
|
if (!defaultHeuristic(msg)) {
|
|
7
7
|
return false;
|
|
8
8
|
}
|
|
@@ -53,7 +53,7 @@ const defaultArgs = {
|
|
|
53
53
|
files: { include: 'src/**/*.{js,ts,jsx,tsx}', ignore: '**/*.d.ts' },
|
|
54
54
|
catalog: './src/locales/{locale}',
|
|
55
55
|
patterns: [pluralPattern],
|
|
56
|
-
heuristic:
|
|
56
|
+
heuristic: jsxDefaultHeuristic,
|
|
57
57
|
granularLoad: false,
|
|
58
58
|
bundleLoad: false,
|
|
59
59
|
generateLoadID: defaultGenerateLoadID,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wuchale/jsx",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Protobuf-like i18n from plain code: JSX adapter",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "tsc --watch",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@sveltejs/acorn-typescript": "^1.0.6",
|
|
73
73
|
"acorn": "^8.15.0",
|
|
74
|
-
"wuchale": "^0.17.
|
|
74
|
+
"wuchale": "^0.17.1"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@types/estree-jsx": "^1.0.5",
|