Skip to content

Commit b8f0232

Browse files
committed
update moduleResolution from node to NodeNext
1 parent 30f0866 commit b8f0232

File tree

7 files changed

+13
-15
lines changed

7 files changed

+13
-15
lines changed

src/data/response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RouterResponseInit, CustomResponse } from "../types";
1+
import type { RouterResponseInit, CustomResponse } from "../types.js";
22

33
export function redirect(url: string, init: number | RouterResponseInit = 302) {
44
let responseInit: ResponseInit;

src/routers/HashRouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { JSX } from "solid-js";
22
import { setupNativeEvents } from "../data/events.js";
3-
import type { BaseRouterProps } from "./components.js";
3+
import type { BaseRouterProps } from "./components.jsx";
44
import { createRouter, scrollToHash, bindEvent } from "./createRouter.js";
55
import { createBeforeLeave, keepDepth, notifyIfNotBlocked, saveCurrentDepth } from "../lifecycle.js";
66

src/routers/createRouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type Signal, createSignal, onCleanup, sharedConfig } from "solid-js";
2-
import type { LocationChange, RouterContext, RouterUtils } from "../types.ts";
2+
import type { LocationChange, RouterContext, RouterUtils } from "../types.js";
33
import { createRouterComponent } from "./components.jsx";
44

55
function intercept<T>(

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88
SearchParams,
99
SetParams,
1010
SetSearchParams
11-
} from "./types.ts";
11+
} from "./types.js";
1212

1313
const hasSchemeRegex = /^(?:[a-z0-9]+:)?\/\//i;
1414
const trimPathRegex = /^\/+|(\/)\/+$/g;

test/types.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { RouteProps } from "../src/routers/components";
2-
import { useMatch } from "../src/routing";
3-
import { MatchFilters } from "../src/types";
4-
import { createMatcher } from "../src/utils";
1+
import { RouteProps } from "../src/routers/components.jsx";
2+
import { useMatch } from "../src/routing.js";
3+
import { MatchFilters } from "../src/types.js";
4+
import { createMatcher } from "../src/utils.js";
55

66
// mock route type
77
const Route = <S extends string>(props: RouteProps<S>) => {};

test/utils.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
expandOptionals,
77
mergeSearchString,
88
extractSearchParams
9-
} from "../src/utils";
9+
} from "../src/utils.js";
1010

1111
describe("resolvePath should", () => {
1212
test("normalize the base arg", () => {

tsconfig.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
"declaration": true,
44
"target": "esnext",
55
"newLine": "LF",
6-
"moduleResolution": "node",
6+
"moduleResolution": "NodeNext",
77
"strict": true,
88
"jsx": "preserve",
99
"jsxImportSource": "solid-js",
1010
"outDir": "./dist",
11-
"module": "esnext"
11+
"module": "NodeNext"
1212
},
13-
"include": [
14-
"./src"
15-
],
13+
"include": ["./src"],
1614
"exclude": ["node_modules/"]
17-
}
15+
}

0 commit comments

Comments
 (0)