properties-file 2.1.15 → 2.1.16
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/lib/content/index.js +8 -8
- package/lib/property.js +1 -1
- package/package.json +8 -8
package/lib/content/index.js
CHANGED
|
@@ -24,7 +24,14 @@ var getProperties = function (content) {
|
|
|
24
24
|
var line = lines_1[_i];
|
|
25
25
|
lineNumber++;
|
|
26
26
|
var propertyLine = new property_line_1.PropertyLine(line, !!property);
|
|
27
|
-
if (
|
|
27
|
+
if (property) {
|
|
28
|
+
// Continue parsing an existing property.
|
|
29
|
+
property.addLine(propertyLine);
|
|
30
|
+
if (propertyLine.continues) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
28
35
|
// Check if the line is a new property.
|
|
29
36
|
if (propertyLine.isComment || propertyLine.isBlank) {
|
|
30
37
|
continue; // Skip line if its a comment or blank.
|
|
@@ -35,13 +42,6 @@ var getProperties = function (content) {
|
|
|
35
42
|
continue; // Continue parsing the next line.
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
|
-
else {
|
|
39
|
-
// Continue parsing an existing property.
|
|
40
|
-
property.addLine(propertyLine);
|
|
41
|
-
if (propertyLine.continues) {
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
45
|
// If the line does not continue, add the property to the collection.
|
|
46
46
|
property = properties.add(property);
|
|
47
47
|
}
|
package/lib/property.js
CHANGED
|
@@ -147,7 +147,7 @@ var Property = /** @class */ (function () {
|
|
|
147
147
|
continue;
|
|
148
148
|
}
|
|
149
149
|
// Check if the delimiter might be escaped.
|
|
150
|
-
var prefix =
|
|
150
|
+
var prefix = position ? this.linesContent.slice(0, position) : '';
|
|
151
151
|
if (prefix.length > 0) {
|
|
152
152
|
var backslashMatch = prefix.match(/(?<backslashes>\\+)$/);
|
|
153
153
|
if (backslashMatch === null || backslashMatch === void 0 ? void 0 : backslashMatch.groups) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "properties-file",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.16",
|
|
4
4
|
"description": ".properties file parser, JSON converter and Webpack loader.",
|
|
5
5
|
"author": "Avansai (https://avansai.com)",
|
|
6
6
|
"repository": {
|
|
@@ -54,21 +54,21 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@release-it/conventional-changelog": "^5.1.1",
|
|
56
56
|
"@types/jest": "^29.2.3",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
58
|
-
"@typescript-eslint/parser": "^5.
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
58
|
+
"@typescript-eslint/parser": "^5.45.0",
|
|
59
59
|
"dotenv-cli": "^6.0.0",
|
|
60
|
-
"eslint": "^8.
|
|
60
|
+
"eslint": "^8.28.0",
|
|
61
61
|
"eslint-config-prettier": "^8.5.0",
|
|
62
62
|
"eslint-import-resolver-node": "^0.3.6",
|
|
63
63
|
"eslint-import-resolver-typescript": "^3.5.2",
|
|
64
64
|
"eslint-plugin-import": "^2.26.0",
|
|
65
|
-
"eslint-plugin-jest": "^27.1.
|
|
65
|
+
"eslint-plugin-jest": "^27.1.6",
|
|
66
66
|
"eslint-plugin-prefer-arrow-functions": "^3.1.4",
|
|
67
67
|
"eslint-plugin-prettier": "^4.2.1",
|
|
68
|
-
"eslint-plugin-unicorn": "^
|
|
68
|
+
"eslint-plugin-unicorn": "^45.0.1",
|
|
69
69
|
"jest": "^29.3.1",
|
|
70
|
-
"prettier": "^2.
|
|
71
|
-
"prettier-plugin-organize-imports": "^3.2.
|
|
70
|
+
"prettier": "^2.8.0",
|
|
71
|
+
"prettier-plugin-organize-imports": "^3.2.1",
|
|
72
72
|
"prettier-plugin-sh": "^0.12.8",
|
|
73
73
|
"release-it": "^15.5.0",
|
|
74
74
|
"ts-jest": "^29.0.3",
|