Skip to content

Commit

Permalink
Define do/1 to be a synonym for action/1, fixes StoneCypher/fsl#809
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneCypher committed Jul 8, 2022
1 parent 2c633a6 commit 4623580
Show file tree
Hide file tree
Showing 27 changed files with 294 additions and 97 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.long.md
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

962 merges; 129 releases
963 merges; 129 releases



Expand All @@ -18,6 +18,21 @@ Published tags:



 

 

## [Untagged] - 7/7/2022 10:11:44 PM

Commit [2c633a61b2ee0f13583ddc85923596f6b473abe6](https://github.com/StoneCypher/jssm/commit/2c633a61b2ee0f13583ddc85923596f6b473abe6)

Author: `John Haugeland <stonecypher@gmail.com>`

* Define go/1 to be a synonym for transition/1, fixes StoneCypher/fsl#810




&nbsp;

&nbsp;
Expand Down
34 changes: 17 additions & 17 deletions CHANGELOG.md
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

962 merges; 129 releases; Changlogging the last 10 commits; Full changelog at [CHANGELOG.long.md](CHANGELOG.long.md)
963 merges; 129 releases; Changlogging the last 10 commits; Full changelog at [CHANGELOG.long.md](CHANGELOG.long.md)



Expand All @@ -18,6 +18,21 @@ Published tags:



&nbsp;

&nbsp;

## [Untagged] - 7/7/2022 10:11:44 PM

Commit [2c633a61b2ee0f13583ddc85923596f6b473abe6](https://github.com/StoneCypher/jssm/commit/2c633a61b2ee0f13583ddc85923596f6b473abe6)

Author: `John Haugeland <stonecypher@gmail.com>`

* Define go/1 to be a synonym for transition/1, fixes StoneCypher/fsl#810




&nbsp;

&nbsp;
Expand Down Expand Up @@ -160,19 +175,4 @@ Commit [86706ce989f8651b79f58dce6cf2511f43fa0629](https://github.com/StoneCypher

Author: `John Haugeland <stonecypher@gmail.com>`

* First draft of the KSD already caught a bug, removes equals from followup atom characters, fixes StoneCypher/fsl#993




&nbsp;

&nbsp;

## [Untagged] - 7/3/2022 2:16:27 PM

Commit [604f0dda3438d81a9209013d77caccc3b89cdd20](https://github.com/StoneCypher/jssm/commit/604f0dda3438d81a9209013d77caccc3b89cdd20)

Author: `John Haugeland <stonecypher@gmail.com>`

* Update typescript, typedoc, and the two typescript-eslint plugins
* First draft of the KSD already caught a bug, removes equals from followup atom characters, fixes StoneCypher/fsl#993
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -18,7 +18,7 @@ Please edit the file it's derived from, instead: `./src/md/readme_base.md`
* Generated for version 5.77.0 at 7/7/2022, 10:10:35 PM
* Generated for version 5.77.1 at 7/7/2022, 10:15:01 PM
-->
# jssm
Expand All @@ -29,7 +29,7 @@ share online. Easy to embed.

Readable, useful state machines as one-liner strings.

***4,665 tests*** run 5,556 times. 4,656 specs with 100.0% coverage, 9 fuzz tests with 5.4% coverage. With 1,725 lines, that's about 2.7 tests per line, or 3.2 generated tests per line.
***4,666 tests*** run 5,557 times. 4,657 specs with 100.0% coverage, 9 fuzz tests with 5.4% coverage. With 1,728 lines, that's about 2.7 tests per line, or 3.2 generated tests per line.

***Meet your new state machine library.***

Expand Down
22 changes: 21 additions & 1 deletion dist/es6/jssm.d.ts
Expand Up @@ -665,7 +665,7 @@ declare class Machine<mDT> {
set history_length(to: number);
/********
*
* Instruct the machine to complete an action.
* Instruct the machine to complete an action. Synonym for {@link do}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
Expand All @@ -683,6 +683,26 @@ declare class Machine<mDT> {
*
*/
action(actionName: StateType, newData?: mDT): boolean;
/********
*
* Instruct the machine to complete an action. Synonym for {@link action}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
*
* light.state(); // 'red'
* light.do('next'); // true
* light.state(); // 'green'
* ```
*
* @typeparam mDT The type of the machine data member; usually omitted
*
* @param actionName The action to engage
*
* @param newData The data change to insert during the action
*
*/
do(actionName: StateType, newData?: mDT): boolean;
/********
*
* Instruct the machine to complete a transition. Synonym for {@link go}.
Expand Down
24 changes: 23 additions & 1 deletion dist/es6/jssm.js
Expand Up @@ -1724,7 +1724,7 @@ class Machine {
}
/********
*
* Instruct the machine to complete an action.
* Instruct the machine to complete an action. Synonym for {@link do}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
Expand All @@ -1744,6 +1744,28 @@ class Machine {
action(actionName, newData) {
return this.transition_impl(actionName, newData, false, true);
}
/********
*
* Instruct the machine to complete an action. Synonym for {@link action}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
*
* light.state(); // 'red'
* light.do('next'); // true
* light.state(); // 'green'
* ```
*
* @typeparam mDT The type of the machine data member; usually omitted
*
* @param actionName The action to engage
*
* @param newData The data change to insert during the action
*
*/
do(actionName, newData) {
return this.transition_impl(actionName, newData, false, true);
}
/********
*
* Instruct the machine to complete a transition. Synonym for {@link go}.
Expand Down
2 changes: 1 addition & 1 deletion dist/es6/version.js
@@ -1,2 +1,2 @@
const version = "5.77.0";
const version = "5.77.1";
export { version };
2 changes: 1 addition & 1 deletion dist/jssm.es5.cjs.js

Large diffs are not rendered by default.

26 changes: 24 additions & 2 deletions dist/jssm.es5.cjs.nonmin.js
Expand Up @@ -16785,7 +16785,7 @@ function peg$parse(input, options) {
}
}

const version = "5.77.0";
const version = "5.77.1";

class JssmError extends Error {
constructor(machine, message, JEEI) {
Expand Down Expand Up @@ -18533,7 +18533,7 @@ class Machine {
}
/********
*
* Instruct the machine to complete an action.
* Instruct the machine to complete an action. Synonym for {@link do}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
Expand All @@ -18553,6 +18553,28 @@ class Machine {
action(actionName, newData) {
return this.transition_impl(actionName, newData, false, true);
}
/********
*
* Instruct the machine to complete an action. Synonym for {@link action}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
*
* light.state(); // 'red'
* light.do('next'); // true
* light.state(); // 'green'
* ```
*
* @typeparam mDT The type of the machine data member; usually omitted
*
* @param actionName The action to engage
*
* @param newData The data change to insert during the action
*
*/
do(actionName, newData) {
return this.transition_impl(actionName, newData, false, true);
}
/********
*
* Instruct the machine to complete a transition. Synonym for {@link go}.
Expand Down
2 changes: 1 addition & 1 deletion dist/jssm.es5.iife.js

Large diffs are not rendered by default.

26 changes: 24 additions & 2 deletions dist/jssm.es5.iife.nonmin.js
Expand Up @@ -16784,7 +16784,7 @@ var jssm = (function (exports) {
}
}

const version = "5.77.0";
const version = "5.77.1";

class JssmError extends Error {
constructor(machine, message, JEEI) {
Expand Down Expand Up @@ -18532,7 +18532,7 @@ var jssm = (function (exports) {
}
/********
*
* Instruct the machine to complete an action.
* Instruct the machine to complete an action. Synonym for {@link do}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
Expand All @@ -18552,6 +18552,28 @@ var jssm = (function (exports) {
action(actionName, newData) {
return this.transition_impl(actionName, newData, false, true);
}
/********
*
* Instruct the machine to complete an action. Synonym for {@link action}.
*
* ```typescript
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
*
* light.state(); // 'red'
* light.do('next'); // true
* light.state(); // 'green'
* ```
*
* @typeparam mDT The type of the machine data member; usually omitted
*
* @param actionName The action to engage
*
* @param newData The data change to insert during the action
*
*/
do(actionName, newData) {
return this.transition_impl(actionName, newData, false, true);
}
/********
*
* Instruct the machine to complete a transition. Synonym for {@link go}.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/assets/search.js

Large diffs are not rendered by default.

54 changes: 31 additions & 23 deletions docs/docs/classes/jssm.Machine.html

Large diffs are not rendered by default.

0 comments on commit 4623580

Please sign in to comment.