Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prettier-plugin-java

Package Overview
Dependencies
Maintainers
6
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-java - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

4

dist/options.js

@@ -174,4 +174,6 @@ "use strict";

{ value: "pattern" },
{ value: "primaryPattern" },
{ value: "typePattern" },
{ value: "recordPattern" },
{ value: "patternList" },
{ value: "guard" },
{ value: "identifyNewExpressionType" },

@@ -178,0 +180,0 @@ { value: "isLambdaExpression" },

@@ -224,3 +224,8 @@ "use strict";

}
return this.visitSingle(ctx);
else if (ctx.pattern) {
var pattern = this.visit(ctx.pattern);
var guard = this.visit(ctx.guard);
return (0, printer_utils_1.rejectAndJoin)(" ", [(0, prettier_builder_1.dedent)(pattern), guard]);
}
return this.visit(ctx.caseConstant);
};

@@ -239,3 +244,3 @@ BlocksAndStatementPrettierVisitor.prototype.switchRule = function (ctx) {

}
return (0, prettier_builder_1.join)(" ", [switchLabel, ctx.Arrow[0], caseInstruction]);
return (0, prettier_builder_1.concat)([switchLabel, " ", ctx.Arrow[0], " ", caseInstruction]);
};

@@ -242,0 +247,0 @@ BlocksAndStatementPrettierVisitor.prototype.caseConstant = function (ctx) {

@@ -506,25 +506,27 @@ "use strict";

ExpressionsPrettierVisitor.prototype.pattern = function (ctx) {
var primaryPattern = this.visit(ctx.primaryPattern);
if (ctx.AndAnd === undefined) {
return primaryPattern;
}
var binaryExpression = this.visit(ctx.binaryExpression);
return (0, printer_utils_1.rejectAndConcat)([
primaryPattern,
" ",
ctx.AndAnd[0],
line,
binaryExpression
]);
return this.visitSingle(ctx);
};
ExpressionsPrettierVisitor.prototype.primaryPattern = function (ctx) {
if (ctx.LBrace === undefined) {
return this.visitSingle(ctx);
}
var pattern = this.visit(ctx.pattern);
return (0, printer_utils_1.putIntoBraces)(pattern, softline, ctx.LBrace[0], ctx.RBrace[0]);
};
ExpressionsPrettierVisitor.prototype.typePattern = function (ctx) {
return this.visitSingle(ctx);
};
ExpressionsPrettierVisitor.prototype.recordPattern = function (ctx) {
var referenceType = this.visit(ctx.referenceType);
var patternList = this.visit(ctx.patternList);
return (0, prettier_builder_1.concat)([
referenceType,
(0, printer_utils_1.putIntoBraces)(patternList, softline, ctx.LBrace[0], ctx.RBrace[0])
]);
};
ExpressionsPrettierVisitor.prototype.patternList = function (ctx) {
var _a, _b;
var patterns = this.mapVisit(ctx.pattern);
var commas = (_b = (_a = ctx.Comma) === null || _a === void 0 ? void 0 : _a.map(function (elt) { return (0, prettier_builder_1.concat)([elt, line]); })) !== null && _b !== void 0 ? _b : [];
return (0, printer_utils_1.rejectAndJoinSeps)(commas, patterns);
};
ExpressionsPrettierVisitor.prototype.guard = function (ctx) {
var expression = this.visit(ctx.expression, {
addParenthesisToWrapStatement: true
});
return (0, prettier_builder_1.concat)([ctx.When[0], " ", (0, prettier_builder_1.dedent)(expression)]);
};
ExpressionsPrettierVisitor.prototype.identifyNewExpressionType = function () {

@@ -531,0 +533,0 @@ return "identifyNewExpressionType";

{
"name": "prettier-plugin-java",
"version": "2.3.1",
"version": "2.4.0",
"description": "Prettier Java Plugin",

@@ -12,3 +12,3 @@ "main": "dist/index.js",

"dependencies": {
"java-parser": "2.0.5",
"java-parser": "2.1.0",
"lodash": "4.17.21",

@@ -45,3 +45,3 @@ "prettier": "3.0.3"

},
"gitHead": "a7f9a5f795a87ccfd7910118b0856b449dedb957"
"gitHead": "acdd5e7f28d08c4fb0351cfaf43d4ff9524b90ba"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc