Skip to content

Commit

Permalink
fix source obliteration (#15)
Browse files Browse the repository at this point in the history
* fix source obliteration

* docs(changeset): prevent transformer from removing source refs
  • Loading branch information
jfrconley authored Aug 9, 2023
1 parent dce3235 commit f1bd3de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-trainers-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nrfcloud/ts-json-schema-transformer": patch
---

prevent transformer from removing source refs
5 changes: 5 additions & 0 deletions src/transformers/file-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export abstract class FileTransformer {
...transformed.statements,
...nodesToAdd.end,
],
file.isDeclarationFile,
file.referencedFiles,
file.typeReferenceDirectives,
file.hasNoDefaultLib,
file.libReferenceDirectives,
);

FileTransformer.FILE_NODE_MAP.delete(file.fileName);
Expand Down

0 comments on commit f1bd3de

Please sign in to comment.