# 1.3.0

We're excited to announce BoxLang v1.3.0, a significant update that brings new features, performance improvements, and important bug fixes to enhance your development experience.

## 🎉 New Features

### Compression & Serialization Enhancements

**Enhanced Zip Component (BL-1508)**

Added `compressionLevel` parameter to zip component and utilities for better control over compression settings. The default `compressionLevel` is `6` which is a balanced approach.

**Example:**

```javascript
// Zip Component
bx:zip compressionLevel="9"

// Compress BIF
compress( compressionLevel: 9 )
```

### **Pretty JSON Serialization (BL-1542)**

Added `pretty` argument to `jsonSerialize()` function to enable formatted JSON output for improved readability and storage.

**Example:**

```javascript
data = {
    name: "John Doe",
    age: 30,
    address: {
        street: "123 Main St",
        city: "Anytown",
        country: "USA"
    },
    hobbies: ["reading", "cycling", "photography"]
};

// Standard compact JSON (default behavior)
compactJson = jsonSerialize( data );
// Output: {"name":"John Doe","age":30,"address":{"street":"123 Main St","city":"Anytown","country":"USA"},"hobbies":["reading","cycling","photography"]}

// Pretty formatted JSON (new feature)
prettyJson = jsonSerialize( data, pretty=true );
/* Output:
{
  "name" : "John Doe",
  "age" : 30,
  "address" : {
    "street" : "123 Main St",
    "city" : "Anytown",
    "country" : "USA"
  },
  "hobbies" : [ "reading", "cycling", "photography" ]
}
*/

// Useful for debugging and configuration files
writeFile( "config.json", jsonSerialize( appConfig, pretty=true ) );
```

### Array, List, Query & Struct Operations

**New xNone() Functions (BL-1533)**

Introduced `xNone()` functions for BIF operations across arrays, lists, queries, and structs to check if no elements match specified criteria.

**Array Example:**

```javascript
numbers = [ 1, 3, 5, 7, 9 ]

// Using BIF with lambda notation
hasNoEvens = arrayNone( numbers, num -> num % 2 == 0 )
// Returns: true (no even numbers found)

hasNoneGreaterThan10 = arrayNone( numbers, num -> num > 10 )
// Returns: true (no numbers greater than 10)

// Using member method with lambda notation
hasNoEvens = numbers.none( num -> num % 2 == 0 )
// Returns: true (no even numbers found)

hasNoneGreaterThan10 = numbers.none( num -> num > 10 )
// Returns: true (no numbers greater than 10)

// More complex example with multiple conditions
products = [
    { name: "laptop", price: 999, category: "electronics" },
    { name: "book", price: 15, category: "education" },
    { name: "phone", price: 599, category: "electronics" }
]

// BIF: Check if none are free products
hasNoFreeProducts = arrayNone( products, product -> product.price == 0 )

// Member method: Check if none are luxury items (over $2000)
hasNoLuxuryItems = products.none( product -> product.price > 2000 )
```

**List Example:**

```javascript
fruits = "apple,banana,cherry,date"

// Using BIF with lambda notation
hasNoZFruits = listNone( fruits, fruit -> left( fruit, 1 ) == "z" )
// Returns: true (no fruits start with 'z')

// Using member method with lambda notation
hasNoZFruits = fruits.none( fruit -> left( fruit, 1 ) == "z" )
// Returns: true (no fruits start with 'z')
```

**Query Example:**

```javascript
users = queryNew( "name,age,status", "varchar,integer,varchar", [
    [ "Alice", 25, "active" ],
    [ "Bob", 30, "active" ],
    [ "Charlie", 35, "inactive" ]
] )

// Using BIF: Check if none of the users are minors
hasNoMinors = queryNone( users, row -> row.age < 18 )
// Returns: true (no users under 18)

// Using member method: Check if none have empty names
hasNoEmptyNames = users.none( row -> len( trim( row.name ) ) == 0 )
// Returns: true (all users have names)
```

**Struct Example:**

```javascript
config = {
    database: "mysql",
    port: 3306,
    ssl: true,
    timeout: 30
}

// Using BIF: Check if none of the values are null or empty
hasNoEmptyValues = structNone( config, ( key, value ) -> isNull( value ) || value == "" )
// Returns: true (all config values are populated)

// Using member method: Check if none of the keys contain "password"
hasNoPasswordKeys = config.none( ( key, value ) -> findNoCase( "password", key ) > 0 )
// Returns: true (no password-related keys found)
```

### Build & Security Improvements

**Binary Checksums (BL-1512)**

Added checksums to all binary creations in the build process for enhanced security and integrity verification.

**Usage in CI/CD:**

```yaml
# Example GitHub Actions step to verify BoxLang binary integrity
- name: Verify BoxLang Binary
  run: |
    wget https://downloads.boxlang.io/boxlang-1.3.0.jar.sha256
    sha256sum -c boxlang-1.3.0.jar.sha256
    echo "Binary integrity verified ✓"
```

