Skip to content

Commit a33a414

Browse files
authored
Merge pull request #22 from aneshodza/feature/release-1.2.0
Add changelog and package.json, etc...
2 parents 7f9fe37 + b61a4ec commit a33a414

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ automaton.addEndState(otherState);
6666
*/
6767
let successful: boolean;
6868
successful = automaton.run();
69+
70+
/*
71+
* 7. In case you want a function to run after every state change
72+
*/
73+
const someFunction = (automaton) => {
74+
// Do some stuff here
75+
}
76+
pushdownAutomaton.addOperation(someFunction);
6977
```
7078

7179
#### Return values of `run()`

docs/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.2.0] - 2024-04-20
9+
### Fixed
10+
- Properly fix the building CI. There was a confucion between cjs and esm, which has now been resolved.
11+
- The termination message import (or lack thereof) was messing when using the library.
12+
### Added
13+
- The option for a different initial character on the stack
14+
815
## [1.1.3] - 2024-04-20
916
### Fixed
10-
- Fixed the publishing again CI, as it didn't build before publishing.
17+
- Fixed the publishing CI again, as it didn't build before publishing.
1118

1219
## [1.1.2] - 2024-04-20
1320
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pushdown-automaton",
3-
"version": "1.1.3",
3+
"version": "1.2.0",
44
"description": "A library that allows you to create a deterministic pushdown automaton",
55
"main": "out/index.js",
66
"types": "out/index.d.ts",

tests/unit_tests/pushdown_automaton.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ test("Initializes the automata with a stack", () => {
2222
expect(automata.stack).toBeDefined();
2323
});
2424

25+
test("Allows the initial stack character to be set", () => {
26+
automata = new PushdownAutomaton("test", "default");
27+
expect(automata.stack.stackValues).toStrictEqual(["default"]);
28+
});
29+
2530
test("Takes in the correct input", () => {
2631
expect(automata.inputWord).toBe("test");
2732
});

0 commit comments

Comments
 (0)