-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deno 2 support Signed-off-by: Marcos Candeia <[email protected]> * Remove unused bench Signed-off-by: Marcos Candeia <[email protected]> * Support deno 2 githubactions Signed-off-by: Marcos Candeia <[email protected]> * Replace to frozen usages Signed-off-by: Marcos Candeia <[email protected]> --------- Signed-off-by: Marcos Candeia <[email protected]>
- Loading branch information
Showing
14 changed files
with
37 additions
and
118 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -7,11 +7,6 @@ | |
import { dirname, join } from "@std/path"; | ||
|
||
import { fromFileUrl, toFileUrl } from "@std/path"; | ||
import { | ||
findSchemeableFromNode, | ||
type Schemeable as _Schemeable, | ||
} from "https://denopkg.com/deco-cx/[email protected]/engine/schema/transform.ts"; | ||
import { denoDoc } from "https://denopkg.com/deco-cx/[email protected]/engine/schema/utils.ts"; | ||
import { ImportMapBuilder } from "../importmap/builder.ts"; | ||
import { parsePath } from "./parser.ts"; | ||
import { type Schemeable, typeNameToSchemeable } from "./transform.ts"; | ||
|
@@ -79,18 +74,6 @@ const getSchemeableDenoAST = async ( | |
}); | ||
}; | ||
|
||
const getSchemeableDenoDoc = async ( | ||
path: string, | ||
name: string, | ||
): Promise<_Schemeable | undefined> => { | ||
const ast = await denoDoc(path); | ||
const nodeTypeRef = ast.find((node) => node.name === name); | ||
if (!nodeTypeRef) { | ||
return undefined; | ||
} | ||
return await findSchemeableFromNode(nodeTypeRef, [path, ast], new Map()); | ||
}; | ||
|
||
Deno.bench( | ||
"transform to schemeable using deno_ast", | ||
{ group: "schema_gen", baseline: true }, | ||
|
@@ -102,14 +85,3 @@ Deno.bench( | |
})); | ||
}, | ||
); | ||
|
||
Deno.bench( | ||
"transform to schemeable using denodoc", | ||
{ group: "schema_gen" }, | ||
async () => { | ||
localStorage.clear(); | ||
await Promise.all(testCases.map(({ path, typeName }) => { | ||
return getSchemeableDenoDoc(path, typeName); | ||
})); | ||
}, | ||
); |
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 was deleted.
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
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