Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Dec 23, 2024
2 parents 71ff8d4 + 49e7153 commit 6a12354
Show file tree
Hide file tree
Showing 97 changed files with 858 additions and 540 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ data
node_modules
datastar-website
*_bin
.DS_Store
.DS_Store
*.qtpl.go
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"makefile.configureOnOpen": false,
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
}
}
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# WIP Release Notes for Datastar

## v0.21.3
## v0.21.4

### Added

- Added the ability to tell Datastar to ignore an element if `data-star-ignore` exists on it. Useful for preventing naming conflicts with third-party libraries.
- Added a `contentType` option to the `sse()` action that, when set to `form`, submits the closest form element, or one specified using the `selector` option ([#400](https://github.com/starfederation/datastar/issues/400)).
- Added a `retryInterval` option to the `sse()` action, defaulting to 1 second ([#393](https://github.com/starfederation/datastar/issues/393)).
- Added the version number in a comment at the top of bundled files ([#401](https://github.com/starfederation/datastar/issues/401)).

### Changed

- The Datastar module is now exported, exposing [public methods and properties](https://data-star.dev/reference/javascript_api) ([#358](https://github.com/starfederation/datastar/issues/358)).
- The `data-on-submit` event listener now prevents the default submission behavior of forms.

### Fixed

- Fixed a bug in which local signals were being unintentionally sent with requests ([#387](https://github.com/starfederation/datastar/issues/387)).
- Fixed a bug in which the bundler was not exporting Datastar ([#403](https://github.com/starfederation/datastar/issues/403)).
- Fixed a bug in which the persist plugin was not maintain values if the values were signals ([#403](https://github.com/starfederation/datastar/issues/413)).
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.21.3
0.21.4
54 changes: 54 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": {
"ignoreUnknown": false,
"include": ["library/**/*.ts"],
"ignore": [
"library/**/*.js",
"library/**/*.d.ts",
"library/src/engine/version.ts",
"library/src/engine/consts.ts"
]
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto",
"bracketSpacing": true
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noNonNullAssertion": "off",
"noParameterAssign": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noConfusingVoidType": "off",
"noAssignInExpressions": "off"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
}
}
}
1 change: 0 additions & 1 deletion build/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*.qtpl.go
*_templ.go
twcli
8 changes: 4 additions & 4 deletions build/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,25 @@ var Consts = &ConstTemplateData{
FileExtension: "go",
Name: "Go",
Icon: "vscode-icons:file-type-go-gopher",
SdkUrl: "https://github.com/starfederation/datastar/tree/develop/sdk/go",
SdkUrl: "https://github.com/starfederation/datastar/tree/main/sdk/go",
},
{
FileExtension: "php",
Name: "PHP",
Icon: "vscode-icons:file-type-php2",
SdkUrl: "https://github.com/starfederation/datastar/tree/develop/sdk/php",
SdkUrl: "https://github.com/starfederation/datastar/tree/main/sdk/php",
},
{
FileExtension: "fs",
Name: "Dotnet",
Icon: "vscode-icons:file-type-fsharp2",
SdkUrl: "https://github.com/starfederation/datastar/tree/develop/sdk/dotnet",
SdkUrl: "https://github.com/starfederation/datastar/tree/main/sdk/dotnet",
},
{
FileExtension: "java",
Name: "Java",
Icon: "vscode-icons:file-type-java",
SdkUrl: "https://github.com/starfederation/datastar/tree/develop/sdk/java",
SdkUrl: "https://github.com/starfederation/datastar/tree/main/sdk/java",
},
},
DatastarKey: "datastar",
Expand Down
7 changes: 5 additions & 2 deletions build/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Build() error {

if err := errors.Join(
// createPluginManifest(),
createBundles(),
createBundles(version),
writeOutConsts(version),
); err != nil {
return fmt.Errorf("error creating bundles: %w", err)
Expand Down Expand Up @@ -51,7 +51,7 @@ func extractVersion() (string, error) {
return version, nil
}

func createBundles() error {
func createBundles(version string) error {
log.Print("Creating bundles...")
defer log.Print("Bundles created!")

Expand All @@ -63,6 +63,9 @@ func createBundles() error {
"library/src/bundles/datastar-core.ts",
"library/src/bundles/datastar.ts",
},
Banner: map[string]string{
"js": "// Datastar v" + version,
},
Outdir: outDir,
Bundle: true,
Write: true,
Expand Down
7 changes: 4 additions & 3 deletions bundles/datastar-core.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bundles/datastar-core.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 6a12354

Please sign in to comment.