upstash / qstash-js

Message queue for serverless
https://docs.upstash.com/qstash
MIT License
133 stars 11 forks source link

fix: pin lib.dom.d.ts import to specific version #33

Closed brams-dev closed 1 year ago

brams-dev commented 1 year ago

The lib.dom.d.ts file does not exist at https://raw.githubusercontent.com/microsoft/TypeScript/lib/lib.dom.d.ts anymore. So I pinned it to the commit at the time that the import was commited.

chronark commented 1 year ago

Thank you, good call 🙏

brams-dev commented 1 year ago

@chronark I might've overlooked something in this PR. When importing import { Receiver } from 'https://raw.githubusercontent.com/upstash/sdk-qstash-ts/main/mod.ts'; instead of import { Receiver } from 'https://deno.land/x/upstash_qstash@v0.3.6/mod.ts'; in a deno project I'm getting weird linting errors in vscode and when trying to deploy the file to supabase edge functions.

Only removing that import and restarting the deno language server gets rid of the errors.

For context: I initially tried to fix an error also while deploying a script to supabase edge functions:

Error: Error bundling function: exit status 1
error: Module not found "https://raw.githubusercontent.com/microsoft/TypeScript/main/lib/lib.dom.d.ts".
    at https://deno.land/x/upstash_qstash@v0.3.6/pkg/client/client.ts:11:8

Try rerunning the command with --debug to troubleshoot the error.
chronark commented 1 year ago

ok let me take another look I'm thinking I might just want to remove the dependency and add a very simple type directly