escomplex-plugin-syntax-babylon
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -9,7 +9,7 @@ 'use strict'; | ||
var _actualise = require('typhonjs-escomplex-commons/dist/traits/actualise.js'); | ||
var _actualize = require('typhonjs-escomplex-commons/dist/module/traits/actualize.js'); | ||
var _actualise2 = _interopRequireDefault(_actualise); | ||
var _actualize2 = _interopRequireDefault(_actualize); | ||
var _safeName = require('typhonjs-escomplex-commons/dist/traits/safeName.js'); | ||
var _safeName = require('typhonjs-escomplex-commons/dist/module/traits/safeName.js'); | ||
@@ -56,3 +56,3 @@ var _safeName2 = _interopRequireDefault(_safeName); | ||
value: function BindExpression() { | ||
return (0, _actualise2.default)(0, 0); | ||
return (0, _actualize2.default)(0, 0); | ||
} | ||
@@ -68,3 +68,3 @@ | ||
value: function BooleanLiteral() { | ||
return (0, _actualise2.default)(0, 0, undefined, function (node) { | ||
return (0, _actualize2.default)(0, 0, undefined, function (node) { | ||
return node.value; | ||
@@ -82,3 +82,3 @@ }); | ||
value: function ClassMethod() { | ||
return (0, _actualise2.default)(0, 0, function (node) { | ||
return (0, _actualize2.default)(0, 0, function (node) { | ||
var operators = ['function']; | ||
@@ -95,3 +95,3 @@ if (node.kind && (node.kind === 'get' || node.kind === 'set')) { | ||
}, 'key', // Note: must skip key as the assigned name is forwarded on to FunctionExpression. | ||
true); | ||
'method'); | ||
} | ||
@@ -107,3 +107,3 @@ | ||
value: function Decorator() { | ||
return (0, _actualise2.default)(0, 0); | ||
return (0, _actualize2.default)(0, 0); | ||
} | ||
@@ -119,3 +119,3 @@ | ||
value: function Directive() { | ||
return (0, _actualise2.default)(1, 0); | ||
return (0, _actualize2.default)(1, 0); | ||
} | ||
@@ -133,3 +133,3 @@ | ||
value: function DirectiveLiteral() { | ||
return (0, _actualise2.default)(0, 0, undefined, function (node) { | ||
return (0, _actualize2.default)(0, 0, undefined, function (node) { | ||
return typeof node.value === 'string' ? '"' + node.value + '"' : node.value; | ||
@@ -147,3 +147,3 @@ }); | ||
value: function NullLiteral() { | ||
return (0, _actualise2.default)(0, 0, undefined, 'null'); | ||
return (0, _actualize2.default)(0, 0, undefined, 'null'); | ||
} | ||
@@ -159,3 +159,3 @@ | ||
value: function NumericLiteral() { | ||
return (0, _actualise2.default)(0, 0, undefined, function (node) { | ||
return (0, _actualize2.default)(0, 0, undefined, function (node) { | ||
return node.value; | ||
@@ -173,3 +173,3 @@ }); | ||
value: function ObjectMethod() { | ||
return (0, _actualise2.default)(0, 0, function (node) { | ||
return (0, _actualize2.default)(0, 0, function (node) { | ||
return typeof node.kind === 'string' && (node.kind === 'get' || node.kind === 'set') ? node.kind : undefined; | ||
@@ -190,3 +190,3 @@ }, undefined, 'key' // Note: must skip key as the assigned name is forwarded on to FunctionExpression. | ||
value: function ObjectProperty() { | ||
return (0, _actualise2.default)(1, 0, function (node) { | ||
return (0, _actualize2.default)(1, 0, function (node) { | ||
return typeof node.shorthand === 'undefined' ? ':' : typeof node.shorthand === 'boolean' && !node.shorthand ? ':' : undefined; | ||
@@ -204,3 +204,3 @@ }); | ||
value: function RestProperty() { | ||
return (0, _actualise2.default)(0, 0); | ||
return (0, _actualize2.default)(0, 0); | ||
} | ||
@@ -216,3 +216,3 @@ | ||
value: function SpreadProperty() { | ||
return (0, _actualise2.default)(0, 0); | ||
return (0, _actualize2.default)(0, 0); | ||
} | ||
@@ -230,3 +230,3 @@ | ||
value: function StringLiteral() { | ||
return (0, _actualise2.default)(0, 0, undefined, function (node) { | ||
return (0, _actualize2.default)(0, 0, undefined, function (node) { | ||
return '"' + node.value + '"'; | ||
@@ -233,0 +233,0 @@ }); |
{ | ||
"name": "escomplex-plugin-syntax-babylon", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"homepage": "https://github.com/typhonjs-node-escomplex/escomplex-plugin-syntax-babylon/", | ||
@@ -23,4 +23,4 @@ "description": "Provides a plugin for typhonjs-escomplex module processing which loads syntax definitions for trait resolution for Babylon AST.", | ||
"dependencies": { | ||
"escomplex-plugin-syntax-estree": "^0.0.1", | ||
"typhonjs-escomplex-commons": "^0.0.1" | ||
"escomplex-plugin-syntax-estree": "^0.0.2", | ||
"typhonjs-escomplex-commons": "^0.0.5" | ||
}, | ||
@@ -27,0 +27,0 @@ "devDependencies": { |
'use strict'; | ||
import actualise from 'typhonjs-escomplex-commons/src/traits/actualise.js'; | ||
import safeName from 'typhonjs-escomplex-commons/src/traits/safeName.js'; | ||
import actualize from 'typhonjs-escomplex-commons/src/module/traits/actualize.js'; | ||
import safeName from 'typhonjs-escomplex-commons/src/module/traits/safeName.js'; | ||
@@ -22,3 +22,3 @@ import PluginSyntaxESTree from 'escomplex-plugin-syntax-estree/src/PluginSyntaxESTree.js'; | ||
*/ | ||
BindExpression() { return actualise(0, 0); } | ||
BindExpression() { return actualize(0, 0); } | ||
@@ -29,3 +29,3 @@ /** | ||
*/ | ||
BooleanLiteral() { return actualise(0, 0, undefined, (node) => { return node.value; }); } | ||
BooleanLiteral() { return actualize(0, 0, undefined, (node) => { return node.value; }); } | ||
@@ -38,12 +38,12 @@ /** | ||
{ | ||
return actualise(0, 0, (node) => | ||
{ | ||
const operators = ['function']; | ||
if (node.kind && (node.kind === 'get' || node.kind === 'set')) { operators.push(node.kind); } | ||
if (typeof node.static === 'boolean' && node.static) { operators.push('static'); } | ||
return operators; | ||
}, | ||
(node) => { return safeName(node.key); }, | ||
'key', // Note: must skip key as the assigned name is forwarded on to FunctionExpression. | ||
true | ||
return actualize(0, 0, (node) => | ||
{ | ||
const operators = ['function']; | ||
if (node.kind && (node.kind === 'get' || node.kind === 'set')) { operators.push(node.kind); } | ||
if (typeof node.static === 'boolean' && node.static) { operators.push('static'); } | ||
return operators; | ||
}, | ||
(node) => { return safeName(node.key); }, | ||
'key', // Note: must skip key as the assigned name is forwarded on to FunctionExpression. | ||
'method' | ||
); | ||
@@ -56,3 +56,3 @@ } | ||
*/ | ||
Decorator() { return actualise(0, 0); } | ||
Decorator() { return actualize(0, 0); } | ||
@@ -63,3 +63,3 @@ /** | ||
*/ | ||
Directive() { return actualise(1, 0); } | ||
Directive() { return actualize(1, 0); } | ||
@@ -74,6 +74,6 @@ /** | ||
{ | ||
return actualise(0, 0, undefined, (node) => | ||
{ | ||
return typeof node.value === 'string' ? `"${node.value}"` : node.value; | ||
} | ||
return actualize(0, 0, undefined, (node) => | ||
{ | ||
return typeof node.value === 'string' ? `"${node.value}"` : node.value; | ||
} | ||
); | ||
@@ -86,3 +86,3 @@ } | ||
*/ | ||
NullLiteral() { return actualise(0, 0, undefined, 'null'); } | ||
NullLiteral() { return actualize(0, 0, undefined, 'null'); } | ||
@@ -93,3 +93,3 @@ /** | ||
*/ | ||
NumericLiteral() { return actualise(0, 0, undefined, (node) => { return node.value; }); } | ||
NumericLiteral() { return actualize(0, 0, undefined, (node) => { return node.value; }); } | ||
@@ -102,9 +102,9 @@ /** | ||
{ | ||
return actualise(0, 0, (node) => | ||
{ | ||
return typeof node.kind === 'string' && (node.kind === 'get' || node.kind === 'set') ? | ||
node.kind : undefined; | ||
}, | ||
undefined, | ||
'key' // Note: must skip key as the assigned name is forwarded on to FunctionExpression. | ||
return actualize(0, 0, (node) => | ||
{ | ||
return typeof node.kind === 'string' && (node.kind === 'get' || node.kind === 'set') ? | ||
node.kind : undefined; | ||
}, | ||
undefined, | ||
'key' // Note: must skip key as the assigned name is forwarded on to FunctionExpression. | ||
); | ||
@@ -121,7 +121,7 @@ } | ||
{ | ||
return actualise(1, 0, (node) => | ||
{ | ||
return typeof node.shorthand === 'undefined' ? ':' : | ||
typeof node.shorthand === 'boolean' && !node.shorthand ? ':' : undefined; | ||
} | ||
return actualize(1, 0, (node) => | ||
{ | ||
return typeof node.shorthand === 'undefined' ? ':' : | ||
typeof node.shorthand === 'boolean' && !node.shorthand ? ':' : undefined; | ||
} | ||
); | ||
@@ -134,3 +134,3 @@ } | ||
*/ | ||
RestProperty() { return actualise(0, 0); } | ||
RestProperty() { return actualize(0, 0); } | ||
@@ -141,3 +141,3 @@ /** | ||
*/ | ||
SpreadProperty() { return actualise(0, 0); } | ||
SpreadProperty() { return actualize(0, 0); } | ||
@@ -150,3 +150,3 @@ /** | ||
*/ | ||
StringLiteral() { return actualise(0, 0, undefined, (node) => { return `"${node.value}"`; }); } | ||
} | ||
StringLiteral() { return actualize(0, 0, undefined, (node) => { return `"${node.value}"`; }); } | ||
} |
305
34738
+ Addedescomplex-plugin-syntax-estree@0.0.2(transitive)
+ Addedtyphonjs-escomplex-commons@0.0.5(transitive)
- Removedescomplex-plugin-syntax-estree@0.0.1(transitive)
- Removedtyphonjs-escomplex-commons@0.0.1(transitive)