Skip to content

Commit 02f7956

Browse files
committed
refactor: Take buildHref out of kernel
Not a kernel function, merely an utilitarian one.
1 parent a65033f commit 02f7956

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/lib/kernel/buildHref.test.ts renamed to src/lib/buildHref.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, test, expect, beforeAll, afterAll, beforeEach } from 'vitest';
22
import { buildHref } from './buildHref.js';
3-
import { init } from '../init.js';
4-
import { location } from './Location.js';
3+
import { init } from './init.js';
4+
import { location } from './kernel/Location.js';
55

66
describe('buildHref', () => {
77
let cleanup: Function;

src/lib/kernel/buildHref.ts renamed to src/lib/buildHref.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { BuildHrefOptions } from "$lib/types.js";
2-
import { location } from "./Location.js";
3-
import { mergeQueryParams } from "./preserveQuery.js";
2+
import { location } from "./kernel/Location.js";
3+
import { mergeQueryParams } from "./kernel/preserveQuery.js";
44

55
/**
66
* Builds a new HREF by combining the path piece from one HREF and the hash piece from another.

src/lib/index.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ describe('index', () => {
2020
'isRouteActive',
2121
'activeBehavior',
2222
'Redirector',
23+
'buildHref',
2324
];
2425

2526
// Act.

src/lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ export { default as RouterTrace } from './RouterTrace/RouterTrace.svelte';
1515
export * from "./public-utils.js";
1616
export * from "./behaviors/active.svelte.js";
1717
export { Redirector } from "./kernel/Redirector.svelte.js";
18+
export { buildHref } from "./buildHref.js";

src/lib/kernel/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe('index', () => {
1717
'LocationLite',
1818
'LocationFull',
1919
'preserveQueryInUrl',
20-
'buildHref',
2120
'calculateMultiHashFragment'
2221
];
2322

src/lib/kernel/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ export { InterceptedHistoryApi } from "./InterceptedHistoryApi.svelte.js";
1212
export { LocationLite } from "./LocationLite.svelte.js";
1313
export { LocationFull } from "./LocationFull.js";
1414
export { preserveQueryInUrl } from "./preserveQuery.js";
15-
export { buildHref } from "./buildHref.js";

0 commit comments

Comments
 (0)