I tried updating from 0.22.0 to 0.24.0 and get all sort of regression issues. Using the following build config:
{
entryPoints: ["./mod.ts"],
outDir: "./npm",
mappings: {
"./http_server_native.ts": "./http_server_node.ts",
},
shims: {
blob: true,
crypto: true,
deno: true,
undici: true,
custom: [{
package: {
name: "stream/web",
},
globalNames: ["ReadableStream", "TransformStream"],
}, {
module: "./node_shims.ts",
globalNames: ["ErrorEvent"],
}],
},
test: true,
compilerOptions: {
importHelpers: true,
target: "ES2021",
},
package: {
name: "@oakserver/oak",
version: Deno.args[0],
description: "A middleware framework for handling HTTP requests",
license: "MIT",
engines: {
node: ">=16.5.0 <18",
},
repository: {
type: "git",
url: "git+https://github.com/oakserver/oak.git",
},
bugs: {
url: "https://github.com/oakserver/oak/issues",
},
dependencies: {
"tslib": "~2.3.1",
},
devDependencies: {
"@types/node": "^16",
},
},
}
And get all sorts of type issues:
npm/src/application.ts:76:11 - error TS2304: Cannot find name 'ErrorEventInit'.
76 extends ErrorEventInit {
~~~~~~~~~~~~~~
npm/src/application.ts:76:11 - error TS4022: 'extends' clause of exported interface 'ApplicationErrorEventInit' has or is using private name 'ErrorEventInit'.
76 extends ErrorEventInit {
~~~~~~~~~~~~~~
npm/src/application.ts:92:46 - error TS2304: Cannot find name 'EventInit'.
92 interface ApplicationListenEventInit extends EventInit {
~~~~~~~~~
npm/src/application.ts:92:46 - error TS4022: 'extends' clause of exported interface 'ApplicationListenEventInit' has or is using private name 'EventInit'.
92 interface ApplicationListenEventInit extends EventInit {
~~~~~~~~~
npm/src/application.ts:215:45 - error TS2304: Cannot find name 'Event'.
215 export class ApplicationListenEvent extends Event {
~~~~~
npm/src/application.ts:215:45 - error TS4020: 'extends' clause of exported class 'ApplicationListenEvent' has or is using private name 'Event'.
215 export class ApplicationListenEvent extends Event {
~~~~~
npm/src/application.ts:261:11 - error TS2304: Cannot find name 'EventTarget'.
261 extends EventTarget {
~~~~~~~~~~~
npm/src/application.ts:261:11 - error TS4020: 'extends' clause of exported class 'Application' has or is using private name 'EventTarget'.
261 extends EventTarget {
~~~~~~~~~~~
npm/src/application.ts:355:10 - error TS2339: Property 'dispatchEvent' does not exist on type 'Application<AS>'.
355 this.dispatchEvent(new ApplicationErrorEvent({ context, message, error }));
~~~~~~~~~~~~~
npm/src/application.ts:355:61 - error TS2345: Argument of type '{ context: Context<AS, Record<string, any>>; message: any; error: any; }' is not assignable to parameter of type 'ApplicationErrorEventInit<AS, Record<string, any>>'.
Object literal may only specify known properties, and 'message' does not exist in type 'ApplicationErrorEventInit<AS, Record<string, any>>'.
355 this.dispatchEvent(new ApplicationErrorEvent({ context, message, error }));
~~~~~~~
npm/src/application.ts:433:25 - error TS2304: Cannot find name 'AddEventListenerOptions'.
433 options?: boolean | AddEventListenerOptions,
~~~~~~~~~~~~~~~~~~~~~~~
npm/src/application.ts:433:25 - error TS4073: Parameter 'options' of public method from exported class has or is using private name 'AddEventListenerOptions'.
433 options?: boolean | AddEventListenerOptions,
~~~~~~~~~~~~~~~~~~~~~~~
npm/src/application.ts:440:25 - error TS2304: Cannot find name 'AddEventListenerOptions'.
440 options?: boolean | AddEventListenerOptions,
~~~~~~~~~~~~~~~~~~~~~~~
npm/src/application.ts:440:25 - error TS4073: Parameter 'options' of public method from exported class has or is using private name 'AddEventListenerOptions'.
440 options?: boolean | AddEventListenerOptions,
~~~~~~~~~~~~~~~~~~~~~~~
npm/src/application.ts:446:15 - error TS2304: Cannot find name 'EventListenerOrEventListenerObject'.
446 listener: EventListenerOrEventListenerObject | null,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm/src/application.ts:447:25 - error TS2304: Cannot find name 'AddEventListenerOptions'.
447 options?: boolean | AddEventListenerOptions,
~~~~~~~~~~~~~~~~~~~~~~~
npm/src/application.ts:538:14 - error TS2339: Property 'addEventListener' does not exist on type 'AbortSignal'.
538 signal.addEventListener("abort", () => {
~~~~~~~~~~~~~~~~
npm/src/application.ts:550:10 - error TS2339: Property 'dispatchEvent' does not exist on type 'Application<AS>'.
550 this.dispatchEvent(
~~~~~~~~~~~~~
npm/src/application.ts:568:12 - error TS2339: Property 'dispatchEvent' does not exist on type 'Application<AS>'.
568 this.dispatchEvent(
~~~~~~~~~~~~~
npm/src/application.ts:569:37 - error TS2345: Argument of type '{ message: string; error: any; }' is not assignable to parameter of type 'ApplicationErrorEventInit<State, State>'.
Object literal may only specify known properties, and 'message' does not exist in type 'ApplicationErrorEventInit<State, State>'.
569 new ApplicationErrorEvent({ message, error }),
~~~~~~~
npm/src/body.ts:186:21 - error TS2304: Cannot find name 'TextDecoder'.
186 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/body_test.ts:17:21 - error TS2304: Cannot find name 'TextDecoder'.
17 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/buf_reader_test.ts:10:21 - error TS2304: Cannot find name 'TextDecoder'.
10 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/content_disposition.ts:103:27 - error TS2304: Cannot find name 'TextDecoder'.
103 const decoder = new TextDecoder(encoding, { fatal: true });
~~~~~~~~~~~
npm/src/context.ts:67:13 - error TS2304: Cannot find name 'WebSocket'.
67 #socket?: WebSocket;
~~~~~~~~~
npm/src/context.ts:108:17 - error TS2304: Cannot find name 'WebSocket'.
108 get socket(): WebSocket | undefined {
~~~~~~~~~
npm/src/context.ts:108:17 - error TS4043: Return type of public getter 'socket' from exported class has or is using private name 'WebSocket'.
108 get socket(): WebSocket | undefined {
~~~~~~~~~
npm/src/context.ts:233:47 - error TS2304: Cannot find name 'WebSocket'.
233 upgrade(options?: UpgradeWebSocketOptions): WebSocket {
~~~~~~~~~
npm/src/context.ts:233:47 - error TS4055: Return type of public method from exported class has or is using private name 'WebSocket'.
233 upgrade(options?: UpgradeWebSocketOptions): WebSocket {
~~~~~~~~~
npm/src/context_test.ts:66:29 - error TS2304: Cannot find name 'WebSocket'.
66 const mockWebSocket = {} as WebSocket;
~~~~~~~~~
npm/src/deps/deno.land/[email protected]/encoding/base64.ts:78:11 - error TS2304: Cannot find name 'TextEncoder'.
78 ? new TextEncoder().encode(data)
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/buffer.ts:470:16 - error TS2304: Cannot find name 'TextDecoder'.
470 return new TextDecoder().decode(buffer);
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/buffer.ts:986:23 - error TS2304: Cannot find name 'TextEncoder'.
986 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/buffer.ts:987:23 - error TS2304: Cannot find name 'TextDecoder'.
987 const decoder = new TextDecoder(decoderOpts?.encoding, decoderOpts);
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/buffer.ts:1004:23 - error TS2304: Cannot find name 'TextDecoder'.
1004 const decoder = new TextDecoder(decoderOpts?.encoding, decoderOpts);
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/readers.ts:14:15 - error TS2304: Cannot find name 'TextEncoder'.
14 super(new TextEncoder().encode(s).buffer);
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/writers.ts:6:21 - error TS2304: Cannot find name 'TextDecoder'.
6 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/writers.ts:15:19 - error TS2304: Cannot find name 'TextEncoder'.
15 const c = new TextEncoder().encode(base);
~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/io/writers.ts:42:5 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
42 return this.#cache;
~~~~~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:67:17 - error TS2304: Cannot find name 'WritableStreamDefaultWriter'.
67 streamWriter: WritableStreamDefaultWriter<Uint8Array>,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:67:17 - error TS4078: Parameter 'streamWriter' of exported function has or is using private name 'WritableStreamDefaultWriter'.
67 streamWriter: WritableStreamDefaultWriter<Uint8Array>,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:80:17 - error TS2304: Cannot find name 'ReadableStreamDefaultReader'.
80 streamReader: ReadableStreamDefaultReader<Uint8Array>,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:80:17 - error TS4078: Parameter 'streamReader' of exported function has or is using private name 'ReadableStreamDefaultReader'.
80 streamReader: ReadableStreamDefaultReader<Uint8Array>,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:113:4 - error TS2304: Cannot find name 'WritableStream'.
113 ): WritableStream<Uint8Array> {
~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:113:4 - error TS4060: Return type of exported function has or is using private name 'WritableStream'.
113 ): WritableStream<Uint8Array> {
~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:116:14 - error TS2304: Cannot find name 'WritableStream'.
116 return new WritableStream({
~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:117:17 - error TS7006: Parameter 'chunk' implicitly has an 'any' type.
117 async write(chunk, controller) {
~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:117:24 - error TS7006: Parameter 'controller' implicitly has an 'any' type.
117 async write(chunk, controller) {
~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:226:22 - error TS2304: Cannot find name 'QueuingStrategy'.
226 writableStrategy?: QueuingStrategy<I>,
~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:226:22 - error TS4078: Parameter 'writableStrategy' of exported function has or is using private name 'QueuingStrategy'.
226 writableStrategy?: QueuingStrategy<I>,
~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:227:22 - error TS2304: Cannot find name 'QueuingStrategy'.
227 readableStrategy?: QueuingStrategy<O>,
~~~~~~~~~~~~~~~
npm/src/deps/deno.land/[email protected]/streams/conversion.ts:227:22 - error TS4078: Parameter 'readableStrategy' of exported function has or is using private name 'QueuingStrategy'.
227 readableStrategy?: QueuingStrategy<O>,
~~~~~~~~~~~~~~~
npm/src/etag.ts:45:21 - error TS2304: Cannot find name 'TextEncoder'.
45 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/etag.ts:56:74 - error TS2345: Argument of type 'string | Uint8Array' is not assignable to parameter of type 'BufferSource'.
Type 'string' is not assignable to type 'BufferSource'.
56 const hash = base64.encode(await dntShim.crypto.subtle.digest("SHA-1", entity))
~~~~~~
npm/src/etag_test.ts:41:21 - error TS2304: Cannot find name 'TextEncoder'.
41 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/headers.ts:10:21 - error TS2304: Cannot find name 'TextDecoder'.
10 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/headers_test.ts:33:22 - error TS2304: Cannot find name 'TextEncoder'.
33 new Buffer(new TextEncoder().encode(fixture)),
~~~~~~~~~~~
npm/src/headers_test.ts:42:11 - error TS2304: Cannot find name 'TextDecoder'.
42 new TextDecoder().decode((await body.readLine())?.bytes),
~~~~~~~~~~~
npm/src/http_server_native_request.ts:130:47 - error TS2304: Cannot find name 'WebSocket'.
130 upgrade(options?: UpgradeWebSocketOptions): WebSocket {
~~~~~~~~~
npm/src/http_server_native_request.ts:130:47 - error TS4055: Return type of public method from exported class has or is using private name 'WebSocket'.
130 upgrade(options?: UpgradeWebSocketOptions): WebSocket {
~~~~~~~~~
npm/src/middleware/proxy_test.ts:12:21 - error TS2304: Cannot find name 'TextDecoder'.
12 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/multipart.ts:12:21 - error TS2304: Cannot find name 'TextDecoder'.
12 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/multipart.ts:13:21 - error TS2304: Cannot find name 'TextEncoder'.
13 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/multipart_test.ts:20:21 - error TS2304: Cannot find name 'TextEncoder'.
20 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/node_shims.ts:3:33 - error TS2304: Cannot find name 'Event'.
3 export class ErrorEvent extends Event {
~~~~~
npm/src/node_shims.ts:3:33 - error TS4020: 'extends' clause of exported class 'ErrorEvent' has or is using private name 'Event'.
3 export class ErrorEvent extends Event {
~~~~~
npm/src/node_shims.ts:28:44 - error TS2304: Cannot find name 'ErrorEventInit'.
28 constructor(type: string, eventInitDict: ErrorEventInit = {}) {
~~~~~~~~~~~~~~
npm/src/node_shims.ts:28:44 - error TS4063: Parameter 'eventInitDict' of constructor from exported class has or is using private name 'ErrorEventInit'.
28 constructor(type: string, eventInitDict: ErrorEventInit = {}) {
~~~~~~~~~~~~~~
npm/src/range.ts:99:21 - error TS2304: Cannot find name 'TextEncoder'.
99 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/range_test.ts:81:25 - error TS2304: Cannot find name 'TextEncoder'.
81 const content = new TextEncoder().encode("hello deno");
~~~~~~~~~~~
npm/src/range_test.ts:91:25 - error TS2304: Cannot find name 'TextEncoder'.
91 const content = new TextEncoder().encode("hello deno");
~~~~~~~~~~~
npm/src/range_test.ts:148:25 - error TS2304: Cannot find name 'TextEncoder'.
148 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/range_test.ts:162:25 - error TS2304: Cannot find name 'TextDecoder'.
162 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/range_test.ts:175:25 - error TS2304: Cannot find name 'TextEncoder'.
175 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/range_test.ts:189:25 - error TS2304: Cannot find name 'TextDecoder'.
189 const decoder = new TextDecoder();
~~~~~~~~~~~
npm/src/response_test.ts:122:25 - error TS2304: Cannot find name 'TextEncoder'.
122 response.body = new TextEncoder().encode("Hello world!");
~~~~~~~~~~~
npm/src/server_sent_event.ts:8:21 - error TS2304: Cannot find name 'TextEncoder'.
8 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/server_sent_event.ts:12:46 - error TS2304: Cannot find name 'EventInit'.
12 export interface ServerSentEventInit extends EventInit {
~~~~~~~~~
npm/src/server_sent_event.ts:12:46 - error TS4022: 'extends' clause of exported interface 'ServerSentEventInit' has or is using private name 'EventInit'.
12 export interface ServerSentEventInit extends EventInit {
~~~~~~~~~
npm/src/server_sent_event.ts:41:26 - error TS2304: Cannot find name 'Event'.
41 class CloseEvent extends Event {
~~~~~
npm/src/server_sent_event.ts:41:26 - error TS4020: 'extends' clause of exported class 'CloseEvent' has or is using private name 'Event'.
41 class CloseEvent extends Event {
~~~~~
npm/src/server_sent_event.ts:42:26 - error TS2304: Cannot find name 'EventInit'.
42 constructor(eventInit: EventInit) {
~~~~~~~~~
npm/src/server_sent_event.ts:42:26 - error TS4063: Parameter 'eventInit' of constructor from exported class has or is using private name 'EventInit'.
42 constructor(eventInit: EventInit) {
~~~~~~~~~
npm/src/server_sent_event.ts:72:38 - error TS2304: Cannot find name 'Event'.
72 export class ServerSentEvent extends Event {
~~~~~
npm/src/server_sent_event.ts:72:38 - error TS4020: 'extends' clause of exported class 'ServerSentEvent' has or is using private name 'Event'.
72 export class ServerSentEvent extends Event {
~~~~~
npm/src/server_sent_event.ts:135:48 - error TS2304: Cannot find name 'EventTarget'.
135 export interface ServerSentEventTarget extends EventTarget {
~~~~~~~~~~~
npm/src/server_sent_event.ts:135:48 - error TS4022: 'extends' clause of exported interface 'ServerSentEventTarget' has or is using private name 'EventTarget'.
135 export interface ServerSentEventTarget extends EventTarget {
~~~~~~~~~~~
npm/src/server_sent_event.ts:217:38 - error TS2304: Cannot find name 'EventTarget'.
217 export class SSEStreamTarget extends EventTarget
~~~~~~~~~~~
npm/src/server_sent_event.ts:217:38 - error TS4020: 'extends' clause of exported class 'SSEStreamTarget' has or is using private name 'EventTarget'.
217 export class SSEStreamTarget extends EventTarget
~~~~~~~~~~~
npm/src/server_sent_event.ts:221:17 - error TS2304: Cannot find name 'ReadableStreamDefaultController'.
221 #controller?: ReadableStreamDefaultController<Uint8Array>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm/src/server_sent_event.ts:233:23 - error TS2339: Property 'dispatchEvent' does not exist on type 'Application<Record<string, any>>'.
233 this.#context.app.dispatchEvent(errorEvent);
~~~~~~~~~~~~~
npm/src/server_sent_event.ts:285:10 - error TS2339: Property 'addEventListener' does not exist on type 'SSEStreamTarget'.
285 this.addEventListener("close", () => {
~~~~~~~~~~~~~~~~
npm/src/server_sent_event_test.ts:26:18 - error TS2304: Cannot find name 'EventTarget'.
26 appTarget: new EventTarget(),
~~~~~~~~~~~
npm/src/server_sent_event_test.ts:34:23 - error TS2304: Cannot find name 'EventTarget'.
34 env.appTarget = new EventTarget();
~~~~~~~~~~~
npm/src/server_sent_event_test.ts:38:6 - error TS7006: Parameter 'evt' implicitly has an 'any' type.
38 (evt) => {
~~~
npm/src/server_sent_event_test.ts:59:22 - error TS2339: Property 'type' does not exist on type 'ServerSentEvent'.
59 assertEquals(evt.type, "message");
~~~~
npm/src/server_sent_event_test.ts:70:22 - error TS2339: Property 'type' does not exist on type 'ServerSentEvent'.
70 assertEquals(evt.type, "ping");
~~~~
npm/src/server_sent_event_test.ts:81:22 - error TS2339: Property 'type' does not exist on type 'ServerSentEvent'.
81 assertEquals(evt.type, "ping");
~~~~
npm/src/server_sent_event_test.ts:95:22 - error TS2339: Property 'type' does not exist on type 'ServerSentEvent'.
95 assertEquals(evt.type, "ping");
~~~~
npm/src/server_sent_event_test.ts:108:22 - error TS2339: Property 'type' does not exist on type 'ServerSentEvent'.
108 assertEquals(evt.type, "__message");
~~~~
npm/src/server_sent_event_test.ts:236:9 - error TS2339: Property 'addEventListener' does not exist on type 'SSEStreamTarget'.
236 sse.addEventListener("close", () => {
~~~~~~~~~~~~~~~~
npm/src/server_sent_event_test.ts:239:9 - error TS2339: Property 'addEventListener' does not exist on type 'SSEStreamTarget'.
239 sse.addEventListener("error", () => {
~~~~~~~~~~~~~~~~
npm/src/structured_clone.ts:142:17 - error TS2304: Cannot find name 'DOMException'.
142 throw new DOMException("Uncloneable value in stream", "DataCloneError");
~~~~~~~~~~~~
npm/src/types.d.d.ts:94:48 - error TS2304: Cannot find name 'WebSocket'.
94 upgrade?(options?: UpgradeWebSocketOptions): WebSocket;
~~~~~~~~~
npm/src/types.d.d.ts:120:11 - error TS2304: Cannot find name 'WebSocket'.
120 socket: WebSocket;
~~~~~~~~~
npm/src/util.ts:378:21 - error TS2304: Cannot find name 'TransformStreamDefaultController'.
378 controller: TransformStreamDefaultController<Uint8Array>,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm/src/util.ts:420:20 - error TS2304: Cannot find name 'TextEncoder'.
420 encoder: new TextEncoder(),
~~~~~~~~~~~
npm/src/util.ts:432:21 - error TS2304: Cannot find name 'TextEncoder'.
432 const encoder = new TextEncoder();
~~~~~~~~~~~
npm/src/util.ts:448:10 - error TS2769: No overload matches this call.
Overload 1 of 2, '(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<...>', gave the following error.
Argument of type '"raw"' is not assignable to parameter of type '"jwk"'.
Overload 2 of 2, '(format: "raw" | "spki" | "pkcs8", keyData: BufferSource, algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<...>', gave the following error.
Argument of type 'Key' is not assignable to parameter of type 'BufferSource'.
Type 'string' is not assignable to type 'BufferSource'.
448 return dntShim.crypto.subtle.importKey(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
449 "raw",
~~~~~~~~~~
...
456 ["sign", "verify"],
~~~~~~~~~~~~~~~~~~~~~~~
457 );
~~~
npm/src/util.ts:466:50 - error TS2345: Argument of type 'Data' is not assignable to parameter of type 'BufferSource'.
Type 'string' is not assignable to type 'BufferSource'.
466 return dntShim.crypto.subtle.sign("HMAC", key, data);
~~~~
I'm not sure what has changed... it is non-obvious to me.