Skip to content

Commit

Permalink
Remove version from source code (#545)
Browse files Browse the repository at this point in the history
* Remove version from source code

* Remove from JS API

* Add release note
  • Loading branch information
bencroker authored Jan 28, 2025
1 parent a1fcf54 commit 490a26f
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 26 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

- Changed the `data-on-interval` attribute to accept a `__duration` modifier instead of a `__delay` modifier ([#513](https://github.com/starfederation/datastar/issues/513)).
- Changed the parsing of Datastar expressions so that only semicolons can be used to explicitly indicate a statement delimiter ([#525](https://github.com/starfederation/datastar/issues/525)).
- The `data-custom-validity` attribute can now be used on select and textarea elements, in addition to input elements ([534](https://github.com/starfederation/datastar/pull/534)).
- The `data-custom-validity` attribute can now be used on select and textarea elements, in addition to input elements ([534](https://github.com/starfederation/datastar/issues/534)).

### Fixed

- Fixed how Datastar expressions are evaluated to allow regular expressions and strings that contain semicolons and new lines ([#508](https://github.com/starfederation/datastar/issues/508)).
- Fixed a bug when using the `__delay` modifier on the `data-on-load` attribute ([#511](https://github.com/starfederation/datastar/issues/511)).
- Fixed a bug with the `inner` merge mode that was causing only the inner HTML of the fragment to be merged ([#524](https://github.com/starfederation/datastar/issues/524)).
- Fixed a bug when generating IDs for elements that was resulting in duplicate IDs ([#533](https://github.com/starfederation/datastar/pull/533)).
- Fixed a bug when generating IDs for elements that was resulting in duplicate IDs ([#533](https://github.com/starfederation/datastar/issues/533)).

### Removed

- Removed the version number variable from the JavaScript API ([#545](https://github.com/starfederation/datastar/issues/545)).
1 change: 0 additions & 1 deletion build/consts_datastar_client.qtpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const DSS = lol.slice(4)
export const DATASTAR = "{%s data.DatastarKey %}";
export const DATASTAR_EVENT = "{%s data.DatastarKey %}-event";
export const DATASTAR_REQUEST = "{%s toolbelt.Pascal( data.DatastarKey) %}-Request";
export const VERSION = "{%s data.Version %}";

// #region Defaults

Expand Down
8 changes: 4 additions & 4 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.

14 changes: 14 additions & 0 deletions bundles/datastar.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions bundles/datastar.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion library/src/engine/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const DSS = lol.slice(4)
export const DATASTAR = "datastar";
export const DATASTAR_EVENT = "datastar-event";
export const DATASTAR_REQUEST = "Datastar-Request";
export const VERSION = "1.0.0-beta.2";

// #region Defaults

Expand Down
6 changes: 1 addition & 5 deletions library/src/engine/engine.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Hash, elUniqId } from '../utils/dom'
import { camelize } from '../utils/text'
import { effect } from '../vendored/preact-core'
import { DSP, DSS, VERSION } from './consts'
import { DSP, DSS } from './consts'
import { initErr, runtimeErr } from './errors'
import { SignalsRoot } from './signals'
import {
Expand Down Expand Up @@ -32,10 +32,6 @@ export class Engine {
return this.#signals
}

get version() {
return VERSION
}

public load(...pluginsToLoad: DatastarPlugin[]) {
for (const plugin of pluginsToLoad) {
const that = this // I hate javascript
Expand Down
4 changes: 2 additions & 2 deletions sdk/go/consts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions site/static/md/reference/javascript_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,4 @@ The signal root, on which you can access signal methods. Beware that you should

```js
Datastar.signals.values()
```

### `version`

The current version number.

```js
Datastar.version
```

0 comments on commit 490a26f

Please sign in to comment.