Skip to content

Commit d038537

Browse files
committed
chore: refactor compiler config system + update angular to v17
Previously the whole configuration loading of ``"reflection": x` was messy and had low test coverage. The code was rewritten and extracted in its own file, making it much easier to debug und test. It supports now the old `reflection: string|string[]|boolean` option in tsConfig.json plus a new "deepkitCompilerOptions" option: ``` deepkitCompilerOptions?: { reflection?: string|string[]|boolean; exclude?: string[]; mergeStrategy: 'replace' | 'merge'; } ``` A new merge strategy has been added to allow more complex tsconfig setup, that allows to configure when to replace or merge reflection|exclude arrays. This is useful when extending another tsconfig that has already reflection|exclude defined as well. The user can now define whether it should be merged (basically extended, which is the default) or entirely replaced (which needs to be manually enabled). Previously when importing from an external module, like e.g. @deepkit/type the reflection transformer had to check whether the imported module was built with runtime types by reading its tsconfig.json (node_modules/@deepkit/type/tsconfig.json) or its package.json. This was unflexible, unnecessary, and not documented. It now looks directly into the importing type definitions (for example node_modules/@deepkit/type/dist/cjs/index.d.ts) and determines by looking at the exports whether a `__Ωx` is exported, and if so we know exactly if it was built using deepkit's type compiler. It no longer looks into package.json, thus the reflection option it in is no longer used. This commit also switches to yarn, as it prepared the integration of deepkit's website into this repo.
1 parent 4e9b8be commit d038537

File tree

84 files changed

+25346
-60587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+25346
-60587
lines changed

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

0 commit comments

Comments
 (0)