prettier-plugin-marko
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -0,1 +1,2 @@ | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
@@ -7,2 +8,3 @@ var __defProps = Object.defineProperties; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -35,2 +37,3 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -116,4 +119,15 @@ | ||
// src/utils/get-original-code.ts | ||
var import_generator = __toESM(require("@babel/generator")); | ||
function getOriginalCode(opts, start, end = start) { | ||
return opts.originalText.slice(locToPos(start.loc.start, opts), locToPos(end.loc.end, opts)); | ||
const startLoc = start.loc; | ||
const endLoc = end.loc; | ||
if (start === end && !startLoc || !endLoc) { | ||
return (0, import_generator.default)(start, { | ||
filename: opts.filepath, | ||
compact: false, | ||
comments: true, | ||
sourceMaps: false | ||
}).code; | ||
} | ||
return opts.originalText.slice(locToPos(startLoc.start, opts), locToPos(endLoc.end, opts)); | ||
} | ||
@@ -120,0 +134,0 @@ |
{ | ||
"name": "prettier-plugin-marko", | ||
"description": "A prettier plugin for parsing and printing Marko files", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"author": "Dylan Piercey <dpiercey@ebay.com>", | ||
"bugs": "https://github.com/marko-js/prettier/issues", | ||
"devDependencies": { | ||
"@babel/generator": "^7.18.9", | ||
"@commitlint/cli": "^16.2.3", | ||
@@ -13,2 +14,3 @@ "@commitlint/config-conventional": "^16.2.1", | ||
"@marko/translator-default": "^5.20.5", | ||
"@types/babel__generator": "^7.6.4", | ||
"@types/mocha": "^9.1.1", | ||
@@ -15,0 +17,0 @@ "@types/node": "^17.0.25", |
Sorry, the diff of this file is not supported yet
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
60564
1524
28