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

Unlisted dependency on assert in the browser #206

Closed
2 tasks done
Vinnl opened this issue Jun 2, 2021 · 3 comments
Closed
2 tasks done

Unlisted dependency on assert in the browser #206

Vinnl opened this issue Jun 2, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Vinnl
Copy link

Vinnl commented Jun 2, 2021

Describe the bug

No dependencies are listed in package.json, however, the browser package appears to depend on assert.

To Reproduce

See https://unpkg.com/browse/[email protected]/dist/browser/util/decode_protected_header.js

There's a non-relative import on the first line:

import { ok as assert } from 'assert';

If the assert npm module is not present, this will not resolve.

Expected behaviour

Either for there to not be a dependency on assert, or for assert to be listed as a dependency in package.json.

Environment:

  • jose version: 3.12.2
  • affected runtime is: all browsers
  • other relevant library versions: Webpack 5.38.1

Additional context

  • the bug is happening on latest jose too. - looks like it
  • i have searched the issues tracker on github for similar issues and couldn't find anything related.
@Vinnl Vinnl added the triage label Jun 2, 2021
@panva
Copy link
Owner

panva commented Jun 2, 2021

The intention is to not have a dependency, this is an oversight i'll get fixed.

@panva panva added bug Something isn't working and removed triage labels Jun 2, 2021
@panva panva closed this as completed in d9d4a5f Jun 2, 2021
@panva
Copy link
Owner

panva commented Jun 2, 2021

@Vinnl
Copy link
Author

Vinnl commented Jun 2, 2021

Quick as usual - thanks!

Vinnl added a commit to inrupt/jose-legacy-modules-js that referenced this issue Jun 2, 2021
Filip released a fix in upstream jose:
panva/jose#206 (comment)
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants