Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
timeout-minutes: 10
steps:
- uses: actions/checkout@master
- uses: denoland/setup-deno@main
with:
deno-version: "1.24.0"
deno-version: "1.39.3"
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: 113
- name: Run linter
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -35,6 +38,7 @@ jobs:
- name: Show chrome version
run: chrome --version
- name: Run tests
env:
CAROL_DEBUG: 1
run: |
deno task test

2 changes: 1 addition & 1 deletion color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class Color {
) {
return null;
}
const hasAlpha = (values[3] !== undefined);
const hasAlpha = values[3] !== undefined;

if (match[1]) { // rgb/rgba
const rgba = [
Expand Down
56 changes: 27 additions & 29 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
export { exists } from "https://deno.land/std@0.149.0/fs/exists.ts";
export {
dirname,
fromFileUrl,
join,
resolve,
} from "https://deno.land/std@0.149.0/path/mod.ts";
export { BufReader } from "https://deno.land/std@0.149.0/io/bufio.ts";
export { concat } from "https://deno.land/std@0.149.0/bytes/mod.ts";
export { exists } from "https://deno.land/std@0.212.0/fs/exists.ts";
export { dirname } from "https://deno.land/std@0.212.0/path/dirname.ts";
export { fromFileUrl } from "https://deno.land/std@0.212.0/path/from_file_url.ts";
export { join } from "https://deno.land/std@0.212.0/path/join.ts";
export { resolve } from "https://deno.land/std@0.212.0/path/resolve.ts";
export { BufReader } from "https://deno.land/std@0.212.0/io/buf_reader.ts";
export { concat } from "https://deno.land/std@0.212.0/bytes/mod.ts";
// TODO: Remove this import statement.
export { decode, encode } from "https://deno.land/std@0.84.0/encoding/utf8.ts";
export {
decode as decodeFromBase64,
encode as encodeToBase64,
} from "https://deno.land/std@0.149.0/encoding/base64.ts";
decodeBase64 as decodeFromBase64,
encodeBase64 as encodeToBase64,
} from "https://deno.land/std@0.212.0/encoding/base64.ts";
export { deferred } from "https://deno.land/std@0.149.0/async/deferred.ts";
export type { Deferred } from "https://deno.land/std@0.149.0/async/deferred.ts";

export { readAll, writeAll } from "https://deno.land/std@0.149.0/io/util.ts";

export {
assert,
assertEquals,
assertRejects,
assertStrictEquals,
assertStringIncludes,
fail,
} from "https://deno.land/std@0.149.0/testing/asserts.ts";
export { readAll } from "https://deno.land/std@0.212.0/streams/read_all.ts";
export { writeAll } from "https://deno.land/std@0.212.0/streams/write_all.ts";

export { default as puppeteer } from "https://unpkg.com/puppeteer@13.3.2/lib/esm/puppeteer/web.js";
export { EventEmitter } from "https://unpkg.com/puppeteer@13.3.2/lib/esm/puppeteer/common/EventEmitter.js";
export { BrowserWebSocketTransport } from "https://unpkg.com/puppeteer@13.3.2/lib/esm/puppeteer/common/BrowserWebSocketTransport.js";
export { assert } from "https://deno.land/std@0.212.0/assert/assert.ts";
export { assertEquals } from "https://deno.land/std@0.212.0/assert/assert_equals.ts";
export { assertRejects } from "https://deno.land/std@0.212.0/assert/assert_rejects.ts";
export { assertStrictEquals } from "https://deno.land/std@0.212.0/assert/assert_strict_equals.ts";
export { assertStringIncludes } from "https://deno.land/std@0.212.0/assert/assert_string_includes.ts";
export { fail } from "https://deno.land/std@0.212.0/assert/fail.ts";

export type { Browser } from "https://unpkg.com/puppeteer@13.3.2/lib/esm/puppeteer/common/Browser.js";
export type { Target } from "https://unpkg.com/puppeteer@13.3.2/lib/esm/puppeteer/common/Target.js";
export type { CDPSession } from "https://unpkg.com/puppeteer@13.3.2/lib/esm/puppeteer/common/Connection.js";
export type { Page } from "https://unpkg.com/puppeteer@13.3.2/lib/esm/puppeteer/common/Page.js";
export {
type Browser,
BrowserWebSocketTransport,
type CDPSession,
default as puppeteer,
EventEmitter,
type Page,
type Target,
} from "npm:puppeteer-core@20.1.0"; // "https://esm.sh/puppeteer-core@20.1.0/lib/esm/puppeteer/puppeteer-core.js?pin=v135";
2 changes: 1 addition & 1 deletion http_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HttpRequest implements types.HttpRequest {
text += CRLF;
let responseBuffer = encode(text);
if (body) {
responseBuffer = concat(responseBuffer, body);
responseBuffer = concat([responseBuffer, body]);
}

return this.resolve_({
Expand Down
2 changes: 1 addition & 1 deletion import_map.test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"imports": {
"https://deno.land/x/carol/mod.ts": "./mod.ts",
"https://deno.land/std/path/mod.ts": "https://deno.land/std@0.107.0/path/mod.ts"
"https://deno.land/std/path/mod.ts": "https://deno.land/std@0.211.0/path/mod.ts"
}
}
4 changes: 1 addition & 3 deletions locate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@

import { exists } from "./deps.ts";

type OS = "darwin" | "linux" | "windows";

export async function locateChrome(
os: OS = Deno.build.os,
os: typeof Deno.build.os = Deno.build.os,
env = Deno.env,
): Promise<string> {
let paths!: string[];
Expand Down
1 change: 1 addition & 0 deletions puppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export async function launch(
options: AppOptions,
): Promise<LaunchResult> {
const chromeArgs = prepareChromeArgs(executablePath, headless, options);
// deno-lint-ignore no-deprecated-deno-api
const chromeProcess = Deno.run({
cmd: chromeArgs,
stderr: "piped",
Expand Down
1 change: 1 addition & 0 deletions tools/generate_rpc_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function validateOutput(output: string): void {
}

async function formatSource(source: string): Promise<string> {
// deno-lint-ignore no-deprecated-deno-api
const deno = Deno.run({
cmd: [Deno.execPath(), "fmt", "-"],
stdin: "piped",
Expand Down