## 🚀 Improvements

### Documentation & Developer Experience

* **Enhanced Documentation** (BL-1471): Added comprehensive examples to documentation for Built-in Functions (BIFs) and Components
* **Command Line Help** (BL-1521, BL-1522): Added `--help` and `-h` flags to Mini Server, Feature Audit, CFTranspiler, Scheduler, BoxRunner, and other command-line tools

### Performance & Architecture

* **HTTP Response Compression** (BL-1511): Added support for compressed HTTP responses to improve performance
* **Query Concurrency** (BL-1534): Significant improvements to query concurrency handling, resolving inconsistencies when adding data to queries in parallel threads
* **Lazy Cache Expiration** (BL-1528): Implemented lazy expiration for caching to optimize memory usage and performance
* **Scope Security** (BL-1494): Prevented scopes from being overridden through scope hunting for better security

### Error Handling & Type Safety

* **Array Type Matching** (BL-1516): Updated `arrayFind()` to handle mismatched types gracefully without throwing exceptions
* **Compile-time Annotations** (BL-1537): Refactored `@NonNull` and `@Nullable` annotations to use compile-time checkers instead of runtime dependencies

### Dependency Updates

* **Semver4j Update** (BL-1526): Bumped org.semver4j:semver4j from 5.7.0 to 5.7.1
* **Jackson Update** (BL-1536): Bumped com.fasterxml.jackson.jr:jackson-jr-stree from 2.19.0 to 2.19.1
* **Runtime Dependencies** (BL-1519): Optimized to ensure only runtime dependencies are stored in the `lib` folder

### CFML Compatibility

* **CFQuery Parameter Mapping** (BL-1544): Created transpiler rule for cfquery params, mapping `cfsqltype` to `sqltype` for better CFML compatibility

## 🐛 Bug Fixes

#### Image Processing

* **Image Scaling** (BL-1216): Fixed issue where `scaleToFit` was creating black images
* **Member Function Resize** (BL-1217): Resolved image resize functionality when used as member function

#### Database & Transactions

* **JDBC Transaction Handling** (BL-1472): Fixed transaction defaults to use app-default datasource instead of ignoring named datasources in queries
* **DATETIME Parameter Aliasing** (BL-1527): Resolved issue where DATETIME was not being properly aliased by query parameters in prepared statements

#### Mathematical Operations

* **Timestamp Math Operations** (BL-1501): Updated math operations encountering timestamps to cast as fractional days for CFML compatibility
* **fix() Function Behavior** (BL-1513): Aligned `fix()` function behavior with Lucee's implementation

#### Parallel Processing

* **Tiered Execution** (BL-1503): Updated parallel computations (`xSome`, `xEvery`, `xMap`, `xFilter`, `xEach`) to use improved tiered execution approach
* **Loop Group Handling** (BL-1504): Fixed issue where looping groups would break instead of continuing properly

#### File Handling & HTTP

* **File Upload Errors** (BL-1507): Resolved HTTP errors occurring during file uploads
* **Multi-part Form Fields** (BL-1523): Fixed issue where all multi-part form fields were being unnecessarily written to disk

#### Exception Handling

* **CFCatch Support** (BL-1524): Improved CFCatch support when catch variable is defined in bx-compat-cfml

#### Caching System

* **Cache Concurrency** (BL-1529): Resolved several concurrency issues affecting cache entries, creation timeouts, and last access timeouts
* **Cache Entry Collisions** (BL-1530): Fixed cache entry equals evaluation that was incorrectly evaluating hash codes and causing collisions

#### Class & Component System

* **Remote Method Templates** (BL-1531): Improved base template setting for remote methods in super classes
* **Class Metadata** (BL-1541): Fixed `type` property in class metadata to properly reference "class" instead of "component"
* **XML Object Duplication** (BL-1547): Resolved issue with duplicate function being broken when using XML objects

#### Path Handling

* **Servlet Path Resolution** (BL-1532): Enhanced handling of `../` patterns in servlet paths for better security and reliability

***

### 📋 Summary

BoxLang v1.3.0 delivers significant improvements across performance, reliability, and developer experience. With enhanced concurrency handling, improved caching mechanisms, and comprehensive bug fixes, this release strengthens BoxLang's foundation while maintaining excellent CFML compatibility.

**Key Highlights:**

* New compression and serialization capabilities
* Major query concurrency improvements
* Enhanced caching with lazy expiration
* Comprehensive documentation updates
* Critical bug fixes for image processing, database operations, and parallel processing

We recommend all users upgrade to v1.3.0 to benefit from these improvements and fixes.

For technical support or questions about this release, please visit our documentation or contact our support team.

***

## Raw Release Notes

