New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cap-js/cds-typer

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cap-js/cds-typer - npm Package Versions

2345

0.32.1

Diff

Changelog

Source

[0.32.1] - 2025-01-20

Added

Changed

Deprecated

Removed

Fixed

  • default value for inline_declarations in help command
  • entity scope and namespace are now added in the correct order to inflected type names

Security

cap-npm
published 0.32.0 •

Changelog

Source

[0.32.0] - 2025-01-14

Added

  • dedicated classes for inline compositions
  • dedicated text-classes for entities with localized elements

Changed

  • prefixed builtin types like Promise and Record with globalThis., to allow using names of builtin types for entities without collisions
  • default export class representing the service itself is now exported without name
  • bumped peer-dependency to @cap-js/cds-types to >=0.9

Deprecated

Removed

Fixed

  • referencing another entity's property of type cds.String in an enum will now properly quote the generated values

Security

cap-npm
published 0.31.0 •

Changelog

Source

[0.31.0] - 2024-12-16

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_type at '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
cap-npm
published 0.30.0 •

Changelog

Source

[0.30.0] - 2024-12-02

Changed

  • [breaking] when running cds-typer in a CAP project, the default for the outputDirectory option will be ./@cds-models instead of ./. This default takes the lowest precedence after setting it in the project's cds.env, or explicitly as CLI argument.

Fixed

  • cds-typer no longer ignores the selected outputDirectory, which would also cause an issue during build
cap-npm
published 0.29.0 •

Changelog

Source

[0.29.0] - 2024-11-20

Added

  • [breaking] cds-typer now tries to automatically detect whether it has to generate ESM or CommonJS in the emitted index.js files. This behaviour can be overridden via the --targetModuleType option. If you rely on these generated index.js files to be CJS despite your project being of ESM type, you need to manually tell cds-typer to generate CJS files!

Fixed

  • The static .keys property now properly reels in key types from inherited classes.
cap-npm
published 0.28.1 •

Changelog

Source

[0.28.1] - 2024-11-07

Fixed

  • cds build no longer fails on Windows with an EINVAL error.
  • cds build also supports custom model paths in tsconfig.json that do not end with /index.ts. This is the case for projects running with tsx.
cap-npm
published 0.28.0 •

Changelog

Source

[0.28.0] - 24-10-24

Added

  • Schema definition for cds.typer options in package.json and .cdsrc-*.json files
  • Added a static elements property to all entities, which allows access to the LinkedDefinitions instance of an entity's elements
  • Schema definition for typescript cds build task.
  • .drafts property of any entity E is now of type DraftOf<E>, or DraftsOf<E> for plurals, respectively. This type exposes dditional properties that are available on drafts during runtime.

Fixed

  • Entity elements of named structured types are flattened when using the option --inlineDeclarations flat
  • override modifier on .kind property is now only generated if the property is actually inherited, satisfying strict tsconfig.jsons
  • Properly support mandatory (not null) action parameters with array of types
  • Static property .drafts is only create for entity classes that are actually draft enabled
cap-npm
published 0.27.0 •

Changelog

Source

[0.27.0] - 2024-10-02

Changed

  • Any configuration variable (via CLI or cds.env) can now be passed in snake_case in addition to camelCase
  • Action parameters are now generated as optional by default, which is how the runtime treats them. Mandatory parameters have to be marked as not null in CDS/CDL, or notNull in CSN.

Fixed

  • Fix build task for projects with spaces
  • Fix a bug where cds-typer would produce redundant type declarations when the model contains an associations to another entity's property
  • Reintroduce default value '.' for --outputDirectory
cap-npm
published 0.26.0 •

Changelog

Source

[0.26.0] - 2024-09-11

Added

  • Added a static .keys property in all entities. That property is dictionary which holds all properties as keys that are marked as key in CDS
  • Added a CLI option --useEntitiesProxy. When set to true, all entities are wrapped into Proxy objects during runtime, allowing top level imports of entity types.
  • Added a static .kind property for entities and types, which contains 'entity' or 'type' respectively
  • Apps need to provide @sap/cds version 8.2 or higher.
  • Apps need to provide @cap-js/cds-types version 0.6.4 or higher.
  • Typed methods are now generated for calls of unbound actions. Named and positional call styles are supported, e.g. service.action({one, two}) and service.action(one, two).
  • Action parameters can be optional in the named call style (service.action({one:1, ...})).
  • Actions for ABAP RFC modules cannot be called with positional parameters, but only with named ones. They have 'parameter categories' (import/export/changing/tables) that cannot be called in a flat order.
  • Services now have their own export (named like the service itself). The current default export is not usable in some scenarios from CommonJS modules.
  • Enums and operation parameters can have doc comments
cap-npm
published 0.25.0 •

Changelog

Source

[0.25.0] - 2024-08-13

Added

  • Declaring a type alias on an enum in cds now also exports it on value level in the resulting type

Fixed

  • Classes representing views and projections will no longer carry ancestry to avoid clashes thereof with aliases fields

Changed

  • All properties are now preceeded with the declare modifier to pass strict tsconfigs using useDefineForClassFields or noImplicitOverride
  • The static actions property of generated classes now includes the types from all inherited classes to also suggest actions defined in a base entity/aspect/type.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc