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

Rework JS feature detection #284

Merged
merged 5 commits into from Oct 6, 2022
Merged

Rework JS feature detection #284

merged 5 commits into from Oct 6, 2022

Commits on Sep 13, 2022

  1. Rework JS feature detection

    Now we look for the standard Web Cryptography API before attempting to
    check for Node.js support. This allows Node.js ES6 module users to add
    a polyfill like:
    ```js
    import {webcrypto} from 'crypto'
    globalThis.crypto = webcrypto
    ```
    as described in #256 (comment)
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    d69e8e0 View commit details
    Browse the repository at this point in the history
  2. Update documentation and error messages

    This allows users to get an actionable error message about this
    particular problem. We also add detection for this problem.
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    0579fe3 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Fix link typo

    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    0503000 View commit details
    Browse the repository at this point in the history
  2. Catch call to module.require

    This call throws an exception if module isn't defined.
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    e0c93b1 View commit details
    Browse the repository at this point in the history
  3. Update Module::require internal comments

    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    9962c70 View commit details
    Browse the repository at this point in the history