Skip to content

Commit

Permalink
Merge pull request #2 from hatsyjs/v3
Browse files Browse the repository at this point in the history
v3
  • Loading branch information
surol authored Sep 17, 2023
2 parents 05b7608 + be756ee commit 1e14359
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 42 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hatsy/router",
"version": "2.3.1",
"version": "3.0.0-pre.0",
"description": "Hatsy router",
"keywords": [
"http-middleware",
Expand All @@ -25,17 +25,17 @@
},
"sideEffects": false,
"dependencies": {
"@hatsy/http-header-value": "^3.7.1",
"@hatsy/route-match": "^1.4.2",
"@proc7ts/primitives": "^3.0.2"
"@hatsy/route-match": "^2.0.0",
"@proc7ts/primitives": "^4.0.1",
"http-header-value": "^4.0.0"
},
"peerDependencies": {
"@hatsy/hatsy": "^2.5.3"
"@hatsy/hatsy": "^3.0.0"
},
"devDependencies": {
"@hatsy/hatsy": "^2.5.3",
"@hatsy/hatsy": "^3.0.0",
"@jest/globals": "^29.7.0",
"@proc7ts/logger": "^1.3.2",
"@proc7ts/logger": "^2.0.0",
"@run-z/eslint-config": "^3.5.0",
"@run-z/prettier-config": "^2.0.0",
"@run-z/project-config": "^0.20.0",
Expand Down
10 changes: 5 additions & 5 deletions src/dispatch/dispatch-by-name.handler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Rendering, RenderMeans } from '@hatsy/hatsy';
import { Logging, RequestContext } from '@hatsy/hatsy/core';
import { TestHttpServer } from '@hatsy/hatsy/testing';
import { Logging, RequestContext } from '@hatsy/hatsy/core.js';
import { TestHttpServer } from '@hatsy/hatsy/testing.js';
import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
import { silentLogger } from '@proc7ts/logger';
import type { RouterMeans } from '../router.means';
import { Routing } from '../routing.capability';
import { dispatchByName } from './dispatch-by-name.handler';
import type { RouterMeans } from '../router.means.js';
import { Routing } from '../routing.capability.js';
import { dispatchByName } from './dispatch-by-name.handler.js';

describe('dispatchByName', () => {
let server: TestHttpServer;
Expand Down
8 changes: 6 additions & 2 deletions src/dispatch/dispatch-by-name.handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { RequestHandler, RequestHandlerMethod, RequestModification } from '@hatsy/hatsy/core';
import type { RouterMeans } from '../router.means';
import type {
RequestHandler,
RequestHandlerMethod,
RequestModification,
} from '@hatsy/hatsy/core.js';
import type { RouterMeans } from '../router.means.js';

/**
* Request processing handlers for route entry names.
Expand Down
10 changes: 5 additions & 5 deletions src/dispatch/dispatch-by-pattern.handler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpForwarding, HttpMeans, Rendering, RenderMeans } from '@hatsy/hatsy';
import type { RequestContext } from '@hatsy/hatsy/core';
import { TestHttpServer } from '@hatsy/hatsy/testing';
import type { RequestContext } from '@hatsy/hatsy/core.js';
import { TestHttpServer } from '@hatsy/hatsy/testing.js';
import type { RouteMatcher } from '@hatsy/route-match';
import {
MatrixRoute,
Expand All @@ -13,9 +13,9 @@ import {
} from '@hatsy/route-match';
import { afterAll, beforeAll, beforeEach, describe, expect, it, jest } from '@jest/globals';
import { noop } from '@proc7ts/primitives';
import type { RouterMeans } from '../router.means';
import { Routing } from '../routing.capability';
import { dispatchByPattern } from './dispatch-by-pattern.handler';
import type { RouterMeans } from '../router.means.js';
import { Routing } from '../routing.capability.js';
import { dispatchByPattern } from './dispatch-by-pattern.handler.js';

describe('dispatchByPattern', () => {
let server: TestHttpServer;
Expand Down
4 changes: 2 additions & 2 deletions src/dispatch/dispatch-by-pattern.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
RequestHandler,
RequestHandlerMethod,
requestUpdate,
} from '@hatsy/hatsy/core';
} from '@hatsy/hatsy/core.js';
import {
PathRoute,
RouteCaptor,
Expand All @@ -14,7 +14,7 @@ import {
URLRoute,
} from '@hatsy/route-match';
import { isIterable, lazyValue } from '@proc7ts/primitives';
import type { RouterMeans } from '../router.means';
import type { RouterMeans } from '../router.means.js';

/**
* Routing dispatch pattern.
Expand Down
2 changes: 0 additions & 2 deletions src/dispatch/index.ts

This file was deleted.

2 changes: 2 additions & 0 deletions src/dispatch/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './dispatch-by-name.handler.js';
export * from './dispatch-by-pattern.handler.js';
8 changes: 0 additions & 8 deletions src/index.ts

This file was deleted.

7 changes: 7 additions & 0 deletions src/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @module @hatsy/router
*/
export * from './dispatch/mod.js';
export * from './router-config.js';
export * from './router.means.js';
export * from './routing.capability.js';
4 changes: 2 additions & 2 deletions src/router-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { HttpMeans } from '@hatsy/hatsy';
import type { RequestContext } from '@hatsy/hatsy/core';
import type { RequestContext } from '@hatsy/hatsy/core.js';
import type { PathRoute, RoutePattern, URLRoute } from '@hatsy/route-match';
import type { RouterMeans } from './router.means';
import type { RouterMeans } from './router.means.js';

/**
* Router configuration.
Expand Down
6 changes: 3 additions & 3 deletions src/routing.capability.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { HttpMeans, RequestHandler } from '@hatsy/hatsy';
import { RequestCapability, RequestContext, requestExtension } from '@hatsy/hatsy/core';
import { RequestCapability, RequestContext, requestExtension } from '@hatsy/hatsy/core.js';
import { PathRoute, simpleRoutePattern, urlRoute, URLRoute } from '@hatsy/route-match';
import { noop } from '@proc7ts/primitives';
import type { RouterConfig } from './router-config';
import type { RouterMeans } from './router.means';
import type { RouterConfig } from './router-config.js';
import type { RouterMeans } from './router.means.js';

/**
* Request routing capability.
Expand Down
6 changes: 2 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"extends": "@run-z/project-config/tsconfig.lib.json",
"compilerOptions": {
"lib": ["DOM", "ES2019"],
"module": "ES2015",
"moduleResolution": "Node",
"lib": ["DOM", "ES2022"],
"outDir": "target/js",
"target": "ES2019"
"rootDir": "src"
},
"include": ["src/**/*"]
}
5 changes: 3 additions & 2 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"entryPoints": ["src/index.ts"],
"entryPoints": ["src/mod.ts"],
"name": "Hatsy router",
"out": "./target/typedoc"
"out": "./target/typedoc",
"sort": ["static-first", "visibility", "enum-value-ascending", "alphabetical", "kind"]
}

0 comments on commit 1e14359

Please sign in to comment.