diff --git a/src/client.ts b/src/client.ts index af3dad0f93..2a26375550 100644 --- a/src/client.ts +++ b/src/client.ts @@ -83,9 +83,10 @@ import { TimeZoneRequest, TimeZoneResponse, timezone } from "./timezone"; import axios, { AxiosInstance, AxiosRequestConfig } from "axios"; import { HttpsAgent } from "agentkeepalive"; -import { version } from "./index"; import { customAdapter } from "./adapter"; +// Cannot be `import` as it's not under TS root dir +export const version = require("../package.json").version; export const defaultHttpsAgent = new HttpsAgent({ keepAlive: true }); export const defaultTimeout = 10000; export const userAgent = `google-maps-services-node-${version}`; diff --git a/src/index.ts b/src/index.ts index a362a392ff..b3b0b0fed8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,9 +14,6 @@ * limitations under the License. */ -// Cannot be `import` as it's not under TS root dir -export const version = require("../package.json").version; - export { DirectionsRequest, DirectionsResponse } from "./directions"; export { DistanceMatrixRequest, DistanceMatrixResponse } from "./distance"; export { ElevationRequest, ElevationResponse } from "./elevation";