@aspruyt/xfg 1.0.0 → 1.0.2

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
@@ -1,6 +1,6 @@
1
1
  # xfg
2
2
 
3
- [![CI](https://github.com/anthony-spruyt/xfg/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/anthony-spruyt/xfg/actions/workflows/ci.yml)
3
+ [![CI](https://github.com/anthony-spruyt/xfg/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/anthony-spruyt/xfg/actions/workflows/ci.yaml)
4
4
  [![npm version](https://img.shields.io/npm/v/@aspruyt/xfg.svg)](https://www.npmjs.com/package/@aspruyt/xfg)
5
5
  [![npm downloads](https://img.shields.io/npm/dw/@aspruyt/xfg.svg)](https://www.npmjs.com/package/@aspruyt/xfg)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
@@ -62,7 +62,7 @@ xfg --config ./config.yaml
62
62
 
63
63
  - **Multi-File Sync** - Sync multiple config files in a single run
64
64
  - **Multi-Format Output** - JSON, YAML, or plain text based on filename extension
65
- - **Subdirectory Support** - Sync files to any path (e.g., `.github/workflows/ci.yml`)
65
+ - **Subdirectory Support** - Sync files to any path (e.g., `.github/workflows/ci.yaml`)
66
66
  - **Text Files** - Sync `.gitignore`, `.markdownlintignore`, etc. with string or lines array
67
67
  - **File References** - Use `@path/to/file` to load content from external template files
68
68
  - **Content Inheritance** - Define base config once, override per-repo as needed
@@ -583,7 +583,7 @@ Sync files to any subdirectory path - parent directories are created automatical
583
583
  ```yaml
584
584
  files:
585
585
  # GitHub Actions workflow
586
- ".github/workflows/ci.yml":
586
+ ".github/workflows/ci.yaml":
587
587
  content:
588
588
  name: CI
589
589
  on: [push, pull_request]
@@ -88,7 +88,15 @@ export function convertContentToString(content, fileName, options) {
88
88
  doc.commentBefore = headerComment;
89
89
  }
90
90
  }
91
- return stringify(doc, { indent: 2 });
91
+ // Quote all string values for YAML 1.1 compatibility.
92
+ // The yaml library outputs YAML 1.2 where "06:00" is a plain string,
93
+ // but many tools (e.g., Dependabot) use YAML 1.1 parsers that interpret
94
+ // unquoted values like "06:00" as sexagesimal (360) or "yes"/"no" as booleans.
95
+ return stringify(doc, {
96
+ indent: 2,
97
+ defaultStringType: "QUOTE_DOUBLE",
98
+ defaultKeyType: "PLAIN",
99
+ });
92
100
  }
93
101
  if (format === "json5") {
94
102
  // JSON5 format - output standard JSON (which is valid JSON5)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aspruyt/xfg",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool to sync JSON or YAML configuration files across multiple GitHub and Azure DevOps repositories",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",