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

@marko/babel-utils

Package Overview
Dependencies
Maintainers
6
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marko/babel-utils - npm Package Compare versions

Comparing version 5.22.0 to 5.22.1

34

dist/diagnostics.js

@@ -27,10 +27,34 @@ "use strict";exports.__esModule = true;exports.DiagnosticType = void 0;exports.diagnosticDeprecate = diagnosticDeprecate;exports.diagnosticError = diagnosticError;exports.diagnosticSuggest = diagnosticSuggest;exports.diagnosticWarn = diagnosticWarn;const DiagnosticType = {

const { diagnostics } = file.metadata.marko;
const { label, fix, loc = path.node.loc } = options;
diagnostics.push({ type, label, loc, fix });
const { label, fix: rawFix, loc = path.node.loc } = options;
let fix = false;
if (fix && file.___compileStage !== "migrate") {
throw new Error(
"Diagnostic fixes can only be registered during the migrate stage.");
if (rawFix) {
if (file.___compileStage !== "migrate") {
throw new Error(
"Diagnostic fixes can only be registered during the migrate stage.");
}
const { applyFixes } = file.markoOpts;
let apply;
if (typeof rawFix === "function") {
apply = rawFix;
fix = true;
} else {
// strip off the apply function.
({ apply, ...fix } = rawFix);
}
if (applyFixes) {
const i = diagnostics.length;
if (applyFixes.has(i)) {
apply(applyFixes.get(i));
}
} else {
apply(undefined);
}
}
diagnostics.push({ type, label, loc, fix });
}

4

index.d.ts

@@ -194,3 +194,5 @@ import type { types as t } from "@marko/compiler";

export function getArgOrSequence(path: t.NodePath<t.MarkoTag>): t.Expression;
export function getArgOrSequence(
path: t.NodePath<t.MarkoTag | t.MarkoAttribute>
): t.Expression;

@@ -197,0 +199,0 @@ export function loadFileForTag(

{
"name": "@marko/babel-utils",
"description": "Utilities for use with Marko babel plugins.",
"version": "5.22.0",
"version": "5.22.1",
"author": "Dylan Piercey <dpiercey@ebay.com>",

@@ -13,3 +13,3 @@ "bugs": "https://github.com/marko-js/marko/issues/new?template=Bug_report.md",

"devDependencies": {
"@marko/compiler": "^5.28.0"
"@marko/compiler": "^5.28.3"
},

@@ -16,0 +16,0 @@ "files": [

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