Releases: cap-js/cds-types
Releases · cap-js/cds-types
v0.11.0
Added
- Syntactically allow infix filters in
SELECT
clauses through tagged templates. These filters are not semantically checked for validity - Added
cds.linked.LinkedDefinition
as alias forcds.linked.classes.any_
- Added
doc?: string
tocds.linked.classes.any_
- Add overload for
Service.emit
to offer improved type support when using an event type emitted by cds-typer. - Added programmatic draft actions.
- Added types for
util.path
,util.fs
, andutil.inspect
.
Changed
- [breaking] Corrected the way the default export is generated. This also gets rid of the export
default_2
that was mistakenly exposed before. Request.reject(…)
now returnsnever
instead ofError
, as its implementation always throws.
Deprecated
Removed
Fixed
Security
v0.10.0
Added
- Added support for new builtin type
cds.Map
- Added types for
SELECT.hints()
ofcds.ql
API - Added types for
.bind(Service)
to all queries. - Added types for
i18n
module
Changed
CHANGELOG.md
andLICENSE
files are no longer part of the npm package.
Deprecated
Removed
Fixed
Security
v0.9.0
Added
- Added missing properties for
log
incds.env
- Added overload for
service.read
to be called with aref
- Added
HandlerFunction.parameters.req
andHandlerFunction.returns
to type handler functions that are not declared as lambdas more conveniently - Added types for anonymous, privileged, and default user
Changed
- removed dependency to
@types/express: ^4.17.21
in favour of a peerDependency to@types/express: >=4
Removed
- [breaking] Removed type
TypedRequest<T>
and replaced it with justRequest<T>
- Removed deprecated
cds.Float
CSN property type
Fixed
- Use
Required
instead ofDeepRequired
in projection function to avoid complexity errors from TypeScript - Added missing type inference for
.set
/.with
ofUPDATE
- Added missing type inference for
.entries
ofUPSERT
andINSERT
- Variants of
SELECT.one(T)
will now returnT | null
, instead ofT
- Documentation link to
srv.emit
v0.8.0
Fixed
- Added missing type for
Request.before('commit', …)
- Added missing types for
Request.on('succeeded' | 'failed' | 'done', …)
- Added missing type for
cds.test.log
- Added missing
.ref
in CQN queries - Added missing
.forUpdate
,.forShareLock
, and.search
incqn.SELECT
- Calling
SELECT.one('...').from(Plural)
now properly returns a single instance
v0.7.0
Fixed
- Added missing type for
cds.context.model
- Added missing type for
cds.context.model
- Added missing type for
req.query.elements
- Made constructors for query parts (
SELECT
,UPDATE
,DELETE
, ...) private, as they should only be accessed statically SELECT
returns a single instance now when specifying a primary key
Added
cds.app
typed as express.js applicationcds.cli
CLI argumentscds.requires
types for MTX servicescds.utils.colors
types- The CQL methods
.where
and.having
now suggest property names for certain overloads. Service.before/on/after(event, target...)
now accept also an array of typer-generated classes in thetarget
parameterlocalized
variants toSELECT
Changed
- Most
cds.requires
entries are now optionals. cds.connect.to
now also supports using a precompiled model.- Properties of entities are no longer optional in projections, eliminating the need to perform optional chaining on them when using nested projections
v0.6.5
Fixed
- The
@types/sap__cds
link created by thepostinstall
script now also works in monorepo setups where the target@cap-js/cds-types
might already be preinstalled (often hoisted some levels up).
v0.6.4
Added
Service.emit(...)
can now also be called with custom eventsService.before(...)
andService.after(...)
now accept bound and unbound functions as parameterconnect.to (ServiceClass)
as alternative to'service'
stringconnect.to ('db')
returningcds.DatabaseService
Changed
.before(...)
,.on(...)
, and.after(...)
now properly infer inflection when a typer-generated class is passed as second parameter
Fixed
EACH
event has appropriately been renamedeach
to reflect runtime behaviour
v0.6.3
Fixed
- Installation no longer fails if symlink
@types/sap__cds
exists
v0.6.2
Fixed
- Symlink
@types/sap__cds
correctly created in case of upgrading@cap-js/cds-types
.
v0.6.1
Fixed
- Scripts
postinstall
andprerelease:ci-fix
now work correctly on windows.
Changed
postinstall
script now creates a relative symlink from@types/sap__cds
to allow the project to be moved/ renamed.