diff --git a/packages/node/package.json b/packages/node/package.json index c5e82d7..3a51846 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -9,9 +9,9 @@ "engines": { "node": ">=10" }, - "main": "dist/index.js", - "module": "esm/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "module": "esm/src/index.js", + "types": "dist/src/index.d.ts", "publishConfig": { "access": "public" }, diff --git a/packages/node/src/constants.ts b/packages/node/src/constants.ts index 05eb5fc..9c7d109 100644 --- a/packages/node/src/constants.ts +++ b/packages/node/src/constants.ts @@ -1,8 +1,5 @@ import { Options, LogLevel } from '@amplitude/types'; -// constants related to this instance of the SDK -// TODO(Kelvin): Why did this break typescript compilation? -// export { version as SDK_VERSION } from '../package.json'; -export const SDK_VERSION = '1.0.1'; +export { version as SDK_VERSION } from '../package.json'; export const SDK_NAME = 'amplitude-node'; export const AMPLITUDE_SERVER_URL = 'https://api2.amplitude.com/2/httpapi'; export const BASE_RETRY_TIMEOUT = 100; diff --git a/packages/node/tsconfig.build.json b/packages/node/tsconfig.build.json index a263a08..1ab152f 100644 --- a/packages/node/tsconfig.build.json +++ b/packages/node/tsconfig.build.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "rootDir": ".", "baseUrl": ".", "outDir": "dist" }, diff --git a/packages/node/tsconfig.esm.json b/packages/node/tsconfig.esm.json index 33a3842..cfb100b 100644 --- a/packages/node/tsconfig.esm.json +++ b/packages/node/tsconfig.esm.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.esm.json", "compilerOptions": { + "rootDir": ".", "baseUrl": ".", "outDir": "esm" }, diff --git a/packages/types/package.json b/packages/types/package.json index 67269df..f8aa08c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -9,9 +9,9 @@ "engines": { "node": ">=10" }, - "main": "dist/index.js", - "module": "esm/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "module": "esm/src/index.js", + "types": "dist/src/index.d.ts", "publishConfig": { "access": "public" }, diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index c0816d8..a0400dc 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -3,7 +3,7 @@ "compilerOptions": { "baseUrl": ".", "outDir": "dist", - "rootDir": "src" + "rootDir": "." }, "include": ["src/**/*.ts"] } diff --git a/packages/types/tsconfig.esm.json b/packages/types/tsconfig.esm.json index 33a3842..cfb100b 100644 --- a/packages/types/tsconfig.esm.json +++ b/packages/types/tsconfig.esm.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.esm.json", "compilerOptions": { + "rootDir": ".", "baseUrl": ".", "outDir": "esm" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index e6d1725..cd6a241 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -9,9 +9,9 @@ "engines": { "node": ">=10" }, - "main": "dist/index.js", - "module": "esm/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "module": "esm/src/index.js", + "types": "dist/src/index.d.ts", "publishConfig": { "access": "public" }, diff --git a/packages/utils/tsconfig.build.json b/packages/utils/tsconfig.build.json index a263a08..1ab152f 100644 --- a/packages/utils/tsconfig.build.json +++ b/packages/utils/tsconfig.build.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "rootDir": ".", "baseUrl": ".", "outDir": "dist" }, diff --git a/packages/utils/tsconfig.esm.json b/packages/utils/tsconfig.esm.json index 33a3842..cfb100b 100644 --- a/packages/utils/tsconfig.esm.json +++ b/packages/utils/tsconfig.esm.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.esm.json", "compilerOptions": { + "rootDir": ".", "baseUrl": ".", "outDir": "esm" }, diff --git a/tsconfig.json b/tsconfig.json index 8f6e7b6..d5f49ca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "types": ["node"], "paths": { "@amplitude/*": ["*/src"] - } + }, + "resolveJsonModule": true } }