Skip to content

Latest commit

 

History

History
441 lines (262 loc) · 20.5 KB

File metadata and controls

441 lines (262 loc) · 20.5 KB

0.9.60, 2026-06-xx

  • orm: make toString methods for ForeignKey instances more compact and readable
  • orm: do not fall through to throwing an illegal arg exception in JoinDao::deleteForScript

0.9.59, 2026-06-12 (internal release only)

  • logging: added some facilities to configure logs via scripting

0.9.58, 2026-06-11 (internal release only)

  • orm: the DAOs now have listeners that can notify you about inserts, updates, and deletes.
  • orm: the DAOs now have a jsonSchema property that returns a JSON representation of the schema.

0.9.57, 2026-05-28 (internal release only)

  • new module "commonmark", wraps the commonmark-java library.
  • Bugfix: GenericDispatchTable::addConstructor apply the optional map arg to itself instead of the created instance

0.9.56, 2026-05-20 (internal release only)

  • revised the structure of the janitor-modules subproject, removed the predecessor, "janitor-commons", and added a convenience "kitchen sink" jar, janitor-modules-common. The "common" dependency will always strive to include all modules, except for those that come with huge external dependencies.
  • New module: "mustang". These are some (minimal) wrappers around the Mustang E-Invoicing library. This module comes with a load of dependencies.
  • All objects based on a GenericDispatchTable now come with an apply method that takes a map and automatically copies the map values into the object. This pattern has proven very popular with users in my "upstream project". Applying properties that do not exist or do not fit will throw an exception.
  • janitor-orm: add utility methods for Java-Stream-friendly nullness checking to ForeignKey.
  • date objects can now be turned into strings via the string or format method (still need to settle on one name instead of having two alias names), just like datetime objects already can.
  • JsonException is now a RuntimeException to make using the various JSON-related methods less cumbersome
  • added a simple XML parser, accessible via the default files module: files.readXml(filename, encoding); files.parseXml(string).
  • janitor-logging: this module is an SLF4J provider and should never be a dependency of library projects, only of apps. All "library-facing" parts have been moved to the janitor-toolbox module, because it is included by all other modules.
  • dependency updates: jline, jansi, shade plugin, maven invoker

0.9.55, 2026-04-23 (internal release only)

  • orm: remove old findByFilter implementations; allow clients to look at the SQL generated by findByFilter without executing it.
  • logging: add "entity" to the logging context, add a logger that adds a "verbose" mode to Loggers

0.9.54, 2026-04-22 (released to maven central)

  • add exportToJson() to the Java side of JList, JMap which automatically uses the default Janitor env, making calls more compact.
  • add clear() to JList and JMap, both Java and Janitor sides.
  • add JetBrains @Contract annotations, starting with JMap, so IDEs better understand the code.
  • orm: allow rewriting filter queries for testing purposes

0.9.53, 2026-04-15 (released to maven central)

  • Starting with this release, Janitor is now uploaded to Maven Central as com.eischet.janitor:janitor-lang:0.9.53 etc.
  • toolbox: the TranslationService allows override values for translation keys to be programmatically set
  • dbxs: add setQueryTimeout and setMaxRows to SimplePreparedStatement, add isTimeout to DatabaseError.
  • orm: the Dao interface gets new "findByFilter" variant that, instead of accumulating more and more special arguments, encapsulates them all into one single object.
  • dependency updates: jline, jansi 4.0.12

0.9.52, 2026-04-07

  • improved equality checks by unpacking left and right and reapplying the operator (Janitor.java, areEquals)
  • improved the brrr module
  • orm: allow ordering to be applied to filter searches
  • introduce a handy "shift" method for call arguments (java side)
  • the SLFLoggingRuntime can now display a custom "context", e.g. the name of a script file
  • dependency updates: jline, jansi, maven stuff

0.9.51, 2026-03-30

  • new operator: ~= performs case-insensitive string comparisons, e.g. ("j" ~= "J") == true.
  • new maven module: janitor-modules will collect a number of "builtin" modules, which users can include in their projects as needed
  • new Janitor module "httpclient" brings a simple HTTP client, e.g. for accessing REST APIs
  • new Janitor module "brrr" brings a wrapper class around "brrr.now"'s Message format.
  • both these new modules are by default included in the Maven plugin, meaning I can now send myself a brrr when my build is done...
  • orm: when resolving a foreign key, "" now means NULL instead of throwing an exception.
  • dependency updates: jansi/jline, jackson
  • upgrade Java 17 to 21 because httpclient uses Java 21 feature

0.9.50, 2026-03-23

  • orm: relax the field name check pattern (for an internal app)
  • dependency updates (jansi/jline 4.x, maven resources plugin 3.x)

