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

feat/server-esm-take-2-dnt #425

Merged
merged 171 commits into from
Aug 22, 2023
Merged

feat/server-esm-take-2-dnt #425

merged 171 commits into from
Aug 22, 2023

Conversation

MasterKale
Copy link
Owner

@MasterKale MasterKale commented Aug 17, 2023

This PR updates SimpleWebAuthn project to add the ability to use @simplewebauthn/server and @simplewebauthn/typescript-types for use in Deno. These packages will be maintained at the following URL:

https://deno.land/x/simplewebauthn

The NPM package output continues to support CommonJS and ECMAScript modules.

This should complete the goal of "adding ESM support to SimpleWebAuthn" as this PR ultimately unblocks use of this library in non-Node, ESM-first, Web-API-centric runtimes as well, like Deno, CloudFlare Workers, and Bun.

Supersedes PR #366 to address Issue #338.

Other Notes

  • There are a lot of formatting-related changes in this PR - I've created a .git-blame-ignore-revs in the root of the monorepo that can be used locally via git blame --ignore-revs-file .git-blame-ignore-revs (the GitLens extension in VS Code has been set up to do this automatically.)
  • I've switched to using deno fmt for code formatting and deno lint for linting. As a result Prettier and ESLint have been removed.
  • pnpm has been introduced in response to Lerna deprecating its bootstrap command for native package manager workspace support. pnpm will make sure local package linking using the workspace: value will get mapped to a proper version as part of pnpm publish.

Breaking Changes

  1. The following methods in @simplewebauthn/server are now async methods that return a Promise:
  • generateRegistrationOptions()
  • generateAuthenticationOptions()
  • generateChallenge() (in @simplewebauthn/server/helpers)

I think I need to keep this around because it's how Lerna will version this package. But with the package.json that ends up being generated being controlled by dnt via build_npm.ts I thought it good to make the root package.json barebones to discourage future-me from trying to use npm again with this library.
@MasterKale MasterKale added package:browser @simplewebauthn/browser package:server @simplewebauthn/server package:types @simplewebauthn/typescript-types monorepo Changes related to monorepo management labels Aug 22, 2023
@MasterKale MasterKale added this to the v8.0.0 milestone Aug 22, 2023
@MasterKale MasterKale mentioned this pull request Aug 22, 2023
@MasterKale MasterKale merged commit fefc95e into master Aug 22, 2023
2 checks passed
@MasterKale MasterKale deleted the feat/server-esm-take-2-dnt branch August 22, 2023 17:13
@MasterKale MasterKale restored the feat/server-esm-take-2-dnt branch August 22, 2023 17:18
@MasterKale MasterKale deleted the feat/server-esm-take-2-dnt branch August 22, 2023 17:18
@MasterKale MasterKale restored the feat/server-esm-take-2-dnt branch August 22, 2023 17:18
@MasterKale MasterKale deleted the feat/server-esm-take-2-dnt branch August 22, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monorepo Changes related to monorepo management package:browser @simplewebauthn/browser package:server @simplewebauthn/server package:types @simplewebauthn/typescript-types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant