Skip to content

Commit c030b3f

Browse files
author
Hyunje Jun
authored
Fix build path (#97)
* Revert JSON import It breaks the original build directory structure, as package.json should be included as a module. * Remove unused test/tsconfig.json
1 parent 14ba023 commit c030b3f

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

lib/http.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import axios, { AxiosInstance, AxiosError } from "axios";
22
import { Readable } from "stream";
33
import { HTTPError, ReadError, RequestError } from "./exceptions";
44
import * as fileType from "file-type";
5-
import * as pkg from "../package.json";
5+
6+
const pkg = require("../package.json");
67

78
export default class HTTPClient {
89
private instance: AxiosInstance;

test/http.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { getStreamData } from "./helpers/stream";
55
import { close, listen } from "./helpers/test-server";
66
import { readFileSync, createReadStream } from "fs";
77
import { join } from "path";
8-
import * as pkg from "../package.json";
8+
9+
const pkg = require("../package.json");
910

1011
const TEST_PORT = parseInt(process.env.TEST_PORT, 10);
1112

test/tsconfig.json

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

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"target": "es6",
55
"noImplicitAny": true,
66
"outDir": "dist",
7-
"declaration": true,
8-
"resolveJsonModule": true
7+
"rootDirs": ["lib", "test"],
8+
"declaration": true
99
},
1010
"include": [
1111
"lib/**/*.ts"

0 commit comments

Comments
 (0)