This repository was 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
parametersrule into two rules,parameterswhich only allows acatalog, andargumentswhich only allows alist. Components are still parameterized, but functions and messages take arguments instead of parameters. Changed theindicesrule to allow either alistof keys or arangeof keys. - Removed an indentation option of
-1for inlining and removedAngle.toDegrees(),Angle.toRadians(),Binary.toBaseXX(),Complex.toRectangular(), andComplex.toPolar()methods. - Added missing
toArray()method tobali.Treeclass. - Removed the
setParameters()method from theComponentclass. - 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.typesmodule to simplify the access to component type information. - Turned the
bali.Exceptionclass into a truebali.Structurecomponent so that it can be used as both a JavaScriptErrorand a Bali Nebula™ component.
- Updated the top level
visitorexport to point to the correct subdirectory.
- Added a new finite state automata (FSA)
utilities.Automatonclass that can be used to enforce state machines. - Moved
utilities.Visitortoabstractions.Visitorandutilities.Exceptiontostructures.Exceptionto 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.Exceptionclass.
- Fixed bug in top level
index.jsfile for validating the type of thecauseparameter in thebali.exception()implementation.
- Added an
exportof thebali.utilities.Visitorclass asbali.visitorin the top levelindex.jsfile.
- Added support for more interface types in the private
validateType()function. - Fixed a bug in the private function
validateType()when anundefinedvalue 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
antlr4andmoment.
- Replaced symbols with global names for type and module attributes since both require a global namespace.
- Added a
NAMEtoken andnameelement to represent global naming of directories and versioned documents. - Added a
bali.Name.concatenation()function and unit testing for thebali.Nameclass. - Merged the
UNICODEgrammar token with theCHARACTERtoken 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
$moduleattribute tobali.Exceptionand updated theException.toString()method to print out the chain of exceptions. - Renamed some of the attribute keys in the
bali.Exceptionattributes to be more consistent.
- Changed formatter
indentationparameter 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
-1as theindentationparameter 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.Durationelement types.
- Renamed the
$functionexception attribute to$proceduresince 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.Stackandbali.Queueconstructors where the type of the collection was not getting set in the parameters. - Added a
bali.Duplicatorclass for doing deep copies of components. - Fixed bug with the
bali.Formatterwhich couldn't handle parameters containing abali.Rangeas its collection. - Moved the
Component.getType()method out of this project since it really belongs in thebali-virtual-machineproject. - 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.Momentclass 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.Referencecontaining a citation. Otherwise, the string after the hash character is interpreted as the URI fragment. - Added getters to the
bali.Referenceclass for the different components of the URI.
- Refactored the top level
index.jsfile to provide a much simpler and easy to use interface to all of the component classes and utilities. - Moved all formatting into the
bali.Formatterclass instead of having formatting functionality in the element classes. The parser and formatter are now completely symmetrical. - Changed the
bali.Formatterto 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, andPHIwithMath.PI,Math.Eand a newMath.PHIconstant. - Added implementation of
baliDuration.inverse(duration)and associated unit tests. - Added functions to the
bali.Momentclass. - Fixed bugs in the
bali.Comparatorclass. 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.Exceptionclass 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.jsfiles 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.Componentcheck frombali.Structure.asComponent()method once and for all since it can't made to behave with the circular dependency betweenbali.Structureand 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.Filterclass tobali.Patternand 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
varqualifiers withconstfor better testing.
- Refactored several collection methods to make them more usable and more efficient.
- Added intrinsic interface checking functions to the
bali.typesmodule. - 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
webpackto handle ES6 features especiallyconst.
- Added a
bali.Exceptionclass for real runtime exceptions and made it clear that when the code throws anErrorexception it represents a bug in the calling code. The newbali.ExceptionextendsErrorand adds anexceptionattribute that is abali.Catalogcontaining 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.Stackandbali.Queueclasses 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 usingtypeofto determine the object types forthisandthatwhich always returned type'object'. Now they usethis.constructor.namestring comparisons.
- Added intrinsic functions and unit tests to the
bali.Angle,bali.Probability, andbali.Complexclasses. - Added a
bali.Precisionmodule 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.Complexclasses. - Fixed bugs in error reporting for several element types.
- Changed the
NATURALgrammar rule toNUMBERsince 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.jsfile.
- Cleaned up the language grammar for the Bali Document Notation™.
- Renamed the
bali.Templateentity tobali.Filterand added support for regular expressions to that entity.
- Added a
bali.Reservedelement type to the Bali Document Notation™ to support temporary variables generated by the assembler.
- Changed how the
bali.Parametersclass 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.Sourceobjects. - 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
indentationparameter 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
documentto only allow acomponentand not aprocedure. This makes the document model much clearer and less error prone. - Removed the
bali.Blockandbali.Procedureclasses and used thebali.Treeclass to implement them instead. - Modified the interface to the
bali.Parserclass by changingparseComponent(source)toparseDocument(document)and removed the other parse methods.
- Changed the
bali.Stackclass to inherit from thebali.Collectionclass. - Added a new
bali.Queuecollection class. - Modified the interface to the
bali.Comparatorclass 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.Parserclass.
- Moved the
bali.Comparator,bali.Iterator,bali.Sorterand thebali.Visitorclasses into theutilitiesdirectory and removed them from thebali.Componentinheritance tree. - Renamed
bali.ComponentFormattertobali.Formatterand converted it to a class. - Renamed
bali.ComponentParsertobali.Parserand converted it to a class.
- This is the initial version of this package.