@codemod-utils/json
Advanced tools
Comparing version 0.3.3 to 0.3.4
export function convertToObject(map = new Map()) { | ||
const sortedMap = new Map([...map.entries()].sort()); | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return Object.fromEntries(sortedMap); | ||
} |
@@ -11,4 +11,3 @@ import { existsSync, readFileSync } from 'node:fs'; | ||
const file = readFileSync(filePath, 'utf8'); | ||
const packageJson = JSON.parse(file); | ||
return packageJson; | ||
return JSON.parse(file); | ||
} | ||
@@ -15,0 +14,0 @@ catch (error) { |
{ | ||
"name": "@codemod-utils/json", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Utilities for handling JSON", | ||
@@ -46,8 +46,8 @@ "keywords": [ | ||
"eslint": "^8.44.0", | ||
"prettier": "^2.8.8", | ||
"prettier": "^3.0.0", | ||
"typescript": "^5.1.6", | ||
"@shared-configs/eslint-config-node": "0.0.0", | ||
"@shared-configs/typescript": "0.0.0", | ||
"@codemod-utils/tests": "0.2.5", | ||
"@shared-configs/typescript": "0.0.0", | ||
"@shared-configs/prettier": "0.0.0", | ||
"@shared-configs/eslint-config-node": "0.0.0" | ||
"@shared-configs/prettier": "0.0.0" | ||
}, | ||
@@ -54,0 +54,0 @@ "engines": { |
8050