This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
V1 Release Notes
Derk Norton edited this page Aug 15, 2021
·
5 revisions
- Added parameter validation to most methods.
- Modified the language grammar to split out the
parameters
rule into two rules,parameters
which only allows acatalog
, andarguments
which only allows alist
. Components are still parameterized, but functions and messages take arguments instead of parameters. Changed theindices
rule to allow either alist
of keys or arange
of keys. - Removed an indentation option of
-1
for inlining and removedAngle.toDegrees()
,Angle.toRadians()
,Binary.toBaseXX()
,Complex.toRectangular()
, andComplex.toPolar()
methods. - Added missing
toArray()
method tobali.Tree
class. - Removed the
setParameters()
method from theComponent
class. - Removed the
bali.literal()
function from the interface.
- Filled in missing parameter type checking throughout the framework.
- Added methods to components that determine their meta types and the interfaces they support.
- Removed the
bali.types
module to simplify the access to component type information. - Turned the
bali.Exception
class into a truebali.Structure
component so that it can be used as both a JavaScriptError
and a Bali Nebula™ component.
- Updated the top level
visitor
export to point to the correct subdirectory.
- Added a new finite state automata (FSA)
utilities.Automaton
class that can be used to enforce state machines. - Moved
utilities.Visitor
toabstractions.Visitor
andutilities.Exception
tostructures.Exception
to better match their purposes. - Added missing
tree()
andsource()
functions to top level index.js file. - Eliminated another possible circular dependency between the top level
convert()
function and thestructures.Exception
class.
- Fixed bug in top level
index.js
file for validating the type of thecause
parameter in thebali.exception()
implementation.
- Added an
export
of thebali.utilities.Visitor
class asbali.visitor
in the top levelindex.js
file.
- Added support for more interface types in the private
validateType()
function. - Fixed a bug in the private function
validateType()
when anundefined
value is passed as the argument.
- Simplified and alphabetized the public interface to the module.
- Added parameter type validation checks to all public functions.
- Fixed bug that occurs when an
bali.exception()
is created using bad attributes.
- Fixed reference problems in the top-level index.js file.
- Update base dependencies.
- Removed unused parameter from the base 32 decoder.
- Simplified the names of some base 32 private functions.
- Updated the package dependencies for
antlr4
andmoment
.
- Replaced symbols with global names for type and module attributes since both require a global namespace.
- Added a
NAME
token andname
element to represent global naming of directories and versioned documents. - Added a
bali.Name.concatenation()
function and unit testing for thebali.Name
class. - Merged the
UNICODE
grammar token with theCHARACTER
token to avoid confusion.
- Fixed bugs in
bali.Catalog.concatenation()
andbali.Catalog.extraction()
where the catalog parameters were not being preserved in the resulting catalog.
- Changed the
bali.catalog({...})
function to allow object key strings that don't include the '$' prefix. The function now inserts the '$' as needed. This makes example code more understandable to traditional javascript programmers who are not used to seeing object keys beginning with '$'.
- Fixed a typo in the README.md file.
- Added missing documentation to the index.js file.
- Added a
$module
attribute tobali.Exception
and updated theException.toString()
method to print out the chain of exceptions. - Renamed some of the attribute keys in the
bali.Exception
attributes to be more consistent.
- Changed formatter
indentation
parameter from a string containing the indentation to a number representing the number of levels to indent the top level. - Added the ability to do inline formatting by passing a value of
-1
as theindentation
parameter to the formatter.
- Fixed bug in language grammar that did not accept a zero as the last decimal of a fraction. This affected the
bali.Probability
,bali.Number
,bali.Percentage
,bali.Moment
, andbali.Duration
element types.
- Renamed the
$function
exception attribute to$procedure
since it is a more general term for a function or method.
- Reversed the order of the parameters in the
bali.Set()
constructor to be consistent with other collections and fix a bug in thebali.Collection.getItems()
method. Also fixed bugs inbali.Set
,bali.Stack
andbali.Queue
constructors where the type of the collection was not getting set in the parameters. - Added a
bali.Duplicator
class for doing deep copies of components. - Fixed bug with the
bali.Formatter
which couldn't handle parameters containing abali.Range
as its collection. - Moved the
Component.getType()
method out of this project since it really belongs in thebali-virtual-machine
project. - Added a
Parser.parseComponent()
method for parsing a single component from a string containing multiple components rather than a document containing just one component. - Changed
bali.Moment
class to default to UTC timezone for all times. - Replaced all
throw new Error()
statements withthrow new utilities.Exception()
to make exception handling consistent throughout and much easier to understand what is causing an exception. - Added encoding and decoding of the '#' character in the body of a
bali.Reference
containing a citation. Otherwise, the string after the hash character is interpreted as the URI fragment. - Added getters to the
bali.Reference
class for the different components of the URI.
- Refactored the top level
index.js
file to provide a much simpler and easy to use interface to all of the component classes and utilities. - Moved all formatting into the
bali.Formatter
class instead of having formatting functionality in the element classes. The parser and formatter are now completely symmetrical. - Changed the
bali.Formatter
to calculate the inlining on the fly instead of the less accurate way based on pre-calculated complexities of each component. - Made all private attributes hidden by defining the methods that use them in the constructor rather than on the prototype.
- Replaced the precision constants
PI
,E
, andPHI
withMath.PI
,Math.E
and a newMath.PHI
constant. - Added implementation of
baliDuration.inverse(duration)
and associated unit tests. - Added functions to the
bali.Moment
class. - Fixed bugs in the
bali.Comparator
class. It wasn't handling booleans and numbers correctly. - Fixed problem with the language grammar for negative time durations.
- Removed the ability for the
bali.Binary()
constructor to create a random byte string. Pass inbali.random.bytes(size)
to the constructor instead for consistency. - Merged
bali.Parameters.getValue()
andbali.Parameters.getParameter()
to make it simpler and more intuitive. - Changed
bali.Tag.getNumberOfBytes()
tobali.Tag.getSize()
for consistency even though the number of bytes is not the same as the number of base 32 characters. The number bytes is the more important aspect from a collision estimation perspective. - Removed redundant
bali.Probability.coinToss()
method. - Renamed the
bali.Collection.clear()
method tobali.Collection.deleteAll()
to be consistent with the naming conventions. - Swapped
bali.Component.matches()
andbali.Pattern.isMatchedBy()
method names to be consistent with the naming conventions. - Refactored the new
bali.Component.isMatchedBy(pattern)
method and added some unit tests for it.
- Added custom
bali.Binary.comparedTo(that)
method. - Fixed a bug in
bali.Element.literalToNumber(literal)
where negative constants were not converted correctly. - Removed the check on first and last values from the range constructor so that it works with variables.
- Added full support for parameterized ranges that constrain the items in a collection.
- Fixed issues in the
bali.Exception
class that kept it from printing out any message or stack trace.
- Added a
Component.toBoolean()
method that can be used by the Bali Virtual Machine™ to evaluate any component as a condition.
- Refactored
index.js
files to make sure all modules are loaded in the same order no matter what. - Changed
Structure.asComponent()
toutilities.converter.asElement()
to eliminate the circular dependencies that it caused.
- Simplified how parameters are accessed from parameter lists.
- Removed
value instanceof bali.Component
check frombali.Structure.asComponent()
method once and for all since it can't made to behave with the circular dependency betweenbali.Structure
and the Bali elements classes. This circular dependency cannot be avoided and provides a much nicer interface between Bali and JS. - Revisited all
require()
statements in the modules and index.js files to make sure they always require the modules in the same order to help minimize the effects of the circular dependency.
- Renamed the
from(literal, parameters)
constructors for the element classes tofromLiteral(literal, parameters)
to make it clearer what the constructor does. - Renamed the
from(collection, parameters)
constructors for the collection classes tofromSequential(sequential, parameters)
to be consistent with the element constructors where sequential is any type, Bali or native, that can be iterated over.
- Refactored the way elements process parameters. They now use the parameter values to adjust the raw value into a canonical form which can be accessed using a
toLiteral()
method on the elements. - Added a
from(literal, parameters)
constructor to each element type. This provides a consistent way to create a new element from its Bali literal source string. - Renamed the
bali.Filter
class tobali.Pattern
and added acomponent.matches(pattern)
method that can take a pattern or regular expression text string and use it to determine whether or not the string version of the component matches the pattern. - Refactored the grammar rule for 'number' to depend on 'angle' since that is the true semantics of a polar complex number.
- Replace most of the
var
qualifiers withconst
for better testing.
- Refactored several collection methods to make them more usable and more efficient.
- Added intrinsic interface checking functions to the
bali.types
module. - Refactored the methods and functions for many of the element classes to be consistent with the intrinsic interfaces required by the Bali Virtual Machine™.
- Changed the packaging build plugin to
webpack
to handle ES6 features especiallyconst
.
- Added a
bali.Exception
class for real runtime exceptions and made it clear that when the code throws anError
exception it represents a bug in the calling code. The newbali.Exception
extendsError
and adds anexception
attribute that is abali.Catalog
containing the exception attributes.
- Made the
bali.Collection.addItem(item)
method signature consistent for all concrete subtypes. They all now return a boolean stating whether or not the item as added successfully. Note, thebali.Stack
andbali.Queue
classes will throw an exception when this method is called and the collection is at full capacity. - The
bali.Catalog.addItem(association)
method now returns false when attempting to add an association with the same key as an existing association in the catalog rather than overwriting the association value. This was considered a bug in the original implementation.
- Changed the list randomizer to generate a random ordinal index using the
bali.codex.randomIndex(length)
function instead of theMath.random()
function. Simplified thebali.List.shuffleItems()
method and added unit tests to test it.
- Changed the
bali.codex.randomIndex(length)
implementation to return an ordinal index in the range[1..length]
to be consistent with the rest of the Bali collection index semantics. - Added a
bali.codex.randomProbability()
function that returns a random probability in the range[0..1]
. - Added a
bali.Probability.randomProbability()
function that returns a random probability in the range[false..true]
. - Added a
bali.Binary.randomBytes(numberOfBytes)
function.
- Fixed bugs in the
this.comparedTo(that)
methods. They were usingtypeof
to determine the object types forthis
andthat
which always returned type'object'
. Now they usethis.constructor.name
string comparisons.
- Added intrinsic functions and unit tests to the
bali.Angle
,bali.Probability
, andbali.Complex
classes. - Added a
bali.Precision
module that handles the significant digits resulting from arithmetic and trigonometric operations. It is used to implement the intrinsic functions for thebali.Angle
,bali.Probability
, andbali.Complex
classes. - Fixed bugs in error reporting for several element types.
- Changed the
NATURAL
grammar rule toNUMBER
since there is no longer a distinction needed between natural numbers and integers. This only affects the regenerated parser, no code changes are necessary. - Added a new
bali.Component.getType()
method and the corresponding unit tests for each concrete component type.
- Fixed bug in top level
index.js
file.
- Cleaned up the language grammar for the Bali Document Notation™.
- Renamed the
bali.Template
entity tobali.Filter
and added support for regular expressions to that entity.
- Added a
bali.Reserved
element type to the Bali Document Notation™ to support temporary variables generated by the assembler.
- Changed how the
bali.Parameters
class is parsed, formatted and accessed. - This makes it easier to access a specific key or value in a parameter list.
- Fixed a bug in the way parameters are parsed and formatted for parameterized
bali.Source
objects. - Added parameters to a source component in the unit tests to prove the problem was fixed.
- Reorganized the project structure and added a unit test of the index files.
- Simplified some module and attribute names.
- Moved the
indentation
parameter in thebali.Formatter.formatComponent(component)
method to thebali.Formatter(indentation)
constructor. - None of these changes should affect dependent modules.
- Removed unneeded constants from
src/abstractions/Types
. - Updated the package dependencies to the latests versions of each package.
- Simplified the Bali Document Notation™ grammar for a
document
to only allow acomponent
and not aprocedure
. This makes the document model much clearer and less error prone. - Removed the
bali.Block
andbali.Procedure
classes and used thebali.Tree
class to implement them instead. - Modified the interface to the
bali.Parser
class by changingparseComponent(source)
toparseDocument(document)
and removed the other parse methods.
- Changed the
bali.Stack
class to inherit from thebali.Collection
class. - Added a new
bali.Queue
collection class. - Modified the interface to the
bali.Comparator
class and improved the robustness of its implementation.
- Simplified the README file.
- Changed
bali.Component.toSource(indentation)
tobali.Component.toDocument(indentation)
to avoid a naming conflict with the old JavaScript method of the same name.
- Removed a circular dependency from the
bali.Parser
class.
- Moved the
bali.Comparator
,bali.Iterator
,bali.Sorter
and thebali.Visitor
classes into theutilities
directory and removed them from thebali.Component
inheritance tree. - Renamed
bali.ComponentFormatter
tobali.Formatter
and converted it to a class. - Renamed
bali.ComponentParser
tobali.Parser
and converted it to a class.
- This is the initial version of this package.