Skip to content

Commit 07a2f30

Browse files
committed
feat: BoxLang compatibility
This release adds compatibility with BoxLang. It is being marked as a breaking change out of an abundance of caution, even though no breaking changes were added. BREAKING CHANGE: Added BoxLang compatibility
1 parent 54ca2aa commit 07a2f30

23 files changed

+224
-105
lines changed

.github/workflows/cron.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
cfengine: ["lucee@5", "lucee@6", "lucee@be", "adobe@2018", "adobe@2021", "adobe@2023", "adobe@be"]
14+
cfengine: ["lucee@5", "lucee@6", "lucee@be", "adobe@2018", "adobe@2023", "adobe@be", "boxlang@be"]
1515
coldbox: ["coldbox@6", "coldbox@7", "coldbox@be"]
1616
javaVersion: ["openjdk8", "openjdk11"]
1717
services:
@@ -35,7 +35,9 @@ jobs:
3535
java-version: 11
3636

3737
- name: Set Up CommandBox
38-
uses: elpete/[email protected]
38+
uses: Ortus-Solutions/[email protected]
39+
with:
40+
install: commandbox-boxlang
3941

4042
- name: Install dependencies
4143
run: |
@@ -51,7 +53,14 @@ jobs:
5153
DB_USER: quick
5254
DB_PASSWORD: quick
5355
run: |
54-
box server start cfengine=${{ matrix.cfengine }} javaVersion=${{ matrix.javaVersion }}
56+
if [[ "${{ matrix.cfengine }}" == *"boxlang"* ]] ; then
57+
box server start cfengine=${{ matrix.cfengine }} javaVersion=openjdk21_jdk
58+
box run-script bx-modules:install
59+
box server restart
60+
else
61+
box server start cfengine=${{ matrix.cfengine }} javaVersion=${{ matrix.javaVersion }}
62+
fi
63+
5564
# Install Adobe 2021 cfpm modules
5665
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
5766
box run-script install:2021

.github/workflows/pr.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
cfengine: ["lucee@5", "adobe@2018", "adobe@2021", "adobe@2023"]
22+
cfengine: ["lucee@5", "adobe@2018", "adobe@2023", "boxlang@be"]
2323
coldbox: ["coldbox@6", "coldbox@7", "coldbox@be"]
2424
services:
2525
mysql:
@@ -42,7 +42,9 @@ jobs:
4242
java-version: 11
4343

4444
- name: Set Up CommandBox
45-
uses: elpete/[email protected]
45+
uses: Ortus-Solutions/[email protected]
46+
with:
47+
install: commandbox-boxlang
4648

4749
- name: Install dependencies
4850
run: |
@@ -58,7 +60,14 @@ jobs:
5860
DB_USER: quick
5961
DB_PASSWORD: quick
6062
run: |
61-
box server start cfengine=${{ matrix.cfengine }}
63+
if [[ "${{ matrix.cfengine }}" == *"boxlang"* ]] ; then
64+
box server start cfengine=${{ matrix.cfengine }} javaVersion=openjdk21_jdk
65+
box run-script bx-modules:install
66+
box server restart
67+
else
68+
box server start cfengine=${{ matrix.cfengine }}
69+
fi
70+
6271
# Install Adobe 2021 cfpm modules
6372
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
6473
box run-script install:2021
@@ -86,7 +95,9 @@ jobs:
8695
java-version: 11
8796

8897
- name: Set Up CommandBox
89-
uses: elpete/[email protected]
98+
uses: Ortus-Solutions/[email protected]
99+
with:
100+
install: commandbox-boxlang
90101

91102
- name: Install CFFormat
92103
run: box install commandbox-cfformat

.github/workflows/prerelease.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
cfengine: ["lucee@5", "adobe@2018", "adobe@2021", "adobe@2023"]
16+
cfengine: ["lucee@5", "adobe@2018", "adobe@2023", "boxlang@be"]
1717
coldbox: ["coldbox@6", "coldbox@7", "coldbox@be"]
1818
services:
1919
mysql:
@@ -36,7 +36,9 @@ jobs:
3636
java-version: 11
3737

3838
- name: Set Up CommandBox
39-
uses: elpete/[email protected]
39+
uses: Ortus-Solutions/[email protected]
40+
with:
41+
install: commandbox-boxlang
4042

