msgpack / msgpack-javascript

@msgpack/msgpack - MessagePack for JavaScript / msgpack.org[JavaScript/TypeScript/ECMA-262]
https://msgpack.org/
ISC License
1.28k stars 160 forks source link

Check process.env exists #199

Closed masaha03 closed 2 years ago

masaha03 commented 2 years ago

Some build systems or other sometimes add window.process in browser but not always add window.process.env. For example, a project created with Nuxt3 will crash due to this problem. Please check process.env exists or not.

codecov-commenter commented 2 years ago

Codecov Report

Merging #199 (79b419f) into main (b041a96) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #199   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files          16       16           
  Lines         964      964           
  Branches      206      206           
=======================================
  Hits          946      946           
  Misses         18       18           
Impacted Files Coverage Δ
src/utils/utf8.ts 95.14% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b041a96...79b419f. Read the comment docs.

gfx commented 2 years ago

Thank you for the PR. It sounds almost good to me, but I rather prefer to use the latest syntax for null checking: https://github.com/msgpack/msgpack-javascript/pull/200 can you take a look at it?

masaha03 commented 2 years ago

No problem at all. I'll close this PR.

gfx commented 2 years ago

Thank you!

gfx commented 2 years ago

v2.7.2 has been released with the fix.