Releases: cap-js/cds-typer
Releases · cap-js/cds-typer
v0.38.0
v0.37.0
Added
Changed
Deprecated
Removed
Fixed
- Added declare statement on type definitions
- Explicitly add an
any[]type in generated boilerplate to avoid issues withnoImplicitAny - Entities included via
cds importnow have their properties properly generated
Security
v0.36.0
Added
Changed
Deprecated
Removed
Fixed
- targeting aspects in compositions now properly resolves them.
- transitive references to property types of other entities now also work for enums.
Security
v0.35.0
Added
Changed
- action parameters annotated with
@mandatoryare no longer nullable - base definitions now properly import the default export of
@sap/cds
Deprecated
Removed
Fixed
- Using
cds.Mapas type will no longer result in the property not being printed at all.
Security
v0.34.0
Added
- Improved performance of repeated
cds-typerruns by introducing an option to cache CDS model between runs. By default, typer will only regenerate the files if the model has changed between runs, usingblake2s256as algorithm. The used version of cds-typer is included in the hash and will therefore be version-specific.
Changed
- [breaking] The config
use_entities_proxy(allowing for static imports) is now set totrueas default. You can set it tofalseto revert to the old behaviour. - Running
cds watchwill triggercds-typer "*"before the initial startup
Deprecated
Removed
Fixed
Security
v0.33.1
Added
Changed
Deprecated
Removed
Fixed
- Enums are now exported in ESM style in ESM projects
Security
v0.33.0
Added
- Support new
cds.Maptype, which is emitted as{[key:string]: unknown}. The most appropriate type would in fact be{[key:string]: any}, which would also allow any and all keys. But would also cause issues with strict project configurations. Therefore, to effectively usecds.Map, users will have to cast theunknowns to the effective type they expect. - Introduce
cds.env.typer.build_taskto allow disabling thetypescriptbuild task shipped with cds-typer by setting it tofalse
Changed
- [breaking] The types
cds.Binaryandcds.LargeBinaryare now generated asBufferandReadablerespectively to reflect the behaviour of the new database packages@cap-js/hanaand@cap-js/sqlite. You can switch back to the old behaviour by addinglegacy_binary_types: trueto your project configuration. CHANGELOG.mdandLICENSEfiles are no longer part of the npm package.
Deprecated
Removed
Fixed
Security
v0.32.1
Added
Changed
Deprecated
Removed
Fixed
- default value for
inline_declarationsin help command - entity scope and namespace are now added in the correct order to inflected type names
Security
v0.31.0
Fixed
- type-referencing a property that is a key no longer breaks the referring property
- when targeting ESM, all imports within the generated types now add a
/index.js-suffix to conform to modern module resolution mechanisms - leaving
target_module_typeat'auto'now properly acts on a detected"type":"module"
Added
- cds aspects now generate a synthetic plural type too, to be used in
composition of many
v0.30.0
Changed
- [breaking] when running cds-typer in a CAP project, the default for the
outputDirectoryoption will be./@cds-modelsinstead of./. This default takes the lowest precedence after setting it in the project'scds.env, or explicitly as CLI argument.
Fixed
- cds-typer no longer ignores the selected
outputDirectory, which would also cause an issue during build