Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Incompatibility between Node.js core libs and webpack's lib #78

Open
azu opened this issue May 1, 2018 · 4 comments
Open

Incompatibility between Node.js core libs and webpack's lib #78

azu opened this issue May 1, 2018 · 4 comments

Comments

@azu
Copy link

azu commented May 1, 2018

I've collected the gap between Node.js core lib and webpack/browserify's shim lib.

Latest results is in following repository.

Env

  • Node.js 10.0.0
  • webpack 4.6.0

Gap list

Node.js Browser shim Issue Link
assert defunctzombie/commonjs-assert Error code and Error message are different Issue, Article
assert.deepEqual does't support Map, Set, Iterator etc... Issue, Document, Release
require("assert").strict Docs, Release
buffer feross/buffer ---
child_process --- ---
cluster --- ---
console Raynos/console-browserify ---
constants juliangruber/constants-browserify ---
crypto crypto-browserify/crypto-browserify ---
dgram --- ---
dns --- ---
domain bevry/domain-browser ---
events Gozala/events eventNames Issue
getMaxListeners Issue
prependListener Issue
prependOnceListener Issue
off Issue
fs --- ---
http jhiesey/stream-http ---
https substack/https-browserify ---
module --- ---
net --- ---
os CoderPuppy/os-browserify os.constants
path substack/path-browserify path.posix Issue
path.parse(path) Issue
path.win32
path.format(pathObject)
process shtylman/node-process process.channel
process.platform Issue
process.execArgv Issue
process.cpuUsage([previousValue])
process.emitWarning(warning[, options])
punycode bestiejs/punycode.js ---
querystring mike-spainhower/querystring ---
readline --- ---
repl --- ---
stream substack/stream-browserify ---
string_decoder rvagg/string_decoder --- Repository
sys defunctzombie/node-util ---
timers jryans/timers-browserify ---
tls --- ---
tty substack/tty-browserify ---
url defunctzombie/node-url url.URL(WHATWG URL) Release, Document, Issue
url.format does't support WHATWG URL Release, Document
util defunctzombie/node-util util.callbackify(original)
util.inspect.custom
util.inspect.defaultOptions
util.promisify(original)
util.promisify.custom
util.inspect() options maxArrayLength, breakLength
util.isDeepStrictEqual
vm substack/vm-browserify vm.isContext(sandbox)
zlib devongovett/browserify-zlib zlib.bytesRead

Tests

Also, I've written the test for these new methods/properties.

Node.js 10 pass the tests, but the code that is bundled by webpack is failed.

@goto-bus-stop
Copy link
Contributor

eventNames, getMaxListeners, prependListener and prependOnceListener are available in [email protected] (#74). off will be available in [email protected].

@billiegoose
Copy link

path.posix, path.parse, and parth.format are available in [email protected]

@jhnns
Copy link
Member

jhnns commented Feb 6, 2019

@azu thanks for compiling that list. That will definitely be helpful when updating the libraries 👍

We can't do that too frequently as updating these libraries might be breaking change for a lot of people.

@niksy
Copy link

niksy commented Nov 13, 2021

Since node-libs-browser is not active and updated anymore, I’ve taken time and created package which is based on this one but updates it to modern implementation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants