yini-cli 1.3.3-beta → 1.3.4

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.
Files changed (3) hide show
  1. package/README.md +47 -52
  2. package/dist/index.js +2 -2
  3. package/package.json +7 -9
package/README.md CHANGED
@@ -1,20 +1,13 @@
1
- # YINI-CLI
1
+ # YINI CLI
2
2
  > **Readable configuration without indentation pitfalls or JSON verbosity.**
3
3
 
4
- **The official terminal / command-line (CLI) tool for validating, inspecting, and converting YINI configuration files to JSON or JavaScript.**
4
+ **The official CLI for validating, inspecting, and converting YINI configuration files to JSON or JavaScript, built by the YINI-lang project.**
5
5
 
6
- *YINI is an INI-inspired and human-readable text format for representing structured information. It is designed to be clear, predictable, and easy for humans to read and write. It supports nesting, comments, and a formally defined syntax. It is suitable for configuration files, application settings, and general data-storage use cases.*
6
+ *YINI is an INI-inspired, human-friendly configuration format with real structure, nested sections, comments, and predictable parsing.*
7
7
 
8
8
  [![npm version](https://img.shields.io/npm/v/yini-cli.svg)](https://www.npmjs.com/package/yini-cli) [![All Test Suites](https://github.com/YINI-lang/yini-cli/actions/workflows/run-all-tests.yml/badge.svg)](https://github.com/YINI-lang/yini-cli/actions/workflows/run-all-tests.yml) [![Regression Tests](https://github.com/YINI-lang/yini-cli/actions/workflows/run-regression-tests.yml/badge.svg)](https://github.com/YINI-lang/yini-cli/actions/workflows/run-regression-tests.yml) [![CLI Test CI](https://github.com/YINI-lang/yini-cli/actions/workflows/run-cli-test.yml/badge.svg)](https://github.com/YINI-lang/yini-cli/actions/workflows/run-cli-test.yml) [![npm downloads](https://img.shields.io/npm/dm/yini-cli)](https://www.npmjs.com/package/yini-cli)
9
9
 
10
- This tool is designed for teams and developers working with human-edited configuration files who require explicit structure without indentation-based semantics.
11
-
12
- ---
13
-
14
- ## Example of YINI code
15
- > A basic YINI configuration example, showing a section, nested section, comments:
16
- ![YINI Config Example](./samples/basic.yini.png)
17
- Source: [basic.yini](./samples/basic.yini)
10
+ Designed for developers and teams who want human-edited configuration with explicit structure and no indentation-based semantics.
18
11
 
19
12
  ## Quick Start
20
13
 
@@ -23,7 +16,7 @@ YINI CLI requires Node.js **v20 or later**.
23
16
 
24
17
  ### Installation
25
18
 
26
- 1. **Install it globally from npm — (requires Node.js)**
19
+ 1. **Install globally from npm — (requires Node.js)**
27
20
  Open your terminal and run:
28
21
  ```
29
22
  npm install -g yini-cli
@@ -34,22 +27,22 @@ YINI CLI requires Node.js **v20 or later**.
34
27
  ```bash
35
28
  yini --version
36
29
  ```
37
- This should print the installed version (e.g., 1.0.0).
30
+ This should print the installed version.
38
31
 
39
- Then you may try:
32
+ Then try:
40
33
  ```bash
41
34
  yini --help
42
35
  ```
43
- Should show you the CLI help for YINI.
36
+ This should show the CLI help.
44
37
 
45
38
  3. **Test functionality**
46
39
  Create a simple test file, for example: `config.yini`:
47
40
  ```yini
48
41
  ^ App
49
- name = "My App Title"
50
- version = "1.2.3"
51
- pageSize = 25
52
- darkTheme = off
42
+ name = "My App Title"
43
+ version = "1.2.3"
44
+ pageSize = 25
45
+ darkTheme = off
53
46
  ```
54
47
 
55
48
  Then run:
@@ -57,7 +50,7 @@ YINI CLI requires Node.js **v20 or later**.
57
50
  yini parse config.yini
58
51
  ```
59
52
 
60
- Expected result, your CLI should output a parsed version of the config and output something similar to:
53
+ Expected output:
61
54
  ```json
62
55
  {
63
56
  "App": {
@@ -77,7 +70,12 @@ YINI CLI requires Node.js **v20 or later**.
77
70
 
78
71
  ---
79
72
 
80
- ## Example 2
73
+ ## What YINI looks like
74
+ > A basic YINI configuration example, showing a section, nested section, comments:
75
+ ![YINI Config Example](./samples/basic.yini.png)
76
+ Source: [basic.yini](./samples/basic.yini)
77
+
78
+ ### A larger example
81
79
  > A real-world YINI configuration example, showing sections, nesting, comments, and multiple data types:
82
80
  ![YINI Config Example](./samples/config.yini.png)
83
81
  Source: [config.yini](./samples/config.yini)
@@ -86,10 +84,10 @@ Source: [config.yini](./samples/config.yini)
86
84
 
87
85
  ## 🙋‍♀️ Why YINI?
88
86
  - **Indentation-independent structure:** YINI is indentation-independent — whitespace never alters structural meaning.
89
- - **Explicit nesting & refactoring safety:** It uses clear header markers (`^`, `^^`, `^^^`) to define hierarchy (like in Markdown), without long dotted keys.
90
- - **Multiple data types:** Supports boolean literals (`true` / `false`, `Yes` / `No`, etc), numbers, arrays (lists), and JS-style objects natively, with explicit string syntax.
91
- - **Comments support:** YINI supports multiple comment styles (`#`, `//`, `/* ... */`, and `;`) allowing one to document config directly in the file.
92
- - **Predictable parsing rules:** Well-defined rules with optional strict and lenient modes, for different use-requirements.
87
+ - **Explicit nesting:** It uses clear header markers (`^`, `^^`, `^^^`) to define hierarchy, making large configurations easier to scan and refactor.
88
+ - **Multiple data types:** Supports booleans (`true` / `false`, `yes` / `no`, etc.), numbers, lists, and inline objects, with explicit string syntax.
89
+ - **Comment support:** YINI supports multiple comment styles (`#`, `//`, `/* ... */`, and `;`), making it easier to document configuration directly in the file.
90
+ - **Predictable parsing:** Well-defined rules with optional strict and lenient modes for different use cases.
93
91
 
94
92
  ---
95
93
 
@@ -130,7 +128,7 @@ yini parse --help
130
128
 
131
129
  ---
132
130
 
133
- ## Quick Look at YINI
131
+ ## A closer look at YINI
134
132
 
135
133
  Here's a small example showing YINI structure and comments:
136
134
  ```yini
@@ -149,7 +147,7 @@ Here's a small example showing YINI structure and comments:
149
147
  # This is a comment too.
150
148
  ```
151
149
 
152
- **The above YINI converted to a JS object:**
150
+ **The above YINI as a JavaScript object:**
153
151
  ```js
154
152
  {
155
153
  App: {
@@ -201,9 +199,7 @@ The `parse` command supports multiple output formats:
201
199
  >💡 `--js` and `--compact` are mutually exclusive.
202
200
  >💡 Tip: You can combine --output with any style flag to control both formatting and destination.
203
201
 
204
- ---
205
-
206
- ## 📁 Output File Handling
202
+ ### Output File Handling
207
203
 
208
204
  When using `-o, --output <file>`, YINI CLI applies safe write rules:
209
205
 
@@ -211,45 +207,44 @@ When using `-o, --output <file>`, YINI CLI applies safe write rules:
211
207
  |----------|--------|
212
208
  | File does not exist | File is written |
213
209
  | File exists and is **older** than the input YINI file | File is overwritten |
214
- | File exists and is **newer** than the input YINI file | Command fails |
210
+ | File exists and is **newer** than the input YINI file | Skipped by default |
211
+ | File exists and output content is unchanged | Skipped |
215
212
  | `--overwrite` is used | File is always overwritten |
216
213
  | `--no-overwrite` is used | Command fails if file exists |
217
214
 
218
- This prevents accidental overwriting of newer generated files.
215
+ This helps avoid overwriting newer generated files and avoids rewriting unchanged output unnecessarily.
219
216
 
220
- Use:
221
- `--overwrite` to force replacement.
217
+ Use `--overwrite` to force replacement.
222
218
 
223
219
  ---
224
220
 
225
- ## 🛠 Roadmap
226
- Areas of planned and possible future expansion:
221
+ ## Links
222
+ - ➡️ [YINI Homepage](https://yini-lang.org)
223
+ *Tutorials, guides, and examples.*
227
224
 
228
- 1. **Improve existing commands** Continued functionality improvements, better diagnostics, and expanded QA for `parse` and `validate` and their options.
229
- 2. Command `convert`: Batch convert YINI files to JSON or JavaScript.
230
- 3. Command `format`: Pretty-print or normalize a `.yini` file.
231
- 4. Command `lint`: Stricter stylistic checks (like `validate`, but opinionated).
232
- 5. Command `diff`: Compare two YINI files and show structural/config differences.
233
- 6. Import JSON or XML into YINI format.
225
+ - ➡️ [Read the YINI Specification](https://yini-lang.org/refs/specification)
226
+ *Full syntax and format reference.*
234
227
 
235
- ---
236
-
237
- ## Links
238
228
  - ➡️ [YINI Parser on npm](https://www.npmjs.com/package/yini-parser)
239
- *Install and view package details.*
229
+ *The TypeScript/Node.js parser used by this CLI.*
240
230
 
241
- - ➡️ [YINI Project](https://github.com/YINI-lang)
242
- *YINI home on GitHub.*
231
+ - ➡️ [Demo Apps](https://github.com/YINI-lang/yini-demo-apps/tree/main)
232
+ *Complete basic usage examples.*
233
+
234
+ - ➡️ [YINI-lang Project](https://github.com/YINI-lang)
235
+ *Repositories and related ecosystem projects.*
243
236
 
244
237
  ---
245
238
 
246
- ## Contribution & Involvement
247
- Contributions, issues, and feedback are welcome. Even small improvements or suggestions are appreciated.
239
+ ## Contributing
240
+ Contributions, bug reports, and feedback are welcome. Even small improvements or suggestions are appreciated.
241
+
242
+ If this tool is useful to you, a GitHub star helps more people discover the project and supports future development.
248
243
 
249
244
  ---
250
245
 
251
246
  ## License
252
- This project is licensed under the Apache-2.0 license - see the [LICENSE](<./LICENSE>) file for details.
247
+ This project is licensed under the Apache-2.0 license see the [LICENSE](./LICENSE) file for details.
253
248
 
254
249
  In this project on GitHub, the `libs` directory contains third party software and each is licensed under its own license which is described in its own license file under the respective directory under `libs`.
255
250
 
@@ -258,4 +253,4 @@ In this project on GitHub, the `libs` directory contains third party software an
258
253
  **^YINI ≡**
259
254
  > Readable like INI. Structured like JSON. No indentation surprises.
260
255
 
261
- [yini-lang.org](https://yini-lang.org/?utm_source=github&utm_medium=referral&utm_campaign=yini_cli&utm_content=readme_footer) · [YINI on GitHub](https://github.com/YINI-lang)
256
+ [yini-lang.org](https://yini-lang.org/?utm_source=github&utm_medium=referral&utm_campaign=yini_cli&utm_content=readme_footer) · [YINI-lang on GitHub](https://github.com/YINI-lang)
package/dist/index.js CHANGED
@@ -52,10 +52,10 @@ program.addHelpText('after', getHelpTextAfter());
52
52
  */
53
53
  // Suggestions for future: --verbose, --debug, --no-color, --color, --timing, --stdin
54
54
  program
55
- .option('-s, --strict', 'Enable strict parsing mode.')
55
+ .option('--strict', 'Enable strict parsing mode.')
56
56
  // .option('-f, --force', 'Continue parsing even if errors occur.')
57
57
  .option('-q, --quiet', 'Reduce output (show only errors).')
58
- .option('--silent', 'Suppress all output (even errors, exit code only).')
58
+ .option('-s, --silent', 'Suppress all output (even errors, exit code only).')
59
59
  .option('--verbose', 'Display extra information.')
60
60
  .action((options) => {
61
61
  debugPrint('Run global options');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yini-cli",
3
- "version": "1.3.3-beta",
4
- "description": "CLI tool for validating and converting YINI configuration files - an INI-like format with real structure, nested sections and strict or lenient modes.",
3
+ "version": "1.3.4",
4
+ "description": "Official YINI CLI for validating, parsing, and converting a human-friendly config format with real structure, nested sections, and predictable strict or lenient parsing.",
5
5
  "keywords": [
6
6
  "yini",
7
7
  "cli",
@@ -11,14 +11,12 @@
11
11
  "parser",
12
12
  "validator",
13
13
  "ini",
14
- "ini alternative",
14
+ "command",
15
15
  "json",
16
- "type-safe",
17
- "nested sections",
18
16
  "command-line",
19
- "strict mode",
20
- "nodejs",
21
- "typescript"
17
+ "yaml",
18
+ "xml",
19
+ "cli-tool"
22
20
  ],
23
21
  "type": "module",
24
22
  "main": "dist/index.js",
@@ -74,7 +72,7 @@
74
72
  "commander": "^14.0.1",
75
73
  "xmlbuilder2": "^4.0.3",
76
74
  "yaml": "^2.8.2",
77
- "yini-parser": "^1.4.2-beta"
75
+ "yini-parser": "^1.4.3"
78
76
  },
79
77
  "devDependencies": {
80
78
  "@eslint/js": "^9.31.0",