properties-file 3.5.13 → 3.6.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.
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Tries to unescape the content from either key or value of a property.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param content - The content to unescape.
|
|
5
5
|
*
|
|
6
6
|
* @returns The unescaped content.
|
|
7
7
|
*
|
|
8
|
-
* @throws
|
|
9
|
-
* This exception is thrown if malformed escaped unicode characters are present.
|
|
8
|
+
* @throws Error if malformed escaped unicode characters are present.
|
|
10
9
|
*/
|
|
11
|
-
export declare const unescapeContent: (
|
|
10
|
+
export declare const unescapeContent: (content: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.unescapeContent=void 0;var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.unescapeContent=void 0;var REGEX_INVALID_UNICODE_ESCAPE=/\\u(?![0-9a-fA-F]{4})/,REGEX_ESCAPE=/\\(?:([fnrt])|u([0-9a-fA-F]{4})|(.))/g,ESCAPE_MAP={f:"\f",n:"\n",r:"\r",t:"\t"},unescapeContent=function(e){if(!e.includes("\\"))return e;var n=e.match(REGEX_INVALID_UNICODE_ESCAPE);if(n){var r=n.index,t=e.slice(r,r+6);throw new Error("malformed escaped unicode characters '".concat(t,"'"))}return e.replace(REGEX_ESCAPE,function(e,n,r,t){return n?ESCAPE_MAP[n]:r?String.fromCodePoint(Number.parseInt(r,16)):t})};exports.unescapeContent=unescapeContent;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Tries to unescape the content from either key or value of a property.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param content - The content to unescape.
|
|
5
5
|
*
|
|
6
6
|
* @returns The unescaped content.
|
|
7
7
|
*
|
|
8
|
-
* @throws
|
|
9
|
-
* This exception is thrown if malformed escaped unicode characters are present.
|
|
8
|
+
* @throws Error if malformed escaped unicode characters are present.
|
|
10
9
|
*/
|
|
11
|
-
export declare const unescapeContent: (
|
|
10
|
+
export declare const unescapeContent: (content: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var REGEX_INVALID_UNICODE_ESCAPE=/\\u(?![0-9a-fA-F]{4})/,REGEX_ESCAPE=/\\(?:([fnrt])|u([0-9a-fA-F]{4})|(.))/g,ESCAPE_MAP={f:"\f",n:"\n",r:"\r",t:"\t"};export var unescapeContent=function(r){if(!r.includes("\\"))return r;var E=r.match(REGEX_INVALID_UNICODE_ESCAPE);if(E){var e=E.index,n=r.slice(e,e+6);throw new Error("malformed escaped unicode characters '".concat(n,"'"))}return r.replace(REGEX_ESCAPE,function(r,E,e,n){return E?ESCAPE_MAP[E]:e?String.fromCodePoint(Number.parseInt(e,16)):n})};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "properties-file",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": ".properties file parser, editor, formatter and Webpack loader.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
".properties",
|
|
@@ -85,9 +85,11 @@
|
|
|
85
85
|
"scripts": {
|
|
86
86
|
"add-file-type-declaration": "node ./dist/esm/add-import-type.js && find ./dist -name 'add-import-type.*' -type f -delete",
|
|
87
87
|
"build": "npm run check-nvm-node-version && npm run prettier-write && npm run eslint-fix && rm -Rf ./dist && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && echo '{ \"type\": \"commonjs\" }' > dist/cjs/package.json && tsc -p src/build-scripts/tsconfig.json && node dist/build-scripts/build.js && npm run test",
|
|
88
|
-
"check-nvm-node-version": "check-node-version --node $(node -p \"'>='
|
|
88
|
+
"check-nvm-node-version": "check-node-version --node $(node -p \"'>='+require('fs').readFileSync('.nvmrc','utf-8').trim()\")",
|
|
89
89
|
"depcheck": "depcheck",
|
|
90
90
|
"eslint-fix": "eslint --fix",
|
|
91
|
+
"ncu": "npm-check-updates",
|
|
92
|
+
"ncu-update": "npm-check-updates -u",
|
|
91
93
|
"prepare": "husky",
|
|
92
94
|
"prettier-write": "prettier --write .",
|
|
93
95
|
"release": "dotenv -- release-it --only-version",
|
|
@@ -96,32 +98,33 @@
|
|
|
96
98
|
"devDependencies": {
|
|
97
99
|
"@release-it/conventional-changelog": "10.0.1",
|
|
98
100
|
"@types/jest": "30.0.0",
|
|
99
|
-
"@types/node": "24.
|
|
101
|
+
"@types/node": "24.3.1",
|
|
100
102
|
"check-node-version": "4.2.1",
|
|
101
103
|
"depcheck": "1.4.7",
|
|
102
|
-
"dotenv-cli": "
|
|
103
|
-
"eslint": "9.
|
|
104
|
+
"dotenv-cli": "10.0.0",
|
|
105
|
+
"eslint": "9.35.0",
|
|
104
106
|
"eslint-config-prettier": "10.1.8",
|
|
105
107
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
106
108
|
"eslint-plugin-compat": "6.0.2",
|
|
107
109
|
"eslint-plugin-import-x": "4.16.1",
|
|
108
110
|
"eslint-plugin-jest": "29.0.1",
|
|
109
|
-
"eslint-plugin-json-files": "5.1.
|
|
111
|
+
"eslint-plugin-json-files": "5.1.1",
|
|
110
112
|
"eslint-plugin-prefer-arrow-functions": "3.6.2",
|
|
111
|
-
"eslint-plugin-prettier": "5.5.
|
|
113
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
112
114
|
"eslint-plugin-tsdoc": "0.4.0",
|
|
113
|
-
"eslint-plugin-unicorn": "
|
|
115
|
+
"eslint-plugin-unicorn": "61.0.1",
|
|
114
116
|
"husky": "9.1.7",
|
|
115
|
-
"jest": "30.
|
|
116
|
-
"jiti": "2.
|
|
117
|
+
"jest": "30.1.3",
|
|
118
|
+
"jiti": "2.5.1",
|
|
117
119
|
"jsonc-eslint-parser": "2.4.0",
|
|
120
|
+
"npm-check-updates": "18.1.0",
|
|
118
121
|
"prettier": "3.6.2",
|
|
119
|
-
"prettier-plugin-organize-imports": "4.
|
|
122
|
+
"prettier-plugin-organize-imports": "4.2.0",
|
|
120
123
|
"release-it": "19.0.4",
|
|
121
|
-
"terser": "5.
|
|
122
|
-
"ts-jest": "29.4.
|
|
123
|
-
"typescript": "5.
|
|
124
|
-
"typescript-eslint": "8.
|
|
124
|
+
"terser": "5.44.0",
|
|
125
|
+
"ts-jest": "29.4.1",
|
|
126
|
+
"typescript": "5.9.2",
|
|
127
|
+
"typescript-eslint": "8.42.0"
|
|
125
128
|
},
|
|
126
129
|
"engines": {
|
|
127
130
|
"node": "*"
|