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

Locker complience fixed #131

Merged
merged 6 commits into from
Jan 20, 2023
Merged

Conversation

ivanovSPvirtru
Copy link
Contributor

Locker api also doesn't like dynamic import

@ivanovSPvirtru ivanovSPvirtru requested a review from a team as a code owner January 16, 2023 16:13
@github-actions
Copy link

If these changes look good, signoff on them with:

git pull && git commit --amend --signoff && git push --force-with-lease origin

If they aren't any good, please remove them with:

git pull && git reset --hard HEAD~1 && git push --force-with-lease origin

@@ -136,7 +137,6 @@ export class AccessToken {
}
if (this.signing_key) {
// TODO: dpop does not have a CommonJS variant.
const { default: dpopFn } = await import('dpop');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is to work around the dpop library not exporting a CJS variant. Node supports dynamic import even in CJS so we may have to do something else here - or fork the library, most likely

See: https://stackoverflow.com/a/71093947

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn it. Welp, last time i had such issues with locker complience, ive just putted lib as a folder. Not whole thing but what we use. Also we could fork it and add webpack to bundle CJS variant. Or maybe theres other libs that doing what drop does

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we can fork as opentdf and publish to GitHub's package registry. Adding the CommonJS output should be pretty similar to what we are doing with this library now

Signed-off-by: sivanov <sivanov.ctr@virtru.com>
@ivanovSPvirtru ivanovSPvirtru force-pushed the feature/locker-complience-fixed branch from e69c4df to 7c87dc2 Compare January 17, 2023 10:38
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ivanovSPvirtru ivanovSPvirtru merged commit 20d2ce6 into main Jan 20, 2023
@ivanovSPvirtru ivanovSPvirtru deleted the feature/locker-complience-fixed branch January 20, 2023 12:15
danielRicaud pushed a commit that referenced this pull request Feb 1, 2023
* Locker complience fixed

* 🤖 🎨 Autoformat

Signed-off-by: sivanov <sivanov.ctr@virtru.com>

* CJS removed

* Readme change

Signed-off-by: sivanov <sivanov.ctr@virtru.com>
Co-authored-by: ivanovSPvirtru <ivanovSPvirtru@users.noreply.github.com>
danielRicaud pushed a commit that referenced this pull request Feb 1, 2023
* Locker complience fixed

* 🤖 🎨 Autoformat

Signed-off-by: sivanov <sivanov.ctr@virtru.com>

* CJS removed

* Readme change

Signed-off-by: sivanov <sivanov.ctr@virtru.com>
Co-authored-by: ivanovSPvirtru <ivanovSPvirtru@users.noreply.github.com>
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.

3 participants