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

fix/427-fix-dynamic-webcrypto-import #428

Merged
merged 3 commits into from
Aug 23, 2023

Conversation

MasterKale
Copy link
Owner

@MasterKale MasterKale commented Aug 23, 2023

This PR fixes the dynamic import attempt I make in getWebCrypto() to correctly use import() instead of require().

It turns out this also fixed the "issue" that lead to me setting up a double-build in server, so this PR includes cleanup of that to get server back down to a single build.

Fixes #427.

Manual Test

I tested the fix with the following files and Node had no problem running either:

test_node.cjs

const { generateRegistrationOptions } = require('@simplewebauthn/server');

(async () => {
  console.log(await generateRegistrationOptions({
    rpID: '',
    rpName: '',
    userID: '',
    userName: '',
  }));
})();

test_node.mjs

import { generateRegistrationOptions } from '@simplewebauthn/server';

(async () => {
  console.log(await generateRegistrationOptions({
    rpID: '',
    rpName: '',
    userID: '',
    userName: '',
  }));
})();

@MasterKale MasterKale merged commit fb30fc9 into master Aug 23, 2023
2 checks passed
@MasterKale MasterKale deleted the fix/427-fix-dynamic-webcrypto-import branch August 23, 2023 16:06
@MasterKale MasterKale restored the fix/427-fix-dynamic-webcrypto-import branch August 23, 2023 16:06
@MasterKale MasterKale deleted the fix/427-fix-dynamic-webcrypto-import branch August 23, 2023 16:07
@MasterKale MasterKale restored the fix/427-fix-dynamic-webcrypto-import branch August 23, 2023 16:07
@MasterKale MasterKale added this to the v8.0.1 milestone Aug 23, 2023
@MasterKale MasterKale added bug Something isn't working package:server @simplewebauthn/server and removed bug Something isn't working labels Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:server @simplewebauthn/server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

require is not defined
1 participant