defense-of-dot-js icon indicating copy to clipboard operation
defense-of-dot-js copied to clipboard

In Defense of .js: A Proposal for Node.js Modules

Results 14 defense-of-dot-js issues
Sort by recently updated
recently updated
newest added

Realizing that it's possible to monkeypatch `require('module')._load` to polyfill the behavior specified here in Node, I figured someone might have released a polyfill already, but a cursory search hasn't turned...

If `require` loads CJS and `import` loads ESM don't things "just work"? The only thing I can think of off the top of my head is if a library updates...

I'm new here (both at this repo and with ES modules in general), but I was reading through the blog posts and I think I would also be unhappy with...

As the [poly-packages](https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md#poly-packages) section stats > The transpiler would rewrite any imports from "./lib/_" in module.js to "./_" in the transpiled CommonJS modules. Since standard modules use a declarative syntax...

enhancement

The defined behavior of using `module.js` as a stand-in for a `module` field in `package.json` is problematic. Consider the following case: - A package exists where there is no `main`...

bug
enhancement

One potential problem with the described system for poly-packages is that they will have to point their transpilation output to the source of the project. This makes it slightly more...

As part of the exercise, we ended up with a handful of possibilities around `package.json`. The three top alternatives that were considered: 1. `shim` 2. `modules.root` 3. `modules.resolver` We decided...

In the [what about](https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md#what-about) section there's [an nvm example](https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md#what-about-tools-like-nvm-that-arent-able-to-parse-json). It's not clear to me how `nvm` loads js files. I use it to switch node versions. Maybe a better example...

If the package has a CLI that uses ES6 imports, how should we declare that the CLI is ES6 module ? `"bin.module": {}` or `"module.bin": {}` or, should the "modules.root"...

question

The [what-about-transitional-packages](https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md#what-about-transitional-packages-that-have-changed-some-files-to-standard-modules-but-not-all) blurb references: > This allows for truly gradual upgrades of large codebases. Keep in mind, since requires can be dynamic (and test frameworks quite often do make use...