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

Hidden dependencies #40

Open
karamosky opened this issue Feb 13, 2021 · 3 comments
Open

Hidden dependencies #40

karamosky opened this issue Feb 13, 2021 · 3 comments

Comments

@karamosky
Copy link

This library has a dependency on node stream, node crypto and node url modules. When used in my project I was forced to provide fallbacks using Webpack.
Is there any way we can remove these dependencies @mcoqblin-hiptest? They seem to be deps on atlassian-jwt package.

@mcoqblin-hiptest
Copy link
Collaborator

Unfortunately I'm not sure we can do much. Webpack 5 does not provide polyfills for core node modules anymore. AP.context.getToken requires JWT, so even without atlassian-jwt we will still need crypto and stream.

I'm not sure about url. It is used by atlassian-jwt but I think it is used for QSH which we do not use. The dev server of Fake AP itself works without it.

Do you know which AP methods require url? Or does your build fail without event using it?

By the way you can provide these polyfill only in development and test environments in Webpack.

@karamosky
Copy link
Author

karamosky commented Feb 15, 2021

How about switching to https://github.com/panva/jose which is a plain js implementation?

@mcoqblin-hiptest
Copy link
Collaborator

That's a good idea. Go ahead if you want to try, otherwise I'll try to do it during the week.

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

No branches or pull requests

2 participants