Comparing version 0.20.2 to 0.20.3
module.exports = { | ||
printWidth: 100, | ||
printWidth: 80, | ||
trailingComma: "all", | ||
@@ -4,0 +4,0 @@ singleQuote: false, |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.printComments = exports.attach = void 0; | ||
var assert_1 = __importDefault(require("assert")); | ||
var types = __importStar(require("ast-types")); | ||
var tslib_1 = require("tslib"); | ||
var assert_1 = tslib_1.__importDefault(require("assert")); | ||
var types = tslib_1.__importStar(require("ast-types")); | ||
var n = types.namedTypes; | ||
@@ -310,3 +289,5 @@ var isArray = types.builtInTypes.array; | ||
(trailing && | ||
!(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock"))) { | ||
!(n.Statement.check(value) || | ||
comment.type === "Block" || | ||
comment.type === "CommentBlock"))) { | ||
leadingParts.push(printLeadingComment(commentPath, print)); | ||
@@ -313,0 +294,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var assert_1 = __importDefault(require("assert")); | ||
var types = __importStar(require("ast-types")); | ||
var util = __importStar(require("./util")); | ||
var tslib_1 = require("tslib"); | ||
var assert_1 = tslib_1.__importDefault(require("assert")); | ||
var types = tslib_1.__importStar(require("ast-types")); | ||
var util = tslib_1.__importStar(require("./util")); | ||
var n = types.namedTypes; | ||
@@ -232,3 +211,5 @@ var isArray = types.builtInTypes.array; | ||
// the parsing ambiguity that made it appear to need parentheses. | ||
var justNeedsOpeningParen = !this.canBeFirstInStatement() && this.firstInStatement() && !this.needsParens(true); | ||
var justNeedsOpeningParen = !this.canBeFirstInStatement() && | ||
this.firstInStatement() && | ||
!this.needsParens(true); | ||
if (justNeedsOpeningParen) { | ||
@@ -279,3 +260,4 @@ return true; | ||
// correctness even when it's the topmost expression. | ||
if (node.type === "AssignmentExpression" && node.left.type === "ObjectPattern") { | ||
if (node.type === "AssignmentExpression" && | ||
node.left.type === "ObjectPattern") { | ||
return true; | ||
@@ -302,3 +284,4 @@ } | ||
} | ||
if (parent.type === "ParenthesizedExpression" || (node.extra && node.extra.parenthesized)) { | ||
if (parent.type === "ParenthesizedExpression" || | ||
(node.extra && node.extra.parenthesized)) { | ||
return false; | ||
@@ -310,3 +293,5 @@ } | ||
case "SpreadProperty": | ||
return parent.type === "MemberExpression" && name === "object" && parent.object === node; | ||
return (parent.type === "MemberExpression" && | ||
name === "object" && | ||
parent.object === node); | ||
case "BinaryExpression": | ||
@@ -368,3 +353,5 @@ case "LogicalExpression": | ||
case "NumericLiteral": | ||
return parent.type === "MemberExpression" && name === "object" && parent.object === node; | ||
return (parent.type === "MemberExpression" && | ||
name === "object" && | ||
parent.object === node); | ||
case "YieldExpression": | ||
@@ -392,6 +379,10 @@ case "AwaitExpression": | ||
case "ArrowFunctionExpression": | ||
if (n.CallExpression.check(parent) && name === "callee" && parent.callee === node) { | ||
if (n.CallExpression.check(parent) && | ||
name === "callee" && | ||
parent.callee === node) { | ||
return true; | ||
} | ||
if (n.MemberExpression.check(parent) && name === "object" && parent.object === node) { | ||
if (n.MemberExpression.check(parent) && | ||
name === "object" && | ||
parent.object === node) { | ||
return true; | ||
@@ -407,3 +398,5 @@ } | ||
case "ObjectExpression": | ||
if (parent.type === "ArrowFunctionExpression" && name === "body" && parent.body === node) { | ||
if (parent.type === "ArrowFunctionExpression" && | ||
name === "body" && | ||
parent.body === node) { | ||
return true; | ||
@@ -427,3 +420,5 @@ } | ||
} | ||
if (parent.type === "NewExpression" && name === "callee" && parent.callee === node) { | ||
if (parent.type === "NewExpression" && | ||
name === "callee" && | ||
parent.callee === node) { | ||
return containsCallExpression(node); | ||
@@ -457,3 +452,5 @@ } | ||
if (n.Node.check(node)) { | ||
return types.someField(node, function (_name, child) { return containsCallExpression(child); }); | ||
return types.someField(node, function (_name, child) { | ||
return containsCallExpression(child); | ||
}); | ||
} | ||
@@ -489,3 +486,5 @@ return false; | ||
} | ||
if (n.BlockStatement.check(parent) && parentName === "body" && childName === 0) { | ||
if (n.BlockStatement.check(parent) && | ||
parentName === "body" && | ||
childName === 0) { | ||
assert_1.default.strictEqual(parent.body[0], child); | ||
@@ -506,3 +505,5 @@ return true; | ||
} | ||
if (n.SequenceExpression.check(parent) && parentName === "expressions" && childName === 0) { | ||
if (n.SequenceExpression.check(parent) && | ||
parentName === "expressions" && | ||
childName === 0) { | ||
assert_1.default.strictEqual(parent.expressions[0], child); | ||
@@ -527,3 +528,5 @@ continue; | ||
} | ||
if (n.UnaryExpression.check(parent) && !parent.prefix && childName === "argument") { | ||
if (n.UnaryExpression.check(parent) && | ||
!parent.prefix && | ||
childName === "argument") { | ||
assert_1.default.strictEqual(parent.argument, child); | ||
@@ -530,0 +533,0 @@ continue; |
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.concat = exports.fromString = exports.countSpaces = exports.Lines = void 0; | ||
var assert_1 = __importDefault(require("assert")); | ||
var source_map_1 = __importDefault(require("source-map")); | ||
var tslib_1 = require("tslib"); | ||
var assert_1 = tslib_1.__importDefault(require("assert")); | ||
var source_map_1 = tslib_1.__importDefault(require("source-map")); | ||
var options_1 = require("./options"); | ||
var util_1 = require("./util"); | ||
var mapping_1 = __importDefault(require("./mapping")); | ||
var mapping_1 = tslib_1.__importDefault(require("./mapping")); | ||
var Lines = /** @class */ (function () { | ||
@@ -69,4 +56,6 @@ function Lines(infos, sourceFileName) { | ||
targetLines.mappings.forEach(function (mapping) { | ||
var sourceCursor = mapping.sourceLines.skipSpaces(mapping.sourceLoc.start) || mapping.sourceLines.lastPos(); | ||
var targetCursor = targetLines.skipSpaces(mapping.targetLoc.start) || targetLines.lastPos(); | ||
var sourceCursor = mapping.sourceLines.skipSpaces(mapping.sourceLoc.start) || | ||
mapping.sourceLines.lastPos(); | ||
var targetCursor = targetLines.skipSpaces(mapping.targetLoc.start) || | ||
targetLines.lastPos(); | ||
while (util_1.comparePos(sourceCursor, mapping.sourceLoc.end) < 0 && | ||
@@ -134,3 +123,3 @@ util_1.comparePos(targetCursor, mapping.targetLoc.end) < 0) { | ||
if (info.line && (i > 0 || !skipFirstLine)) { | ||
info = __assign(__assign({}, info), { indent: Math.max(0, info.indent - width) }); | ||
info = tslib_1.__assign(tslib_1.__assign({}, info), { indent: Math.max(0, info.indent - width) }); | ||
} | ||
@@ -154,3 +143,3 @@ return info; | ||
if (info.line && !info.locked) { | ||
info = __assign(__assign({}, info), { indent: info.indent + by }); | ||
info = tslib_1.__assign(tslib_1.__assign({}, info), { indent: info.indent + by }); | ||
} | ||
@@ -177,3 +166,3 @@ return info; | ||
if (i > 0 && info.line && !info.locked) { | ||
info = __assign(__assign({}, info), { indent: info.indent + by }); | ||
info = tslib_1.__assign(tslib_1.__assign({}, info), { indent: info.indent + by }); | ||
} | ||
@@ -195,3 +184,3 @@ return info; | ||
} | ||
return new Lines(this.infos.map(function (info, i) { return (__assign(__assign({}, info), { locked: i > 0 })); })); | ||
return new Lines(this.infos.map(function (info, i) { return (tslib_1.__assign(tslib_1.__assign({}, info), { locked: i > 0 })); })); | ||
}; | ||
@@ -238,3 +227,5 @@ Lines.prototype.getIndentAt = function (line) { | ||
var firstLineInfo = this.infos[0], sliceStart = firstLineInfo.sliceStart, sliceEnd = firstLineInfo.sliceEnd, firstLine = firstLineInfo.line.slice(sliceStart, sliceEnd).trim(); | ||
return (firstLine.length === 0 || firstLine.slice(0, 2) === "//" || firstLine.slice(0, 2) === "/*"); | ||
return (firstLine.length === 0 || | ||
firstLine.slice(0, 2) === "//" || | ||
firstLine.slice(0, 2) === "/*"); | ||
}; | ||
@@ -438,3 +429,5 @@ Lines.prototype.isOnlyWhitespace = function () { | ||
var before_1 = info.line.slice(0, info.sliceStart); | ||
if (reuseWhitespace && isOnlyWhitespace(before_1) && countSpaces(before_1, tabWidth) === indent) { | ||
if (reuseWhitespace && | ||
isOnlyWhitespace(before_1) && | ||
countSpaces(before_1, tabWidth) === indent) { | ||
// Reuse original spaces if the indentation is correct. | ||
@@ -478,3 +471,5 @@ parts.push(info.line.slice(0, info.sliceEnd)); | ||
var prevLine_1 = infos.length; | ||
var prevColumn_1 = Math.max(prevInfo.indent, 0) + prevInfo.sliceEnd - prevInfo.sliceStart; | ||
var prevColumn_1 = Math.max(prevInfo.indent, 0) + | ||
prevInfo.sliceEnd - | ||
prevInfo.sliceStart; | ||
prevInfo.line = | ||
@@ -499,3 +494,3 @@ prevInfo.line.slice(0, prevInfo.sliceEnd) + | ||
if (!prevInfo || i > 0) { | ||
prevInfo = __assign({}, info); | ||
prevInfo = tslib_1.__assign({}, info); | ||
infos.push(prevInfo); | ||
@@ -648,3 +643,5 @@ } | ||
assert_1.default.strictEqual(lineLength, indent + sliceEnd - sliceStart); | ||
if (info.indent === indent && info.sliceStart === sliceStart && info.sliceEnd === sliceEnd) { | ||
if (info.indent === indent && | ||
info.sliceStart === sliceStart && | ||
info.sliceEnd === sliceEnd) { | ||
return info; | ||
@@ -651,0 +648,0 @@ } |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var assert_1 = __importDefault(require("assert")); | ||
var tslib_1 = require("tslib"); | ||
var assert_1 = tslib_1.__importDefault(require("assert")); | ||
var util_1 = require("./util"); | ||
@@ -152,4 +150,6 @@ var Mapping = /** @class */ (function () { | ||
// Skipping forward. | ||
sourceCursor = sourceLines.skipSpaces(sourceFromPos) || sourceLines.lastPos(); | ||
targetCursor = targetLines.skipSpaces(targetFromPos) || targetLines.lastPos(); | ||
sourceCursor = | ||
sourceLines.skipSpaces(sourceFromPos) || sourceLines.lastPos(); | ||
targetCursor = | ||
targetLines.skipSpaces(targetFromPos) || targetLines.lastPos(); | ||
var lineDiff = targetToPos.line - targetCursor.line; | ||
@@ -167,3 +167,4 @@ sourceCursor.line += lineDiff; | ||
} | ||
while (util_1.comparePos(targetCursor, targetToPos) < 0 && targetLines.nextPos(targetCursor, true)) { | ||
while (util_1.comparePos(targetCursor, targetToPos) < 0 && | ||
targetLines.nextPos(targetCursor, true)) { | ||
assert_1.default.ok(sourceLines.nextPos(sourceCursor, true)); | ||
@@ -175,4 +176,6 @@ assert_1.default.strictEqual(sourceLines.charAt(sourceCursor), targetLines.charAt(targetCursor)); | ||
// Skipping backward. | ||
sourceCursor = sourceLines.skipSpaces(sourceFromPos, true) || sourceLines.firstPos(); | ||
targetCursor = targetLines.skipSpaces(targetFromPos, true) || targetLines.firstPos(); | ||
sourceCursor = | ||
sourceLines.skipSpaces(sourceFromPos, true) || sourceLines.firstPos(); | ||
targetCursor = | ||
targetLines.skipSpaces(targetFromPos, true) || targetLines.firstPos(); | ||
var lineDiff = targetToPos.line - targetCursor.line; | ||
@@ -190,3 +193,4 @@ sourceCursor.line += lineDiff; | ||
} | ||
while (util_1.comparePos(targetToPos, targetCursor) < 0 && targetLines.prevPos(targetCursor, true)) { | ||
while (util_1.comparePos(targetToPos, targetCursor) < 0 && | ||
targetLines.prevPos(targetCursor, true)) { | ||
assert_1.default.ok(sourceLines.prevPos(sourceCursor, true)); | ||
@@ -193,0 +197,0 @@ assert_1.default.strictEqual(sourceLines.charAt(sourceCursor), targetLines.charAt(targetCursor)); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parse = void 0; | ||
var assert_1 = __importDefault(require("assert")); | ||
var types = __importStar(require("ast-types")); | ||
var tslib_1 = require("tslib"); | ||
var assert_1 = tslib_1.__importDefault(require("assert")); | ||
var types = tslib_1.__importStar(require("ast-types")); | ||
var b = types.builders; | ||
@@ -34,3 +13,3 @@ var isObject = types.builtInTypes.object; | ||
var comments_1 = require("./comments"); | ||
var util = __importStar(require("./util")); | ||
var util = tslib_1.__importStar(require("./util")); | ||
function parse(source, options) { | ||
@@ -37,0 +16,0 @@ options = options_1.normalize(options); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getReprinter = exports.Patcher = void 0; | ||
var assert_1 = __importDefault(require("assert")); | ||
var linesModule = __importStar(require("./lines")); | ||
var types = __importStar(require("ast-types")); | ||
var tslib_1 = require("tslib"); | ||
var assert_1 = tslib_1.__importDefault(require("assert")); | ||
var linesModule = tslib_1.__importStar(require("./lines")); | ||
var types = tslib_1.__importStar(require("ast-types")); | ||
var Printable = types.namedTypes.Printable; | ||
@@ -34,3 +13,3 @@ var Expression = types.namedTypes.Expression; | ||
var util_1 = require("./util"); | ||
var fast_path_1 = __importDefault(require("./fast-path")); | ||
var fast_path_1 = tslib_1.__importDefault(require("./fast-path")); | ||
var isObject = types.builtInTypes.object; | ||
@@ -268,3 +247,5 @@ var isArray = types.builtInTypes.array; | ||
var oldNode = oldPath.getValue(); | ||
if (newNode === oldNode || newPath.valueIsDuplicate() || oldPath.valueIsDuplicate()) { | ||
if (newNode === oldNode || | ||
newPath.valueIsDuplicate() || | ||
oldPath.valueIsDuplicate()) { | ||
return true; | ||
@@ -298,3 +279,5 @@ } | ||
return false; | ||
if (newNode === oldNode || newPath.valueIsDuplicate() || oldPath.valueIsDuplicate()) { | ||
if (newNode === oldNode || | ||
newPath.valueIsDuplicate() || | ||
oldPath.valueIsDuplicate()) { | ||
return true; | ||
@@ -401,3 +384,4 @@ } | ||
// changed within them. | ||
if (ReturnStatement.check(newPath.getNode()) && reprints.length > originalReprintCount) { | ||
if (ReturnStatement.check(newPath.getNode()) && | ||
reprints.length > originalReprintCount) { | ||
return false; | ||
@@ -404,0 +388,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = void 0; | ||
var assert_1 = __importDefault(require("assert")); | ||
var types = __importStar(require("ast-types")); | ||
var tslib_1 = require("tslib"); | ||
var assert_1 = tslib_1.__importDefault(require("assert")); | ||
var types = tslib_1.__importStar(require("ast-types")); | ||
var n = types.namedTypes; | ||
var source_map_1 = __importDefault(require("source-map")); | ||
var source_map_1 = tslib_1.__importDefault(require("source-map")); | ||
var SourceMapConsumer = source_map_1.default.SourceMapConsumer; | ||
@@ -129,3 +108,5 @@ var SourceMapGenerator = source_map_1.default.SourceMapGenerator; | ||
// positions of the export declaration node. | ||
if (node.declaration && node.declaration.decorators && isExportDeclaration(node)) { | ||
if (node.declaration && | ||
node.declaration.decorators && | ||
isExportDeclaration(node)) { | ||
node.declaration.decorators.forEach(include); | ||
@@ -132,0 +113,0 @@ } |
27
main.js
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.run = exports.prettyPrint = exports.print = exports.types = exports.parse = void 0; | ||
var fs_1 = __importDefault(require("fs")); | ||
var types = __importStar(require("ast-types")); | ||
var tslib_1 = require("tslib"); | ||
var fs_1 = tslib_1.__importDefault(require("fs")); | ||
var types = tslib_1.__importStar(require("ast-types")); | ||
exports.types = types; | ||
@@ -29,0 +8,0 @@ var parser_1 = require("./lib/parser"); |
{ | ||
"author": "Ben Newman <bn@cs.stanford.edu>", | ||
"name": "recast", | ||
"version": "0.20.2", | ||
"version": "0.20.3", | ||
"description": "JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator", | ||
@@ -48,3 +48,4 @@ "keywords": [ | ||
"private": "^0.1.8", | ||
"source-map": "~0.6.1" | ||
"source-map": "~0.6.1", | ||
"tslib": "^2.0.1" | ||
}, | ||
@@ -58,3 +59,3 @@ "devDependencies": { | ||
"@types/mocha": "8.0.3", | ||
"@types/node": "14.6.0", | ||
"@types/node": "14.6.1", | ||
"@typescript-eslint/parser": "^3.0.1", | ||
@@ -66,3 +67,3 @@ "eslint": "^7.1.0", | ||
"lint-staged": "^10.2.6", | ||
"mocha": "8.1.1", | ||
"mocha": "8.1.3", | ||
"prettier": "^2.0.5", | ||
@@ -69,0 +70,0 @@ "reify": "0.20.12", |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parse = exports.parser = void 0; | ||
var _babel_options_1 = __importDefault(require("./_babel_options")); | ||
var tslib_1 = require("tslib"); | ||
var _babel_options_1 = tslib_1.__importDefault(require("./_babel_options")); | ||
// Prefer the new @babel/parser package, but fall back to babylon if | ||
@@ -9,0 +7,0 @@ // that's what's available. |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./babel"), exports); | ||
var tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./babel"), exports); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parse = void 0; | ||
var tslib_1 = require("tslib"); | ||
var babel_1 = require("./babel"); | ||
var _babel_options_1 = __importDefault(require("./_babel_options")); | ||
var _babel_options_1 = tslib_1.__importDefault(require("./_babel_options")); | ||
// This module is suitable for passing as options.parser when calling | ||
@@ -10,0 +8,0 @@ // recast.parse to process Flow code: |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parse = void 0; | ||
var tslib_1 = require("tslib"); | ||
var babel_1 = require("./babel"); | ||
var _babel_options_1 = __importDefault(require("./_babel_options")); | ||
var _babel_options_1 = tslib_1.__importDefault(require("./_babel_options")); | ||
// This module is suitable for passing as options.parser when calling | ||
@@ -10,0 +8,0 @@ // recast.parse to process TypeScript code: |
@@ -14,2 +14,3 @@ { | ||
"esModuleInterop": true, | ||
"importHelpers": true, | ||
"stripInternal": true | ||
@@ -16,0 +17,0 @@ }, |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
234058
5
5609
+ Addedtslib@^2.0.1