@babel/types
Advanced tools
Comparing version 7.1.6 to 7.2.0
@@ -156,2 +156,3 @@ "use strict"; | ||
exports.assertClassPrivateProperty = assertClassPrivateProperty; | ||
exports.assertClassPrivateMethod = assertClassPrivateMethod; | ||
exports.assertImport = assertImport; | ||
@@ -880,2 +881,6 @@ exports.assertDecorator = assertDecorator; | ||
function assertClassPrivateMethod(node, opts = {}) { | ||
assert("ClassPrivateMethod", node, opts); | ||
} | ||
function assertImport(node, opts = {}) { | ||
@@ -882,0 +887,0 @@ assert("Import", node, opts); |
@@ -156,2 +156,3 @@ "use strict"; | ||
exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; | ||
exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod; | ||
exports.import = exports.Import = Import; | ||
@@ -832,2 +833,6 @@ exports.decorator = exports.Decorator = Decorator; | ||
function ClassPrivateMethod(...args) { | ||
return (0, _builder.default)("ClassPrivateMethod", ...args); | ||
} | ||
function Import(...args) { | ||
@@ -834,0 +839,0 @@ return (0, _builder.default)("Import", ...args); |
@@ -60,3 +60,3 @@ "use strict"; | ||
body: { | ||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) | ||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) | ||
} | ||
@@ -63,0 +63,0 @@ } |
@@ -115,2 +115,15 @@ "use strict"; | ||
}); | ||
(0, _utils.default)("ClassPrivateMethod", { | ||
builder: ["kind", "key", "params", "body", "static"], | ||
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], | ||
aliases: ["Method", "Private", "Function"], | ||
fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, { | ||
key: { | ||
validate: (0, _utils.assertNodeType)("PrivateName") | ||
}, | ||
body: { | ||
validate: (0, _utils.assertNodeType)("BlockStatement") | ||
} | ||
}) | ||
}); | ||
(0, _utils.default)("Import", { | ||
@@ -117,0 +130,0 @@ aliases: ["Expression"] |
@@ -36,2 +36,3 @@ "use strict"; | ||
case "ClassMethod": | ||
case "ClassPrivateMethod": | ||
case "ObjectMethod": | ||
@@ -38,0 +39,0 @@ if (parent.key === node) { |
{ | ||
"name": "@babel/types", | ||
"version": "7.1.6", | ||
"version": "7.2.0", | ||
"description": "Babel Types is a Lodash-esque utility library for AST nodes", | ||
@@ -17,5 +17,5 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
"devDependencies": { | ||
"@babel/generator": "^7.1.6", | ||
"@babel/parser": "^7.1.6" | ||
"@babel/generator": "^7.2.0", | ||
"@babel/parser": "^7.2.0" | ||
} | ||
} |
"use strict"; | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const chalk = require("chalk"); | ||
const generateBuilders = require("./generators/generateBuilders"); | ||
@@ -29,4 +30,11 @@ const generateValidators = require("./generators/generateValidators"); | ||
writeFile(generateBuilders(), "builders/generated/index.js"); | ||
console.log(` ${chalk.green("✔")} Generated builders`); | ||
writeFile(generateValidators(), "validators/generated/index.js"); | ||
console.log(` ${chalk.green("✔")} Generated validators`); | ||
writeFile(generateAsserts(), "asserts/generated/index.js"); | ||
console.log(` ${chalk.green("✔")} Generated asserts`); | ||
writeFile(generateConstants(), "constants/generated/index.js"); | ||
console.log(` ${chalk.green("✔")} Generated constants`); |
@@ -7,4 +7,6 @@ "use strict"; | ||
const prettierConfig = prettier.resolveConfig.sync(filename); | ||
prettierConfig.filepath = filename; | ||
prettierConfig.parser = "babylon"; | ||
return prettier.format(code, prettierConfig); | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
569234
11808
0