Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit 4eabca6

Browse files
authored
Merge pull request #21 from hatsyjs/v3
v3
2 parents f2d7c87 + a843593 commit 4eabca6

57 files changed

Lines changed: 290 additions & 275 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hatsy/hatsy",
3-
"version": "2.5.3",
3+
"version": "3.0.0-pre.0",
44
"description": "Asynchronous TypeScript-friendly HTTP server for Node.js",
55
"keywords": [
66
"http-framework",
@@ -22,10 +22,10 @@
2222
"types": "./dist/hatsy.d.ts",
2323
"typesVersions": {
2424
"*": {
25-
"core": [
25+
"core.js": [
2626
"./dist/hatsy.core.d.ts"
2727
],
28-
"testing": [
28+
"testing.js": [
2929
"./dist/hatsy.testing.d.ts"
3030
]
3131
}
@@ -35,30 +35,28 @@
3535
"types": "./dist/hatsy.d.ts",
3636
"default": "./dist/hatsy.js"
3737
},
38-
"./core": {
38+
"./core.js": {
3939
"types": "./dist/hatsy.core.d.ts",
4040
"default": "./dist/hatsy.core.js"
4141
},
4242
"./package.json": "./package.json",
43-
"./testing": {
43+
"./testing.js": {
4444
"types": "./dist/hatsy.testing.d.ts",
4545
"default": "./dist/hatsy.testing.js"
4646
}
4747
},
4848
"sideEffects": false,
4949
"dependencies": {
50-
"@frontmeans/httongue": "^2.4.0",
51-
"@hatsy/http-header-value": "^3.7.1",
52-
"@proc7ts/logger": "^1.3.2",
53-
"@proc7ts/primitives": "^3.0.2"
50+
"@proc7ts/logger": "^2.0.0",
51+
"@proc7ts/primitives": "^4.0.1",
52+
"httongue": "^3.1.0",
53+
"http-header-value": "^4.0.0"
5454
},
5555
"engines": {
56-
"node": ">=12"
56+
"node": ">=18"
5757
},
5858
"devDependencies": {
5959
"@jest/globals": "^29.7.0",
60-
"@proc7ts/context-values": "^7.1.1",
61-
"@proc7ts/logger": "^1.3.2",
6260
"@run-z/eslint-config": "^3.5.0",
6361
"@run-z/prettier-config": "^2.0.0",
6462
"@run-z/project-config": "^0.20.0",

src/core/dispatch-error.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { ErrorMeans } from './error.means';
2-
import type { RequestHandler } from './request-handler';
3-
import { requestExtension } from './request-modification';
1+
import type { ErrorMeans } from './error.means.js';
2+
import type { RequestHandler } from './request-handler.js';
3+
import { requestExtension } from './request-modification.js';
44

55
/**
66
* Dispatches request processing error.

src/core/index.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/core/logging/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/core/logging/logger.means.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RequestLogger } from './request-logger';
1+
import type { RequestLogger } from './request-logger.js';
22

33
/**
44
* Request logger means.

src/core/logging/logging.capability.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { consoleLogger } from '@proc7ts/logger';
2-
import { RequestCapability } from '../request-capability';
3-
import type { RequestHandler } from '../request-handler';
4-
import { requestExtension } from '../request-modification';
5-
import type { LoggerMeans } from './logger.means';
6-
import type { RequestLogger } from './request-logger';
2+
import { RequestCapability } from '../request-capability.js';
3+
import type { RequestHandler } from '../request-handler.js';
4+
import { requestExtension } from '../request-modification.js';
5+
import type { LoggerMeans } from './logger.means.js';
6+
import type { RequestLogger } from './request-logger.js';
77

88
/**
99
* Request logging capability.

src/core/logging/logging.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { beforeEach, describe, expect, it, jest } from '@jest/globals';
22
import { consoleLogger, silentLogger } from '@proc7ts/logger';
33
import { noop } from '@proc7ts/primitives';
44
import type { Mock } from 'jest-mock';
5-
import type { RequestContext } from '../request-context';
6-
import type { RequestHandler } from '../request-handler';
7-
import type { RequestProcessor } from '../request-processor';
8-
import { requestProcessor } from '../request-processor';
9-
import type { LoggerMeans } from './logger.means';
10-
import { Logging } from './logging.capability';
11-
import type { RequestLogger } from './request-logger';
5+
import type { RequestContext } from '../request-context.js';
6+
import type { RequestHandler } from '../request-handler.js';
7+
import type { RequestProcessor } from '../request-processor.js';
8+
import { requestProcessor } from '../request-processor.js';
9+
import type { LoggerMeans } from './logger.means.js';
10+
import { Logging } from './logging.capability.js';
11+
import type { RequestLogger } from './request-logger.js';
1212

1313
describe('Logging', () => {
1414
let handler: Mock<(context: RequestContext<LoggerMeans>) => void>;

src/core/logging/mod.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './logger.means.js';
2+
export * from './logging.capability.js';
3+
export * from './request-logger.js';

src/core/mod.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @module @hatsy/hatsy/core.js
3+
*/
4+
export * from './dispatch-error.js';
5+
export * from './error.means.js';
6+
export * from './logging/mod.js';
7+
export * from './request-body.means.js';
8+
export * from './request-capability.js';
9+
export * from './request-context.js';
10+
export * from './request-handler.js';
11+
export * from './request-modification.js';
12+
export * from './request-processor.js';
13+
export * from './request-value-transformer.js';

src/core/request-capability.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RequestHandler } from './request-handler';
1+
import type { RequestHandler } from './request-handler.js';
22

33
/**
44
* Request processing capability.

0 commit comments

Comments
 (0)