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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
48c7af5
Update cbor-x
MasterKale Aug 16, 2023
dc29a40
Add file extensions to imports
MasterKale Aug 16, 2023
2b0032e
Set up Deno
MasterKale Aug 16, 2023
b208aa0
Add dnt build script
MasterKale Aug 16, 2023
01d9074
Add COSECRV.SECP256K1
MasterKale Aug 16, 2023
765c8c4
Change @hexagon/base64 to point to deno.land
MasterKale Aug 16, 2023
3bd585a
Try to make sure TS isn't influencing any behavior
MasterKale Aug 16, 2023
1637987
Sync up entrypoint definitions
MasterKale Aug 16, 2023
cb8afd5
Migrate typesVersions over
MasterKale Aug 16, 2023
42ffbb4
Migrate TS compilerOptions.lib
MasterKale Aug 16, 2023
acbe93d
Disable post-build type-checking for now
MasterKale Aug 16, 2023
ce1ae8e
Map cbor-x to deno.land
MasterKale Aug 16, 2023
44d009e
Use Deno for linting server
MasterKale Aug 16, 2023
c7610cf
Address `deno lint` issues
MasterKale Aug 16, 2023
e2044cb
Convert typescripti-types imports into deps.ts
MasterKale Aug 16, 2023
2b4f978
Try to start using deno for builds
MasterKale Aug 16, 2023
150b5a0
Commit changes to deno.lock
MasterKale Aug 16, 2023
6869562
Explicitly export types to appease Deno
MasterKale Aug 16, 2023
688b046
Move more deps into deps.ts
MasterKale Aug 16, 2023
ee8d2a1
Rearrange deps.ts
MasterKale Aug 16, 2023
c52e58d
Update deno.lock
MasterKale Aug 16, 2023
52f5092
Move @peculiar libs to deps.ts
MasterKale Aug 16, 2023
54cbd4f
Fix versions on more NPM libs
MasterKale Aug 16, 2023
698628d
Fix debug lib type export
MasterKale Aug 16, 2023
b3fff12
Completely regenerate deno.lock
MasterKale Aug 16, 2023
5bbd9f0
Strip down root package.json into a Lerna wrapper
MasterKale Aug 16, 2023
a017fb0
Format build_npm.ts
MasterKale Aug 16, 2023
70e65cb
Tell dnt to use version in root package.json
MasterKale Aug 16, 2023
070f73b
Run `ddi fmt` over src/
MasterKale Aug 16, 2023
ba61627
Migrate typescript-types to dnt
MasterKale Aug 17, 2023
90976ff
Remove old tsconfig.json from server
MasterKale Aug 17, 2023
0b33078
Clean up build command in server
MasterKale Aug 17, 2023
8c0991a
Figure out how to map relative imports in deps.ts
MasterKale Aug 17, 2023
b1292ed
Enable deno in typescript-types dir
MasterKale Aug 17, 2023
8940736
Document some insights in extract-dom-types
MasterKale Aug 17, 2023
184f6a8
Update deno.lock
MasterKale Aug 17, 2023
c1f32ec
Tweak typescript-types build
MasterKale Aug 17, 2023
1d6993e
Migrate iso-webcrypto to dnt
MasterKale Aug 17, 2023
cd577b8
Try to setup `deno fmt` in Deno packages
MasterKale Aug 17, 2023
59f1f2f
Replace iso-webcrypto with Deno's crypto
MasterKale Aug 17, 2023
0163765
Clear out more iso-webcrypto
MasterKale Aug 17, 2023
c4c6e35
Add getWebCrypto to isoCrypto
MasterKale Aug 17, 2023
549e08d
Run `deno fmt` on everything
MasterKale Aug 17, 2023
92f9656
Update pre-commit hook
MasterKale Aug 17, 2023
3e83445
Use default Deno formatting
MasterKale Aug 17, 2023
3bf51a7
Remove Prettier
MasterKale Aug 17, 2023
8df0bfd
Remove unused old WebCrypto import
MasterKale Aug 17, 2023
4a38a00
Deal with making getRandomValues async
MasterKale Aug 17, 2023
58472a6
Remove crypto shim
MasterKale Aug 17, 2023
57b57de
Fix formatting
MasterKale Aug 17, 2023
0520198
Add missing await
MasterKale Aug 17, 2023
69d493a
Update generateAuthenticationOptions tests
MasterKale Aug 17, 2023
e3c286c
Update test script
MasterKale Aug 17, 2023
429a42c
Add editor ruler matching `deno fmt` line length
MasterKale Aug 17, 2023
82f7b8a
Update verifyAuthenticationResponse tests
MasterKale Aug 17, 2023
1ad27ad
Refactor verifyRegistrationResponse tests
MasterKale Aug 17, 2023
e660597
Don't mutate original CBOR bytes
MasterKale Aug 17, 2023
8195195
Update generateRegistrationOptions tests
MasterKale Aug 17, 2023
d7dc400
Update convertAAGUIDToString tests
MasterKale Aug 17, 2023
a124702
Update verifyOKP tests
MasterKale Aug 17, 2023
4cd3ce7
Update convertCertBufferToPEM tests
MasterKale Aug 17, 2023
d7c7c21
Update convertCOSEtoPKCS tests
MasterKale Aug 17, 2023
2a204f2
Update convertPEMToBytes test
MasterKale Aug 17, 2023
375736d
Update decodeAttestationObject tests
MasterKale Aug 17, 2023
e18e383
Update decodeAuthenticatorExtensions tests
MasterKale Aug 17, 2023
9e260b9
Update decodeClientDataJSON tests
MasterKale Aug 17, 2023
10cdf6f
Update generateChallenge tests
MasterKale Aug 17, 2023
ea9526b
Update parseAuthenticatorData tests
MasterKale Aug 17, 2023
e5a04fe
Update parseBackupFlags tests
MasterKale Aug 17, 2023
abd0b64
Update toHash tests
MasterKale Aug 17, 2023
b0aaa0e
Remove Jest mocks
MasterKale Aug 17, 2023
7470d80
Update verifyAttestationWithMetadata tests
MasterKale Aug 17, 2023
29ef00b
Update verifyAttestationTPM tests
MasterKale Aug 17, 2023
b154b45
Update verifyAttestationPacked tests
MasterKale Aug 17, 2023
430aa8c
Update index tests
MasterKale Aug 17, 2023
19c2312
Update verifyAttestationApple tests
MasterKale Aug 17, 2023
f7b2256
Update verifyAttestationAndroidKey tests
MasterKale Aug 17, 2023
7f5b4d7
Tweak wording in verifyAttestationApple test
MasterKale Aug 17, 2023
170cc47
Update verifyJWT tests
MasterKale Aug 17, 2023
ac4d922
Update verifyAttestationAndroidSafetyNet tests
MasterKale Aug 17, 2023
d6c2318
Update MetadataService E2E tests
MasterKale Aug 17, 2023
ac2a9c1
Update SettingsService tests
MasterKale Aug 17, 2023
77929ac
Create new fetch helper
MasterKale Aug 17, 2023
33e933f
Update MetadataService tests
MasterKale Aug 17, 2023
a029a02
Clean out server Jest config
MasterKale Aug 17, 2023
e1a2f51
Update deno.lock
MasterKale Aug 17, 2023
e685869
Don't shim crypto
MasterKale Aug 17, 2023
7d51950
Clean up npm directories too
MasterKale Aug 17, 2023
39bb131
Try to get browser's tests to see typescript-types
MasterKale Aug 17, 2023
00a0c11
Try to add Deno to GitHub action
MasterKale Aug 18, 2023
e444370
Reorder job steps steps
MasterKale Aug 18, 2023
f89276e
Tweak CI wording
MasterKale Aug 18, 2023
e75a2ac
Downgrade CI Deno to v1.33.1 for now
MasterKale Aug 18, 2023
b0ebdeb
Point lerna publish to dnt build directories
MasterKale Aug 18, 2023
0f9fc95
Update lerna and nx
MasterKale Aug 18, 2023
86cfb81
Run `npx lerna repair`
MasterKale Aug 18, 2023
744f254
Add dnt build dirs to nx build outputs
MasterKale Aug 18, 2023
d4041f8
Start migrating to npm workspaces
MasterKale Aug 18, 2023
fd1a786
Format typescript-types and add more exports
MasterKale Aug 18, 2023
ca373de
Remove experimental typeRoots from browser
MasterKale Aug 18, 2023
2b82649
Rebuild root package-lock.json
MasterKale Aug 18, 2023
8b363bc
Adjust npm scripts for mixed use of npm + Deno
MasterKale Aug 18, 2023
5eea86a
Add back test:watch script to server
MasterKale Aug 18, 2023
ba1ffcd
Remove more eslint comments from server
MasterKale Aug 18, 2023
0ab416e
Remove lingering references to bootstrapping
MasterKale Aug 18, 2023
34a0c49
Format README.md
MasterKale Aug 18, 2023
a85427c
Update development section of README
MasterKale Aug 18, 2023
de5e22f
Move magic comment in response to Deno formatting
MasterKale Aug 18, 2023
dfb32f4
Format browser
MasterKale Aug 18, 2023
e30aa4f
Remove eslint
MasterKale Aug 18, 2023
872893e
Run `deno fmt` on example project
MasterKale Aug 18, 2023
aec8ec9
Add linting to commit hook
MasterKale Aug 18, 2023
35b73db
Fix linting issues in browser
MasterKale Aug 18, 2023
b7dc3e3
Refine GitHub workflow
MasterKale Aug 18, 2023
01437da
Finish thought in getWebCrypto
MasterKale Aug 18, 2023
dcf37d2
Add version to root package.json
MasterKale Aug 18, 2023
dcfe8fd
Update clean script
MasterKale Aug 18, 2023
a031a79
Update server deps.ts
MasterKale Aug 18, 2023
361a5b0
Enable tests during build
MasterKale Aug 18, 2023
7edae5a
Update package-lock.json
MasterKale Aug 18, 2023
ea57f7f
Enable tests to pass without shims in prod build
MasterKale Aug 18, 2023
b360a01
Update root dep: TypeScript
MasterKale Aug 18, 2023
a4cc445
Update root dep: Jest and Typedoc
MasterKale Aug 18, 2023
3f495ce
Update root dep: Husky
MasterKale Aug 18, 2023
2f05757
Update root dep: lint-staged
MasterKale Aug 18, 2023
33b4a45
Uninstall semver
MasterKale Aug 18, 2023
41de06c
Update root deps: rimraf and nodemon
MasterKale Aug 18, 2023
2159b2e
Update root dep: ts-node
MasterKale Aug 18, 2023
797b409
Update root dep: ts-morph
MasterKale Aug 18, 2023
bf93b0a
Switch to @rollup/plugin-terser in browser build
MasterKale Aug 18, 2023
c242f0e
Fix browser tests custom test environment
MasterKale Aug 18, 2023
69169fd
Reorder CI steps to ensure types are available
MasterKale Aug 18, 2023
acdc8d4
Fix issue with getWebCrypto in Node
MasterKale Aug 18, 2023
e0d32bd
Add deno as explicit formatter for more files
MasterKale Aug 18, 2023
a59634a
Use single-quotes and increase line width
MasterKale Aug 18, 2023
ed082a3
Drop typedoc
MasterKale Aug 18, 2023
2ce98ce
Try to get Lerna to see other packages
MasterKale Aug 18, 2023
d1c041a
Simplify workspace names
MasterKale Aug 18, 2023
f6165b1
Try to link browser to typescript-types
MasterKale Aug 18, 2023
490dd0b
Update package-lock.json
MasterKale Aug 18, 2023
84462c4
Map typescript-types to npm version
MasterKale Aug 18, 2023
a885dac
Tweak browser package.json
MasterKale Aug 19, 2023
8d7ffc2
Add LICENSE.md to all packages
MasterKale Aug 19, 2023
b8fb017
Update repo URLs in dnt package.json
MasterKale Aug 20, 2023
f89a0be
Update root scripts to use lerna
MasterKale Aug 20, 2023
3cab7c5
Revert browser link to types
MasterKale Aug 20, 2023
3274501
Remove shims from typescript-types
MasterKale Aug 20, 2023
8543f10
Update package-lock.json from server build
MasterKale Aug 20, 2023
e84054f
Realize I should use simpler esm.sh URLs
MasterKale Aug 20, 2023
9ac03cc
Set up pnpm
MasterKale Aug 20, 2023
e76ce57
Add tslib to browser devDeps
MasterKale Aug 20, 2023
21f479f
Rearrange npm scripts
MasterKale Aug 20, 2023
782b891
Add publish scripts
MasterKale Aug 20, 2023
ff0ce68
Add pnpm to CI
MasterKale Aug 21, 2023
32b2ce0
Update CHANGELOG to v8.0.0-alpha.0
MasterKale Aug 21, 2023
6a80f97
chore(release): publish v8.0.0-alpha.0
MasterKale Aug 21, 2023
bf55d53
Add HANDBOOK.md
MasterKale Aug 21, 2023
c8508c8
Enable shorter deno.land URLs
MasterKale Aug 21, 2023
3013f5f
Tweak server and types READMEs for Deno support
MasterKale Aug 21, 2023
cb165ac
Add engines.node to server's dnt build output
MasterKale Aug 21, 2023
ab877cc
Remove browser Deno import for now
MasterKale Aug 21, 2023
a7726ce
Update READMEs
MasterKale Aug 21, 2023
a995de0
Add runtime versions to root README
MasterKale Aug 21, 2023
073dece
Add a bit more Deno-related info to root README
MasterKale Aug 22, 2023
0228a1a
Change `import` to `import type`
MasterKale Aug 22, 2023
ab7cdeb
Emphasize CJS and ESM support in server
MasterKale Aug 22, 2023
031437e
Tweak README's
MasterKale Aug 22, 2023
bc3bc91
Update development steps in README to use pnpm
MasterKale Aug 22, 2023
a6d57af
Move @hexagon/base64 import into deps.ts
MasterKale Aug 22, 2023
4db46fa
Add .git-blame-ignore-revs of `deno fmt` commits
MasterKale Aug 22, 2023
2935857
Remove prepublish scripts
MasterKale Aug 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

