Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: access node process object via globalThis #136

Conversation

achingbrain
Copy link
Collaborator

To allow use of noise in the browser with minimal bundling, access process.env.FOO via globalThis and with optional chaining.

Removes the need to use babel etc to transpile the code first.

To allow use of noise in the browser with minimal bundling, access
`process.env.FOO` via `globalThis` and with optional chaining.

Removes the need to use babel etc to transpile the code first.
@codecov-commenter
Copy link

Codecov Report

Merging #136 (264f7bc) into master (fe1ea66) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   81.21%   81.21%           
=======================================
  Files          26       26           
  Lines        2864     2864           
  Branches      279      279           
=======================================
  Hits         2326     2326           
  Misses        538      538           
Impacted Files Coverage Δ
src/constants.ts 100.00% <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 fe1ea66...264f7bc. Read the comment docs.

@mpetrunic mpetrunic merged commit 297292e into ChainSafe:master Mar 21, 2022
@achingbrain achingbrain deleted the fix/access-node-process-from-global-this branch March 21, 2022 18:11
@achingbrain
Copy link
Collaborator Author

achingbrain commented Mar 22, 2022

@mpetrunic thanks for the quick review - any chance of a release with this in it please?

@dapplion
Copy link
Contributor

@achingbrain Would you mind porting your auto-release infra to this library? Not time efficient to ask for releases on each timely fix

achingbrain added a commit to achingbrain/js-libp2p-noise that referenced this pull request Apr 11, 2022
Updates project config to add autorelease in the [unified CI model](https://github.com/protocol/.github) as requested in this comment - ChainSafe#136 (comment)

Before merging this:

1. Check npm config of https://www.npmjs.com/package/@chainsafe/libp2p-noise - "Publishing access" should be set to "Require two-factor authentication or automation tokens"
2. Create a repository secret here called `NPM_TOKEN` with a npm automation token that can publish to `@chainsafe/libp2p-noise`.
3. Add https://github.com/web3-bot as a collaborator to this repo to receive automated CI config updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants