@l10nmonster/helpers-java 3.0.1 → 3.0.2
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/CHANGELOG.md +15 -0
- package/filter.js +7 -0
- package/index.js +5 -0
- package/package.json +4 -3
- package/tsconfig.json +18 -0
- package/.releaserc.json +0 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## @l10nmonster/helpers-java [3.0.2](https://public-github/l10nmonster/l10nmonster/compare/@l10nmonster/helpers-java@3.0.1...@l10nmonster/helpers-java@3.0.2) (2025-12-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Improve type definitions and checks ([826b412](https://public-github/l10nmonster/l10nmonster/commit/826b412f0f7e761d404165a243b0c2b26c416ac1))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* **@l10nmonster/core:** upgraded to 3.1.1
|
|
15
|
+
|
|
1
16
|
## @l10nmonster/helpers-java [3.0.1](https://public-github/l10nmonster/l10nmonster/compare/@l10nmonster/helpers-java@3.0.0...@l10nmonster/helpers-java@3.0.1) (2025-12-20)
|
|
2
17
|
|
|
3
18
|
|
package/filter.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { parseToEntries, stringifyFromEntries } from '@js.properties/properties';
|
|
2
2
|
|
|
3
|
+
/** @typedef {import('@l10nmonster/core').ResourceFilter} ResourceFilter */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Filter for Java .properties files.
|
|
7
|
+
* @implements {ResourceFilter}
|
|
8
|
+
*/
|
|
3
9
|
export default class JavaPropertiesFilter {
|
|
10
|
+
|
|
4
11
|
/**
|
|
5
12
|
* @param {Object} [params] - Configuration options
|
|
6
13
|
* @param {boolean} [params.enablePluralizationSuffixes=false] - Enable detection of plural forms via key suffixes (_one, _other, etc.)
|
package/index.js
CHANGED
|
@@ -9,6 +9,8 @@ const javaControlCharsToDecode = {
|
|
|
9
9
|
r: '\r',
|
|
10
10
|
f: '\f',
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
/** @type {import('@l10nmonster/core').DecoderFunction} */
|
|
12
14
|
export const escapesDecoder = regex.decoderMaker(
|
|
13
15
|
'javaEscapesDecoder',
|
|
14
16
|
/(?<node>\\(?<escapedChar>['"\\])|\\(?<escapedControl>[tbnrf])|\\u(?<codePoint>[0-9A-Za-z]{4}))/g,
|
|
@@ -21,6 +23,7 @@ export const escapesDecoder = regex.decoderMaker(
|
|
|
21
23
|
);
|
|
22
24
|
|
|
23
25
|
// TODO: do we need to escape also those escapedChar that we decoded?
|
|
26
|
+
/** @type {import('@l10nmonster/core').TextEncoderFunction} */
|
|
24
27
|
export const escapesEncoder = regex.encoderMaker(
|
|
25
28
|
'javaEscapesEncoder',
|
|
26
29
|
// eslint-disable-next-line prefer-named-capture-group
|
|
@@ -34,6 +37,7 @@ export const escapesEncoder = regex.encoderMaker(
|
|
|
34
37
|
}
|
|
35
38
|
);
|
|
36
39
|
|
|
40
|
+
/** @type {import('@l10nmonster/core').DecoderFunction} */
|
|
37
41
|
export const MFQuotesDecoder = regex.decoderMaker(
|
|
38
42
|
'javaMFQuotesDecoder',
|
|
39
43
|
/(?:(?<quote>')'|(?:'(?<quoted>[^']+)'))/g,
|
|
@@ -41,6 +45,7 @@ export const MFQuotesDecoder = regex.decoderMaker(
|
|
|
41
45
|
);
|
|
42
46
|
|
|
43
47
|
// need to be smart about detecting whether MessageFormat was used or not based on presence of {vars}
|
|
48
|
+
/** @type {import('@l10nmonster/core').TextEncoderFunction} */
|
|
44
49
|
export const MFQuotesEncoder = regex.encoderMaker(
|
|
45
50
|
'javaMFQuotesEncoder',
|
|
46
51
|
// eslint-disable-next-line prefer-named-capture-group
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@l10nmonster/helpers-java",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Helpers to deal with Java file formats",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "node --test"
|
|
8
|
+
"test": "node --test",
|
|
9
|
+
"typecheck": "tsc --noEmit"
|
|
9
10
|
},
|
|
10
11
|
"author": "Diego Lagunas",
|
|
11
12
|
"license": "MIT",
|
|
@@ -13,6 +14,6 @@
|
|
|
13
14
|
"@js.properties/properties": "^0.5.4"
|
|
14
15
|
},
|
|
15
16
|
"peerDependencies": {
|
|
16
|
-
"@l10nmonster/core": "3.1.
|
|
17
|
+
"@l10nmonster/core": "3.1.1"
|
|
17
18
|
}
|
|
18
19
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.base.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"*.js",
|
|
5
|
+
"**/*.js"
|
|
6
|
+
],
|
|
7
|
+
"exclude": [
|
|
8
|
+
"node_modules",
|
|
9
|
+
"**/node_modules",
|
|
10
|
+
"test/**",
|
|
11
|
+
"tests/**",
|
|
12
|
+
"**/*.test.js",
|
|
13
|
+
"**/*.spec.js",
|
|
14
|
+
"dist/**",
|
|
15
|
+
"ui/**",
|
|
16
|
+
"types/**"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/.releaserc.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"branches": [
|
|
3
|
-
"main",
|
|
4
|
-
{
|
|
5
|
-
"name": "next",
|
|
6
|
-
"prerelease": "alpha"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"name": "beta",
|
|
10
|
-
"prerelease": "beta"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"tagFormat": "@l10nmonster/helpers-java@${version}",
|
|
14
|
-
"plugins": [
|
|
15
|
-
"@semantic-release/commit-analyzer",
|
|
16
|
-
"@semantic-release/release-notes-generator",
|
|
17
|
-
{
|
|
18
|
-
"path": "@semantic-release/changelog",
|
|
19
|
-
"changelogFile": "CHANGELOG.md"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "@semantic-release/npm",
|
|
23
|
-
"npmPublish": false
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "@semantic-release/git",
|
|
27
|
-
"assets": ["CHANGELOG.md", "package.json"],
|
|
28
|
-
"message": "chore(release): @l10nmonster/helpers-java@${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|