@sveltia/cms 0.105.6 → 0.106.1

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
 
@@ -142,7 +150,7 @@ While we fix reported bugs as quickly as possible, usually within 24 hours, our
142
150
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#current-limitations)
143
151
  - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
144
152
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
145
- - So far, **250+ issues, or 540+ if including duplicates, have been effectively solved** in Sveltia CMS (Yes, you read it right)
153
+ - So far, **250+ issues, or 550+ if including duplicates, have been effectively solved** in Sveltia CMS (Yes, you read it right)
146
154
  - Target:
147
155
  - 250 issues, or 500 if including duplicates, by GA — We did it! 🎉
148
156
  - 400 issues, or 800 if including duplicates, in the future 💪
@@ -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).
@@ -518,6 +526,9 @@ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widget
518
526
  - A URL can also be entered in the dialog.
519
527
  - Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo.[^8] More stock photo providers will be added in the future.
520
528
  - Users can also simply drag and drop a file onto a File/Image field to attach it without having to open the Select File dialog.
529
+ - Supports the boolean `multiple` option, which can be set to `true` to allow multiple file uploads.[^239]
530
+ - When enabled, users can select and upload multiple files at once in the Select File dialog, as well as drag and drop multiple files onto the field. The field value will be an array of strings instead of a single string.
531
+ - The `min` and `max` options are also available to limit the number of files that can be uploaded.
521
532
  - Large images automatically fit in the Preview Pane instead of being displayed at their original size, which can easily exceed the width of the pane.
522
533
  - The new `accept` option allows files to be filtered by a comma-separated list of unique file type specifiers, in the same way as the HTML [`accept` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept) for `<input type="file">`.[^216]
523
534
  - By default, the Image widget only accepts an AVIF, GIF, JPEG, PNG, WebP or SVG image. BMP, HEIC, JPEG XL, PSD, TIFF and other less common or non-standard files are excluded.[^217]
@@ -567,6 +578,7 @@ Sveltia CMS supports all the [built-in widgets](https://decapcms.org/docs/widget
567
578
  - Enhancements to media libraries:
568
579
  - Supports multiple media libraries with the [new `media_libraries` option](#configuring-multiple-media-libraries).[^195]
569
580
  - Default media library
581
+ - 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
582
  - 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
583
  - 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
584
  - 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 +715,7 @@ These options are deprecated and will be removed in Sveltia CMS 1.0:
703
715
 
704
716
  ### Compatibility with Static CMS
705
717
 
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.
718
+ 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
719
 
708
720
  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
721
 
@@ -719,7 +731,7 @@ Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/dec
719
731
  - The [KeyValue widget](#new-widgets) is implemented in Sveltia CMS with the same options.
720
732
  - The [UUID widget](#new-widgets) is also implemented, but with different options.
721
733
  - 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))
734
+ - The `multiple` option for the File and Image widgets is supported in Sveltia CMS, along with the `min` and `max` options.
723
735
  - 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
736
  - Customization
725
737
  - `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 +805,16 @@ If you want to stay with Git Gateway and Netlify Identity, unfortunately you can
793
805
 
794
806
  ### Installing with npm
795
807
 
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.
808
+ 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:
809
+
810
+ ```diff
811
+ -import CMS, { init } from 'decap-cms-app';
812
+ +import CMS, { init } from '@sveltia/cms';
813
+ ```
797
814
 
798
815
  ### Updates
799
816
 
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.
817
+ 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
818
 
802
819
  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
820
 
@@ -1855,7 +1872,6 @@ Due late 2025
1855
1872
 
1856
1873
  - Enhanced [compatibility with Netlify/Decap CMS](#current-limitations)
1857
1874
  - 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
1875
  - Several Cloudinary and Uploadcare media library issues, including selection of existing files[^247]
1860
1876
  - [RTL localization support](https://github.com/sveltia/sveltia-cms/issues/385)[^245]
1861
1877
  - Thorough site config validation[^246]
@@ -1880,7 +1896,7 @@ Due early/mid 2026
1880
1896
 
1881
1897
  - **Sveltia CMS Additions**: Edge functions for Cloudflare Workers and possibly other platforms that provide features that cannot be implemented client-side:
1882
1898
  - User management (Netlify Identity alternative) with roles[^23]
1883
- - Sign-in without a Git service account (Git Gateway alternative)
1899
+ - Commits without a Git service account (Git Gateway alternative)
1884
1900
  - End-user documentation
1885
1901
  - Contributor documentation
1886
1902
 
@@ -2114,7 +2130,7 @@ This project would not have been possible without the open source Netlify CMS pr
2114
2130
 
2115
2131
  [^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
2116
2132
 
2117
- [^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), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504), [#7524](https://github.com/decaporg/decap-cms/issues/7524), [#7531](https://github.com/decaporg/decap-cms/issues/7531), [#7535](https://github.com/decaporg/decap-cms/issues/7535), [#7553](https://github.com/decaporg/decap-cms/issues/7553), [#7561](https://github.com/decaporg/decap-cms/issues/7561), [#7584](https://github.com/decaporg/decap-cms/issues/7584), [#7591](https://github.com/decaporg/decap-cms/issues/7591)
2133
+ [^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), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504), [#7524](https://github.com/decaporg/decap-cms/issues/7524), [#7531](https://github.com/decaporg/decap-cms/issues/7531), [#7535](https://github.com/decaporg/decap-cms/issues/7535), [#7553](https://github.com/decaporg/decap-cms/issues/7553), [#7561](https://github.com/decaporg/decap-cms/issues/7561), [#7584](https://github.com/decaporg/decap-cms/issues/7584), [#7591](https://github.com/decaporg/decap-cms/issues/7591), [#7609](https://github.com/decaporg/decap-cms/issues/7609)
2118
2134
 
2119
2135
  [^74]: Netlify/Decap CMS [#4209](https://github.com/decaporg/decap-cms/issues/4209)
2120
2136