Skip to content
Open
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
6 changes: 5 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"@astrojs/react": "npm:@astrojs/react",
"@astrojs/mdx": "npm:@astrojs/mdx",
"@astrojs/db": "npm:@astrojs/db",
"std/": "https://deno.land/std@0.221.0/",
"astro": "npm:astro",
"astro/": "npm:astro/",
"@std/assert": "jsr:@std/assert@^0.225.2",
"@std/http": "jsr:@std/http@^0.224.0",
"@std/path": "jsr:@std/path@^0.225.1",
"deno_dom/": "https://deno.land/x/deno_dom@v0.1.45/"
}
}
635 changes: 634 additions & 1 deletion deno.lock

Large diffs are not rendered by default.

483 changes: 247 additions & 236 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/__deno_imports.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { serveFile } from "https://deno.land/std@0.222.1/http/file_server.ts";
export { fromFileUrl } from "https://deno.land/std@0.222.1/path/mod.ts";
export { serveFile } from "@std/http";
export { fromFileUrl } from "@std/path";
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ const denoRenameNodeModulesPlugin = {
},
};

type AstroBuildConfig = AstroConfig["build"] & { server: URL, client: URL };
export default function createIntegration(opts?: Options): AstroIntegration {
let _buildConfig: AstroConfig["build"];
let _buildConfig: AstroBuildConfig;
return {
name: "@antonyfaris/deno-astro-adapter",
hooks: {
"astro:config:done": ({ setAdapter, config }) => {
setAdapter(getAdapter(opts));
_buildConfig = config.build;
_buildConfig = config.build as AstroBuildConfig;

if (config.output === "static") {
console.warn(
Expand Down
4 changes: 2 additions & 2 deletions test/astro-collections.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DOMParser } from "deno_dom/deno-dom-wasm.ts";
import { assert } from "std/assert/assert.ts";
import { assertEquals } from "std/assert/assert_equals.ts";
import { assert } from "@std/assert";
import { assertEquals } from "@std/assert";
import { defaultTestPermissions, runBuildAndStartApp } from "./helpers.ts";

Deno.test({
Expand Down
4 changes: 2 additions & 2 deletions test/astro-db.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DOMParser } from "deno_dom/deno-dom-wasm.ts";
import { assert } from "std/assert/assert.ts";
import { assertEquals } from "std/assert/assert_equals.ts";
import { assert } from "@std/assert";
import { assertEquals } from "@std/assert";
import { defaultTestPermissions, runBuildAndStartApp } from "./helpers.ts";

// Absolute path to the sqlite database file
Expand Down
4 changes: 2 additions & 2 deletions test/astro-images.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DOMParser } from "deno_dom/deno-dom-wasm.ts";
import { assert } from "std/assert/assert.ts";
import { assertEquals } from "std/assert/assert_equals.ts";
import { assert } from "@std/assert";
import { assertEquals } from "@std/assert";
import { defaultTestPermissions, runBuildAndStartApp } from "./helpers.ts";

Deno.test({
Expand Down
4 changes: 2 additions & 2 deletions test/basics.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DOMParser } from "deno_dom/deno-dom-wasm.ts";
import { assert } from "std/assert/assert.ts";
import { assertEquals } from "std/assert/assert_equals.ts";
import { assert } from "@std/assert";
import { assertEquals } from "@std/assert";
import { defaultTestPermissions, runBuildAndStartApp } from "./helpers.ts";

// this needs to be here and not in the specific test case, because
Expand Down
4 changes: 2 additions & 2 deletions test/dynamic-import.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DOMParser } from "deno_dom/deno-dom-wasm.ts";
import { assert } from "std/assert/assert.ts";
import { assertEquals } from "std/assert/assert_equals.ts";
import { assert } from "@std/assert";
import { assertEquals } from "@std/assert";
import { runBuildAndStartAppFromSubprocess } from "./helpers.ts";

Deno.test({
Expand Down
4 changes: 2 additions & 2 deletions test/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fromFileUrl } from "std/path/mod.ts";
import { assert } from "std/assert/assert.ts";
import { fromFileUrl } from "@std/path";
import { assert } from "@std/assert";

const dir = new URL("./", import.meta.url);
const defaultURL = new URL("http://localhost:8085/");
Expand Down