Skip to content

Commit

Permalink
Merge pull request #9 from whats-good/kerem/single-entry
Browse files Browse the repository at this point in the history
Kerem/single entry
  • Loading branch information
mechanical-turk authored Nov 20, 2023
2 parents 609ce87 + fd24420 commit a63a4d8
Show file tree
Hide file tree
Showing 33 changed files with 90 additions and 304 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-pandas-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@whatsgood/nexus": patch
---

Reverted back to single-entrypoint module, in alignment with whatwg-node/server
16 changes: 3 additions & 13 deletions packages/nexus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,10 @@
"url": "https://github.com/whats-good/nexus"
},
"exports": {
"./fetch": {
"require": "./dist/fetch/index.js",
"import": "./dist/fetch/index.mjs",
"types": "./dist/fetch/index.d.ts"
},
"./node": {
"require": "./dist/node/index.js",
"import": "./dist/node/index.mjs",
"types": "./dist/node/index.d.ts"
},
".": {
"require": "./dist/lib/index.js",
"import": "./dist/lib/index.mjs",
"types": "./dist/lib/index.d.ts"
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions packages/nexus/src/fetch/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/nexus/src/fetch/request-handler/index.ts

This file was deleted.

File renamed without changes.
77 changes: 0 additions & 77 deletions packages/nexus/src/lib/request-handler/abstract-request-handler.ts

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createServerAdapter } from "@whatwg-node/server";
import { RequestHandler } from "../../fetch";
import { RequestHandler } from "../request-handler/request-handler";
import type { ChainRegistry } from "../chain/chain-registry";
import { Config } from "../config";
import type { ConfigConstructorParams } from "../config";
Expand Down
4 changes: 0 additions & 4 deletions packages/nexus/src/node/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/nexus/src/node/request-handler/index.ts

This file was deleted.

183 changes: 0 additions & 183 deletions packages/nexus/src/node/request-handler/request-handler.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest";
import { setupServer } from "msw/node";
import { Config } from "@src/config";
import { Nexus } from "@src/nexus";
import { handlers } from "@test/mock-server-handlers";
import { retry } from "@test/utils";
import { Config } from "@lib/config";
import { Nexus } from "@lib/nexus";
import { RequestHandler } from "./request-handler";

const sharedConfig = {
Expand Down Expand Up @@ -50,7 +50,7 @@ const blockNumberRequestHelper = (config: Config) => {
return requestHandler.handle();
};

describe("fetch request handler - relay", () => {
describe("request handler - relay", () => {
describe("all providers up", () => {
const server = setupServer(
handlers.alchemyReturnsBlockNumber,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest";
import { setupServer } from "msw/node";
import { Config } from "@src/config";
import { Nexus } from "@src/nexus";
import { handlers } from "@test/mock-server-handlers";
import { Config } from "@lib/config";
import { Nexus } from "@lib/nexus";
import { RequestHandler } from "./request-handler";

export const requestHelper = async (endpoint: string, config: Config) => {
Expand All @@ -17,7 +17,7 @@ export const requestHelper = async (endpoint: string, config: Config) => {
return data;
};

describe("fetch request handler - status", () => {
describe("request handler - status", () => {
describe("providers are up", () => {
const server = setupServer(
handlers.alchemyReturnsBlockNumber,
Expand Down
Loading

0 comments on commit a63a4d8

Please sign in to comment.