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

prettier-plugin-packagejson

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-packagejson - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0

lib/esm-proxy/chain.js

13

lib/index.js
const requireSafe = require('./require')
const { parsers } = requireSafe('prettier/parser-babel') || requireSafe('prettier/parser-babylon')
const sortPackageJson = require('sort-package-json')
const sortPackageJson = require('./sort-package-json')
const { parsers } =
requireSafe('prettier/parser-babel') ||
// istanbul ignore next
requireSafe('prettier/parser-babylon')
const parser = parsers['json-stringify']
/** @type {import('prettier').Plugin['parsers']} */
exports.parsers = {

@@ -10,2 +16,3 @@ 'json-stringify': {

preprocess(text, options) {
// istanbul ignore next
if (parser.preprocess) {

@@ -16,3 +23,3 @@ text = parser.preprocess(text, options)

return options.filepath && /(^|\\|\/)package\.json$/.test(options.filepath)
? sortPackageJson(text)
? sortPackageJson.default(text)
: text

@@ -19,0 +26,0 @@ },

{
"name": "prettier-plugin-packagejson",
"version": "2.3.0",
"version": "2.4.0",
"description": "Prettier package.json plugin to make the order of properties nice.",

@@ -21,8 +21,6 @@ "keywords": [

"scripts": {
"ci:test": "run-s test send:coverage",
"fix": "run-p fix:*",
"fix:prettier": "npm run lint:prettier -- --write",
"lint": "run-p lint:*",
"lint:prettier": "prettier -l \"**/*.{js,json,md,yaml,yml}\"",
"send:coverage": "npx codecov",
"lint:prettier": "prettier -c .",
"test": "run-s lint test:*",

@@ -32,8 +30,9 @@ "test:unit": "jest"

"dependencies": {
"sort-package-json": "1.57.0"
"sort-package-json": "2.1.0",
"synckit": "0.8.4"
},
"devDependencies": {
"jest": "29.1.1",
"jest": "29.3.1",
"npm-run-all": "4.1.5",
"prettier": "2.7.1"
"prettier": "2.8.3"
},

@@ -40,0 +39,0 @@ "peerDependencies": {

[![npm-badge]][npm]
[![downloads-badge]][npm]
[![circleci-badge]][circleci]
[![actions-badge]][actions]
[![renovate-badge]][renovate]

@@ -10,4 +10,4 @@ [![codecov-badge]][codecov]

[downloads-badge]: https://img.shields.io/npm/dw/prettier-plugin-packagejson?color=blue
[circleci-badge]: https://circleci.com/gh/matzkoh/prettier-plugin-packagejson.svg?style=shield
[circleci]: https://circleci.com/gh/matzkoh/prettier-plugin-packagejson
[actions-badge]: https://github.com/matzkoh/prettier-plugin-packagejson/actions/workflows/release.yml/badge.svg
[actions]: https://github.com/matzkoh/prettier-plugin-packagejson/actions/workflows/release.yml
[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen

@@ -14,0 +14,0 @@ [renovate]: https://renovatebot.com/

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