githubEdit

1.0.0-Beta14

September 13, 2024

In this release, we are excited to introduce several new features and enhancements aimed at improving functionality and user experience. These updates include the creation of Unmodifiable query types, new server keys to aid on CLI tooling, and methods to identify runtime initiation modes.

Additionally, we've added an event announcement for dump rendering to enable better integration with external listeners. Read on to learn more about these features and how they can benefit your workflow.

Code Strong!

New Features

BL-542arrow-up-right BoxRunner cli options are now prefixed with `--bx-{option}`

This is a breaking change in our betas. All the CLI options for the BoxRunner now use the --bx- prefix. We are doing this to avoid any issues going forward when building CLI tooling. Pleaes checkout the Running Boxlang section for all the docs on this.

BL-93arrow-up-right Create Unmodifiable query type

We have now introduced the Unmodifiable query type. Any query in BoxLang can become Unmodifiable by just calling the toUnmodifiable() method on it. This will lock the query into read-only mode. Great for multi-threaded operations or just data safety. You can also unlock Unmodifiable types via the toMutable() method.

// Just call the toUnmodifiable() to lock the type
myData = myDataService.queryData().toUnmodifiable()

// You can also unlock it via the toMutable() method
unlockedData = myData.toMutable()

BL-529arrow-up-right Announce the onBXDump whenever a dump is about to be rendered, to allow for external listeners to receive the dump

We have added a new global listener for the language: onBxDump which allows you to listen to any call to our dump component. This will allow developers to tap into the dumping facilities and intercept the dump calls. We are doing this in order to bring real-time dump facilities to VSCode.

All the arguments from the dump bif/component will be passed through.

BL-538arrow-up-right New runtime inCLIMode() method to tell you if the runtime was started via the runtime or something else

This is a new method in the BoxRuntime which allows developers or module authors to know if your runtime is in CLI mode or not. The server.boxlang also contains much more information about the modes you are in:

  • server.boxlang.cliMode - True or false if you are in CLI mode

  • server.boxlang.jarMode - True or false if running in JAR mode

  • server.boxlang.runtimeHome - The runtime home seeded in the runtime

BL-539arrow-up-right New server.cli key to provide you with all the CLI options used to run the runtime

There is a new server.cli structure that will assist CLI developers. It contains the following data:

  • server.cli.executionPath - From what directory was the runtime command called from

  • server.cli.command - The full raw commandline string used by the OS to call the binary + your command

  • server.cli.args - The raw array of arguments the command was called with

  • server.cli.parsed.options - A struct of name-value pairs of all the options detected in the CLI arguments.

  • server.cli.parsed.positionals - An array of positional arguments sent to the CLI

BoxLang will detect and parse the following conditions into the options struct:

  • --{name} - Will crete a key called {name} with a value of true

  • --!{name} - Will crete a key called {name} with a value of false

  • --no-{name} - Will crete a key called {name} with a value of false

  • -{character} - Shorthands using a single character. The value will be true and the key will be the character used. Example: -p

  • -{characters} - You can use multi-shorthand characters and each of them will be keys in the struct with a value of true. Example: -abc will create a=true, b=true, c=true

  • --{name}=value - Will create a key called {name} with the value from the right side of the equals sign.

  • --{name}="value" - Will create a key called {name} with the value from the right side of the equals sign and removing the quotes.

  • --{name}='value' - Will create a key called {name} with the value from the right side of the equals sign and removing the single quotes

BL-540arrow-up-right Refactor the CLIOptions to it's own class and add a simple argument parser

In preparation to the inclusion of CommandBox commands into BoxLang we have also added our CLI utility to assist with argument parsing and detection. We have also encapsulated our CLI tooling in preparation for more in the next betas.

Improvements

BL-228arrow-up-right Consolidate/Rename "LS" Bifs and Move US-Centric ones to Compat

BL-409arrow-up-right Member method cleanup

BL-410arrow-up-right Improve REPL output of native Java arrays

BL-541arrow-up-right Add "decimal" as a cast type

Bugs

BL-496arrow-up-right replace and replaceNoCase functions do not accept a callback

BL-519arrow-up-right Query dereferencing is not working correctly: Column '1' does not exist in query

BL-520arrow-up-right Run Class via URL

BL-523arrow-up-right A class which uses inheritance, the metadata includes the inherited functions in itself and parent.

BL-524arrow-up-right reFindNoCase( "^(f|x)?test$", arguments.methodName ) fails with Cannot invoke "String.length()" because the return value of "java.util.regex.Matcher.group(int)" is null

BL-525arrow-up-right lsParseDateTime errors when given locale and mask

BL-526arrow-up-right dateformat incorrectly parsing date with leading 0's?

BL-527arrow-up-right onMissingMethod is not firing if the execution of the method is from within the class

BL-528arrow-up-right query dumps assume the value is simple and can explode with encodeForHTML() can't do complex objects

BL-530arrow-up-right Improve tracking of class in function box context

BL-531arrow-up-right Difference of behavior with cfdirectory recurse = true not including path

BL-532arrow-up-right super long strings cause compilation errors due to limitations in Java source code

BL-533arrow-up-right Errors in miniserver when flushing large amounts of output to buffer

BL-534arrow-up-right Missing !== operator

BL-535arrow-up-right query cell assign erroring

BL-537arrow-up-right Add onBifInvocation Interception Announcement to BIF invoke method

Last updated

Was this helpful?