Release Notes - craterdog-archives/js-bali-component-framework GitHub Wiki
- Updated the package dependencies to the latest versions.
- Fixed a problem with the parsing of narratives.
- Fixed some HTML formatting problems.
- Optimized the processing of narratives with a
isNarrative
flag in theText
class.
- Generalized the language grammar
NARRATIVE
token rule to allow nested narratives.
- Replaced the
moment.js
package dependency with native date, time and duration implementations. - Added more unit tests for all possible months, days, hours, minutes and seconds to the
Moment
class tests. - Added support for the extended year ISO 8601 timestamp format with positive and negative year values up to 6 digits in length.
- Changed the language grammar for the
checkoutClause
rule to have the key word "at level" instead of "at". This resolves the previous keyword conflict but makes the clause more readable.
- Renamed the
Version.validNextVersion()
method toVersion.validNext()
. - Changed the language grammar for the
signClause
andcheckoutClause
rules to free up the 'sign' and 'level' keywords since both are likely to be used as argument and variable names.
- Cleaned up the
Pattern.matchesString()
method and theComparator.doesMatch()
methods so that they are not confused with each other. - Restricted the language grammar rule for a
LABEL
token to only start with a letter or digit. - Changed language grammar to require at least one base 32 digit in a
TAG
token.
- Changed the
src/abstractions/Component.toBoolean()
method tosrc/abstractions/Component.isSignificant()
since it is making that determination rather than converting the value to a boolean. - Added a
/bali/interfaces/Polarized
interface with anisNegative()
method. - Added support for the new
/bali/interfaces/Polarized
interface to theAngle
,Duration
,Number
, andPercentage
element classes. - Removed the
toReal()
method from thesrc/elements/Boolean
class.
- Removed the
src/interfaces/Reflective
interface since only thesrc/abstractions/Component
class supported it. - Changed the
index
parameter in theList.insertItem(index, item)
andList.insertItems(index, items)
methods to be theslot
number before the item in the list.
- Moved the
comparator
parameter out of theSorter
agent constructors and into thesortCollection()
method. - Moved the parameters out of the
Formatter
agent constructors and into the methods.
- Changed the return type of the
Catalog.removeAttributes()
method back toList
.
- Generalized the
containsX()
,getXs()
andremoveXs()
methods to take sequences of indices instead of ranges.
- Renamed the
Collection.removeAll()
method toCollection.emptyCollection()
since it doesn't return the removed items like other remove methods.
- Added a
title
parameter to thesrc/agents/HTMLFormatter()
constructor. - Adjusted the HTML formatting for binary strings.
- Made the return values for all collection
remove...()
methods consistent.
- Changed the HTML footer to be the full transparent craterdog logo.
- Fixed a bug in the
BDNParser.visitCatalog()
andBDNParser.visitList()
visitor methods where any additional type parameterization was being used in the type comparisons. - Fixed a bug in the
Queue
,Set
andStack
constructors where any additional parameterizations was being stripped off.
- Fixed various problems with the
HTMLFormatter
agent.
- Fixed a bug in the
Visitor.visitComponent()
method where name collisions could occur with type names.
- Disallowed an
undefined
argument to theCollection.addItems(items)
method. - Refactored the
Exception
attribute structure. - Added double quotes around all
$text
attributes in exceptions to avoid an unneeded parsing attempt.
- Fixed a bug in the
Component.validateArgument()
function where the function was returning afalse
boolean rather than throwing an exception.
- Cleaned up confusing code in parsing exceptions.
- Added unit tests for formatting and parsing iterators. The node iterator cannot be formatted into a legal grammatical construct so it does not support formatting.
- Fixed problems with how iterators handle negative slots.
- Fixed a bug in how the
src/collections/Catalog
constructor sets the type. It was using any type specified in the parameters as the type, but should always be/bali/collections/Catalog
so that the visitors work correctly. - Now exporting the
bali.component.validateArgument()
andbali.component.normalizedIndex()
functions in the mainindex.js
file.
- Fixed incorrect type names for all strings.
- Renamed the
Decoder
"base2" references to "base02" so that the bases sort correctly.
- Attempted to make Exception inherit from both Component and Error. This works fairly well.
- Fixed a bug in the
Exception
constructor that made it impossible to print itself out correctly.
- Added support for the
Exception
class,CanonicalComparator
andMergeSorter
agents as components to all visitors. - Updated the
cause
processing within theException
class. - Moved the
Exception
class to be collocated with theComponent
class. Moved theValidator
methods to theComponent
class as methods and functions. - Moved the decision on whether or not to log an exception into the
Exception
constructor function. - Added missing validation calls to the methods and functions that take parameters.
- Refactored the abstract methods a bit to be more maintainable.
- Added some missing exception cases for some abstract and collection classes.
- Removed the
debug
argument fromComponent.componentize(value)
method since it is already available from the this pointer for the component. - Added comparison tests for internal vs external sorting to make sure the results were the same.
- Removed the
bali.bdn()
,bali.duplicator()
, andbali.parser()
functions from the Bali API. - Moved the
Iterator
implementation back into theCollection
class and generalized it for all collections except theRange
class which has its own iterator.
- Added convenience functions to the Bali API for each agent method.
- Refactored the agent framework to have the abstract pattern classes in the
src/abstractions/
directory and the concrete agent implementations in thesrc/agents/
directory. - Changed
Comparator.compareComponents()
toComparator.ranking()
. - Removed the
bali.type(object)
function from the API in the index.js file since it gets confused with theComponent.getType()
method. - Cleaned up the dependencies between types of classes and made sure that the only two
circular dependencies (in the
Component.toString()
andComponent.componentize(object)
methods) are bound to the class at the end in the top level index.js file.
- Moved the
src/abstractions/Iterator
andsrc/abstractions/Visitor
classes to thesrc/agents/
directory. - The
src/agents/Iterator
class is no longer a subclass ofsrc/abstractions/Component
. - Refactored the visitor pattern implementation to be simpler by using reflection.
- Changed
sortItems(comparator)
tosortItems(sorter)
.
- Changed the
algorithm
parameter tocomparator
in all sorting.
- Removed the
getIndex(item)
method from the/bali/interfaces/Sequential
interface.
- Moved the
src/trees/Exception
class tosrc/agents/Exception
.
- Removed the
src/abstractions/Composite
class since it added not concrete methods. - Moved the
src/composites/Node
andsrc/composites/Procedure
to a newsrc/trees/
directory. - Moved the
src/compositesAssociation
to thesrc/collections/
directory. - Renamed the
/bali/interfaces/Structural
interface to/bali/interfaces/Composite
.
- Removed the
toLiteral()
method fromsrc/collections/Range
class since it can now contain expressions as endpoints. - Renamed the
concatenation()
function tochain()
.
- Refactored the
src/composites/Range
class to be a collectionsrc/collections/Range
that accepts expressions for its first and last items. - Reversed the second and third parameters in the new
src/collections/Range
constructor. - Added
Range.setFirst(value)
andRange.setLast(value)
methods to thesrc/collections/Range
class.
- Generalized the language grammar for lists and catalogs to allow expressions for their values.
- Renamed the
src/utilities/
directory tosrc/agents/
to match the Bali Nebula™ naming conventions.
- Cleaned up the natural algorithm in the
src/utilities/Comparator
class. - Added
<..<
,<..
and..<
connectors to the existing..
range connector to implement exclusive bounds at either end. - Refactored the language grammar to allow negative constant floating point numbers like
-π
and-e
.
- Fixed a bug in the
src/utilities/Comparator
class which cast various component types into numbers rather than comparing the types of components with different types.
- Added functionality to the
Visitor.visitEvaluationClause()
methods that handles the+=
,-=
, and*=
operators.
- Renamed the
/bali/interfaces/Composite
interface to/bali/interfaces/Structural
. - Renamed the
src/abstractions/Structure
class tosrc/abstractions/Composite
.
- Renamed the
src/abstractions/Sequence
class tosrc/abstractions/String
. - Added a
/bali/libraries/Radial
function library to thesrc/elements/Angle
class.
- Renamed the
src/elements/Complex
class tosrc/elements/Number
. - Split out a new
src/elements/Boolean
class fromsrc/elements/Probability
.
- Removed
getParent()
method from theTree
class since a child node can be shared by multiple parents. - Renamed the
Tree
class toNode
since that is what they are.
- Fixed an erroneous type name in the
Validator
class. - Added support for the
/bali/interfaces/Discrete
interface to theProbability
class. ThetoInteger()
method now returns a zero or one. - Added the missing
duplicate()
method to theException
class. - Split out the methods in
Component
andException
by interface. - Changed the
/bali/interfaces/Numerical
interface to/bali/interfaces/Continuous
, and thetoNumber()
method totoReal()
since a Bali Number is a complex number. - Fixed bug in the formatting of complex numbers in polar form.
- Renamed the element
Percent
toPercentage
which is a noun instead of an adverb. - Removed the unused
/bali/interfaces/Procedural
interface from theTree
class. - Renamed the element
Reference
toResource
and the tokenTYPE
toLABEL
in the language grammar. - Added a unit test for variable length tags.
- Added a concrete implementation of the
getSize()
method to theCollection
abstract class. - Moved the
Tree
class fromsrc/collections
tosrc/structures
since it is not a collection. - Removed the
interfaces
parameter from theIterator
constructor signature. - Added a
StringIterator
to theSequence
class that works for all subclasses. - Exported the
Collection.Iterator
class and now theRange.getIterator()
method returns it.
- Changed the
commit
document clause to asign
contract clause to be consistent with the document repository API.
- Added a
source
top level rule to the grammar to allow proper parsing of a Bali Document Notation™ string rather than adocument
. This fixes a bug where the string being parsed is only partially read before a matching component is found.
- Changed the
activity
rule in the language grammar tocode
since it is a much better term. Code anthropologists are going to have fun with this one!
- Tightened up the grammar definition for a
document
so that it forces POSIX text file compliance. - The
Component.toHTML()
andComponent.toDocument()
methods now append the required EOL character to the generated text documents.
- Renamed the
action
rule toactivity
in the language grammar to make it a bit more clear.
- Made comments (e.g.
/*
,*/
blocks) into parse tree components so that they are preserved during parse-format round trips. - Allow notes (e.g.
-- This is a note
) at the end of any component. The notes too will be preserved during parse-format round trips.
- Changed the
statements
rule in the language grammar toaction
to better reflect the fact that it is a tree structure rather than a list of statements.
- Changed the
Range
element from aSequential
type toStructure
component. - Generalized the first and last values of a
Range
to be anyElement
. - The constructor for
Range
now takes afirst
andlast
argument instead of an array. - Added
bali/interfaces/Literal
andbali/interfaces/Sequential
interface support to theRange
structure. -
Range.getIterator()
will throw an exception if the first and last elements of the range are not integers.
- Added a
/bali/interfaces/Discrete
interface to theComplex
type. This supports thetoInteger()
method.
- Changed the path 'types' to 'abstractions' to be consistent with the bali naming and to avoid confusion with the bali meta types.
- Another patch to revert the change of
Complex.toNumber()
returning the magnitude back to returning the real part. Otherwise, negative real numbers come back positive.
- Added missing changes from last release as a patch:
Catalog.getValues(...)
toCatalog.getAttributes(...)
andCatalog.removeValue(...)
toCatalog.removeAttribute(...)
.
- Merged the
Composite.[gs]etValue(...)
andStructure.[gs]etSubcomponent(...)
methods into a newComposite.[gs]etAttribute()
method since they implemented the same functionality and were causing confusion with theElement.getValue()
method. - Fixed bug in
Complex.toNumber()
which was returning only the real part rather than the magnitude. - Added in the missing reciprocal operation to inversion expressions in the language grammar.
- Updated to the latest versions all dependencies except antr4 which forces ES6 modules after version 4.8.
- Fixed bug in how
Catalog
constructor handles a type parameter.
- Fixed a bug in
Catalog
where a$type
parameter was not being integrated into the ancestry.
- Renamed the
'receive' message
statement to'retrieve' message
to be consistent with the other repository retrieval methods.
- Added an optional
('as' recipient)?
part to the'save' expression
grammar rule. The resulting draft citation will be stored in the recipient.
- Added back in the
Structure
abstract class for theAssociation
,Procedure
, andException
classes to inherit from.
- Changed the
Exception.toString()
method to include the native stack trace when there is a javascript exception as the cause. - Updated the document repository related language statement grammar to reflect the latest changes to the repository API and the VM.
- Added many more unit test cases for the
Comparator
class. - Made the natural algorithm defined in the
Comparator
class more general and accurate. - Fixed several bugs in the
Range
andComparator
classes when dealing with zero values that were being treated asundefined
. - Added the missing
Exception
import in theRange
class.
- Fixed an HTML formatting bug for
Range
parameters. - Found an elegant way to allow a component's parameters to be stored as a
Catalog
instead of a JavaScriptObject
without introducing circular dependencies. - Simplified the language grammar for handle clauses.
- Added a
toLiteral()
method to theElement
andProcedure
classes for use by the VM. - Converted the
Complex
,Duration
,Moment
andRange
constructors to take a value type that is the same as what is returned from getValue(). This makes duplicating elements more consistent.
- Fixed a bug in how keys are created when converting an object into a catalog.
- Added methods to the
Duration
class to retrieve parts of the duration.
- Added methods to the
Moment
class to retrieve parts of the time.
- Removed the
Reserved
element class since it is not really needed anymore.
- Added the
Symbol
andReserved
elements as additional subclasses of the abstractSequence
class.
- Added an abstract
Sequence
class that theBinary
,Name
,Range
,Text
, andVersion
element classes inherit from. This adds thegetItem(index)
andgetItems(range)
methods to those classes.
- Fixed a small bug in the
Decoder
constructor where an undefinedindentation
was not handled correctly.
- Fixed a bug in
List.removeItems(range)
where the items were being removed in order which changes the indexing. They must be removed last to first in the range.
- Fixed some bugs in the
getSubcomponent()
and thesetSubcomponent()
methods. The index that was passed in is an element and must be converted to a number for some types of collections.
- Redesigned the
Range
class and made it anElement
instead of aCollection
to address the many issues that arose from the previous design. - Moved the
removeAll()
method toCollection
class since is now implemented by all collections.
- Added a
Composite
interface that supportsgetSubcomponent(index)
andsetSubcomponent(index, subcomponent)
methods. TheStructure
,List
andCatalog
classes support this interface. This interface is only useful for the compiler and virtual machine.
- Renamed the
Composite
class toStructure
and theabstractions
directory totypes
. - Added a default implementation to
Collection.getItem(index)
which uses the iterator to go directly to the requested index.
- Changed all text based expression operators to all uppercase to avoid name collisions with their
intrinsic function counterparts. The new operators are
IS
,MATCHES
,NOT
,AND
,SANS
,OR
, andXOR
. - Renamed the
queue <message>
statement topost <message>
to avoid a naming collision between thequeue
keyword and thequeue()
intrinsic function name. The symantics remain the same.
- Added a second
<-
operator to themessageExpression
rule grammar for asynchronous message passing to complement the existing.
operator for synchronous message passing.
- Added the missing
new
keyword toGenerator
andSorter
constructor calls within some functions. - Changed the
Version.nextVersion()
andVersion.validNextVersion()
methods into class functions. - Fixed a bug in the
Calculator
class where zero significant digits was getting calculated. - Fixed bugs in the
Collection.addItem()
method and added aRange.addItem()
implement that throws a more specific exception when it is called.
- Fixed a bug in the
index.type(component)
function. - Added some missing interfaces.
- Added some missing arguments to the
index.tree()
function. - Moved the
addItem(item)
andaddItems(items)
methods to thebali.Collection
class. - Fixed an erroneous comment in the bali
Catalog.extraction()
method.
- Refactored the
Iterator
class into an abstract class that is now inherited by all iterator classes.
- Updated the generated HTML header to use the latest
bali-nebula.net
images and icons.
- Fixed bugs in how the
Probability
class handles booleans passed into its constructor.
- Fixed an error in the path for the favicon.ico file when generating HTML.
- Modified the HTML generated by the HTML formatter class to enhance the readability of different element types.
- Added a link behind each
name
in a generated HTML document. The link can be used by a browser to retrieve the notarized document associated with the name.
- Added a meta tag to the header for the HTML formatted output that sets the character set to UTF-8.
- Added an explicit link reference to the favicon.
- Having the repository service serve up the static content for the HTML formatter was too slow.
It is now served up by a seperate API Gateway instance that connects directly to the S3 bucket
holding the content. This required a change to the URI for the static content. It is now
https://bali-nebula.net/static/*
.
- Fixed error in the location of the static resources for the HTML formatter, the correct path is
https://bali-nebula.net/repository/statics/
.
- Changed the location of the static resources for the HTML formatter to be in
https://bali-nebula.net/statics/
.
- Added a check for a configurator directory that does not end with
/
and fixes it if necessary.
- Changed "Powered By" logo and style sheet for HTML formatting to use the Bali Nebula™ site.
- Fixed bug in language grammar definition for
name
that rejected digits following a slash. - Removed
Component.format()
andComponent.html()
methods that were deprecated.
- Added a missing
this
pointer to anonymous functions that attempt to referencethis.debug
.
- Changed font family for HTML style sheet to be Roboto to address formatting issues.
- Deprecated
Component.format()
andComponent.html()
, and replaced them with 'Component.toBDN()' and 'Component.toHTML()'.
- Cleaned up some formatting issues with the new HTML formatter class.
- Fixed a bugs in the language grammar for Bali Document Notation™ that allowed components to be used as endpoints in a range instead of restricting them to just element types.
- Added a new
HTML
utility class and aComponent.html(style)
method that returns a static web page for the component using the specified link to a CSS style sheet.
- Fixed bugs in the language grammar for Bali Document Notation™ that allowed expressions to be used as values in structural components. The structural components cannot contain expressions since they are declarative and there is no virtual machine to evaluate them.
- Added language grammar support to the Bali Document Notation™ for the symbols
∞
,π
,φ
, andτ
, the last being equivalent to the value of2π
per the Tau Manifesto. The new symbols map to the existing values defined for the language: -
∞
:infinity
-
π
:pi
-
φ
:phi
-
τ
:2 * pi
- This is the first release of
v2
of the framework. The framework is ready for general use. - It's public interfaces should now be stable, though it is far from bug-free.
- From here on out, a minor release (e.g.
v2.x
) should only add new functionality and bug fixes, it should not break existing code that uses it. - Each dot release (e.g.
v2.x.y
) will be for urgent bug fixes. - There will be
v2
releases for the rest of the Bali Nebula™ repositories that depend on the Bali Component Framework™ over the next few months.
NOTE: To view the release notes from v1
of the framework, click here.