15 changes: 15 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
######################
# Deno formatting runs
######################
# "Use single-quotes and increase line width"
a59634a1a9b0393622fb121fbe229132c01a2624
# "Run `deno fmt` on everything"
549e08dbed9736b63d827649aaf422958f989609
# "Format browser"
dfb32f4891f6c955c25b2f305fa702cdaf8c5a5e
# "Format README.md"
34a0c49714b2974e409495bd0dba59ccc7003ae1
# "Run `deno fmt` on example project"
872893e3c4930c293cd8b701395429e24088ce1e
# "Run `ddi fmt` over src/"
070f73b8de107111b4a34001254a981548f677f7
69 changes: 69 additions & 0 deletions .github/workflows/ciChecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI Checks

on:
push:
branches: [ master, beta ]
pull_request:
branches: [ master, beta ]

jobs:
unit_tests:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 16, 18 ]
# TODO: Find a better action, this one is limited to v1.33.1
# See https://github.com/maximousblk/setup-deno/issues
deno-version: [ 'v1.33.1' ]

steps:
- uses: actions/checkout@v3

# Install Node
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: node -v

# Install Deno
- name: Setup Deno ${{ matrix.deno-version }}
uses: maximousblk/setup-deno@v2
with:
deno-version: ${{ matrix.deno-version }}
- run: deno -V

