properties-file 3.4.1 → 3.5.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.
package/README.md CHANGED
@@ -212,18 +212,21 @@ module.exports = {
212
212
 
213
213
  As soon as you configure Webpack, the `.properties` type should be available in your IDE when using `import`. If you ever need to add it manually, you can add a `*.properties` type declaration file at the root of your application, like this:
214
214
 
215
- ```js
216
- // properties-file.d.ts
215
+ ```ts
217
216
  declare module '*.properties' {
218
- const properties: { readonly [key: string]: string };
219
- export default properties;
217
+ /** A key/value object representing the content of a `.properties` file. */
218
+ const properties: {
219
+ /** The value of a `.properties` file key. */
220
+ [key: string]: string
221
+ }
222
+ export { properties }
220
223
  }
221
224
  ```
222
225
 
223
226
  By adding these configurations you should now be able to import directly `.properties` files just like this:
224
227
 
225
228
  ```ts
226
- import helloWorld from './hello-world.properties'
229
+ import { properties as helloWorld } from './hello-world.properties'
227
230
 
228
231
  console.dir(helloWorld)
229
232
  ```
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __1=require(".."),webpackLoader=function(e){return"module.exports = ".concat(JSON.stringify((0,__1.getProperties)(e)),";")};exports.default=webpackLoader;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __1=require(".."),webpackLoader=function(e){return"exports.properties = ".concat(JSON.stringify((0,__1.getProperties)(e)),";")};exports.default=webpackLoader;
@@ -1,8 +1,8 @@
1
1
  declare module '*.properties' {
2
2
  /** A key/value object representing the content of a `.properties` file. */
3
- const keyValuePairObject: {
3
+ const properties: {
4
4
  /** The value of a `.properties` file key. */
5
- readonly [key: string]: string
5
+ [key: string]: string
6
6
  }
7
- export = keyValuePairObject
7
+ export { properties }
8
8
  }
@@ -1 +1 @@
1
- import{getProperties}from"../index.js";var webpackLoader=function(e){return"module.exports = ".concat(JSON.stringify(getProperties(e)),";")};export default webpackLoader;
1
+ import{getProperties}from"../index.js";var webpackLoader=function(e){return"exports.properties = ".concat(JSON.stringify(getProperties(e)),";")};export default webpackLoader;
@@ -1,8 +1,8 @@
1
1
  declare module '*.properties' {
2
2
  /** A key/value object representing the content of a `.properties` file. */
3
- const keyValuePairObject: {
3
+ const properties: {
4
4
  /** The value of a `.properties` file key. */
5
- readonly [key: string]: string
5
+ [key: string]: string
6
6
  }
7
- export = keyValuePairObject
7
+ export { properties }
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "properties-file",
3
- "version": "3.4.1",
3
+ "version": "3.5.1",
4
4
  "description": ".properties file parser, editor, formatter and Webpack loader.",
5
5
  "keywords": [
6
6
  ".properties",
@@ -86,43 +86,44 @@
86
86
  "add-file-type-declaration": "node ./lib/esm/add-import-type.js && find ./lib -name 'add-import-type.*' -type f -delete",
87
87
  "build": "check-node-version --node '>=16' && npm run prettier && npm run lint-fix && rm -Rf ./lib && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json && tsc -p tsconfig.build-scripts.json && node lib/build-scripts/build.js && npm run test",
88
88
  "ci": "npm run build",
89
+ "depcheck": "depcheck",
89
90
  "lint-fix": "eslint --fix .",
90
91
  "prettier": "prettier --write .",
91
92
  "release": "dotenv -- release-it --only-version",
92
93
  "test": "jest --coverage"
93
94
  },
94
95
  "devDependencies": {
96
+ "@eslint/js": "8.57.0",
95
97
  "@release-it/conventional-changelog": "8.0.1",
96
98
  "@types/jest": "29.5.12",
97
- "@types/node": "^20.11.24",
98
- "@typescript-eslint/eslint-plugin": "7.1.0",
99
- "@typescript-eslint/parser": "7.1.0",
100
- "check-node-version": "^4.2.1",
101
- "dotenv-cli": "7.3.0",
99
+ "@types/node": "20.11.25",
100
+ "@typescript-eslint/eslint-plugin": "7.1.1",
101
+ "@typescript-eslint/parser": "7.1.1",
102
+ "check-node-version": "4.2.1",
103
+ "depcheck": "1.4.7",
104
+ "dotenv-cli": "7.4.1",
102
105
  "eslint": "8.57.0",
103
106
  "eslint-config-prettier": "9.1.0",
104
107
  "eslint-import-resolver-node": "0.3.9",
105
108
  "eslint-import-resolver-typescript": "3.6.1",
106
109
  "eslint-plugin-import": "2.29.1",
107
110
  "eslint-plugin-jest": "27.9.0",
108
- "eslint-plugin-jsdoc": "^48.2.0",
111
+ "eslint-plugin-jsdoc": "48.2.1",
109
112
  "eslint-plugin-json-files": "4.1.0",
110
113
  "eslint-plugin-prefer-arrow-functions": "3.3.2",
111
114
  "eslint-plugin-prettier": "5.1.3",
112
115
  "eslint-plugin-tsdoc": "0.2.17",
113
116
  "eslint-plugin-unicorn": "51.0.1",
114
- "glob": "^10.3.10",
115
- "globals": "^14.0.0",
117
+ "globals": "14.0.0",
116
118
  "jest": "29.7.0",
117
- "jsonc-eslint-parser": "^2.4.0",
119
+ "jsonc-eslint-parser": "2.4.0",
118
120
  "prettier": "3.2.5",
119
121
  "prettier-plugin-organize-imports": "3.2.4",
120
122
  "prettier-plugin-sh": "0.14.0",
121
123
  "release-it": "17.1.1",
122
- "terser": "^5.28.1",
124
+ "terser": "5.29.1",
123
125
  "ts-jest": "29.1.2",
124
- "ts-node": "10.9.2",
125
- "typescript": "5.3.3"
126
+ "typescript": "5.4.2"
126
127
  },
127
128
  "engines": {
128
129
  "node": "*"