alasql 4.16.1 → 4.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/alasql-cli.js +1 -1
- package/dist/alasql-worker.js +2 -2
- package/dist/alasql.fs.js +10 -10
- package/dist/alasql.js +10 -10
- package/dist/alasql.min.js +6 -6
- package/package.json +1 -1
package/bin/alasql-cli.js
CHANGED
package/dist/alasql-worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.16.
|
|
1
|
+
//! AlaSQL v4.16.2 build: develop-ff717ec7 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.16.
|
|
4
|
+
@version 4.16.2
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
package/dist/alasql.fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.16.
|
|
1
|
+
//! AlaSQL v4.16.2 build: develop-ff717ec7 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.16.
|
|
4
|
+
@version 4.16.2
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
|
@@ -141,7 +141,7 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.16.
|
|
144
|
+
alasql.version = '4.16.2';
|
|
145
145
|
alasql.build = 'develop-ff717ec7';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2948,7 +2948,7 @@ next:function () {
|
|
|
2948
2948
|
|
|
2949
2949
|
// return next match that has a token
|
|
2950
2950
|
lex:function lex () {
|
|
2951
|
-
var r = this.next();
|
|
2951
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2952
2952
|
if (r) {
|
|
2953
2953
|
return r;
|
|
2954
2954
|
} else {
|
|
@@ -7133,7 +7133,7 @@ function queryfn3(query) {
|
|
|
7133
7133
|
|
|
7134
7134
|
// Prepare variables
|
|
7135
7135
|
query.data = [];
|
|
7136
|
-
query.xgroups
|
|
7136
|
+
query.xgroups=Object.create(null);
|
|
7137
7137
|
query.groups = [];
|
|
7138
7138
|
|
|
7139
7139
|
// Level of Joins
|
|
@@ -16632,22 +16632,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
16632
16632
|
if (this.props && this.props.length > 0) {
|
|
16633
16633
|
let fs;
|
|
16634
16634
|
if (this.method === '@') {
|
|
16635
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
16635
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
16636
16636
|
} else {
|
|
16637
|
-
fs = `params['${this.variable}']`;
|
|
16637
|
+
fs = `params[k('${this.variable}')]`;
|
|
16638
16638
|
}
|
|
16639
16639
|
this.props.forEach(prop => {
|
|
16640
16640
|
if (typeof prop === 'string') {
|
|
16641
|
-
fs += `['${prop}']`;
|
|
16641
|
+
fs += `[k('${prop}')]`;
|
|
16642
16642
|
} else if (typeof prop === 'number') {
|
|
16643
16643
|
fs += `[${prop}]`;
|
|
16644
16644
|
} else {
|
|
16645
16645
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
16646
|
-
fs += `[${prop.toJS()}]`;
|
|
16646
|
+
fs += `[k(${prop.toJS()})]`;
|
|
16647
16647
|
}
|
|
16648
16648
|
});
|
|
16649
16649
|
|
|
16650
|
-
new Function('value, params, alasql',
|
|
16650
|
+
new Function('value, params, alasql', `var k=function(x){if(x==="__proto__"||x==="constructor"||x==="prototype")throw new Error(x+" is not allowed");return x};${fs} = value`)(res, params, alasql);
|
|
16651
16651
|
} else {
|
|
16652
16652
|
if (this.method === '@') {
|
|
16653
16653
|
alasql.vars[this.variable] = res;
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.16.
|
|
1
|
+
//! AlaSQL v4.16.2 build: develop-ff717ec7 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.16.
|
|
4
|
+
@version 4.16.2
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
|
@@ -141,7 +141,7 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.16.
|
|
144
|
+
alasql.version = '4.16.2';
|
|
145
145
|
alasql.build = 'develop-ff717ec7';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2948,7 +2948,7 @@ next:function () {
|
|
|
2948
2948
|
|
|
2949
2949
|
// return next match that has a token
|
|
2950
2950
|
lex:function lex () {
|
|
2951
|
-
var r = this.next();
|
|
2951
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2952
2952
|
if (r) {
|
|
2953
2953
|
return r;
|
|
2954
2954
|
} else {
|
|
@@ -7133,7 +7133,7 @@ function queryfn3(query) {
|
|
|
7133
7133
|
|
|
7134
7134
|
// Prepare variables
|
|
7135
7135
|
query.data = [];
|
|
7136
|
-
query.xgroups
|
|
7136
|
+
query.xgroups=Object.create(null);
|
|
7137
7137
|
query.groups = [];
|
|
7138
7138
|
|
|
7139
7139
|
// Level of Joins
|
|
@@ -16632,22 +16632,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
16632
16632
|
if (this.props && this.props.length > 0) {
|
|
16633
16633
|
let fs;
|
|
16634
16634
|
if (this.method === '@') {
|
|
16635
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
16635
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
16636
16636
|
} else {
|
|
16637
|
-
fs = `params['${this.variable}']`;
|
|
16637
|
+
fs = `params[k('${this.variable}')]`;
|
|
16638
16638
|
}
|
|
16639
16639
|
this.props.forEach(prop => {
|
|
16640
16640
|
if (typeof prop === 'string') {
|
|
16641
|
-
fs += `['${prop}']`;
|
|
16641
|
+
fs += `[k('${prop}')]`;
|
|
16642
16642
|
} else if (typeof prop === 'number') {
|
|
16643
16643
|
fs += `[${prop}]`;
|
|
16644
16644
|
} else {
|
|
16645
16645
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
16646
|
-
fs += `[${prop.toJS()}]`;
|
|
16646
|
+
fs += `[k(${prop.toJS()})]`;
|
|
16647
16647
|
}
|
|
16648
16648
|
});
|
|
16649
16649
|
|
|
16650
|
-
new Function('value, params, alasql',
|
|
16650
|
+
new Function('value, params, alasql', `var k=function(x){if(x==="__proto__"||x==="constructor"||x==="prototype")throw new Error(x+" is not allowed");return x};${fs} = value`)(res, params, alasql);
|
|
16651
16651
|
} else {
|
|
16652
16652
|
if (this.method === '@') {
|
|
16653
16653
|
alasql.vars[this.variable] = res;
|