From 287053ace814608c62dbf14706e54071e41033b8 Mon Sep 17 00:00:00 2001 From: Lucas Garron Date: Mon, 14 Nov 2022 17:46:57 -0800 Subject: [PATCH] Update to `rome` stable. Includes workarounds for: - https://github.com/rome/tools/issues/3734 - https://github.com/rome/tools/issues/3735 --- package-lock.json | 162 ++++++++++----------------- package.json | 2 +- rome.json | 5 +- src/webauthn-json/basic/supported.ts | 7 +- 4 files changed, 64 insertions(+), 112 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70659f9b..6594abb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "esbuild": "^0.15.13", "jest": "^29.2.2", "jest-environment-jsdom": "^29.2.2", - "rome": "^0.10.1-next", + "rome": "^10.0.1", "ts-jest": "^29.0.3", "typescript": "^4.8.4" } @@ -984,9 +984,9 @@ } }, "node_modules/@rometools/cli-darwin-arm64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-arm64/-/cli-darwin-arm64-0.10.1-next.tgz", - "integrity": "sha512-nyNijAs52mIE6oAJOXEGgnJfiBRP2tN+puQbi88o4ktmSXR43XnXs2fTme7xXRwzZ6uwoc9kVRAbHsgFZpYgMA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-arm64/-/cli-darwin-arm64-10.0.1.tgz", + "integrity": "sha512-MwQjk3uhZrCu6LgIwJHREAsVt/mUQTGv7p8iosfaF8lCIxMVjyS+akbF/QcBufyW5sFtHYNWUEe/uKPHK4E//A==", "cpu": [ "arm64" ], @@ -997,9 +997,9 @@ ] }, "node_modules/@rometools/cli-darwin-x64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-x64/-/cli-darwin-x64-0.10.1-next.tgz", - "integrity": "sha512-O+1tDZKITaf/WaF3r1PnANGhm8Ex6IwrHXAFNVHEdy496jHfBGIzZ9wf6g8o2INpUe+OM6v6knA9wwjbMPmzSw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-x64/-/cli-darwin-x64-10.0.1.tgz", + "integrity": "sha512-n010Wc/z9L8wRkRnR5boMhdWgDVGrTG/i7zL8u/3+F5aSUgLCywf9F/b3ex74tCJJfcwBLlhaAqAVQX6U1bIkA==", "cpu": [ "x64" ], @@ -1010,9 +1010,9 @@ ] }, "node_modules/@rometools/cli-linux-arm64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-linux-arm64/-/cli-linux-arm64-0.10.1-next.tgz", - "integrity": "sha512-aZGSrTaPzcHarlrA8hAO2ZbpoF1yl5BwhX93U5eM92jEJg9/NPl0RuVmZaiOIVN6gUu7Xv2PDE9S0ZqPUugcAA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-linux-arm64/-/cli-linux-arm64-10.0.1.tgz", + "integrity": "sha512-JljZsnud1KCfe36VNsVh/LrYdAzgbKbcsCTzeCjW9ROkMyNj8pmQ/gIUFxZ+PyhMFgowHIDGihoNf4m+pgpxkA==", "cpu": [ "arm64" ], @@ -1023,9 +1023,9 @@ ] }, "node_modules/@rometools/cli-linux-x64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-linux-x64/-/cli-linux-x64-0.10.1-next.tgz", - "integrity": "sha512-fVN7HhUVSEANQL8qFJbteX/8wLIFc+1HtTRxwoGEbmSZfXbIPalFuvkQ3o0pke2+LdpU1URiLzMIx+5gBwPjeA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-linux-x64/-/cli-linux-x64-10.0.1.tgz", + "integrity": "sha512-jXIqd9iDyZUexk63CRfAXDA4zNDUHpErUmCejjGab3dhDt1KA40fDqKb+kxZpAhY3tQoWNSNQyo750zX5NawLw==", "cpu": [ "x64" ], @@ -1036,9 +1036,9 @@ ] }, "node_modules/@rometools/cli-win32-arm64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-win32-arm64/-/cli-win32-arm64-0.10.1-next.tgz", - "integrity": "sha512-UMkSgQMslkTQ/QvwTdOsmQWlTc2RgiA4fsHv9thcDHdrV13+kUCsYQV5EA27ROVCFFdyxAG3OrZiRPbd92mHHA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-win32-arm64/-/cli-win32-arm64-10.0.1.tgz", + "integrity": "sha512-G/toRrKPhhi7SMYMyROq/E2c8/4xRX/67vFhVihuMvDDzhanIb99hEt5MMbM4HbYK1nnZBPyLN6LxVsxm9M9hA==", "cpu": [ "arm64" ], @@ -1049,9 +1049,9 @@ ] }, "node_modules/@rometools/cli-win32-x64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-win32-x64/-/cli-win32-x64-0.10.1-next.tgz", - "integrity": "sha512-1ZCdAZKtB/bzFDJtbSECfCE3f+d00n8+/8AShOZ4+gKTtJZMOZ56XWD+9MvLq16DUogyGKwR0IzVgIUzvOQGwQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-win32-x64/-/cli-win32-x64-10.0.1.tgz", + "integrity": "sha512-y299+VGoBufZntZj0Xz7w9DODU+6E5giXStfBDoa0fspXGNkYyYfD+HC6j9gUv4zpMZJ607XVvVHjpfwM/3ftA==", "cpu": [ "x64" ], @@ -1061,27 +1061,6 @@ "win32" ] }, - "node_modules/@rometools/wasm-bundler": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/wasm-bundler/-/wasm-bundler-0.10.1-next.tgz", - "integrity": "sha512-yREKu7ZgmKfCOvxYvX7EmJu65mNT+BioaJf3Vep/mCI+/S6WJotMomNogeMzfrWQ06VhEVkqebV4x8W1hFLMjg==", - "dev": true, - "optional": true - }, - "node_modules/@rometools/wasm-nodejs": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/wasm-nodejs/-/wasm-nodejs-0.10.1-next.tgz", - "integrity": "sha512-4aiPUhsumpzj497ipSAqQhJTT12hVS2IJaVe4hztGxqZgLlrm1hbWWal/XzUMYYh30iGAaqZIfR8vuA4E8WCoQ==", - "dev": true, - "optional": true - }, - "node_modules/@rometools/wasm-web": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/wasm-web/-/wasm-web-0.10.1-next.tgz", - "integrity": "sha512-FjPkty4Rab2fEciL4tonpDwHpOyHVgAdxhz3BhSnDlEMCW1VnFCpk45v/2srDrBCY+W23++zQyBbDoZKbjIbJA==", - "dev": true, - "optional": true - }, "node_modules/@sinclair/typebox": { "version": "0.24.51", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", @@ -4008,9 +3987,9 @@ } }, "node_modules/rome": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/rome/-/rome-0.10.1-next.tgz", - "integrity": "sha512-WB+zT+NGE6pqSmNgemlAwreE2BwWLi6rQ3g8L1IlBOvBI8QB0iRMgYRmdVxBMjQ2X6CDnCuDnbKOE3uqC50qvw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/rome/-/rome-10.0.1.tgz", + "integrity": "sha512-RfaDa+cSustBsjX6bj3fWqEhoNxXrK1uNgKHpkCHAqp20QMJXnCRtbokhirNMe0utyGI9GTO/sDoK7hJP7O8Bw==", "dev": true, "hasInstallScript": true, "bin": { @@ -4020,15 +3999,12 @@ "node": ">=14.*" }, "optionalDependencies": { - "@rometools/cli-darwin-arm64": "0.10.1-next", - "@rometools/cli-darwin-x64": "0.10.1-next", - "@rometools/cli-linux-arm64": "0.10.1-next", - "@rometools/cli-linux-x64": "0.10.1-next", - "@rometools/cli-win32-arm64": "0.10.1-next", - "@rometools/cli-win32-x64": "0.10.1-next", - "@rometools/wasm-bundler": "0.10.1-next", - "@rometools/wasm-nodejs": "0.10.1-next", - "@rometools/wasm-web": "0.10.1-next" + "@rometools/cli-darwin-arm64": "10.0.1", + "@rometools/cli-darwin-x64": "10.0.1", + "@rometools/cli-linux-arm64": "10.0.1", + "@rometools/cli-linux-x64": "10.0.1", + "@rometools/cli-win32-arm64": "10.0.1", + "@rometools/cli-win32-x64": "10.0.1" } }, "node_modules/safer-buffer": { @@ -5409,65 +5385,44 @@ } }, "@rometools/cli-darwin-arm64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-arm64/-/cli-darwin-arm64-0.10.1-next.tgz", - "integrity": "sha512-nyNijAs52mIE6oAJOXEGgnJfiBRP2tN+puQbi88o4ktmSXR43XnXs2fTme7xXRwzZ6uwoc9kVRAbHsgFZpYgMA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-arm64/-/cli-darwin-arm64-10.0.1.tgz", + "integrity": "sha512-MwQjk3uhZrCu6LgIwJHREAsVt/mUQTGv7p8iosfaF8lCIxMVjyS+akbF/QcBufyW5sFtHYNWUEe/uKPHK4E//A==", "dev": true, "optional": true }, "@rometools/cli-darwin-x64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-x64/-/cli-darwin-x64-0.10.1-next.tgz", - "integrity": "sha512-O+1tDZKITaf/WaF3r1PnANGhm8Ex6IwrHXAFNVHEdy496jHfBGIzZ9wf6g8o2INpUe+OM6v6knA9wwjbMPmzSw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-x64/-/cli-darwin-x64-10.0.1.tgz", + "integrity": "sha512-n010Wc/z9L8wRkRnR5boMhdWgDVGrTG/i7zL8u/3+F5aSUgLCywf9F/b3ex74tCJJfcwBLlhaAqAVQX6U1bIkA==", "dev": true, "optional": true }, "@rometools/cli-linux-arm64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-linux-arm64/-/cli-linux-arm64-0.10.1-next.tgz", - "integrity": "sha512-aZGSrTaPzcHarlrA8hAO2ZbpoF1yl5BwhX93U5eM92jEJg9/NPl0RuVmZaiOIVN6gUu7Xv2PDE9S0ZqPUugcAA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-linux-arm64/-/cli-linux-arm64-10.0.1.tgz", + "integrity": "sha512-JljZsnud1KCfe36VNsVh/LrYdAzgbKbcsCTzeCjW9ROkMyNj8pmQ/gIUFxZ+PyhMFgowHIDGihoNf4m+pgpxkA==", "dev": true, "optional": true }, "@rometools/cli-linux-x64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-linux-x64/-/cli-linux-x64-0.10.1-next.tgz", - "integrity": "sha512-fVN7HhUVSEANQL8qFJbteX/8wLIFc+1HtTRxwoGEbmSZfXbIPalFuvkQ3o0pke2+LdpU1URiLzMIx+5gBwPjeA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-linux-x64/-/cli-linux-x64-10.0.1.tgz", + "integrity": "sha512-jXIqd9iDyZUexk63CRfAXDA4zNDUHpErUmCejjGab3dhDt1KA40fDqKb+kxZpAhY3tQoWNSNQyo750zX5NawLw==", "dev": true, "optional": true }, "@rometools/cli-win32-arm64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-win32-arm64/-/cli-win32-arm64-0.10.1-next.tgz", - "integrity": "sha512-UMkSgQMslkTQ/QvwTdOsmQWlTc2RgiA4fsHv9thcDHdrV13+kUCsYQV5EA27ROVCFFdyxAG3OrZiRPbd92mHHA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-win32-arm64/-/cli-win32-arm64-10.0.1.tgz", + "integrity": "sha512-G/toRrKPhhi7SMYMyROq/E2c8/4xRX/67vFhVihuMvDDzhanIb99hEt5MMbM4HbYK1nnZBPyLN6LxVsxm9M9hA==", "dev": true, "optional": true }, "@rometools/cli-win32-x64": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/cli-win32-x64/-/cli-win32-x64-0.10.1-next.tgz", - "integrity": "sha512-1ZCdAZKtB/bzFDJtbSECfCE3f+d00n8+/8AShOZ4+gKTtJZMOZ56XWD+9MvLq16DUogyGKwR0IzVgIUzvOQGwQ==", - "dev": true, - "optional": true - }, - "@rometools/wasm-bundler": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/wasm-bundler/-/wasm-bundler-0.10.1-next.tgz", - "integrity": "sha512-yREKu7ZgmKfCOvxYvX7EmJu65mNT+BioaJf3Vep/mCI+/S6WJotMomNogeMzfrWQ06VhEVkqebV4x8W1hFLMjg==", - "dev": true, - "optional": true - }, - "@rometools/wasm-nodejs": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/wasm-nodejs/-/wasm-nodejs-0.10.1-next.tgz", - "integrity": "sha512-4aiPUhsumpzj497ipSAqQhJTT12hVS2IJaVe4hztGxqZgLlrm1hbWWal/XzUMYYh30iGAaqZIfR8vuA4E8WCoQ==", - "dev": true, - "optional": true - }, - "@rometools/wasm-web": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/@rometools/wasm-web/-/wasm-web-0.10.1-next.tgz", - "integrity": "sha512-FjPkty4Rab2fEciL4tonpDwHpOyHVgAdxhz3BhSnDlEMCW1VnFCpk45v/2srDrBCY+W23++zQyBbDoZKbjIbJA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@rometools/cli-win32-x64/-/cli-win32-x64-10.0.1.tgz", + "integrity": "sha512-y299+VGoBufZntZj0Xz7w9DODU+6E5giXStfBDoa0fspXGNkYyYfD+HC6j9gUv4zpMZJ607XVvVHjpfwM/3ftA==", "dev": true, "optional": true }, @@ -7605,20 +7560,17 @@ "dev": true }, "rome": { - "version": "0.10.1-next", - "resolved": "https://registry.npmjs.org/rome/-/rome-0.10.1-next.tgz", - "integrity": "sha512-WB+zT+NGE6pqSmNgemlAwreE2BwWLi6rQ3g8L1IlBOvBI8QB0iRMgYRmdVxBMjQ2X6CDnCuDnbKOE3uqC50qvw==", - "dev": true, - "requires": { - "@rometools/cli-darwin-arm64": "0.10.1-next", - "@rometools/cli-darwin-x64": "0.10.1-next", - "@rometools/cli-linux-arm64": "0.10.1-next", - "@rometools/cli-linux-x64": "0.10.1-next", - "@rometools/cli-win32-arm64": "0.10.1-next", - "@rometools/cli-win32-x64": "0.10.1-next", - "@rometools/wasm-bundler": "0.10.1-next", - "@rometools/wasm-nodejs": "0.10.1-next", - "@rometools/wasm-web": "0.10.1-next" + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/rome/-/rome-10.0.1.tgz", + "integrity": "sha512-RfaDa+cSustBsjX6bj3fWqEhoNxXrK1uNgKHpkCHAqp20QMJXnCRtbokhirNMe0utyGI9GTO/sDoK7hJP7O8Bw==", + "dev": true, + "requires": { + "@rometools/cli-darwin-arm64": "10.0.1", + "@rometools/cli-darwin-x64": "10.0.1", + "@rometools/cli-linux-arm64": "10.0.1", + "@rometools/cli-linux-x64": "10.0.1", + "@rometools/cli-win32-arm64": "10.0.1", + "@rometools/cli-win32-x64": "10.0.1" } }, "safer-buffer": { diff --git a/package.json b/package.json index ab54013a..96f63cae 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "esbuild": "^0.15.13", "jest": "^29.2.2", "jest-environment-jsdom": "^29.2.2", - "rome": "^0.10.1-next", + "rome": "^10.0.1", "ts-jest": "^29.0.3", "typescript": "^4.8.4" }, diff --git a/rome.json b/rome.json index 690f7c91..a45f65dd 100644 --- a/rome.json +++ b/rome.json @@ -6,10 +6,7 @@ "linter": { "enabled": true, "rules": { - "recommended": true, - "correctness": { - "useSimplifiedLogicExpression": "off" - } + "recommended": true } } } diff --git a/src/webauthn-json/basic/supported.ts b/src/webauthn-json/basic/supported.ts index a4961973..3122e4e0 100644 --- a/src/webauthn-json/basic/supported.ts +++ b/src/webauthn-json/basic/supported.ts @@ -4,9 +4,12 @@ // https://developers.google.com/web/updates/2018/03/webauthn-credential-management export function supported(): boolean { + // rome-ignore format: Work around https://github.com/rome/tools/issues/3734 return !!( - navigator.credentials?.create && + // rome-ignore lint(style/useOptionalChain): Optional chaining creates more complicated ES2019 code + navigator.credentials && + navigator.credentials.create && navigator.credentials.get && - globalThis.PublicKeyCredential + window.PublicKeyCredential ); }