bio-dts 0.15.1 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -151,15 +151,19 @@ export default function generateTypes(fileNames, compilerOptions, ts, generateOp
151
151
 
152
152
  const combinedJSON = JSON.parse(JSON.stringify(combined));
153
153
 
154
- // produce source maps with relative paths to sources,
155
- // following typescript conventions
154
+ // produce source maps with relative paths, following typescript conventions
155
+ const mapDir = path.dirname(path.resolve(fileName));
156
+
156
157
  if (combinedJSON.sources) {
157
- const mapDir = path.dirname(path.resolve(fileName));
158
158
  combinedJSON.sources = combinedJSON.sources.map(src =>
159
159
  path.relative(mapDir, path.resolve(src))
160
160
  );
161
161
  }
162
162
 
163
+ if (combinedJSON.file) {
164
+ combinedJSON.file = path.relative(mapDir, path.resolve(fileName));
165
+ }
166
+
163
167
  // keep maps small, do not inline source text in declaration maps
164
168
  delete combinedJSON.sourcesContent;
165
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bio-dts",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "Generate sane and clean types from JavaScript sources",
5
5
  "type": "module",
6
6
  "bin": "./bin/cmd.js",