ucum-lhc icon indicating copy to clipboard operation
ucum-lhc copied to clipboard

build: removes stream package by using stream-browserify

Open shawnzhu opened this issue 1 year ago • 1 comments

Motivation

when bundling my app that depends on @lhncbc/ucum-lhc via esbuild, it will include the stream package from node_modules/stream instead of using the stream package from node runtime because require('stream') was transpiled as require('node_modules/stream').

when using @lhncbc/ucum-lhc on node, it doesn't need the npm package stream. when using @lhncbc/ucum-lhc on browser, it could use the stream-browserify instead since it's in devDependencies already.

shawnzhu avatar Jan 11 '24 20:01 shawnzhu

It looks to me like "stream" is not even used by the ucum-lhc.js browser distribution file or the files in "source", but only by the files in the impexp sudirectory which is a utility program for updating the data that is only run in a node environment. So, I don't think the change will affect the browser builds, and it does at least remove an unnecessary dependency.

plynchnlm avatar Jan 26 '24 21:01 plynchnlm

This now merged, though somehow in the process of merging, the commit SHA changed, which is why this doesn't look merged. However, you will find https://github.com/LHNCBC/ucum-lhc/commit/d5159f38dcf877ccac10935663408e83aa77cadd on the master branch.

plynchnlm avatar Aug 13 '24 14:08 plynchnlm

@plynchnlm thank you. may I ask when it cuts a new release that include this change?

shawnzhu avatar Aug 13 '24 16:08 shawnzhu

It is in 7.0.0 (already released).

plynchnlm avatar Aug 13 '24 18:08 plynchnlm