4143
- name: Install dependencies
4244
run: |
@@ -52,7 +54,14 @@ jobs:
5254
DB_USER: quick
5355
DB_PASSWORD: quick
5456
run: |
55-
box server start cfengine=${{ matrix.cfengine }}
57+
if [[ "${{ matrix.cfengine }}" == *"boxlang"* ]] ; then
58+
box server start cfengine=${{ matrix.cfengine }} javaVersion=openjdk21_jdk
59+
box run-script bx-modules:install
60+
box server restart
61+
else
62+
box server start cfengine=${{ matrix.cfengine }}
63+
fi
64+
5665
# Install Adobe 2021 cfpm modules
5766
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
5867
box run-script install:2021

.github/workflows/release.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
cfengine: ["lucee@5", "adobe@2018", "adobe@2021", "adobe@2023"]
17+
cfengine: ["lucee@5", "adobe@2018", "adobe@2023", "boxlang@be"]
1818
coldbox: ["coldbox@6", "coldbox@7", "coldbox@be"]
1919
services:
2020
mysql:
@@ -37,7 +37,9 @@ jobs:
3737
java-version: 11
3838

3939
- name: Set Up CommandBox
40-
uses: elpete/[email protected]
40+
uses: Ortus-Solutions/[email protected]
41+
with:
42+
install: commandbox-boxlang
4143

4244
- name: Install dependencies
4345
run: |
@@ -53,7 +55,14 @@ jobs:
5355
DB_USER: quick
5456
DB_PASSWORD: quick
5557
run: |
56-
box server start cfengine=${{ matrix.cfengine }}
58+
if [[ "${{ matrix.cfengine }}" == *"boxlang"* ]] ; then
59+
box server start cfengine=${{ matrix.cfengine }} javaVersion=openjdk21_jdk
60+
box run-script bx-modules:install
61+
box server restart
62+
else
63+
box server start cfengine=${{ matrix.cfengine }}
64+
fi
65+
5766
# Install Adobe 2021 cfpm modules
5867
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
5968
box run-script install:2021
@@ -87,7 +96,9 @@ jobs:
8796
java-version: 11
8897

8998
- name: Set Up CommandBox
90-
uses: elpete/[email protected]
99+
uses: Ortus-Solutions/[email protected]
100+
with:
101+
install: commandbox-boxlang
91102

92103
- name: Install and Configure Semantic Release
93104
run: |
@@ -109,14 +120,3 @@ jobs:
109120
- name: Get Current Version
110121
id: current_version
111122
run: echo "::set-output name=version::`cat box.json | jq '.version' -r`"
112-
113-
- name: Upload API Docs to S3
114-
uses: jakejarvis/s3-sync-action@master
115-
with:
116-
args: --acl public-read
117-
env:
118-
AWS_S3_BUCKET: "apidocs.ortussolutions.com"
119-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
120-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
121-
SOURCE_DIR: ".tmp/apidocs"
122-
DEST_DIR: "${{ github.repository }}/${{ steps.current_version.outputs.version }}"

box.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@
2424
"format:check":"cfformat check dsl/**/*.cfc,extras/**/*.cfc,models/**/*.cfc,tests/specs/**/*.cfc --verbose",
2525
"format:watch":"cfformat watch dsl/**/*.cfc,extras/**/*.cfc,models/**/*.cfc,tests/specs/**/*.cfc",
2626
"generateAPIDocs":"rm .tmp --recurse --force && docbox generate mapping=quick excludes=test|/modules|ModuleConfig|QuickCollection strategy-outputDir=.tmp/apidocs strategy-projectTitle=Quick",
27-
"install:2021":"cfpm install document,feed,mysql,zip"
27+
"install:2021":"cfpm install document,feed,mysql,zip",
28+
"bx-modules:install":"install bx-compat-cfml@be,bx-esapi,bx-mysql"
2829
},
2930
"type":"modules",
3031
"dependencies":{
31-
"qb":"^11.0.1",
32+
"qb":"^11.0.2",
3233
"str":"^4.0.0",
3334
"mementifier":"^3.0.0"
3435
},
3536
"devDependencies":{
3637
"coldbox":"v7.3.0",
37-
"testbox":"v6.1.0",
38+
"testbox":"be",
3839
"cfcollection":"^3.6.4",
3940
"cfmigrations":"^4.0.0"
4041
},

models/BaseEntity.cfc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3076,7 +3076,9 @@ component accessors="true" {
30763076
public any function ignoreLoadedGuard( required any callback ) {
30773077
variables._ignoreNotLoadedGuard = true;
30783078
try {
3079-
return arguments.callback();
3079+
var retval = arguments.callback();
3080+
variables._ignoreNotLoadedGuard = false;
3081+
return isNull( retval ) ? javacast( "null", "" ) : retval;
30803082
} finally {
30813083
variables._ignoreNotLoadedGuard = false;
30823084
}

models/QuickBuilder.cfc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,10 @@ component accessors="true" transientCache="false" {
13341334
qb.setColumns(
13351335
qb.getColumns()
13361336
.map( function( column ) {
1337+
if ( variables.qb.getUtils().isExpression( column ) ) {
1338+
return column;
1339+
}
1340+
13371341
if ( !qualifiedColumns.contains( column ) ) {
13381342
return column;
13391343
}

models/QuickQB.cfc

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ component
6060
combinator = "and",
6161
negate = false
6262
) {
63-
if ( structKeyExists( arguments.query, "isQuickBuilder" ) ) {
63+
if ( isStruct( arguments.query ) && structKeyExists( arguments.query, "isQuickBuilder" ) ) {
6464
arguments.query = arguments.query.getQB();
6565
}
6666

@@ -359,7 +359,12 @@ component
359359
combinator = "and",
360360
negate = false
361361
) {
362-
if ( structKeyExists( arguments.query, "isQuickBuilder" ) ) {
362+
if (
363+
!isClosure( arguments.query ) && !isCustomFunction( arguments.query ) && structKeyExists(
364+
arguments.query,
365+
"isQuickBuilder"
366+
)
367+
) {
363368
arguments.query = arguments.query.getQB();
364369
}
365370

@@ -857,7 +862,12 @@ component
857862
"value" : ( isNull( arguments.value ) || getEntity().isNullValue( arguments.column, arguments.value ) ) ? "" : arguments.value,
858863
"cfsqltype" : getEntity().attributeHasSqlType( arguments.column ) ? getEntity().retrieveSqlTypeForAttribute(
859864
arguments.column
860-
) : ( isNull( arguments.value ) ? "CF_SQL_VARCHAR" : getUtils().inferSqlType( arguments.value, variables.grammar ) ),
865+
) : (
866+
isNull( arguments.value ) ? "CF_SQL_VARCHAR" : getUtils().inferSqlType(
867+
arguments.value,
868+
variables.grammar
869+
)
870+
),
861871
"null" : isNull( arguments.value ) || (
862872
getEntity().canConvertToNull( arguments.column ) && getEntity().isNullValue(
863873
arguments.column,
@@ -876,7 +886,12 @@ component
876886
"value" : isNull( arguments.value ) ? "" : arguments.value,
877887
"cfsqltype" : getEntity().attributeHasSqlType( arguments.column ) ? getEntity().retrieveSqlTypeForAttribute(
878888
arguments.column
879-
) : ( isNull( arguments.value ) ? "CF_SQL_VARCHAR" : getUtils().inferSqlType( arguments.value, variables.grammar ) ),
889+
) : (
890+
isNull( arguments.value ) ? "CF_SQL_VARCHAR" : getUtils().inferSqlType(
891+
arguments.value,
892+
variables.grammar
893+
)
894+
),
880895
"null" : isNull( arguments.value ),
881896
"nulls" : isNull( arguments.value )
882897
};

server.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"app":{
3-
"cfengine":"adobe@2018"
3+
"cfengine":"adobe@2021"
4+
},
5+
"JVM":{
6+
"javaVersion":"openjdk21"
47
},
58
"web":{
69
"http":{

tests/index.cfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<meta charset="utf-8">
5050
<meta name="generator" content="TestBox v#testbox.getVersion()#">
5151
<title>TestBox Global Runner</title>
52-
<script><cfinclude template="/testbox/system/reports/assets/js/jquery-3.3.1.min.js"></script>
52+
<script src="/testbox/system/reports/assets/js/jquery-3.3.1.min.js"></script>
5353
<script>
5454
$(document).ready(function() {
5555

0 commit comments

Comments
 (0)