Comments (7)
It's not actually a best practice, it doesn't solve any problems (although it creates many), and only a very very small number of package authors are inflicting that on the ecosystem right now.
If you're having a specific problem, please file an issue about that; the format of the package should be none of your concern.
from node-deep-equal.
We already do, because ESM can import CJS.
from node-deep-equal.
No, the usual way is to do nothing, since CJS Just Works.
Adding a build step and the dual package hazard isnβt an improvement - CJS is the true universal format.
from node-deep-equal.
We already do, because ESM can import CJS.
I meant in the package json. Currently in angular I get commonjs optimization bailouts warning. I guess providing the mapping in package json can fix that
from node-deep-equal.
Those warnings are incorrect; any purely CJS package is importable from ESM with zero problems. If a bundler is having trouble doing that most basic thing, it's broken, and you should file an issue on it.
from node-deep-equal.
It works just shows a warning. Afaik the usual way is targeting both cjs and mjs using package json exports. Mostly you write esm and compile to cjs too. Is it not possible?
from node-deep-equal.
As far as I know there is the "move to esm" best practice lately. More and more packages support it
from node-deep-equal.
Related Issues (20)
- Feature request: point discrepancy that caused inequality HOT 2
- Weird Compare Fail HOT 11
- "regexp.prototype.flags": "^1.5.0" dependency is failing HOT 1
- "46 times faster" Link in Readme is broken HOT 1
- Some unit tests don't make sense HOT 5
- Performance of this deep equal implementation is generally proportionally between 5x slower and 700x slower compared to native deepStrictEqual HOT 1
- Sets and Maps are not compared properly
- Upgrading to 2.0.1 results in 'return' outside of function error HOT 12
- deep-equal 2.0.1 throws is-weakmap compiler error, 'return' outside of function (12:1) HOT 5
- eslint failing on transitive deep-equal HOT 1
- Fails silently on symbols. HOT 7
- New exports field in package.json get wrong mapping HOT 1
- Dependency Dashboard
- Support for comparing arrays by members without order (set equality) HOT 3
- Incorrect result for ArrayBuffer values HOT 2
- Equivalent objects with NaN values are treated as not equal HOT 3
- Bloat HOT 2
- TO DELETE HOT 1
- `util` `isDeepStrictEqual` is a built-in Node.js function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-deep-equal.