Uppercase first character in errors

This commit is contained in:
Ben Croker 2024-12-11 11:05:28 -06:00
parent 9a0e74112a
commit 6ccc9e9c94
No known key found for this signature in database
GPG Key ID: 09D799816F1CF332
10 changed files with 20 additions and 19 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,7 @@ export const hasValNonExpr = /([\w0-9.]+)\.value/gm;
export const dsErr = (code: string, args?: any) => { export const dsErr = (code: string, args?: any) => {
const e = new Error(); const e = new Error();
code = code.charAt(0).toUpperCase() + code.slice(1);
e.name = `error ${code}`; e.name = `error ${code}`;
const fullURL = `${url}/${code}?${new URLSearchParams(args)}`; const fullURL = `${url}/${code}?${new URLSearchParams(args)}`;
e.message = `for more info see ${fullURL}`; e.message = `for more info see ${fullURL}`;

View File

@ -38,8 +38,8 @@ type EventType =
module Consts = module Consts =
let [<Literal>] DatastarKey = "datastar" let [<Literal>] DatastarKey = "datastar"
let [<Literal>] Version = "0.21.1" let [<Literal>] Version = "0.21.1"
let [<Literal>] VersionClientByteSize = 33622 let [<Literal>] VersionClientByteSize = 33661
let [<Literal>] VersionClientByteSizeGzip = 12362 let [<Literal>] VersionClientByteSizeGzip = 12377
/// Default: TimeSpan.FromMilliseconds 300 /// Default: TimeSpan.FromMilliseconds 300
let DefaultFragmentsSettleDuration = TimeSpan.FromMilliseconds 300 let DefaultFragmentsSettleDuration = TimeSpan.FromMilliseconds 300

4
sdk/go/consts.go generated
View File

@ -7,8 +7,8 @@ import "time"
const ( const (
DatastarKey = "datastar" DatastarKey = "datastar"
Version = "0.21.1" Version = "0.21.1"
VersionClientByteSize = 33622 VersionClientByteSize = 33661
VersionClientByteSizeGzip = 12362 VersionClientByteSizeGzip = 12377
//region Default durations //region Default durations

View File

@ -8,8 +8,8 @@ import starfederation.datastar.enums.FragmentMergeMode;
public final class Consts { public final class Consts {
public static final String DATASTAR_KEY = "datastar"; public static final String DATASTAR_KEY = "datastar";
public static final String VERSION = "0.21.1"; public static final String VERSION = "0.21.1";
public static final int VERSION_CLIENT_BYTE_SIZE = 33622; public static final int VERSION_CLIENT_BYTE_SIZE = 33661;
public static final int VERSION_CLIENT_BYTE_SIZE_GZIP = 12362; public static final int VERSION_CLIENT_BYTE_SIZE_GZIP = 12377;
// The default duration for settling during fragment merges. Allows for CSS transitions to complete. // The default duration for settling during fragment merges. Allows for CSS transitions to complete.
public static final int DEFAULT_FRAGMENTS_SETTLE_DURATION = 300; public static final int DEFAULT_FRAGMENTS_SETTLE_DURATION = 300;

View File

@ -11,8 +11,8 @@ class Consts
{ {
public const DATASTAR_KEY = 'datastar'; public const DATASTAR_KEY = 'datastar';
public const VERSION = '0.21.1'; public const VERSION = '0.21.1';
public const VERSION_CLIENT_BYTE_SIZE = 33622; public const VERSION_CLIENT_BYTE_SIZE = 33661;
public const VERSION_CLIENT_BYTE_SIZE_GZIP = 12362; public const VERSION_CLIENT_BYTE_SIZE_GZIP = 12377;
// The default duration for settling during fragment merges. Allows for CSS transitions to complete. // The default duration for settling during fragment merges. Allows for CSS transitions to complete.
public const DEFAULT_FRAGMENTS_SETTLE_DURATION = 300; public const DEFAULT_FRAGMENTS_SETTLE_DURATION = 300;

View File

@ -1,11 +1,11 @@
# Error: ViewTransitionKeyNotAllowed # Error: ScrollIntoViewKeyNotAllowed
A key was provided to the `data-view-transition` attribute. The `data-view-transition` attribute must not have a key _nor_ a value. A key was provided to the `data-scroll-into-view` attribute. The `data-scroll-into-view` attribute must not have a key _nor_ a value.
Example: Example:
```html ```html
<div data-view-transition></div> <div data-scroll-into-view></div>
``` ```
See the docs on the [`data-view-transition`](https://data-star.dev/reference/plugins_browser#view-transition) attribute. See the docs on the [`data-scroll-into-view`](https://data-star.dev/reference/plugins_browser#scroll-into-view) attribute.