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

prettier-plugin-hermes-parser

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-hermes-parser - npm Package Compare versions

Comparing version 0.20.1 to 0.21.0

42

dist/index.js

@@ -39,24 +39,2 @@ /**

/**
* Create a prettier plugin config for prettier v3 which adds
* hermes parser support.
*/
function createPrettierV3HermesPlugin() {
return {
// $FlowExpectedError[unsafe-getters-setters]
get parsers() {
// Lazy require this module as its only available in prettier v3.
const flowPlugin = require('prettier/plugins/flow');
return {
hermes: { ...flowPlugin.parsers.flow,
parse
}
};
}
};
}
/**
* Create a prettier plugin config for prettier v2 which adds

@@ -67,3 +45,3 @@ * hermes parser support and patches in prettier v3 printing logic.

function createPrettierV2HermesPlugin() {
function createPrettierHermesPlugin() {
// Lazy require custom prettier v3 internals

@@ -175,18 +153,2 @@ const {

function getPrettierFlowPlugin() {
const {
version
} = require('prettier');
if (version.startsWith('3.')) {
return createPrettierV3HermesPlugin();
}
if (version.startsWith('2.')) {
return createPrettierV2HermesPlugin();
}
throw new Error(`Unsupported prettier version: ${version}`);
}
module.exports = getPrettierFlowPlugin();
module.exports = createPrettierHermesPlugin();

8

package.json
{
"name": "prettier-plugin-hermes-parser",
"version": "0.20.1",
"version": "0.21.0",
"description": "Hermes parser plugin for Prettier.",

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

"dependencies": {
"hermes-estree": "0.20.1",
"hermes-parser": "0.20.1",
"prettier-plugin-hermes-parser": "0.20.1"
"hermes-estree": "0.21.0",
"hermes-parser": "0.21.0",
"prettier-plugin-hermes-parser": "0.21.0"
},

@@ -17,0 +17,0 @@ "peerDependencies": {

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