0.9.49, 2026-03-13

  • orm: enable subclasses to access more parts of the filter logic, for implementing 'fake column searches' in an internal project
  • simplify SLFLoggingRuntime construction
  • some dependabot updates

0.9.48, 2026-03-04

  • orm: Filter isComplete() check did not look at the date value
  • orm: improved filter expression handling
  • dbxs: improved date / datetime handling

0.9.47, 2026-02-24

  • ORM: allow automatically sorting the lazy-loaded entries for AssociatedList objects
  • some dependabot updates

0.9.46, 2026-02-20

  • Dependency Upgrades: JB Annotations 26.1.0, Parent POM 1.0.10.
  • Centralized all unit tests in new janitor-tests module, which will not be deployed, to simplify and share the required setup code for the interpreter.
  • ORM: Improve Filter Expressions, making them less error-prone to use. (There's an internal UI tool using those to query a DB...)

0.9.45, 2026-02-12

  • ORM: Further DispatchTable related improvements when mapping foreign keys in the janitor-orm module, Filter Expression bug fixes

0.9.44, 2026-01-30

  • When converting JMap (Hashmaps) to JSON, default values are now serialized. Before, {foo: false}.toJson() omitted the field "foo". This applies to all types of value that are "primitive" in Java, which means they have a natural default.
  • DispatchTable is now more precise, because the Function interfaces wrapping getters and setters were replaced by custom ones that make it clear when a field is nullable and when not, and that explicitly show us when (Java) primitive field types are used (which would throw NPE when assigned null).
  • DispatchTable is now more forgiving, because it allows all getters/setters to throw Exception now, making it easier for users to map their classes.

0.9.43, 2026-01-26

  • Scope.java: rebinding of a variable in a sealed scope is now rejected. There was an error message already, but the rebind did take place.
  • improve access to map values by properly unpacking them from TemporaryAssignable to the real value where needed.
  • small QOL improvements in the toolbox and the ORM module.
  • In the maven plugin, getDependencies is fixed to take into account the actual versions of dependencies with transitive updates.

0.9.42, 2026-01-19

0.9.41, 2025-12-23

  • JList: set(index, value) method added, which grows the list when needed
  • ORM: some ORM tweaks for an upstream project
  • skipping v.0.9.40 because of a build issue

0.9.39, 2025-12-08

  • Fixed a template parser bug: templates that end in "'" produced invalid script code.
  • Added missing containsValue method to Maps
  • A bunch of convoluted calls like "runtime.getEnvironment().getBuiltinTypes().(...)" where shortened to "Janitor.(...)"

0.9.38, 2025-11-21

  • Improve and simplify the ORM module.
  • Fix the logging dependency for the REPL.
  • Shade the REPL jar so it can be run with java -jar.
  • The REPL now uses JLine for improved prompting by default.
  • added "janitor-generator", an experimental generator for Java code that includes Janitor mappings
  • Add a meaningful toString() method to EvaluatedArgument in the Call Args; error messages are so much more useful with readable contents.

0.9.37, 2025-11-12

  • Improve toString() for TemporaryAssignable to aid debugging.
  • Improve a lot of nullability annotations.
  • Catch RuntimeExceptions in Script and Statement, making the runtime more robust in the face of errors. Runtime exceptions that occur in Java Code can now be caught by script code, where the script used to be terminated instead. JanitorError extends RuntimeException is provided as a base class for your own hierarchiy of runtime exceptions, but at the moment it is not processed differently from other runtime exceptions.
  • Keep parameter names (via maven compiler plugin, via company root POM 1.0.6)
  • Basic support for BigDecimal properties in dispatch tables.
  • added the standalone project "dbxs" as module "janitor-dbxs", which will first be updated gently and then be enhanced with Janitor bindings
  • added the standalone project "janitor-orm", a very experimental (but working) simple ORM for Janitor objects.
  • In janitor-logging, the required @AutoService annotation was placed correctly, but no annotation processor was configured, so it did not do anything.

0.9.36, 2025-10-27

Just a few cosmetic changes:

  • fix snapshot repo for automatic builds on GitHub Actions
  • remove a number of leftover debug statements that wrote to stderr/stdout

0.9.35, 2025-10-21

Updated grammar:

  • Syntax is prepared for *args and **kwargs, but they are not fully implemented yet. Notably, these are currently only available on functions, not on lambdas.
  • Semicolons are now optional at the end of a statement, similar to JavaScript
  • Unused lexer symbols were removed: "|", "#".
  • Function calls were simplified in the AST compiler.
  • The syntax has been updated to see assignments as statements, not expressions, which was intended from the start, but I somehow never got around to fixing. As a side effect, the language is now stricter with unbalanced parentheses, which I have no real explanation for, but which is a good thing.
  • The throw statement has been implemented.

0.9.30-33, 2025-09-18

0.9.30: Packaging changes only. Janitor is now deployed to a small public maven repo; see pom.xml if interested. 0.9.31: moved the project under a new common parent POM for simpler dependency management. 0.9.32: release with updated POM, no changes. 0.9.33: the Maven plugin did stupid things to the class path; fixed by setting all dependencies to "provided".

0.9.29, 2025-09-15

Defend against null pointer exceptions coming from unset locations, as reported by an upstream project customer.

Lists without a specified element type can now be read from JSON. Objects within the list will be returned as Maps.

Generic Maps can now be read from JSON.

Add factory methods for nullable ints and longs to the Janitor interface.

JDateTime was missing equals/hashCode.

JDateTime and JDate can now be properly written to JSON, and basic support for reading from JSON has been added.

0.9.28, 2025-08-25

Add missing list methods "remove" and "removeAll" that remove elements (by equality) from the list.

Add a "value expander" that allows you to auto-translate values assigned to object properties. E.g. your client code can detect "a.foo = 'bar'" and turn the string 'bar' into an object instance that can actually be assigned to the property. This works great with database lookups (in the not-yet-public janitor-orm sister project) and will be useful for enums, too, where you could turn the 'bar' string into an actual enum instance without much ado.

The wildcard matching operator now handles null values more consistently. Instead of failing, a "null" string will make the operators return false.

(0.9.27 was skipped because of a premature internal package deployment.)

0.9.26, 2025-08-21

Add a value converter to object properties in the GenericDispatchTable, so you can chose to convert script values in app object. This is used in a project to enable assignments like foo.bar = 'frobnicate' to automatically look up a database object by the string value and assign that to the property instead of the string value. This is very useful in classes that have "foreign key" properties. Value conversion is handled by the client, so you can make it work however you want. The default implementation simply casts to the expected type.

0.9.25, 2025-08-20

Wildcard matching operator: if either side of the operator is null, return false. This applies to both the "" and "!" operators in the same way, as SQL does it with "LIKE" and "NOT LIKE".

List: the 'remove' method was not added to the default dispatch table, and it was actually "removeAll". Fixed both.

Skipped 0.9.24 because I deployed a broken version internally by mistake.

0.9.23, 2025-08-14

"foo"[:8] now returns "foo" instead of failing with an exception, like it was always meant to.

Script processes now always have a name, which an upstream project uses for auditing data access. The name is filled with the module name, which was always mandatory, and should not influence existing client code.

A number of @Nullable/@NotNull annotations were added to clarify the API auf the JanitorScriptProcess.

0.9.22, 2025-08-05

JanitorEnvironment: enable auto-discovery of modules via the Service Loader mechanism; this is an opt-in feature.

Maven Plugin: opt in to this new auto-discovery. Use case: I'm auto-generating TypeScript definitions for Java Code in a web project.

Relax some parts of the GenericDispatchTable, which were rejecting valid values since 0.9.21, e.g. null for a nullable string property.

General toolbox thing: Add a very simple i18n tool that handles a single resource bundle for translations.

JList is now JanitorComposed, not wrapped, to hide the inner list object. This enables us to more easily implement list properties that, when changed, "write back" to the original object. E.g. you can now "foo.entries.add('bar')", which would've manipulated a temporary list and had no visible effect before when a simple addListProperty(getter) call was used to define "entries".

Dispatch tables now take an optional, but recommended, java default constructor. Having this enables reading objects from JSON lists, for example.

0.9.21, 2025-07-18

Many helper functions, e.g. for creating script objects like integers and floats, have been centralized in the new "Janitor" class. The plan is to move most client-facing code into that class. Instead of getting the builtins from somewhere, you can now simply write Janitor.string(...) to create a string instance, for example. That's both nicer to read and easier to remember.

Behind the scenes, it is still possible to provide a custom Environment, either discovered via the service loader mechanism or manually, but your code doesn't have to reference it all over the place.

Made the REPL work and added a standalone REPL jar. Some logging issues remain, where SLF4J bindings are not picked up; still figuring that one out.

New MetaData Key TYPE_HINT is automatically populated by the DispatchTable where possible. This means that Java code can now more easily introspect an unknown object.

We now have distinct "glue" and "runtime" exceptions, where the new glue exception can be converted to runtime in order to get a proper script stack trace. This makes code working with Janitor types much simpler, mainly because it's now unnecessary to carry around references to a running script process or to the runtime.

0.9.20, 2025-07-02

The runtime now supports arbitrary callbacks to be executed; those are JCallable (and usually JanitorObject) instances that are retrieved from another script and then can be called by the Java side when needed.

0.9.19, 2025-06-25

Add a regex matcher class, in Java style, e.g. m = re/(foo)/.matcher(text); Add arbitrary meta data to dispatch tables. Add rudimentary support for Pythonic "dir" and "help" functions as default builtins.

0.9.18, 2025-04-24

Add os.getenv(string): string to the os module. When serializing objects to JSON, using the DispatchTable, omit empty strings by default. Skipped 0.9.17 because of build settings mistake.

0.9.16, 2025-04-23

Improve JSON output in the "GenericDispatchTable" implementation: ignore defaults like 0, "", 0.0d instead of writing them; automatically output lists.

JanitorDefaultEnvironment now provides a static "create" method that allows creating envs as one-liners, for use in unit tests, like this:

    @BeforeAll
    public static void setUp() {
        SomeSingleton.setJanitorEnvironment(JanitorDefaultEnvironment.create(new JanitorFormattingGerman(), System.err::println));
    }

0.9.15, 2025-03-28

Update the maven plugin to add os.exec, for another project that uses this plugin.

0.9.14, 2025-03-19

New string method split splits a string into a list of substrings by the given separator. Usually, a separator is taken as a string: '1,2,3'.split(',') returns ['1', '2', '3']. This string can be empty, splitting by each character: 'abc'.split('') returns ['a', 'b', 'c']. If the separator is a regular expression, it is used to split the string: '1,2,3'.split(/,/). This is very similar to how split works in Java.

''.encode(charset) encodes a string to a binary representation using the given charset, which defaults to UTF-8 when omitted.

0.9.13, 2025-02-20

Tweak JSON parsing to return integers for numbers that are integers, and doubles only for numbers that are not. This improves interoperability with many JSON APIs, which seem to have issues with e.g. an ID value of 5.0 where 5 is expected, even though there are actually no integers in the JSON specification.

0.9.12, 2024-11-28

Fix maps throwing a null pointer exception when non-existent keys are accessed as d.foo instead of d["foo"]. This makes map.foo behave like map?.foo in call cases now, which is probably more readable, especially when working with JSON-like data.

0.9.11, 2024-10-29

Add some properties to the maven plugin.

0.9.10, 2024-10-07

Provide automatic conversion to/from JSON in classes that extends JanitorComposed, base on the existing dispatch tables. Basic cases work, but overall the feature needs some more thought.

0.9.9, 2024-09-11

New 'md5' and 'sha256' methods on binary values to calculate checksums. Provide easier access to the dispatch tables for builtin types, though I'm not happy with having those implementation details in the API.

0.9.8, 2024-09-05

0.9.7 broke filter scripts with implicit objects in an app; restoring old behaviour.

0.9.7, 2024-09-05

Added basic syntax highlighters for ACE, TextMate and VS Code. Added a logo. Added several example scripts, some implementing challenges from sampleprograms.io. Remove the "CompilerSettings", which allowed to automatically turn "." into "?.", which was a bad idea from the start and caused subtle concurrency bugs in unit tests. Lots of test improvements, some refactorings.

0.9.6, 2024-08-13

Added a number of unit tests. Converted JString into a composite instead of a wrapper. Durations can now be added and subtracted. The AST can now be written to JSON. Lots of names, signatures, comments cleaned up.

0.9.5, 2024-08-07

Merged addModule/registerModule in the Environment interface, of which one was only an empty stub. Small fixes for Scopes.

0.9.4, 2024-08-02

Fixed some design mistakes with JsonOutputStream; a number of helper methods for writing optional values have had their signature changes to key, value instead of the surprising value, key, and all have been renamed to "optional".

Enable mapping true|false|null for Java Boolean fields in dispatch tables.

Added some tests.

0.9.3, 2024-07-30

New JSR223 implementation. See Jsr223TestCase for a simple example. Contexts are not implemented yet, but bindings should work reasonably well. Note that this is currently just a by-product, "because we can", not our main artifact.

The "baseDispatch" in the builtin types interface can now be used to add properties/methods to all builtin objects; all dispatch tables now support simple inheritance.

0.9.2, 2024-07-27

An older "class" implementation is removed and replace by a new "dispatch table" approach, which is easier to extend. Most built-in classes have been updated to use dispatch tables instead of classes or even hand-written dispatch logic. A number of implementation details have been moved out of the "api" into the "lang" implementation package.

Initial Release 0.9.1, 2024-07-17

This is the first public release, after the language grew within a custom application for a couple of years.