-
Notifications
You must be signed in to change notification settings - Fork 650
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
refactor: remove deno.run #1036
Conversation
src/server/bundle.ts
Outdated
@@ -11,7 +11,7 @@ export interface JSXConfig { | |||
let esbuildInitialized: boolean | Promise<void> = false; | |||
async function ensureEsbuildInitialized() { | |||
if (esbuildInitialized === false) { | |||
if (Deno.run === undefined) { | |||
if (Deno.Command === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may you consider to check it by typeof
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that in Deno, and other recent js runtime, you cannot anymore re-defined undefined
and so using typeof is not required. tested in repl
$ deno
Deno 1.30.3+e0074b5
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> globalThis.undefined = 1
Uncaught TypeError: Cannot assign to read only property 'undefined' of object '#<Window>'
at <anonymous>:2:22
Is there any other reasons to use typeof
?
|
|
www/main_test.ts
Outdated
@@ -2,16 +2,18 @@ import { assertEquals } from "$std/testing/asserts.ts"; | |||
import { TextLineStream } from "$std/streams/delimiter.ts"; | |||
|
|||
Deno.test("CORS should not set on GET /fresh-badge.svg", { | |||
sanitizeOps: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any way to avoid using sanitizeOps: false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hashrock i have pushed a change. PTAL thanks.
Head branch was pushed to by a user without write access
@lucacasonato @hashrock Could this be merged? (the issue blocking the previous auto-merge has now been resolved). thanks |
remove deno.run in favor of Deno.Command