### New Feature

[BL-1508](https://ortussolutions.atlassian.net/browse/BL-1508) Add \`compressionLevel\` to the zip component and utilities

[BL-1512](https://ortussolutions.atlassian.net/browse/BL-1512) Add checksums to all binary creations in the build process

[BL-1533](https://ortussolutions.atlassian.net/browse/BL-1533) xNone() for bif operations: array, list, query, struct

[BL-1542](https://ortussolutions.atlassian.net/browse/BL-1542) Added \`pretty\` argument to jsonSerialize() to allow for pretty serialization

### Improvement

[BL-1471](https://ortussolutions.atlassian.net/browse/BL-1471) Add Examples to docs for BIFs and Components

[BL-1494](https://ortussolutions.atlassian.net/browse/BL-1494) Don't allow scopes to be "overridden" with scope hunting

[BL-1511](https://ortussolutions.atlassian.net/browse/BL-1511) Add Support for Compressed HTTP responses

[BL-1516](https://ortussolutions.atlassian.net/browse/BL-1516) arrayFind shouldn't throw on mismatched types

[BL-1519](https://ortussolutions.atlassian.net/browse/BL-1519) Small update to make sure only runtime dependencies are stored in the \`lib\` folder using our maven pom in the Boxlang home.

[BL-1521](https://ortussolutions.atlassian.net/browse/BL-1521) Add --help -h to Mini Server

[BL-1522](https://ortussolutions.atlassian.net/browse/BL-1522) Add --help -h to Feature Audit, CFTranspiler, Scheduler, BoxRunner and more

[BL-1526](https://ortussolutions.atlassian.net/browse/BL-1526) Bumps org.semver4j:semver4j from 5.7.0 to 5.7.1.

[BL-1528](https://ortussolutions.atlassian.net/browse/BL-1528) Add lazy expiration for caching

[BL-1534](https://ortussolutions.atlassian.net/browse/BL-1534) Query Concurrency Improvements : There are some inconsistencies and issues when dealing with adding data to queries in parallel threads

[BL-1536](https://ortussolutions.atlassian.net/browse/BL-1536) Bumps com.fasterxml.jackson.jr:jackson-jr-stree from 2.19.0 to 2.19.1.

[BL-1537](https://ortussolutions.atlassian.net/browse/BL-1537) Refactor @NonNull and @Nullable to use compile time checkers instead of runtime dependencies

[BL-1544](https://ortussolutions.atlassian.net/browse/BL-1544) Create a transpiler rule for cfquery params: \`cfsqltype\` to \`sqltype\`

### Bugs

[BL-1216](https://ortussolutions.atlassian.net/browse/BL-1216) Image scaleToFit creating black images

[BL-1217](https://ortussolutions.atlassian.net/browse/BL-1217) Image resize not working as member func.

[BL-1472](https://ortussolutions.atlassian.net/browse/BL-1472) JDBC - Transaction defaults to app-default datasource, and ignores the datasource named in the first query

[BL-1501](https://ortussolutions.atlassian.net/browse/BL-1501) Compat: Math Operations Which Encounter Timestamps Should Cast as Fractional Days

[BL-1503](https://ortussolutions.atlassian.net/browse/BL-1503) Update parallel computations to use a tiered execution approach; xSome, xEvery, xMap, xFilter, xEach

[BL-1504](https://ortussolutions.atlassian.net/browse/BL-1504) looping groups breaks when it should continue

[BL-1507](https://ortussolutions.atlassian.net/browse/BL-1507) HTTP Errors When Uploading File

[BL-1513](https://ortussolutions.atlassian.net/browse/BL-1513) fix() behaviour is not equal to Lucee's behaviour

[BL-1523](https://ortussolutions.atlassian.net/browse/BL-1523) All multi-part form fields are being written to disk

[BL-1524](https://ortussolutions.atlassian.net/browse/BL-1524) CFCatch support when catch variable defined in bx-compat-cfml

[BL-1527](https://ortussolutions.atlassian.net/browse/BL-1527) DATETIME is not being aliased by query parameters in prepared statements

[BL-1529](https://ortussolutions.atlassian.net/browse/BL-1529) Several concurrency issues on cache entries created and last access timeouts

[BL-1530](https://ortussolutions.atlassian.net/browse/BL-1530) cache entry equals evaluating the hash codes incorrectly and causing collisions

[BL-1531](https://ortussolutions.atlassian.net/browse/BL-1531) Set base template for remote methods in super class

[BL-1532](https://ortussolutions.atlassian.net/browse/BL-1532) Better handle ../ in servlet paths

[BL-1541](https://ortussolutions.atlassian.net/browse/BL-1541) The \`type\` property in class metadata still references "component" instead of being "class"

[BL-1547](https://ortussolutions.atlassian.net/browse/BL-1547) duplicate function broken when using xml objects
