properties-file
Advanced tools
Comparing version 3.5.8 to 3.5.9
@@ -1,1 +0,1 @@ | ||
"use strict";var __values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeyCollisions=exports.Properties=exports.getFirstEolCharacter=exports.DEFAULT_END_OF_LINE_CHARACTER=exports.BOM_CODE_POINT=exports.BOM=void 0;var property_1=require("./property"),property_line_1=require("./property-line");exports.BOM="\ufeff",exports.BOM_CODE_POINT=exports.BOM.codePointAt(0),exports.DEFAULT_END_OF_LINE_CHARACTER="\n";var getFirstEolCharacter=function(e){var t=e.indexOf("\n");return t<0?void 0:"".concat("\r"===e[t-1]?"\r":"","\n")};exports.getFirstEolCharacter=getFirstEolCharacter;var Properties=function(){function e(e){var t;this.collection=[],this.keyLineNumbers={};var r="string"==typeof e?e:e.toString();this.hasBom=r.codePointAt(0)===exports.BOM_CODE_POINT,this.eolCharacter=null!==(t=(0,exports.getFirstEolCharacter)(r))&&void 0!==t?t:exports.DEFAULT_END_OF_LINE_CHARACTER,this.lines=(this.hasBom?r.slice(1):r).split(/\r?\n/),this.parseLines()}return e.prototype.parseLines=function(){var e,t;this.collection=[],this.keyLineNumbers={};var r,o,i=0;try{for(var n=__values(this.lines),s=n.next();!s.done;s=n.next()){var l=s.value;i++;var a=new property_line_1.PropertyLine(l,!!r);if(r){if(r.addLine(a),a.isContinuing)continue}else{if(a.isComment||a.isBlank)continue;if(r=new property_1.Property(a,i,o),a.isContinuing)continue}this.addToCollection(r),o=r,r=void 0}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.addToCollection=function(e){var t;e.setKeyAndValue(),(null===(t=this.keyLineNumbers[e.key])||void 0===t?void 0:t.length)?(this.keyLineNumbers[e.key].push(e.startingLineNumber),e.hasKeyCollisions=!0,e.keyCollisionLines=this.keyLineNumbers[e.key],this.collection=this.collection.filter((function(t){return t.key!==e.key}))):this.keyLineNumbers[e.key]=[e.startingLineNumber],this.collection.push(e)},e.prototype.getKeyCollisions=function(){var e,t,r=[];try{for(var o=__values(Object.entries(this.keyLineNumbers)),i=o.next();!i.done;i=o.next()){var n=__read(i.value,2),s=n[0],l=n[1];l.length>1&&r.push(new KeyCollisions(s,l))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return r},e.prototype.toObject=function(){var e={};return this.collection.forEach((function(t){e[t.key]=t.value})),e},e.prototype.format=function(e){return"".concat(this.hasBom?exports.BOM:"").concat(this.lines.join(e||this.eolCharacter))},e}();exports.Properties=Properties;var KeyCollisions=function(){function e(e,t){this.key=e,this.startingLineNumbers=t}return e.prototype.getApplicableLineNumber=function(){return this.startingLineNumbers.slice(-1)[0]},e}();exports.KeyCollisions=KeyCollisions; | ||
"use strict";var __values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.KeyCollisions=exports.Properties=exports.getFirstEolCharacter=exports.DEFAULT_END_OF_LINE_CHARACTER=exports.BOM_CODE_POINT=exports.BOM=void 0;var property_1=require("./property"),property_line_1=require("./property-line");exports.BOM="\ufeff",exports.BOM_CODE_POINT=exports.BOM.codePointAt(0),exports.DEFAULT_END_OF_LINE_CHARACTER="\n";var getFirstEolCharacter=function(e){var t=e.indexOf("\n");return-1===t?void 0:"".concat("\r"===e[t-1]?"\r":"","\n")};exports.getFirstEolCharacter=getFirstEolCharacter;var Properties=function(){function e(e){var t;this.collection=[],this.keyLineNumbers={};var r="string"==typeof e?e:e.toString();this.hasBom=r.codePointAt(0)===exports.BOM_CODE_POINT,this.eolCharacter=null!==(t=(0,exports.getFirstEolCharacter)(r))&&void 0!==t?t:exports.DEFAULT_END_OF_LINE_CHARACTER,this.lines=(this.hasBom?r.slice(1):r).split(/\r?\n/),this.parseLines()}return e.prototype.parseLines=function(){var e,t;this.collection=[],this.keyLineNumbers={};var r,o,i=0;try{for(var n=__values(this.lines),s=n.next();!s.done;s=n.next()){var l=s.value;i++;var a=new property_line_1.PropertyLine(l,!!r);if(r){if(r.addLine(a),a.isContinuing)continue}else{if(a.isComment||a.isBlank)continue;if(r=new property_1.Property(a,i,o),a.isContinuing)continue}this.addToCollection(r),o=r,r=void 0}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.addToCollection=function(e){var t;e.setKeyAndValue(),(null===(t=this.keyLineNumbers[e.key])||void 0===t?void 0:t.length)?(this.keyLineNumbers[e.key].push(e.startingLineNumber),e.hasKeyCollisions=!0,e.keyCollisionLines=this.keyLineNumbers[e.key],this.collection=this.collection.filter((function(t){return t.key!==e.key}))):this.keyLineNumbers[e.key]=[e.startingLineNumber],this.collection.push(e)},e.prototype.getKeyCollisions=function(){var e,t,r=[];try{for(var o=__values(Object.entries(this.keyLineNumbers)),i=o.next();!i.done;i=o.next()){var n=__read(i.value,2),s=n[0],l=n[1];l.length>1&&r.push(new KeyCollisions(s,l))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return r},e.prototype.toObject=function(){var e={};return this.collection.forEach((function(t){e[t.key]=t.value})),e},e.prototype.format=function(e){return"".concat(this.hasBom?exports.BOM:"").concat(this.lines.join(e||this.eolCharacter))},e}();exports.Properties=Properties;var KeyCollisions=function(){function e(e,t){this.key=e,this.startingLineNumbers=t}return e.prototype.getApplicableLineNumber=function(){return this.startingLineNumbers.slice(-1)[0]},e}();exports.KeyCollisions=KeyCollisions; |
@@ -1,1 +0,1 @@ | ||
var __values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};import{Property}from"./property.js";import{PropertyLine}from"./property-line.js";export var BOM="\ufeff";export var BOM_CODE_POINT=BOM.codePointAt(0);export var DEFAULT_END_OF_LINE_CHARACTER="\n";export var getFirstEolCharacter=function(e){var t=e.indexOf("\n");return t<0?void 0:"".concat("\r"===e[t-1]?"\r":"","\n")};var Properties=function(){function e(e){var t;this.collection=[],this.keyLineNumbers={};var r="string"==typeof e?e:e.toString();this.hasBom=r.codePointAt(0)===BOM_CODE_POINT,this.eolCharacter=null!==(t=getFirstEolCharacter(r))&&void 0!==t?t:DEFAULT_END_OF_LINE_CHARACTER,this.lines=(this.hasBom?r.slice(1):r).split(/\r?\n/),this.parseLines()}return e.prototype.parseLines=function(){var e,t;this.collection=[],this.keyLineNumbers={};var r,n,i=0;try{for(var o=__values(this.lines),s=o.next();!s.done;s=o.next()){var l=s.value;i++;var a=new PropertyLine(l,!!r);if(r){if(r.addLine(a),a.isContinuing)continue}else{if(a.isComment||a.isBlank)continue;if(r=new Property(a,i,n),a.isContinuing)continue}this.addToCollection(r),n=r,r=void 0}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.addToCollection=function(e){var t;e.setKeyAndValue(),(null===(t=this.keyLineNumbers[e.key])||void 0===t?void 0:t.length)?(this.keyLineNumbers[e.key].push(e.startingLineNumber),e.hasKeyCollisions=!0,e.keyCollisionLines=this.keyLineNumbers[e.key],this.collection=this.collection.filter((function(t){return t.key!==e.key}))):this.keyLineNumbers[e.key]=[e.startingLineNumber],this.collection.push(e)},e.prototype.getKeyCollisions=function(){var e,t,r=[];try{for(var n=__values(Object.entries(this.keyLineNumbers)),i=n.next();!i.done;i=n.next()){var o=__read(i.value,2),s=o[0],l=o[1];l.length>1&&r.push(new KeyCollisions(s,l))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},e.prototype.toObject=function(){var e={};return this.collection.forEach((function(t){e[t.key]=t.value})),e},e.prototype.format=function(e){return"".concat(this.hasBom?BOM:"").concat(this.lines.join(e||this.eolCharacter))},e}();export{Properties};var KeyCollisions=function(){function e(e,t){this.key=e,this.startingLineNumbers=t}return e.prototype.getApplicableLineNumber=function(){return this.startingLineNumbers.slice(-1)[0]},e}();export{KeyCollisions}; | ||
var __values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};import{Property}from"./property.js";import{PropertyLine}from"./property-line.js";export var BOM="\ufeff";export var BOM_CODE_POINT=BOM.codePointAt(0);export var DEFAULT_END_OF_LINE_CHARACTER="\n";export var getFirstEolCharacter=function(e){var t=e.indexOf("\n");return-1===t?void 0:"".concat("\r"===e[t-1]?"\r":"","\n")};var Properties=function(){function e(e){var t;this.collection=[],this.keyLineNumbers={};var r="string"==typeof e?e:e.toString();this.hasBom=r.codePointAt(0)===BOM_CODE_POINT,this.eolCharacter=null!==(t=getFirstEolCharacter(r))&&void 0!==t?t:DEFAULT_END_OF_LINE_CHARACTER,this.lines=(this.hasBom?r.slice(1):r).split(/\r?\n/),this.parseLines()}return e.prototype.parseLines=function(){var e,t;this.collection=[],this.keyLineNumbers={};var r,n,i=0;try{for(var o=__values(this.lines),s=o.next();!s.done;s=o.next()){var l=s.value;i++;var a=new PropertyLine(l,!!r);if(r){if(r.addLine(a),a.isContinuing)continue}else{if(a.isComment||a.isBlank)continue;if(r=new Property(a,i,n),a.isContinuing)continue}this.addToCollection(r),n=r,r=void 0}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.addToCollection=function(e){var t;e.setKeyAndValue(),(null===(t=this.keyLineNumbers[e.key])||void 0===t?void 0:t.length)?(this.keyLineNumbers[e.key].push(e.startingLineNumber),e.hasKeyCollisions=!0,e.keyCollisionLines=this.keyLineNumbers[e.key],this.collection=this.collection.filter((function(t){return t.key!==e.key}))):this.keyLineNumbers[e.key]=[e.startingLineNumber],this.collection.push(e)},e.prototype.getKeyCollisions=function(){var e,t,r=[];try{for(var n=__values(Object.entries(this.keyLineNumbers)),i=n.next();!i.done;i=n.next()){var o=__read(i.value,2),s=o[0],l=o[1];l.length>1&&r.push(new KeyCollisions(s,l))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},e.prototype.toObject=function(){var e={};return this.collection.forEach((function(t){e[t.key]=t.value})),e},e.prototype.format=function(e){return"".concat(this.hasBom?BOM:"").concat(this.lines.join(e||this.eolCharacter))},e}();export{Properties};var KeyCollisions=function(){function e(e,t){this.key=e,this.startingLineNumbers=t}return e.prototype.getApplicableLineNumber=function(){return this.startingLineNumbers.slice(-1)[0]},e}();export{KeyCollisions}; |
{ | ||
"name": "properties-file", | ||
"version": "3.5.8", | ||
"version": "3.5.9", | ||
"description": ".properties file parser, editor, formatter and Webpack loader.", | ||
@@ -98,18 +98,18 @@ "keywords": [ | ||
"devDependencies": { | ||
"@eslint/js": "9.11.1", | ||
"@eslint/js": "9.12.0", | ||
"@release-it/conventional-changelog": "8.0.2", | ||
"@types/jest": "29.5.13", | ||
"@types/node": "22.7.3", | ||
"@typescript-eslint/eslint-plugin": "8.7.0", | ||
"@typescript-eslint/parser": "8.7.0", | ||
"@types/node": "22.7.4", | ||
"@typescript-eslint/eslint-plugin": "8.8.0", | ||
"@typescript-eslint/parser": "8.8.0", | ||
"check-node-version": "4.2.1", | ||
"depcheck": "1.4.7", | ||
"dotenv-cli": "7.4.2", | ||
"eslint": "9.11.1", | ||
"eslint": "9.12.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-import-resolver-node": "0.3.9", | ||
"eslint-import-resolver-typescript": "3.6.3", | ||
"eslint-plugin-import-x": "4.3.0", | ||
"eslint-plugin-import-x": "4.3.1", | ||
"eslint-plugin-jest": "28.8.3", | ||
"eslint-plugin-jsdoc": "50.3.0", | ||
"eslint-plugin-jsdoc": "50.3.1", | ||
"eslint-plugin-json-files": "4.4.1", | ||
@@ -119,4 +119,4 @@ "eslint-plugin-prefer-arrow-functions": "3.4.1", | ||
"eslint-plugin-tsdoc": "0.3.0", | ||
"eslint-plugin-unicorn": "55.0.0", | ||
"globals": "15.9.0", | ||
"eslint-plugin-unicorn": "56.0.0", | ||
"globals": "15.10.0", | ||
"husky": "^9.1.6", | ||
@@ -128,4 +128,4 @@ "jest": "29.7.0", | ||
"prettier-plugin-sh": "0.14.0", | ||
"release-it": "17.6.0", | ||
"terser": "5.34.0", | ||
"release-it": "17.7.0", | ||
"terser": "5.34.1", | ||
"ts-jest": "29.2.5", | ||
@@ -132,0 +132,0 @@ "typescript": "5.6.2" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75997