-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade to deno_ast 0.28 (#131)
- Loading branch information
Showing
42 changed files
with
5,170 additions
and
5,251 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { printHello2, returnsFoo } from "./subdir/mod2.ts"; | ||
export function returnsHi() { | ||
return "Hi"; | ||
return "Hi"; | ||
} | ||
export function returnsFoo2() { | ||
return returnsFoo(); | ||
return returnsFoo(); | ||
} | ||
export function printHello3() { | ||
printHello2(); | ||
printHello2(); | ||
} | ||
export function throwsError() { | ||
throw Error("exception from mod1"); | ||
throw Error("exception from mod1"); | ||
} |
4 changes: 2 additions & 2 deletions
4
tests/__snapshots__/common/exports/transpile/local/subdir/mod2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { printHello } from "./print_hello.ts"; | ||
export function returnsFoo() { | ||
return "Foo"; | ||
return "Foo"; | ||
} | ||
export function printHello2() { | ||
printHello(); | ||
printHello(); | ||
} |
2 changes: 1 addition & 1 deletion
2
tests/__snapshots__/common/exports/transpile/local/subdir/print_hello.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export function printHello() { | ||
console.log("Hello"); | ||
console.log("Hello"); | ||
} |
4 changes: 2 additions & 2 deletions
4
tests/__snapshots__/common/jsx_import_from_ts/transpile/local/subdir/app.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const React = { | ||
createElement () {} | ||
createElement () {} | ||
}; | ||
export default function app() { | ||
return /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("h2", null, "asdf")); | ||
return /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("h2", null, "asdf")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...te_url_as_object/transpile/remote/NNRNTa3nQ9cRguYpg8Fa19sQDzU/[email protected]/_util/assert.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
export class DenoStdInternalError extends Error { | ||
constructor(message){ | ||
super(message); | ||
this.name = "DenoStdInternalError"; | ||
} | ||
constructor(message){ | ||
super(message); | ||
this.name = "DenoStdInternalError"; | ||
} | ||
} | ||
/** Make an assertion, if not `true`, then throw. */ export function assert(expr, msg = "") { | ||
if (!expr) { | ||
throw new DenoStdInternalError(msg); | ||
} | ||
if (!expr) { | ||
throw new DenoStdInternalError(msg); | ||
} | ||
} |
22 changes: 11 additions & 11 deletions
22
...remote_url_as_object/transpile/remote/NNRNTa3nQ9cRguYpg8Fa19sQDzU/[email protected]/_util/os.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. | ||
// This module is browser compatible. | ||
export const osType = (()=>{ | ||
// deno-lint-ignore no-explicit-any | ||
const { Deno } = globalThis; | ||
if (typeof Deno?.build?.os === "string") { | ||
return Deno.build.os; | ||
} | ||
// deno-lint-ignore no-explicit-any | ||
const { navigator } = globalThis; | ||
if (navigator?.appVersion?.includes?.("Win")) { | ||
return "windows"; | ||
} | ||
return "linux"; | ||
// deno-lint-ignore no-explicit-any | ||
const { Deno } = globalThis; | ||
if (typeof Deno?.build?.os === "string") { | ||
return Deno.build.os; | ||
} | ||
// deno-lint-ignore no-explicit-any | ||
const { navigator } = globalThis; | ||
if (navigator?.appVersion?.includes?.("Win")) { | ||
return "windows"; | ||
} | ||
return "linux"; | ||
})(); | ||
export const isWindows = osType === "windows"; | ||
export const isLinux = osType === "linux"; |
Oops, something went wrong.