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

prettier-plugin-marko

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-marko - npm Package Compare versions

Comparing version 1.1.4 to 1.2.0

53

dist/index.js

@@ -1,2 +0,1 @@

var __create = Object.create;
var __defProp = Object.defineProperty;

@@ -8,3 +7,2 @@ var __defProps = Object.defineProperties;

var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;

@@ -25,22 +23,19 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable;

var __spreadProps = (a, b6) => __defProps(a, __getOwnPropDescs(b6));
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __export = (target, all) => {
__markAsModule(target);
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __reExport = (target, module2, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames(module2))
if (!__hasOwnProp.call(target, key) && key !== "default")
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return target;
return to;
};
var __toModule = (module2) => {
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
__export(exports, {
var src_exports = {};
__export(src_exports, {
languages: () => languages,

@@ -51,10 +46,11 @@ options: () => options,

});
var import_path = __toModule(require("path"));
var import_module = __toModule(require("module"));
var import_prettier5 = __toModule(require("prettier"));
var import_compiler = __toModule(require("@marko/compiler"));
module.exports = __toCommonJS(src_exports);
var import_path = require("path");
var import_module = require("module");
var import_prettier5 = require("prettier");
var import_compiler = require("@marko/compiler");
// src/constants.ts
var enclosedNodeTypeReg = /^(?:Identifier|.*Literal|(?:Object|Array|Parenthesized|Record|Tuple)Expression)$/;
var styleReg = /^style(?:\.([^\s]+))?\s*\{?/;
var styleReg = /^style((?:\.[^\s\\/:*?"<>|({]+)+)?\s*\{?/;
var voidHTMLReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|keygen|link|meta|param|source|track|wbr)$/;

@@ -126,3 +122,3 @@ var shorthandIdOrClassReg = /^[a-zA-Z0-9_$][a-zA-Z0-9_$-]*(?:\s+[a-zA-Z0-9_$][a-zA-Z0-9_$-]*)*$/;

// src/utils/with-line-if-needed.ts
var import_prettier = __toModule(require("prettier"));
var import_prettier = require("prettier");
var { builders: b } = import_prettier.doc;

@@ -153,3 +149,3 @@ function withLineIfNeeded(node, opts, doc6) {

// src/utils/with-block-if-needed.ts
var import_prettier2 = __toModule(require("prettier"));
var import_prettier2 = require("prettier");

@@ -257,3 +253,3 @@ // src/utils/outer-code-matches.ts

// src/utils/with-parens-if-needed.ts
var import_prettier3 = __toModule(require("prettier"));
var import_prettier3 = require("prettier");
var { builders: b3 } = import_prettier3.doc;

@@ -270,3 +266,3 @@ function withParensIfNeeded(node, opts, valDoc) {

// src/utils/as-literal-text-content.ts
var import_prettier4 = __toModule(require("prettier"));
var import_prettier4 = require("prettier");
var { builders: b4 } = import_prettier4.doc;

@@ -317,3 +313,3 @@ var temp = [""];

codemirrorMimeType: "text/html",
extensions: [".marko", ".ts.marko"]
extensions: [".marko"]
}

@@ -482,4 +478,4 @@ ];

} else if (literalTagName === "style") {
const [startContent, lang = "css"] = styleReg.exec(node.rawValue || literalTagName);
embedMode = `style.${import_prettier5.getFileInfo.sync(`${opts.filepath}.${lang}`).inferredParser}`;
const [startContent, lang = ".css"] = styleReg.exec(node.rawValue || literalTagName);
embedMode = `style.${import_prettier5.getFileInfo.sync(opts.filepath + lang).inferredParser}`;
if (startContent.endsWith("{")) {

@@ -491,3 +487,3 @@ const codeSartOffset = startContent.length;

"style",
lang === "css" ? "" : `.${lang}`,
lang === ".css" ? "" : lang,
" {",

@@ -509,2 +505,3 @@ b5.indent([b5.line, callEmbed(print, path, embedMode, code)]),

}
const shorthandIndex = doc6.push("") - 1;
if (node.var) {

@@ -538,3 +535,3 @@ doc6.push("/", callEmbed(print, path, "var", getOriginalCode(opts, node.var)));

const symbol = childNode.name === "class" ? "." : "#";
doc6.push(symbol, childNode.value.value.split(/ +/).join(symbol));
doc6[shorthandIndex] += symbol + childNode.value.value.split(/ +/).join(symbol);
} else if (childNode.default) {

@@ -541,0 +538,0 @@ doc6.push(print(childPath));

{
"name": "prettier-plugin-marko",
"description": "A prettier plugin for parsing and printing Marko files",
"version": "1.1.4",
"version": "1.2.0",
"author": "Dylan Piercey <dpiercey@ebay.com>",
"bugs": "https://github.com/marko-js/prettier/issues",
"devDependencies": {
"@commitlint/cli": "^13.2.1",
"@commitlint/config-conventional": "^13.2.0",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@marko/compiler": "^5.16.0",
"@marko/translator-default": "^5.16.0",
"@types/mocha": "^9.0.0",
"@types/node": "^16.10.3",
"@types/prettier": "^2.4.1",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@marko/compiler": "^5.20.5",
"@marko/translator-default": "^5.20.5",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.25",
"@types/prettier": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"codecov": "^3.8.3",
"esbuild": "^0.13.4",
"esbuild-register": "^3.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"fast-glob": "^3.2.7",
"esbuild": "^0.14.38",
"esbuild-register": "^3.3.2",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
"fast-glob": "^3.2.11",
"fixpack": "^4.0.0",
"husky": "^7.0.2",
"lint-staged": "^11.2.3",
"marko": "^5.15.10",
"mocha": "^9.1.2",
"mocha-snap": "^4.0.2",
"husky": "^7.0.4",
"lint-staged": "^12.4.0",
"marko": "^5.20.5",
"mocha": "^9.2.2",
"mocha-snap": "^4.3.0",
"nyc": "^15.1.0",
"prettier": "^2.3.2",
"semantic-release": "^18.0.0",
"typescript": "^4.4.3"
"prettier": "^2.6.2",
"semantic-release": "^19.0.2",
"typescript": "^4.6.3"
},

@@ -57,3 +57,3 @@ "exports": {

"peerDependencies": {
"@marko/compiler": "^5.16.0",
"@marko/compiler": "^5.20.5",
"prettier": "^2"

@@ -60,0 +60,0 @@ },

Sorry, the diff of this file is not supported yet

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