superdiff
patch-package
Our great sponsors
superdiff | patch-package | |
---|---|---|
5 | 64 | |
433 | 9,867 | |
- | - | |
4.3 | 7.0 | |
2 months ago | 24 days ago | |
TypeScript | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
superdiff
-
Superdiff has reached 377 GitHub stars thanks to you. Here are the latest enhancements.
A few weeks ago, I shared Superdiff, a library that compares two arrays or objects and returns a full diff of their differences in a readable format, on this sub. The project has gained some traction, with 377 GitHub stars. Thanks to user feedback, Superdiff now offers significant improvements since last time: - Supports diff between arrays with duplicate values - Provides the option to consider two arrays with the same values but in a different order as equal - Allows you to filter the diff output by state, with full control over nested properties; diff readability has never been better. - Fixes remaining edge cases, with more tests. Source code
patch-package
-
TypeScript NPM Packages Done Right
If you use Yarn, there’s the `yarn patch` command [1], which lets you maintain patches for your dependencies. Even though I try to upstream patches wherever possible, sometimes you just want to apply a quick patch and move on, especially if the dependency is poorly maintained or even worse, deeply nested in your dependency hierarchy. I use `yarn patch` regularly, it’s one of the main reasons why I moved to Yarn in the first place.
If you’re not using Yarn, there seems to be a similar thing on npm, `patch-package`. [2] I never had to use that though.
- Jest not recommended to be used in Node.js due to instanceOf operator issues
-
Credentials Leak with Knex
NPM doesn't have a patch command, but you can use patch-package to achieve the same result.
-
Why react native is so shit
If there's issue ticket discussing it and someone can fix it, ask for patch file and use patch-package to patch it
-
How to get git to recognize one of my CSS files in node modules folder?
patch-package
- Surprising Consequences of macOS’s Environment Variable Sanitization
-
Gradual React-Router-Dom Upgrades (complex case)
Note that, generally saying, this approach is somewhat fragile, especially because some libraries may not expose their Contexts officially or consider their structure private. We may be able to expose private Contexts by using a tool like patch-package, but remember to keep all the versions pinned because even a patch release of a third-party library may change the behavior.
-
Certain npm packages won't install
You can fork there repo. Or try to use something like https://www.npmjs.com/package/patch-package but without guarantee. There may be a reason why they limited this. Or not idk
-
Deno 1.28: Featuring 1.3M New Modules
patch-package is a tool for this specific purpose
https://www.npmjs.com/package/patch-package
You commit your changes as a git diff and add the patch-package command to your post-install hook so it runs after every install
My main use for it is fixing other packages' package.json exports field and Typescript definitions
What are some alternatives?
husky - Git hooks made easy 🐶 woof!
node-pre-gyp - Node.js tool for easy binary deployment of C++ addons
vite - Next generation frontend tooling. It's fast!
vercel - Develop. Preview. Ship.
Faker.js - What really happened with Aaron Swartz?
basic-ftp - FTP client for Node.js, supports FTPS over TLS, passive mode over IPv6, async/await, and Typescript.
Electron - :electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
cashify - 💸 Lightweight currency conversion library, successor of money.js
hasha - Hashing made simple. Get the hash of a buffer/string/stream/file.
dotenv - Loads environment variables from .env for nodejs projects.
cheerio - The fast, flexible, and elegant library for parsing and manipulating HTML and XML.
microsite - Do more with less JavaScript. Microsite is a smarter, performance-obsessed static site generator powered by Preact and Snowpack.