Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

properties-file

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

properties-file - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

5

lib/index.d.ts
/// <reference types="./properties-file" />
export { Properties, KeyLineNumbers } from './properties';
export { getProperties, propertiesToJson } from './file';
export { KeyLineNumbers, Properties } from './properties';
export { Property } from './property';
export { PropertyLine } from './property-line';
export { getProperties } from './file';
export { propertiesToJson } from './file';
/**

@@ -9,0 +8,0 @@ * A simple "key/value" object.

9

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.propertiesToJson = exports.getProperties = exports.PropertyLine = exports.Property = exports.Properties = void 0;
exports.PropertyLine = exports.Property = exports.Properties = exports.propertiesToJson = exports.getProperties = void 0;
var file_1 = require("./file");
Object.defineProperty(exports, "getProperties", { enumerable: true, get: function () { return file_1.getProperties; } });
Object.defineProperty(exports, "propertiesToJson", { enumerable: true, get: function () { return file_1.propertiesToJson; } });
var properties_1 = require("./properties");

@@ -10,5 +13,1 @@ Object.defineProperty(exports, "Properties", { enumerable: true, get: function () { return properties_1.Properties; } });

Object.defineProperty(exports, "PropertyLine", { enumerable: true, get: function () { return property_line_1.PropertyLine; } });
var file_1 = require("./file");
Object.defineProperty(exports, "getProperties", { enumerable: true, get: function () { return file_1.getProperties; } });
var file_2 = require("./file");
Object.defineProperty(exports, "propertiesToJson", { enumerable: true, get: function () { return file_2.propertiesToJson; } });
/** This allows to get the correct type when using `import` on `.properties` files. */
declare module '*.properties' {
const properties: {
readonly [key: string]: string;
};
export default properties;
readonly [key: string]: string
}
export default properties
}
{
"name": "properties-file",
"version": "2.0.8",
"version": "2.0.9",
"description": ".properties file parser, JSON converter and Webpack loader.",

@@ -46,8 +46,7 @@ "author": "Avansai (https://avansai.com)",

"build": "rm -Rf ./lib && tsc && npm run add-import-type && npm run lint && npm test",
"lint": "eslint --ext .js --ext .jsx --ext .ts --ext .tsx --fix .",
"lint-print-config": "eslint --print-config ./eslintrc.yaml",
"prettier": "prettier --write .",
"add-import-type": "node ./src/add-import-type",
"test": "jest --coverage",
"tmp-test": "tsc && node ./lib/tmp.js",
"lint": "eslint . --fix",
"prettier-check": "prettier --check .",
"prettier-fix": "prettier --write .",
"release": "dotenv -- release-it --only-version"

@@ -61,8 +60,13 @@ },

"dotenv-cli": "^6.0.0",
"eslint": "^8.20.0",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.6.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.3.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.7.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^28.1.3",
"prettier": "2.7.1",
"release-it": "^15.1.4",
"prettier": "^2.7.1",
"prettier-plugin-organize-imports": "^3.0.0",
"release-it": "^15.2.0",
"ts-jest": "^28.0.7",

@@ -69,0 +73,0 @@ "ts-node": "^10.9.1",

@@ -43,5 +43,5 @@ # properties-file

```ts
import { propertiesToJson } from 'properties-file';
import { propertiesToJson } from 'properties-file'
console.log(propertiesToJson('hello-world.properties'));
console.log(propertiesToJson('hello-world.properties'))
```

@@ -58,7 +58,7 @@

```ts
import { propertiesToJson } from 'properties-file/content';
import { propertiesToJson } from 'properties-file/content'
// ...some code to get the .properties file content into a variable called `propertiesFileContent`
console.log(propertiesToJson(propertiesFileContent));
console.log(propertiesToJson(propertiesFileContent))
```

@@ -89,9 +89,9 @@

```ts
import { getProperties } from 'properties-file';
import { getProperties } from 'properties-file'
const properties = getProperties('assets/tests/collisions-test.properties');
const properties = getProperties('assets/tests/collisions-test.properties')
properties.collection.forEach((property) => {
console.log(`${property.key} => '${property.value}'`);
});
console.log(`${property.key} => '${property.value}'`)
})

@@ -106,3 +106,3 @@ /**

const keyCollisions = properties.getKeyCollisions();
const keyCollisions = properties.getKeyCollisions()

@@ -116,4 +116,4 @@ keyCollisions.forEach((keyCollision) => {

)} (will use the value at line ${keyCollision.getApplicableLineNumber()}).`
);
});
)
})

@@ -148,3 +148,3 @@ /**

},
};
}
```

@@ -165,5 +165,5 @@

```ts
import helloWorld from './hello-world.properties';
import helloWorld from './hello-world.properties'
console.dir(helloWorld);
console.dir(helloWorld)
```

@@ -170,0 +170,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc