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
5 changes: 5 additions & 0 deletions .changeset/eighty-bottles-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/router": minor
---

Update `moduleResolution`
2 changes: 1 addition & 1 deletion src/data/response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RouterResponseInit, CustomResponse } from "../types";
import type { RouterResponseInit, CustomResponse } from "../types.js";

export function redirect(url: string, init: number | RouterResponseInit = 302) {
let responseInit: ResponseInit;
Expand Down
2 changes: 1 addition & 1 deletion src/routers/HashRouter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { JSX } from "solid-js";
import { setupNativeEvents } from "../data/events.js";
import type { BaseRouterProps } from "./components.js";
import type { BaseRouterProps } from "./components.jsx";
import { createRouter, scrollToHash, bindEvent } from "./createRouter.js";
import { createBeforeLeave, keepDepth, notifyIfNotBlocked, saveCurrentDepth } from "../lifecycle.js";

Expand Down
2 changes: 1 addition & 1 deletion src/routers/createRouter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Signal, createSignal, onCleanup, sharedConfig } from "solid-js";
import type { LocationChange, RouterContext, RouterUtils } from "../types.ts";
import type { LocationChange, RouterContext, RouterUtils } from "../types.js";
import { createRouterComponent } from "./components.jsx";

function intercept<T>(
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
SearchParams,
SetParams,
SetSearchParams
} from "./types.ts";
} from "./types.js";

const hasSchemeRegex = /^(?:[a-z0-9]+:)?\/\//i;
const trimPathRegex = /^\/+|(\/)\/+$/g;
Expand Down
8 changes: 4 additions & 4 deletions test/types.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RouteProps } from "../src/routers/components";
import { useMatch } from "../src/routing";
import { MatchFilters } from "../src/types";
import { createMatcher } from "../src/utils";
import { RouteProps } from "../src/routers/components.jsx";
import { useMatch } from "../src/routing.js";
import { MatchFilters } from "../src/types.js";
import { createMatcher } from "../src/utils.js";

// mock route type
const Route = <S extends string>(props: RouteProps<S>) => {};
Expand Down
2 changes: 1 addition & 1 deletion test/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
expandOptionals,
mergeSearchString,
extractSearchParams
} from "../src/utils";
} from "../src/utils.js";

describe("resolvePath should", () => {
test("normalize the base arg", () => {
Expand Down
11 changes: 5 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
"declaration": true,
"target": "esnext",
"newLine": "LF",
"moduleResolution": "node",
"moduleResolution": "NodeNext",
"strict": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"outDir": "./dist",
"module": "esnext"
"module": "NodeNext",
"skipLibCheck": true
},
"include": [
"./src"
],
"include": ["./src"],
"exclude": ["node_modules/"]
}
}
Loading