@sveltia/cms 0.51.0 → 0.52.0

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
@@ -138,7 +138,7 @@ We are working hard to create a **tremendously better alternative to Netlify CMS
138
138
  ### Better performance
139
139
 
140
140
  - Built completely from scratch with Svelte instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast. The compiled code is vanilla JavaScript — you can use it with any framework or static site generator (SSG) that can load static data files during the build process.
141
- - Small footprint: The bundle size is less than 450 KB when minified and brotlied, which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.8 MB) and Static CMS (2.6 MB)[^57][^64], even though we haven’t implemented some features yet. That’s the power of Svelte + Vite.
141
+ - Small footprint: The bundle size is less than 500 KB when minified and brotlied, which is much lighter than Netlify CMS (1.5 MB), Decap CMS (1.8 MB) and Static CMS (2.6 MB)[^57][^64], even though we haven’t implemented some features yet. That’s the power of Svelte + Vite.
142
142
  - We have upgraded from Svelte 4 to [Svelte 5](https://svelte.dev/blog/svelte-5-is-alive) to further improve performance, including an even smaller bundle size. A full migration to the Runes reactivity API is in progress.
143
143
  - Sveltia CMS is free of technical debt and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
144
144
  - Uses the GraphQL API for GitHub and GitLab to quickly fetch content at once, so that entries and assets can be listed and searched instantly[^32][^65] (the useless `search` configuration option is ignored). It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
@@ -293,7 +293,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
293
293
  ### Better data output
294
294
 
295
295
  - Keys in generated JSON/TOML/YAML content are always sorted by the order of configured fields, making Git commits clean and consistent[^86].
296
- - Netlify/Decap CMS often, but not always, omits optional and empty fields from the output. Sveltia CMS aims at complete and consistent data output — it always saves proper values, such as an empty string, an empty array or `null`, instead of nothing (`undefined`), regardless of the `required` field option[^45][^46][^44][^154][^157].
296
+ - Netlify/Decap CMS often, but not always, omits optional and empty fields from the output[^154]. Sveltia CMS aims at complete and consistent data output — it always saves proper values, such as an empty string, an empty array or `null`, instead of nothing (`undefined`), regardless of the `required` field option[^45][^46][^44][^157].
297
297
  - In other words, in Sveltia CMS, `required: false` makes data input optional, but doesn’t make data output optional.
298
298
  - To omit empty optional fields from data output, use `omit_empty_optional_fields: true` in the [data output options](#controlling-data-output). This is useful if you have data type validations that expect `undefined`[^156].
299
299
  - JSON/TOML/YAML data is saved with a new line at the end of the file to prevent unnecessary changes being made to the file[^11].
@@ -301,7 +301,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
301
301
  - YAML string folding (maximum line width) is disabled, mainly for framework compatibility[^119].
302
302
  - DateTime field values in ISO 8601 format are stored in native date/time format instead of quoted strings when the data output is TOML[^147].
303
303
  - Provides JSON/YAML format options as part of the [data output options](#controlling-data-output), including indentation and quotes[^9][^155].
304
- - Note: the `yaml_quote: true` collection option added v0.5.10 is now deprecated and will be removed in v1.0.
304
+ - The `yaml_quote` collection option added in [v0.5.10](https://github.com/sveltia/sveltia-cms/releases/tag/v0.5.10) is now deprecated and will be removed in v1.0.0. `yaml_quote: true` is equivalent to `quote: double` for the new `yaml` option.
305
305
 
306
306
  ### Better widgets
307
307
 
@@ -335,7 +335,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
335
335
  - The default editor mode can be set by changing the order of the `modes` option[^58]. If you want to use the plain text editor by default, add `modes: [raw, rich_text]` to the field configuration.
336
336
  - Line breaks are rendered as line breaks in the preview pane according to GitHub Flavored Markdown (GFM).
337
337
  - Number
338
- - If the `value_type` option is `int` or `float`, the `required` option is `false`, and the value is not entered, it will be saved as `null` instead of an empty string[^157].
338
+ - If the `value_type` option is `int` (default) or `float`, the `required` option is `false`, and the value is not entered, the field will be saved as `null` (or `undefined` if the `omit_empty_optional_fields` option is `true`) instead of an empty string[^157]. If `value_type` is something else, the data type remains string.
339
339
  - Object
340
340
  - Sveltia CMS offers two ways to have conditional fields in a collection[^30]:
341
341
  - The Object widget supports [variable types](https://decapcms.org/docs/variable-type-widgets/) (the `types` option) just like the List widget.
@@ -804,7 +804,7 @@ Note: The `root` option is ignored if the collection or collection file contains
804
804
 
805
805
  ### Controlling data output
806
806
 
807
- Sveltia CMS supports some data output options, including JSON/YAML formatting preferences, in the configuration file. The default options are listed below:
807
+ Sveltia CMS supports some [data output](#better-data-output) options, including JSON/YAML formatting preferences, in the configuration file. The default options are listed below:
808
808
 
809
809
  ```yaml
810
810
  output:
@@ -1152,7 +1152,7 @@ This software is provided “as is” without any express or implied warranty. W
1152
1152
 
1153
1153
  [^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
1154
1154
 
1155
- [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251)
1155
+ [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361)
1156
1156
 
1157
1157
  [^74]: Netlify/Decap CMS [#4209](https://github.com/decaporg/decap-cms/issues/4209)
1158
1158
 
@@ -1314,7 +1314,7 @@ This software is provided “as is” without any express or implied warranty. W
1314
1314
 
1315
1315
  [^153]: Netlify/Decap CMS [#7347](https://github.com/decaporg/decap-cms/issues/7347)
1316
1316
 
1317
- [^154]: Netlify/Decap CMS [#1449](https://github.com/decaporg/decap-cms/issues/1988), [#1449](https://github.com/decaporg/decap-cms/issues/1988)
1317
+ [^154]: Netlify/Decap CMS [#1449](https://github.com/decaporg/decap-cms/issues/1449), [#1988](https://github.com/decaporg/decap-cms/issues/1988)
1318
1318
 
1319
1319
  [^155]: Netlify/Decap CMS [#5870](https://github.com/decaporg/decap-cms/issues/5870)
1320
1320