• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

🚀 YINI Parser v1.3.0-beta – Smarter Options, Safer Metadata, and New Controls

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,480
Баллы
155


I've just released yini-parser v1.3.0-beta 🎉 (Node package) - a big step forward for ergonomics, diagnostics, and developer experience when working with

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, the human-friendly configuration format inspired by INI but with modern clarity.

This release focuses on cleaner public APIs, new output controls, and better tooling around metadata and CI.

✨ What's New

🐛 Fixed

  • Fixed a bug where buildResultMetadata(..) could occasionally produce an undefined error.
🔄 Renamed (Breaking API Changes)


To make public types more ergonomic for end-users, several interfaces were renamed:

  • AllUserOptions → ParseOptions
  • PrimaryUserParams → BasicOptions
  • OnDuplicateKey → DuplicateKeyPolicy

This makes names shorter, more consistent, and closer to their intent.

📖 Clarified

  • The strictMode parameter in TSDoc has been clarified: It defines the baseline ruleset (true = strict, false = lenient). Rule-specific options (e.g., treatEmptyValueAsNull, onDuplicateKey) may override the baseline. When overrides are applied, the effective mode becomes custom.
🆕 New Features


  • DocumentTerminatorRule and EmptyValueRule: new user-facing parsing rule value types.


  • quiet option:
    • Only prints errors to the console.
    • Warnings, notices, etc. are suppressed.
    • Diagnostics are still captured in metadata.

  • silent option:
    • Suppresses all console output, even errors.
    • Programmatic callers should use metadata; CLI users should rely on the exit code.

  • throwOnError option:
    • true (default): parser throws on parse errors.
    • false: errors are reported via diagnostics without throwing.
    • ⚠ Planned change: next release will switch the default to false.
    • ✅ Action: set throwOnError: true to keep current behavior, or throwOnError: false to adopt the upcoming behavior.
📊 Metadata Improvements

  • Added effectiveMode inside meta.diagnostics.effectiveOptions.
  • Metadata bumped to v1.1.1.
  • Fields strictMode and effectiveOptions now correctly reflect when rules override the initial mode.

The resultet metadata looks like this:


"meta": {
"parserVersion": "1.3.0-beta",
"mode": "strict",
"totalErrors": 0,
"totalWarnings": 1,
"totalMessages": 1,
"runStartedAt": "2025-09-23T14:23:22.587Z",
"runFinishedAt": "2025-09-23T14:23:22.618Z",
"durationMs": 30.746,
"preservesOrder": true,
"orderGuarantee": "implementation-defined",
"source": {
"sourceType": "inline",
"hasDocumentTerminator": false,
"hasYiniMarker": false,
"lineCount": 10,
"byteSize": null,
"sha256": "d79db628387ad8244fc3d394916e20b12c7fe6ef9c39fbf525b9579cdc95130a"
},
"structure": {
"maxDepth": 5,
"sectionCount": 5,
"memberCount": 3,
"keysParsedCount": null,
"sectionNamePaths": [
"User2",
"User2.PrefsOfUser2",
"User2.PrefsOfUser2.DeepSection",
"User2.PrefsOfUser2.DeepSection.DeeperSection",
"User2.PrefsOfUser2.DeepSection.DeeperSection.YetDeeperSection"
]
},
"metaSchemaVersion": "1.1.1"
}



🛠 CI & Tooling


The repo now runs stronger checks on every PR & release:

  • Security: CodeQL, npm audit, lockfile-lint, Gitleaks (SARIF), Semgrep (SARIF).
  • Grammar drift check: Ensures ANTLR-generated sources are committed.
  • Regression tests: Node/OS matrix coverage.
  • Releases: npm publish with provenance (tag-driven).
💬 Other

  • Parser summary logic and messages have been updated for clearer output.
📦 Install / Upgrade


npm install yini-parser@1.3.0-beta




npm update yini-parser



📚 Links


💡 This release lays groundwork for safer defaults and better developer ergonomics.

Thanks for reading!



Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу