Skip to content

Commit

Permalink
feat: deprecate netlify:edge in function templates (#4842)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas authored Jul 22, 2022
1 parent 0eb9d16 commit cfbb34d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/functions-templates/typescript/abtest/{{name}}.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context } from "netlify:edge";
import type { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
// look for existing "test_bucket" cookie
Expand Down
2 changes: 1 addition & 1 deletion src/functions-templates/typescript/geolocation/{{name}}.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Context } from "netlify:edge";
import { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
// Here's what's available on context.geo
Expand Down
2 changes: 1 addition & 1 deletion src/functions-templates/typescript/json/{{name}}.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context } from "netlify:edge";
import type { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
return context.json({ hello: "world" });
Expand Down
2 changes: 1 addition & 1 deletion src/functions-templates/typescript/log/{{name}}.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context } from "netlify:edge";
import type { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
context.log("Hello from the logging service");
Expand Down
2 changes: 1 addition & 1 deletion src/functions-templates/typescript/set-cookies/{{name}}.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context } from "netlify:edge";
import type { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
const url = new URL(request.url);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context } from "netlify:edge";
import type { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
request.headers.set("X-Your-Custom-Header", "Your custom header value");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context } from "netlify:edge";
import type { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
const response = await context.next();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Context } from "netlify:edge";
import { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
const url = new URL(request.url);
Expand Down

1 comment on commit cfbb34d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

Package size: 222 MB

Please sign in to comment.