Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

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 a catalog, and arguments which only allows a list. Components are still parameterized, but functions and messages take arguments instead of parameters. Changed the indices rule to allow either a list of keys or a range of keys.
  • Removed an indentation option of -1 for inlining and removed Angle.toDegrees(), Angle.toRadians(), Binary.toBaseXX(), Complex.toRectangular(), and Complex.toPolar() methods.
  • Added missing toArray() method to bali.Tree class.
  • Removed the setParameters() method from the Component 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 true bali.Structure component so that it can be used as both a JavaScript Error 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 to abstractions.Visitor and utilities.Exception to structures.Exception to better match their purposes.
  • Added missing tree() and source() functions to top level index.js file.
  • Eliminated another possible circular dependency between the top level convert() function and the structures.Exception class.
  • Fixed bug in top level index.js file for validating the type of the cause parameter in the bali.exception() implementation.
  • Added an export of the bali.utilities.Visitor class as bali.visitor in the top level index.js file.
  • Added support for more interface types in the private validateType() function.
  • Fixed a bug in the private function validateType() when an undefined 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 and moment.
  • Replaced symbols with global names for type and module attributes since both require a global namespace.
  • Added a NAME token and name element to represent global naming of directories and versioned documents.
  • Added a bali.Name.concatenation() function and unit testing for the bali.Name class.
  • Merged the UNICODE grammar token with the CHARACTER token to avoid confusion.
  • Fixed bugs in bali.Catalog.concatenation() and bali.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 to bali.Exception and updated the Exception.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 the indentation 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, and bali.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 the bali.Collection.getItems() method. Also fixed bugs in bali.Set, bali.Stack and bali.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 a bali.Range as its collection.
  • Moved the Component.getType() method out of this project since it really belongs in the bali-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 with throw 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, and PHI with Math.PI, Math.E and a new Math.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 in bali.random.bytes(size) to the constructor instead for consistency.
  • Merged bali.Parameters.getValue() and bali.Parameters.getParameter() to make it simpler and more intuitive.
  • Changed bali.Tag.getNumberOfBytes() to bali.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 to bali.Collection.deleteAll() to be consistent with the naming conventions.
  • Swapped bali.Component.matches() and bali.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() to utilities.converter.asElement() to eliminate the circular dependencies that it caused.
  • Simplified how parameters are accessed from parameter lists.
  • Removed value instanceof bali.Component check from bali.Structure.asComponent() method once and for all since it can't made to behave with the circular dependency between bali.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 to fromLiteral(literal, parameters) to make it clearer what the constructor does.
  • Renamed the from(collection, parameters) constructors for the collection classes to fromSequential(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 to bali.Pattern and added a component.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 with const 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 especially const.
  • Added a bali.Exception class for real runtime exceptions and made it clear that when the code throws an Error exception it represents a bug in the calling code. The new bali.Exception extends Error and adds an exception attribute that is a bali.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, the bali.Stack and bali.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 the Math.random() function. Simplified the bali.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 using typeof to determine the object types for this and that which always returned type 'object'. Now they use this.constructor.name string comparisons.
  • Added intrinsic functions and unit tests to the bali.Angle, bali.Probability, and bali.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 the bali.Angle, bali.Probability, and bali.Complex classes.
  • Fixed bugs in error reporting for several element types.
  • Changed the NATURAL grammar rule to NUMBER 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 to bali.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 the bali.Formatter.formatComponent(component) method to the bali.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 a component and not a procedure. This makes the document model much clearer and less error prone.
  • Removed the bali.Block and bali.Procedure classes and used the bali.Tree class to implement them instead.
  • Modified the interface to the bali.Parser class by changing parseComponent(source) to parseDocument(document) and removed the other parse methods.
  • Changed the bali.Stack class to inherit from the bali.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) to bali.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 the bali.Visitor classes into the utilities directory and removed them from the bali.Component inheritance tree.
  • Renamed bali.ComponentFormatter to bali.Formatter and converted it to a class.
  • Renamed bali.ComponentParser to bali.Parser and converted it to a class.
  • This is the initial version of this package.