![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
better-sort-package-json
Advanced tools
Sorts a package.json
file following these rules:
package.json
specification, then the Node.JS fields, and finally all the other properties.keywords
and files
, are sorted alphabetically.script
are sorted alphabetically but placing the "pre" and "post" scripts along with before and after its target.Other packages like sort-package-json
already exist but there is no way to customize the sorting rule applied and I was looking for a simpler set matching current practices at Hemi.
This package can be installed globally, then used to sort package.json
files:
npm install --global better-sort-package-json
better-sort-package-json <path-to-a-package-json-file-to-sort>
In addition, it can be used without installing it:
npx better-sort-package-json <path-to-a-package-json-file-to-sort>
Install the package:
npm install better-sort-package-json
Then use it to sort the contents of a package.json
:
import * as fs from "node:fs";
import { sortPackageJson } from "better-sort-package-json";
fs.writeFileSync(path, sortPackageJson(fs.readFileSync(path, "utf8")));
To i.e. let lint-staged
take care of sorting the package.json
automatically, but without altering the formatting done by Prettier
, this configuration can be used:
{
"*.json,!package.json": ["prettier --write"],
"package.json": ["better-sort-package-json", "prettier --write"]
}
FAQs
Sort a package.json file following the NPM docs
The npm package better-sort-package-json receives a total of 0 weekly downloads. As such, better-sort-package-json popularity was classified as not popular.
We found that better-sort-package-json demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.