Skip to content

Commit

Permalink
upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
zuisong committed Nov 27, 2023
1 parent 4656f9f commit 5e1d7f6
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 34 deletions.
6 changes: 4 additions & 2 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
"imports": {
"deno_std/": "https://deno.land/[email protected]/",
"esm.sh/": "https://esm.sh/v134/",
"deno_std/": "https://deno.land/[email protected]/",
"esm.sh/": "https://esm.sh/v135/",
"rollup": "npm:@rollup/[email protected]",
"@happy-dom/global-registrator": "npm:@happy-dom/global-registrator"
},
"scopes": {},
Expand Down
36 changes: 18 additions & 18 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deps.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as rollup from "npm:@rollup/[email protected]";
import * as rollup from "rollup";
export { default as resolveUri } from "esm.sh/@jridgewell/[email protected]";
export { rollup };
2 changes: 1 addition & 1 deletion notion-kroki.user.js.map

Large diffs are not rendered by default.

19 changes: 8 additions & 11 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@ const config: rollup.InputOptions & { output: rollup.OutputOptions } = {
{
name: "swc",
async transform(rawCode, filename) {
return await swc.transform(rawCode,
{
filename,
jsc: { parser: { syntax: 'typescript' } },
env: {
targets: "chrome>=60,safari>=13,firefox>=60",
},
sourceMaps: true,
})
return await swc.transform(rawCode, {
filename,
jsc: { parser: { syntax: "typescript" } },
env: { targets: "chrome>=60,safari>=13,firefox>=60" },
sourceMaps: true,
});
},
}
] satisfies rollup.Plugin[],
},
],
};

const bundle = await rollup.rollup(config);
Expand Down
6 changes: 5 additions & 1 deletion test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export type Any = Parameters<typeof console.log>[0];

export const sleep = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms));
export function sleep(ms: number) {
const defer = Promise.withResolvers<void>();
setTimeout(defer.resolve, ms);
return defer.promise;
}

0 comments on commit 5e1d7f6

Please sign in to comment.