Skip to content

Commit

Permalink
chore: update ts config
Browse files Browse the repository at this point in the history
  • Loading branch information
escwxyz committed Oct 30, 2024
1 parent 7868baf commit 6647ad1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

## 0.0.2

- Minor fixes on the TypeScript config

## 0.0.1

- Initial release
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "traffic-lens",
"version": "0.0.1",
"description": "A network traffic monitoring tool with proxy awareness for Node.js",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand All @@ -16,7 +17,7 @@
"test:integration": "vitest run tests/integration",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest watch",
"build": "tsc",
"build": "tsc --project tsconfig.build.json",
"prebuild": "rm -rf dist",
"format": "prettier --write .",
"lint": "prettier --check .",
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/traffic-lens.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { vi, describe, it, expect, beforeEach } from "vitest";
import TrafficLens from "../../src";
import TrafficLens from "../../src/index.js";
import * as si from "systeminformation";
import { mockNetworkStats, mockNetworkConnections, expectedStats } from "../fixtures/mock-data";
import { mockNetworkStats, mockNetworkConnections, expectedStats } from "../fixtures/mock-data.js";

// Mock systeminformation module
vi.mock("systeminformation", () => ({
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"include": ["src"]
}
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"target": "ESNext",
"module": "NodeNext",
"declaration": true,
"outDir": "./dist",
"strict": true
},
"include": ["src"],
"include": ["src", "tests"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit 6647ad1

Please sign in to comment.