Skip to content

Commit 9daec5f

Browse files
committed
feat: remove sourcemap option
1 parent c01da85 commit 9daec5f

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

.changeset/social-lies-design.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"elysia-remote-dts": patch
3+
---
4+
5+
remove option for `sourcemap`

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ dts(entryPoint, options)
6565
| `emitDtsOnly` | `boolean` | `false` | When `true`, the plugin will only emit `.d.ts` files and remove all other chunks. Useful when generating `d.ts` files for CommonJS format as part of a separate build process. |
6666
| `tsconfig` | `string \| boolean` | `"tsconfig.json"` | The path to the `tsconfig.json` file. When set to `false`, any `tsconfig.json` file will be ignored. |
6767
| `compilerOptions` | `object` | `{}` | The `compilerOptions` for the TypeScript compiler. See [TypeScript compiler options](https://www.typescriptlang.org/docs/handbook/compiler-options.html). |
68-
| `sourcemap` | `boolean` | `false` | When `true`, the plugin will generate declaration maps (`.d.ts.map` files) for `.d.ts` files. |
6968
| `resolve` | `boolean \| (string \| RegExp)[]` | `false` | Resolve external types used in `.d.ts` files from `node_modules`. Can be a boolean or an array of strings/RegExp patterns. |
7069
| `resolvePaths` | `boolean` | `false` | When `true`, the plugin will resolve `paths` in `tsconfig.json`. This option is enabled automatically when `paths` is set in `compilerOptions`. |
7170

src/resolveOptions.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export function resolveOptions({
66
cwd = process.cwd(),
77
tsconfig,
88
compilerOptions = {},
9-
sourcemap,
109
dtsInput = false,
1110
emitDtsOnly = false,
1211
resolve = false,
@@ -30,15 +29,15 @@ export function resolveOptions({
3029
tsconfig = undefined
3130
}
3231

33-
sourcemap ??= !!compilerOptions.declarationMap
34-
compilerOptions.declarationMap = sourcemap
32+
// Always set declarationMap to false since we removed the sourcemap option
33+
compilerOptions.declarationMap = false
3534

3635
return {
3736
cwd,
3837
tsconfig: typeof tsconfig === 'boolean' ? undefined : tsconfig,
3938
compilerOptions,
4039
isolatedDeclarations: false,
41-
sourcemap,
40+
sourcemap: false,
4241
dtsInput,
4342
emitDtsOnly,
4443
resolve,

src/types.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ export interface Options {
3737
*/
3838
compilerOptions?: TsConfigJson.CompilerOptions
3939

40-
/**
41-
* When `true`, the plugin will generate declaration maps for `.d.ts` files.
42-
*/
43-
sourcemap?: boolean
44-
4540
/** Resolve external types used in dts files from `node_modules` */
4641
resolve?: boolean | (string | RegExp)[]
4742

@@ -60,6 +55,7 @@ export type OptionsResolved = Overwrite<
6055
{
6156
tsconfig: string | undefined
6257
isolatedDeclarations: false
58+
sourcemap: false
6359
}
6460
>
6561

0 commit comments

Comments
 (0)