Releases: sindrekjr/sentence-engine
Releases · sindrekjr/sentence-engine
0.8.0
0.7.0
Breaking 💥
- Changed various types and interfaces
- Removed method
restoreDefaults
fromSentenceFactory
Features 🎉
- Added needlessly complex esm build process
- Added automatic type declarations to compile
- Added following types to exports:
Template
Vocabulary
Options
Configuration
StringResolvable
WeightedEntry
Bugfixes 🐛
- Fixed various issues/bugs with special characters in placeholder notation
0.6.1
0.6.0 - Weighted Types
Breaking 💥
- Changed method
addVocab
toaddVocabulary
in classSentence
- Removed method
setOptions
in classSentence
- Removed option
allowDuplicates
Features 🎉
- Added type
WeightedTemplate
- Added type
WeightedVocabulary
- Added type
WeightedEntry
- Added setter
options
inSentence
- Added getter
weightedTemplates
inSentence
- Added getter
weightedVocabulary
inSentence
- Changed resolution of duplicates so that they simply increases the given entry's weight
Bugfixes 🐛
- Fix
addVocabulary
so that it appends instead of overwriting
0.5.2 - StringResolvable
Features 🎉
- Added type
StringResolvable
- Change type
Template
to accept StringResolvable - Change type
Vocabulary
to accept StringResolvable
0.5.1 - Bugfix
🐛 Fix issue where option forceNewSentence
had no effect
0.5.0 - TypeScript
Breaking 💥
- Refactored entire project to TypeScript
- Removed default export, usage should now defer to importing
createSentence
for the default behaviour - Removed or changed all other exports
Features 🎉
- Added class
Sentence
to exports - Added class
SentenceFactory
to exports
See README for further details on usage.
0.4.2 - 11.08.2020
Documentation
- 🔩 Change package keywords
- 🔩 Change package description
- 🔩 Change README
0.4.1 - 30.07.2020
- 🎉 New option
allowDuplicates
now functions as expected - 🎉 New option
capitalize
now functions as expected - 🎉 New option
placeholderNotation
- 💥 Changed option
preserveCurlyBrackets
topreservePlaceholderNotation
- 🐛 Fix
setOptions
so that it no longer resets unspecified options to previous defaults
0.4.0 - 26.07.2020
Features
- 🎉 New option
forceNewSentence
, which will forceSentence.generate()
to avoid duplicate of previous sentence when possible - 🎉 New method
restoreDefaults()
available at entry point
Development
- 🔩 Add jest for testing
- 🔩 Add eslint for linting
- 🔩 Add .npmignore
- 🔩 Add Github Workflows for CI/CD
- 🔩 Change validation to module
validator
- 🔩 Change defaults to module
defaults
- 🔩 Various other changes and improvements to readability and encapsulation