# Install pnpm w/cache for quicker installs
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Setup pnpm 8.6.12
uses: pnpm/action-setup@v2
with:
version: 8.6.12
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

# Install deps
- name: Install dependencies
run: pnpm install

# Build and test dnt packages
- run: npm run build:types # browser tests will need this to be built
- run: npm run build:server # dnt will test everything in Node too

# Test packages
- run: npm run test:browser
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules/
dist/
npm/
npm-test/
coverage/
.DS_Store
docs/
Expand Down
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**",
"${workspaceFolder}/**/node_modules/**",
"${workspaceFolder}/**/node_modules/**"
],
"cwd": "${workspaceFolder}/example",
"cwd": "${workspaceFolder}/example"
}
]
}
24 changes: 23 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"deno.path": "/opt/homebrew/bin/deno",
"deno.enablePaths": [
"./packages/server",
"./packages/typescript-types"
],
"editor.rulers": [
100
],
"editor.defaultFormatter": "denoland.vscode-deno",
// Required for formatOnSave to work, see https://github.com/denoland/vscode_deno/issues/789
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[jsonc]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"gitlens.advanced.blame.customArguments": [
"--ignore-revs-file",
".git-blame-ignore-revs"
]
}
50 changes: 25 additions & 25 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build:server",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build:server",
"detail": "lerna bootstrap --scope=@simplewebauthn/server"
},
{
"type": "npm",
"script": "build:browser",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build:browser",
"detail": "lerna bootstrap --scope=@simplewebauthn/browser"
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build:server",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build:server",
"detail": "lerna bootstrap --scope=@simplewebauthn/server"
},
{
"type": "npm",
"script": "build:browser",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build:browser",
"detail": "lerna bootstrap --scope=@simplewebauthn/browser"
}
]
}
Loading
Loading