malinajs 0.6.61 → 0.6.62

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.
Files changed (3) hide show
  1. package/compile.js +4 -4
  2. package/malina.js +5 -5
  3. package/package.json +2 -2
package/compile.js CHANGED
@@ -53,7 +53,7 @@ const isNumber = (value) => {
53
53
  function detectExpressionType(name) {
54
54
  if(isSimpleName(name)) return 'identifier';
55
55
 
56
- let ast = acorn.parse(name, {allowReturnOutsideFunction: true});
56
+ let ast = acorn.parse(name, {allowReturnOutsideFunction: true, ecmaVersion: 'latest'});
57
57
 
58
58
  function checkIdentificator(body) {
59
59
  if(body.length != 1) return;
@@ -250,7 +250,7 @@ const genId = () => {
250
250
 
251
251
 
252
252
  const extractKeywords = (exp) => {
253
- let ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 12});
253
+ let ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 'latest'});
254
254
 
255
255
  const keys = new Set();
256
256
  const rec = (n) => {
@@ -305,7 +305,7 @@ const replaceElementKeyword = (exp, fn) => {
305
305
 
306
306
  const parseJS = (exp) => {
307
307
  let self = {};
308
- self.ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 12});
308
+ self.ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 'latest'});
309
309
 
310
310
  self.transform = function(fn) {
311
311
  const rec = (n, pk) => {
@@ -1126,7 +1126,7 @@ function parse$1() {
1126
1126
  if(isBlockComment) return;
1127
1127
  this.script.comments.push({start, end, value});
1128
1128
  };
1129
- this.script.ast = acorn.parse(source, {sourceType: 'module', ecmaVersion: 12, onComment});
1129
+ this.script.ast = acorn.parse(source, {sourceType: 'module', ecmaVersion: 'latest', onComment});
1130
1130
 
1131
1131
  if(source.includes('$props')) this.require('$props');
1132
1132
  if(source.includes('$attributes')) this.require('$attributes');
package/malina.js CHANGED
@@ -54,7 +54,7 @@
54
54
  function detectExpressionType(name) {
55
55
  if(isSimpleName(name)) return 'identifier';
56
56
 
57
- let ast = acorn.parse(name, {allowReturnOutsideFunction: true});
57
+ let ast = acorn.parse(name, {allowReturnOutsideFunction: true, ecmaVersion: 'latest'});
58
58
 
59
59
  function checkIdentificator(body) {
60
60
  if(body.length != 1) return;
@@ -251,7 +251,7 @@
251
251
 
252
252
 
253
253
  const extractKeywords = (exp) => {
254
- let ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 12});
254
+ let ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 'latest'});
255
255
 
256
256
  const keys = new Set();
257
257
  const rec = (n) => {
@@ -306,7 +306,7 @@
306
306
 
307
307
  const parseJS = (exp) => {
308
308
  let self = {};
309
- self.ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 12});
309
+ self.ast = acorn.parse(exp, {sourceType: 'module', ecmaVersion: 'latest'});
310
310
 
311
311
  self.transform = function(fn) {
312
312
  const rec = (n, pk) => {
@@ -1127,7 +1127,7 @@
1127
1127
  if(isBlockComment) return;
1128
1128
  this.script.comments.push({start, end, value});
1129
1129
  };
1130
- this.script.ast = acorn.parse(source, {sourceType: 'module', ecmaVersion: 12, onComment});
1130
+ this.script.ast = acorn.parse(source, {sourceType: 'module', ecmaVersion: 'latest', onComment});
1131
1131
 
1132
1132
  if(source.includes('$props')) this.require('$props');
1133
1133
  if(source.includes('$attributes')) this.require('$attributes');
@@ -5931,7 +5931,7 @@
5931
5931
  return {event, fn};
5932
5932
  }
5933
5933
 
5934
- const version = '0.6.61';
5934
+ const version = '0.6.62';
5935
5935
 
5936
5936
 
5937
5937
  async function compile(source, config = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "malinajs",
3
- "version": "0.6.61",
3
+ "version": "0.6.62",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "prepare": "npm run build",
@@ -15,7 +15,7 @@
15
15
  "brotli": "brotli --input /app/malinajs/example/public/app.min.js --output /app/malinajs/example/public/app.min.js.br; brotli --input /app/malinajs/example/public/app.min2.js --output /app/malinajs/example/public/app.min2.js.br"
16
16
  },
17
17
  "dependencies": {
18
- "acorn": "^7.3.1",
18
+ "acorn": "^8.7.1",
19
19
  "astring": "^1.4.3",
20
20
  "css-tree": "^1.0.0-alpha.39"
21
21
  },