Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace imports deno.land to jsr #1565

Merged
merged 7 commits into from
Mar 18, 2025
Merged
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
2 changes: 1 addition & 1 deletion deploy/api/runtime-broadcast-channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ a simple server that uses `BroadcastChannel` to synchornize state across all
running instances of the server.

```ts
import { Hono } from "https://deno.land/x/hono/mod.ts";
import { Hono } from "jsr:@hono/hono";

// in-memory cache of messages
const messages = [];
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/aws_lightsail.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To focus on the deployment, our app will simply be a `main.ts` file that returns
a string as an HTTP response:

```ts
import { Application } from "https://deno.land/x/oak/mod.ts";
import { Application } from "jsr:@oak/oak";

const app = new Application();

Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/digital_ocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To focus on the deployment, our app will simply be a `main.ts` file that returns
a string as an HTTP response:

```ts title="main.ts"
import { Application } from "https://deno.land/x/oak/mod.ts";
import { Application } from "jsr:@oak/oak";

const app = new Application();

Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/google_cloud_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To focus on the deployment, our app will simply be a `main.ts` file that returns
a string as an HTTP response:

```ts title="main.ts"
import { Application } from "https://deno.land/x/oak/mod.ts";
import { Application } from "jsr:@oak/oak";

const app = new Application();

Expand Down
4 changes: 2 additions & 2 deletions examples/tutorials/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ You should see something similar to the following screenshot:

## Create your API routes

We'll use [`oak`](https://deno.land/x/oak) to create the API routes. Let's keep
We'll use [`oak`](https://jsr.io/@oak/oak) to create the API routes. Let's keep
them simple for now.

Let's create a `main.ts` file:
Expand All @@ -176,7 +176,7 @@ Then, in your `main.ts` file:

```ts
import { PrismaClient } from "./generated/client/deno/edge.ts";
import { Application, Router } from "https://deno.land/x/[email protected]/mod.ts";
import { Application, Router } from "jsr:@oak/oak";

/**
* Initialize.
Expand Down
22 changes: 11 additions & 11 deletions examples/tutorials/word_finder.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function renderHtml(pattern, words) {
}
searchResultsContent = `
<p id="search-result-count" data-count="${words.length}">Words found: ${words.length}</p>
<ul id="search-result" name="search-results">
<ul id="search-result" name="search-results">
${wordList}
</ul>
`;
Expand All @@ -54,17 +54,17 @@ export function renderHtml(pattern, words) {
</head>
<body>
<h1>Deno Word Finder</h1>

<form id="perform-search" name="perform-search" method="get" action="/api/search">
<label for="search-text">Search text:</label>
<input id="search-text" name="search-text" type="text" value="${pattern}" />
<input type="submit" />
</form>

${searchResultsContent}

<h2>Instructions</h2>

<p>
Enter a word using _ and ? as needed for unknown characters. Using ? means to include letters that aren't already used (you can think of it as a "Wheel of Fortune" placeholder). Using _ will find words that contain any character (whether it's currently "revealed" or not).
<br />
Expand Down Expand Up @@ -133,15 +133,15 @@ export function search(pattern, dictionary) {

## Running a Deno Server

[Oak](https://deno.land/x/oak@v11.1.0) is a framework that lets you easily setup
a server in Deno (analogous to JavaScript's Express) and we'll be using it to
host our application. Our server will use our search function to populate our
HTML template with data and then return the customized HTML back to the viewer.
We can conveniently rely on the `/usr/share/dict/words` file as our dictionary
[Oak](https://jsr.io/@oak/oak) is a framework that lets you easily setup a
server in Deno (analogous to JavaScript's Express) and we'll be using it to host
our application. Our server will use our search function to populate our HTML
template with data and then return the customized HTML back to the viewer. We
can conveniently rely on the `/usr/share/dict/words` file as our dictionary
which is a standard file present on most Unix-like operating systems.

```jsx title="server.js"
import { Application, Router } from "https://deno.land/x/oak/mod.ts";
import { Application, Router } from "jsr:@oak/oak";
import { search } from "./search.js";
import { renderHtml } from "./render.js";

Expand Down
Loading