@sveltia/cms 0.105.6 → 0.106.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
@@ -26,8 +26,8 @@ Built from the ground up, Sveltia CMS offers an excellent UX, DX, performance, s
26
26
  - [Better UX](#better-ux)
27
27
  - [Better performance](#better-performance)
28
28
  - [Better productivity](#better-productivity)
29
- - [Better accessibility](#better-accessibility)
30
29
  - [Better security](#better-security)
30
+ - [Better accessibility](#better-accessibility)
31
31
  - [Better installation](#better-installation)
32
32
  - [Better configuration](#better-configuration)
33
33
  - [Better backend support](#better-backend-support)
@@ -117,9 +117,17 @@ We loved the simple, unique setup of Netlify CMS that turned a Git repository in
117
117
 
118
118
  Due to its unfortunate abandonment in early 2022, Netlify CMS spawned 3 successors:
119
119
 
120
- - [Static CMS](https://github.com/StaticJsCMS/static-cms): a community fork, initial commit made in September 2022 — discontinued in September 2024 after making meaningful improvements
121
- - **Sveltia CMS**: not a fork but a **complete rewrite**, started in November 2022, first appeared on GitHub in March 2023 — actively developed with frequent releases and numerous improvements
122
- - [Decap CMS](https://github.com/decaporg/decap-cms): a rebranded version, [announced in February 2023](https://www.netlify.com/blog/netlify-cms-to-become-decap-cms/) as the official successor with a Netlify agency partner taking ownership — mostly stagnant, no significant improvements made since then
120
+ - [Static CMS](https://github.com/StaticJsCMS/static-cms): a community fork
121
+ - Initial commit made in September 2022
122
+ - Discontinued in September 2024 after making meaningful improvements
123
+ - **Sveltia CMS**: not a fork but a **complete rewrite**
124
+ - Started in November 2022, first appeared on GitHub in March 2023
125
+ - Actively developed with frequent releases and numerous improvements
126
+ - Solved more than 250 issues reported in the Netlify/Decap CMS repository
127
+ - [Decap CMS](https://github.com/decaporg/decap-cms): a rebranded version
128
+ - [Announced in February 2023](https://www.netlify.com/blog/netlify-cms-to-become-decap-cms/) as the official successor with a Netlify agency partner taking ownership
129
+ - Mostly stagnated since then, with no significant progress made
130
+ - A [XSS vulnerability](https://github.com/advisories/GHSA-xp8g-32qh-mv28), high severity dependency vulnerabilities, fatal crashes and many other bugs remain unaddressed
123
131
 
124
132
  Sveltia CMS is the only project that doesn’t inherit the complexity, technical debt, and numerous bugs of Netlify CMS, which was launched in 2015. Our product is better by design: We have rebuilt the app from the ground up using a [modern framework](https://svelte.dev/) while closely monitoring and analyzing the predecessor’s issue tracker. We don’t reuse any part of their code. This “total reboot” allows us to make [hundreds of improvements](#differentiators) without getting stuck in an old system.
125
133
 
@@ -168,7 +176,7 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
168
176
 
169
177
  - Created and actively maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design, marketing, localization and everything in between. You can expect constant improvements to the user experience (UX) and developer experience (DX) across the platform.
170
178
  - The maintainer tries to respond to bug reports as quickly as possible. While there are no guarantees, the typical turnaround time for a bug fix is less than 24 hours.
171
- - Frequent releases deliver new features and enhancements to users more quickly. The release interval of Decap CMS has been irregular and often long, sometimes exceeding several months.
179
+ - Frequent releases deliver new features and enhancements to users more quickly. The release interval of Decap CMS has been irregular and often long, sometimes exceeding 2 months.
172
180
  - Many of our minor [releases](https://github.com/sveltia/sveltia-cms/releases) address one or more Netlify/Decap CMS issues, giving you even more reasons to switch from the legacy predecessor.
173
181
  - Offers a modern, intuitive user interface that utilizes the full viewport,[^178] inspired in part by the Netlify CMS v3 prototype.[^1][^211][^212][^213][^214]
174
182
  - Provides immersive dark mode.[^2] The UI theme follows the user’s system preference by default and can be changed in the application settings.
@@ -211,6 +219,20 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
211
219
  - Instant full-text search with results sorted by relevance helps you find entries faster. In Netlify/Decap CMS, you often won’t get the results you expect.
212
220
  - Some [keyboard shortcuts](#using-keyboard-shortcuts) are available for faster editing.
213
221
 
222
+ ### Better security
223
+
224
+ - Avoids vulnerabilities in dependencies through constant updates, Dependabot alerts, [`pnpm audit`](https://pnpm.io/cli/audit), and frequent releases, unlike Netlify/Decap CMS where a number of high severity vulnerabilities remain unaddressed for a long time.[^33]
225
+ - The unpatched [XSS vulnerability](https://github.com/advisories/GHSA-xp8g-32qh-mv28) in Decap CMS does not affect Sveltia CMS, as our entry preview implementation is completely different.
226
+ - However, the Markdown widget was potentially vulnerable to XSS attacks because the `sanitize_preview` option was set to `false` by default for compatibility with Netlify/Decap CMS. This behaviour is [documented](https://decapcms.org/docs/widgets/#markdown) and is not a bug, but it’s definitely not secure. In [Sveltia CMS 0.105.0](https://github.com/sveltia/sveltia-cms/releases/tag/v0.105.0), we changed the default value to `true`, assuming that most users would prefer security over compatibility.
227
+ - Our [local repository workflow](#working-with-a-local-git-repository) does not require a proxy server. This reduces attack surfaces by eliminating the possibility of compromised dependencies[^158] and unauthorized API access.[^282]
228
+ - Thanks to pnpm, Vite, GitHub Actions and [npm package provenance](https://github.blog/security/supply-chain-security/introducing-npm-package-provenance/), our release process is fast, reliable and transparent. This setup makes it easy to verify the integrity of published code and assets. It also helps us avoid errors that can occur with manual build steps.[^264]
229
+ - We have created a [security policy](https://github.com/sveltia/sveltia-cms/blob/main/SECURITY.md).
230
+ - We have documented how to [set up a Content Security Policy](#setting-up-content-security-policy) for the CMS to prevent any unexpected errors or otherwise insecure configuration.[^108]
231
+ - The `unsafe-eval` and `unsafe-inline` keywords are not needed in the `script-src` CSP directive.[^34]
232
+ - The `same-origin` referrer policy is automatically set with a `<meta>` tag.
233
+ - Sveltia CMS has a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) requirement that forces the site content, including the CMS configuration file, to be served over HTTPS.
234
+ - GitHub commits are automatically GPG-signed and [marked as verified](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification).[^144]
235
+
214
236
  ### Better accessibility
215
237
 
216
238
  - Improved keyboard handling lets you efficiently navigate through UI elements using the Tab, Space, Enter and arrow keys.[^17][^67]
@@ -223,20 +245,6 @@ Note: This lengthy section compares Sveltia CMS with both Netlify CMS and Decap
223
245
  - Browser console logs for developers are readable in either light or dark mode.[^116]
224
246
  - We’ll continue to test and improve the application to meet [WCAG 2.2](https://w3c.github.io/wcag/guidelines/22/).
225
247
 
226
- ### Better security
227
-
228
- - Avoids vulnerabilities in dependencies through constant updates, Dependabot alerts, [`pnpm audit`](https://pnpm.io/cli/audit), and frequent releases, unlike Netlify/Decap CMS where a number of high severity vulnerabilities remain unpatched for a long time.[^33]
229
- - The [XSS vulnerability](https://github.com/advisories/GHSA-xp8g-32qh-mv28) found in Decap CMS does not affect Sveltia CMS, as our entry preview implementation is completely different.
230
- - However, the Markdown widget was potentially vulnerable to XSS attacks because the `sanitize_preview` option was set to `false` by default for compatibility with Netlify/Decap CMS. This behaviour is [documented](https://decapcms.org/docs/widgets/#markdown) and is not a bug, but it’s definitely not secure. In [Sveltia CMS 0.105.0](https://github.com/sveltia/sveltia-cms/releases/tag/v0.105.0), we changed the default value to `true`, assuming that most users would prefer security over compatibility.
231
- - Thanks to pnpm, Vite, GitHub Actions and [npm package provenance](https://github.blog/security/supply-chain-security/introducing-npm-package-provenance/), our release process is fast, reliable and transparent. This setup makes it easy to verify the integrity of published code and assets. It also helps us avoid errors that can occur with manual build steps.[^264]
232
- - We have created a [security policy](https://github.com/sveltia/sveltia-cms/blob/main/SECURITY.md).
233
- - We have documented how to [set up a Content Security Policy](#setting-up-content-security-policy) for the CMS to prevent any unexpected errors or otherwise insecure configuration.[^108]
234
- - The `unsafe-eval` and `unsafe-inline` keywords are not needed in the `script-src` CSP directive.[^34]
235
- - The `same-origin` referrer policy is automatically set with a `<meta>` tag.
236
- - Sveltia CMS has a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) requirement that forces the site content, including the CMS configuration file, to be served over HTTPS.
237
- - GitHub commits are automatically GPG-signed and [marked as verified](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification).[^144]
238
- - Our [local repository workflow](#working-with-a-local-git-repository) does not require a proxy server. This reduces attack surfaces by eliminating the possibility of compromised dependencies[^158] and unauthorized API access.[^282]
239
-
240
248
  ### Better installation
241
249
 
242
250
  - Sveltia CMS is built with [Svelte](https://svelte.dev/), and we only publish compiled vanilla JavaScript bundles, so there are no React compatibility issues that might prevent developers from upgrading a project for many months.[^177] No dependencies will be installed when you [install the app with npm](#installing-with-npm).
@@ -512,6 +520,7 @@ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widget
512
520
  - Supports the `before_input` and `after_input` string options, which allow developers to display custom labels before and/or after the input UI.[^28] Markdown is supported in the value.
513
521
  - Compatibility note: In Static CMS, these options are implemented as `prefix` and `suffix`, respectively, which have different meaning in Sveltia CMS.
514
522
  - File and Image
523
+ - Supports `multiple`, `min` and `max` options to allow uploading multiple files at once.[^239]
515
524
  - Provides a reimagined all-in-one asset selection dialog for File and Image fields.[^234]
516
525
  - Entry, file, [collection](#using-a-custom-media-folder-for-a-collection) and global assets are listed on separate tabs for easy selection.[^19]
517
526
  - A new asset can be uploaded by dragging & dropping it into the dialog.[^20]
@@ -567,6 +576,7 @@ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widget
567
576
  - Enhancements to media libraries:
568
577
  - Supports multiple media libraries with the [new `media_libraries` option](#configuring-multiple-media-libraries).[^195]
569
578
  - Default media library
579
+ - It supports multiple file selection.[^239] This can be enabled by setting the new `multiple` File/Image widget option to `true`. For compatibility with other media libraries, the `media_library.config.multiple` option is also supported.
570
580
  - It comes with a [built-in image optimizer](#optimizing-images-for-upload). With a few lines of configuration, images selected by users for upload are automatically converted to WebP format for reduced size,[^199] and it’s also possible to specify a maximum width and/or height.[^200] SVG images can also be optimized.
571
581
  - The `max_file_size` option for the File/Image widget can be defined within the global `media_library` option, using `default` as the library name. It applies to all File/Image entry fields, as well as direct uploads to the Asset Library. The option can also be part of the [new `media_libraries` option](#configuring-multiple-media-libraries).
572
582
  - Unlike Netlify/Decap CMS, files are uploaded with their original names. Uppercase letters and spaces are not converted to lowercase letters and hyphens.[^97] If you want to slugify filenames according to the [`slug` option](https://decapcms.org/docs/configuration-options/#slug-type), use the `slugify_filename` [default media library option](#configuring-multiple-media-libraries).
@@ -703,7 +713,7 @@ These options are deprecated and will be removed in Sveltia CMS 1.0:
703
713
 
704
714
  ### Compatibility with Static CMS
705
715
 
706
- Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. Since Static CMS was archived some time ago, we don’t plan to implement additional compatibility beyond what’s listed below. However, we may still adopt some of their features that we find useful.
716
+ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. Since Static CMS was archived over a year ago, we don’t plan to implement additional compatibility beyond what’s listed below. However, we may still adopt some of their features that we find useful.
707
717
 
708
718
  Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/decap-migration-guide) while Sveltia CMS mostly follows Netlify/Decap CMS, so you should review your configuration carefully.
709
719
 
@@ -719,7 +729,7 @@ Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/dec
719
729
  - The [KeyValue widget](#new-widgets) is implemented in Sveltia CMS with the same options.
720
730
  - The [UUID widget](#new-widgets) is also implemented, but with different options.
721
731
  - The `prefix` and `suffix` options for the Boolean, Number and String widgets are implemented as `before_input` and `after_input` in Sveltia CMS, respectively. Our `prefix` and `suffix` options for the String widget are literally a prefix and suffix to the value.
722
- - The `multiple` option for the File and Image widgets will be implemented in Sveltia CMS before GA. ([#10](https://github.com/sveltia/sveltia-cms/issues/10))
732
+ - The `multiple` option for the File and Image widgets is supported in Sveltia CMS, along with the `min` and `max` options.
723
733
  - The [breaking change to the List widget](https://staticjscms.netlify.app/docs/decap-migration-guide#list-widget) doesn’t apply to Sveltia CMS. You must use the `field` (singular) option to produce a single subfield with [no `name` output](#understanding-exceptions-in-data-output).
724
734
  - Customization
725
735
  - `CMS.registerIcon()` will not be supported, as Sveltia CMS includes the Material Symbols font for [custom collection icons](#using-a-custom-icon-for-a-collection) that doesn’t require manual registration.
@@ -793,11 +803,16 @@ If you want to stay with Git Gateway and Netlify Identity, unfortunately you can
793
803
 
794
804
  ### Installing with npm
795
805
 
796
- For advanced users, we have also made the bundle available as an [npm package](https://www.npmjs.com/package/@sveltia/cms). You can install it by running `npm i @sveltia/cms` or `pnpm add @sveltia/cms` on your project. The [manual initialization](https://decapcms.org/docs/manual-initialization/) flow with the `init` method is the same as for Netlify/Decap CMS.
806
+ For advanced users, we have also made the bundle available as an [npm package](https://www.npmjs.com/package/@sveltia/cms). You can install it by running `npm i @sveltia/cms` or `pnpm add @sveltia/cms` on your project. The [manual initialization](https://decapcms.org/docs/manual-initialization/) flow with the `init` method is the same as for Netlify/Decap CMS. Just update the `import` statement if you’re migrating:
807
+
808
+ ```diff
809
+ -import CMS, { init } from 'decap-cms-app';
810
+ +import CMS, { init } from '@sveltia/cms';
811
+ ```
797
812
 
798
813
  ### Updates
799
814
 
800
- Updating Sveltia CMS is transparent, unless you include a specific version in the `<script>` source URL or use the npm package. Whenever you (re)load the CMS, the latest version will be served via [UNPKG](https://unpkg.com/). The CMS also periodically checks for updates and notifies you when a new version is available. After the product reaches GA, you could use a semantic version range (`^1.0.0`) like Netlify/Decap CMS.
815
+ Updating Sveltia CMS is automatic, unless you include a specific version in the `<script>` source URL or use the npm package. Whenever you (re)load the CMS, the latest version will be served via [UNPKG](https://unpkg.com/). The CMS also periodically checks for updates and notifies you when a new version is available. After the product reaches GA, you could use a semantic version range (`^1.0.0`) like Netlify/Decap CMS.
801
816
 
802
817
  If you’ve chosen to install with npm, updating the package is your responsibility. We strongly recommend using [`ncu`](https://www.npmjs.com/package/npm-check-updates) or a service like [Dependabot](https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/) to keep dependencies up to date. Otherwise, you’ll miss important bug fixes and new features. (ProTip: We update our dependencies using `ncu -u && pnpm up` at least once a week.)
803
818
 
@@ -1855,7 +1870,6 @@ Due late 2025
1855
1870
 
1856
1871
  - Enhanced [compatibility with Netlify/Decap CMS](#current-limitations)
1857
1872
  - Tackling some more Netlify/Decap CMS issues:
1858
- - [Multiple file selection with the File and Image widgets](https://github.com/sveltia/sveltia-cms/issues/10)[^239]
1859
1873
  - Several Cloudinary and Uploadcare media library issues, including selection of existing files[^247]
1860
1874
  - [RTL localization support](https://github.com/sveltia/sveltia-cms/issues/385)[^245]
1861
1875
  - Thorough site config validation[^246]