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

Upgrade project to use ESM imports #409

Open
kdhttps opened this issue Jan 17, 2022 · 1 comment · May be fixed by #426
Open

Upgrade project to use ESM imports #409

kdhttps opened this issue Jan 17, 2022 · 1 comment · May be fixed by #426
Assignees
Labels
enhancement Needs Documentation Issue that requires documentation to be added in Gluu docs

Comments

@kdhttps
Copy link
Contributor

kdhttps commented Jan 17, 2022

Currently, we are using commonjs format where we add libs in a project using require('module') but some libs(e.g. got) are stoping this and moving on to the latest javascript technique that is ESM(ECMA Script Module) which use import and export syntax for use lib. CommonJS does not allow to use/import of ESM Modules but the ESM technique allows both ESM and CommonJS so it is good to upgrade projects to use ESM.

discussion #401 (comment)

@kdhttps
Copy link
Contributor Author

kdhttps commented Jan 27, 2022

@christian-hawk mate, rewire is not supporting ESM https://github.com/jhnns/rewire#limitations. There is one package babel-plugin-rewire but it depends on babel which means we have to rebuild/restructure whole gluu-passport. There is not any other package for this so I guess we have to modify our code and test cases. Please share your thoughts

@kdhttps kdhttps added the Needs Documentation Issue that requires documentation to be added in Gluu docs label Feb 3, 2022
@kdhttps kdhttps linked a pull request Mar 2, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Needs Documentation Issue that requires documentation to be added in Gluu docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant