UNPKG

@sap/vscode-cds

Version:

SAP CDS language support as npm library.

1,507 lines (1,069 loc) 55.8 kB
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). ## [9.2.1] - 2025-08-08 ### Changed - OData Annotation Modeler's sub features can be enabled distinctively. For performance reasons, **only _code completion_ and _hover information_ are enabled by default**. Enable others via user settings: `cds.contributions.features.<feature>` - Performance optimizations when updating dependency net of CDS file dependencies ### Fixed - _Using_ paths which end with a folder name were not resolved correctly - Formatter support for `==` operator ### Also see - `@sap/cds-lsp` 9.2.1 - `@sap/cds-compiler` 6.2.2 ## [9.2.0] - 2025-07-29 ### Added - goto implementation for NodeJS services, entities, events, actions and functions, services and entities for Java ### Also see - `@sap/cds-lsp` 9.2.0 - `@sap/cds-compiler` 6.2.0 ## [9.1.3] - 2025-07-21 ### Added - Formatting options `whitespaceBeforeColonInParamList` and `whitespaceAfterColonInParamList` to control whitespace around colons in parameter lists ### Fixed - Workspace symbols could have been incomplete due to a bug in the where-used index ### Also see - `@sap/cds-lsp` 9.1.2 ## [9.1.1] - 2025-07-10 ### Changed - Maximum log-file size can now be increased to at most 1 GB (default limit unchanged at 10 MB) ### Fixed - Colons in type paths are no longer aligned with other colons, nor are they padded with spaces ### Also see - `@sap/cds-lsp` 9.1.1 ## [9.1.0] - 2025-07-02 ### Added - Performance/Responsiveness: + Reduce _"lagging red underline"_ while typing - configurable via user setting `cds.workspace.fastDiagnosticsMode` + Outdated compilations in background are aborted fast. This increases responsiveness and reduces CPU usage and is especially useful for large projects with many files. - Formatter: New option `argsInNewLine` to put multiple arguments to e.g. function calls on a new line - Outline/Workspace Symbols: use distinct icons for `Association` and `Composition` elements ### Changed - Minimum VSCode version is now 1.99.0 - Formatter: Chained method-like function calls are now broken into separate lines ### Fixed - Formatter: + Original empty lines are now correctly preserved before single-lined blocks + Separate alignment of annotations before resp. within projection-like entities ### Also see - `@sap/cds-lsp` 9.1.0 - `@sap/cds-compiler` 6.1.0 ## [9.0.2] - 2025-06-05 ### Changed - Telemetry now requires the user to install `SAP Business Application Studio Toolkit` extension ## [9.0.1] - 2025-05-27 ### Added - Formatter: option `boolOpsAtLineEnd` to position `and`, `or` operators at line end - Support for telemetry - See `README.md` for details ### Changed - Change license from SAP DEVELOPER LICENSE AGREEMENT '3.1' to '3.2 CAP v2' - Where-used functionality now based on new index - Improved `cds json schema` retrieval - Refactored CLI call handling to cds and other tools - More compact formatting of `case` statements - Refactoring when renaming/deleting CDS files is now disabled by default. Corresponding user settings are `cds.refactoring.files.rename.enabled` and `cds.refactoring.files.delete.enabled` ### Added - Support for telemetry - See `README.md` for details ### Fixed - Avoid exception during json schema hover when no hover text is available - Welcome page (`CAP Release Notes`) now show title of code block sections - Formatter: Separate alignment of annotations to entity and select items - Syntax highlighting of parenthesized annotations with strings containing a colon - Syntax highlighting of comments in queries ### Removed - User setting `cds.useOldParser` - Official support for CDS < 8 and CDS compiler < 5 (a fallback to the latest compiler is done) ### Also see - `@sap/cds-lsp` 9.0.0 - `@sap/cds-compiler` 6.0.8 ## [8.9.1] - 2025-04-07 ### Fixed - Formatting of annotations in parentheses with values containing spaces ### Also see - `@sap/cds-lsp` 8.9.1 ## [8.9.0] - 2025-04-01 ### Changed - use new CDS parser by default ### Fixed - Auto update of **Annotation Modeler** plugin did not work - _Document highlights_ could show wrong ranges for namespaces ### Also see - `@sap/cds-lsp` 8.9.0 - `@sap/cds-compiler` 5.9.0 ## [8.8.2] - 2025-03-19 ### Fixed - _Welcome Page_ was shown after each restart ## [8.8.1] - 2025-03-17 ### Changed - using native Node.js `fetch` for https requests ### Fixed - use lowercase `cdsjsonschema` as protocol for cds schema urls. - user setting `cds.useOldParser` did not work correctly ### Also see - `@sap/cds-lsp` 8.8.1 - `@sap/cds-compiler` 5.8.2 ## [8.8.0] - 2025-03-06 ### Changed - preparation to use new CDS parser - minimum VSCode version is now 1.96.0 ### Fixed - removed rendering issues in `CAP Release Notes` view - `Generate data model` now also works for `schema.cds` files in subfolders ### Also see - `@sap/cds-lsp` 8.8.0 - `@sap/cds-compiler` 5.8.0 ## [8.5.1] - 2024-12-02 ### Changed - enabling `newParser` via `cds.env` will no longer interfere with CDS editor ### Removed - obsolete support for CAP Notebook urls ### Also see - `@sap/cds-lsp` 8.5.1 - `@sap/cds-compiler` 5.5.2 ## [8.5.0] - 2024-11-29 ### Also see - `@sap/cds-lsp` 8.5.0 - `@sap/cds-compiler` 5.5.0 ## [8.4.3] - 2024-11-13 ### Added - refactoring `using` statements when renaming/deleting files or folders now considers ignore files (.cdsignore or .gitignore) and will not refactor ignored files ### Changed - (performance) expensive workspace scanning is only done during renaming/deleting files or folders if those contain CDS files ### Also see - `@sap/cds-lsp` 8.4.5 ## [8.4.2] - 2024-11-08 ### Added - user setting to disable refactoring support when renaming/deleting CDS files (`cds.refactoring.files.rename.enabled` and `cds.refactoring.files.delete.enabled`) ### Changed - performance improved when scanning the workspace and calculating refactorings when renaming/deleting CDS files ### Also see - `@sap/cds-lsp` 8.4.4 - `@sap/cds-compiler` 5.4.2 ## [8.4.1] - 2024-11-05 ### Fixed - Deleting CDS files now also suggests to remove `using` statements without artifacts ### Also see - `@sap/cds-lsp` 8.4.3 ## [8.4.0] - 2024-11-02 ### Added - Rename or move of CDS files and folders will update all `using` statements to the renamed file - Deletion of CDS files or folders will show all `using` statements to the renamed file with possibility to remove those. Note: The referencing files will likely have compilation errors afterward. - Telemetry reporting in SAP Business Application Studio ### Changed - Improve handling of fall back cds-lsp version 7.9.0 - Improve dynamic schema loading for `package.json` and `cds-rc.json` - Improve size and start-up time by bundling ### Fixed - Preview uses text document listener for refreshing preview file - highlighting of escaped identifiers and parameter lists - `using` path proposals could have been suggesting JS files instead of CDS files in certain cases - on Windows if client mixes upper- and lowercase drive letters some requests could have failed - CDS Typer was called when deleting a file which led to a misleading error output - Analysis of dependencies failed when handling non-npm `package.json` files (e.g. from `pnpm` lacking `name` property) ### Also see - `@sap/cds-lsp` 8.4.2 - `@sap/cds-compiler` 5.4.0 ## [8.3.0] - 2024-10-01 ### Added - Preview of `mta.yaml` via Mermaid diagram - show absolute name and kind of artifact in hover and completion details ### Changed - Visualize dependencies: + no longer need to install 3rd party extension + no longer need to show `.dot` text file first to render the graph i.e. less flickering + removed clumsy zoom buttons. Use mouse wheel or touchpad gestures to zoom in/out, mouse drag to move - Improved UI code formatter settings: better usage of horizontal space, number settings are now shown in same line ### Fixed - highlighting of CASE-statement keywords when put in their own line - analysis of dependencies for certain cases ### Also see - `@sap/cds-lsp` 8.3.2 - `@sap/cds-compiler` 5.3.0 ## [8.2.0] - 2024-09-02 ### Added - code completion for artifacts within `using` statements now also completes single name segments with complete name ### Changed - hover and completion proposal details now show artifact kind - Minimum VSCode version is now 1.90.2 ### Fixed - highlighting of element names in annotate statements and of special element names `entity`, `type`, `event` - completion: rename of source folders led to wrong using path proposals - completion: using path proposals did not work in multi-line using statements - maintain translation quickfix sent wrong document version ### Also see - `@sap/cds-lsp` 8.2.1 - `@sap/cds-compiler` 5.2.0 ## [8.0.2] - 2024-08-15 ### Added - Mermaid: add option for layout direction ## [8.0.1] - 2024-07-12 ### Added - Commands _CDS: Preview as diagram_ to create a _Mermaid_ class diagram. `@sap/cds-dk 8` is required. - If trace is enabled via `cds.trace.level` the trace file location is shown in the `vscode-cds` _Output_ view. ### Changed - Dropped official support for CDS compilers <4. The extension likely still works with older versions, but compatibility is not guaranteed. - Minimum VSCode version is now 1.89.1 ### Also see - `@sap/cds-lsp` 8.0.0 - `@sap/cds-compiler` 5.0.6 ## [7.9.0] - 2024-05-03 ### Added - Commands _CDS: Generate Model Data as JSON/CSV_ to create a number of records with test data for a selected entity. - Command _CDS: Generate HTTP Requests_ to create HTTP requests for a selected service or entity. - Syntax highlighting for the `cds` language to the markdown editor (not to the _preview_ though). ### Fixed - code completion for elements snippet now works when annotating artifacts using paths such as `MyService.SomeEntity` or when triggered at particular positions including line start - maintain translation quickfix could have used an existing translation file of a reuse component ### Removed - Toolbar button _Open with CDS Text Editor_ from graphical modeler, modeler now handles both directions to switch between graphical and textual editor. ### Also see - `@sap/cds-lsp` 7.9.0 - `@sap/cds-compiler` 4.9.0 ## [7.8.1] - 2024-04-09 ### Changed - Formatter now puts `actions` keyword after projection or query in a new line ### Fixed - Revert json schema to `draft-07` due to unsupported features in `2020-12` and `2019-09` - `workspace/symbols` request could have shown interactive popup if LSP plugins are slow - Indexing of entities with enum elements that led to wrongly reported unused imports - Indexing of namespaces after internal compiler changes - Indexing of annotations was slow ### Also see - `@sap/cds-lsp` 7.8.2 ## [7.8.0] - 2024-03-25 ### Added - Add preview commands to editor title ### Changed - Move menu item `Preview as yaml` to the top of the menu items list indicating its default character - Formatting logging now includes whitespace even if it may be reduced to empty string, relative alignment positions, and details on inserting delayed items - Minimum supported VSCode version is now 1.86.0 ### Fixed - Code completion for annotations with ![] identifiers ### Also see - `@sap/cds-lsp` 7.8.0 - `@sap/cds-compiler` 4.8.0 ## [7.6.1] - 2024-02-26 ### Fixed - Elements snippet now works when annotating artifacts in namespaces and/or contexts or if the brace after the elements is still missing ## [7.6.0] - 2024-02-07 ### Added - Hover over import path of `using` statement shows `README.md` or `package.json#description` if absolute (i.e. module) import ### Changed - Formatting option `alignAfterKey` option now applies to views and projections as well ### Fixed - Removed padding after unary plus, minus or parameter colon - Artifact-elements snippet in `annotate` statement now appears regardless of cursor position between braces (or logs reason for not appearing) - Highlighting after semicolon in certain contexts - On Windows editor potentially no longer updated diagnostics for sources with annotations - Wrong diagnostics about unused imports - First code completion could have been slow as workspace was scanned unnessarily - Code completion for annotations was not shown in certain cases - `untitled` i.e. new not yet saved files no longer worked in VSCode ### Also see - `@sap/cds-lsp` 7.6.0 - `@sap/cds-compiler` 4.6.2 ## [7.5.1] - 2024-01-19 ### Fixed - Retrieval of `@sap/cds-dk` global installation path is now more robust in SAP Business Application Studio - Activate extension also for `jsonc` files ## [7.5.0] - 2023-12-20 ### Added - Unused imports are reported as warning and grayed out incl. quickfix to remove them - Snippet proposals for artifact elements in an `annotate` statement - New user setting `cds.contributions.enablement.additionalAnalyticalAnnotations` (default: off) to get annotation support for analytical queries (experimental) ### Fixed - CDS schema loading is more robust - Removed failing `copy` function for code blocks from `CAP Release Notes` - CAP with Typescript (beta): command line for creating types now also works correctly on Windows - Padding and highlighting of identifiers with Unicode characters - Highlighting of `stored` keyword ### Also see - `@sap/cds-lsp` 7.5.0 - `@sap/cds-compiler` 4.5.0 ## [7.4.0] - 2023-11-16 ### Changed - Formatting + Projections now similar to that of views + Markdown formatting inside doc comments is now done with `marked` parser AST instead of `remark`. Previously, this was enabled by default but due to slightly different formatting this feature is disabled by default, now. Thus, already formatted markdown won't be changed and thus won't lead to file changes when used in CI/CD via `format-cds` command. Enable it via format setting `formatDocComments`. - Simplified trace configuration - just use `cds.trace.level` ### Fixed - Formatting + Padding of quoted identifiers + Treat only /** (no additional asterisks) as start of doc comments - Syntax highlighting of comments within braced select item lists - Update of diagnostic messages could have got lost ## Removed - Workspace validation modes `OpenEditorsAndDirectSources` and `OpenEditorsDirectSourcesAndDirectDependencies` are no longer supported. In real-world models they led to high CPU usage and slow responsiveness. Any of these user setting values are now treated as `ActiveEditorOnly` if supported by IDE, else `OpenEditorsOnly`. ### Also see - `@sap/cds-lsp` 7.4.0 - `@sap/cds-compiler` 4.4.0 ## [7.3.0] - 2023-10-09 ### Added - support for `cdsc.moduleLookupDirectories` - Support for merged cds schemas returned by `cds-dk` ### Changed - formatting of action and function parameters according to existing newlines - Minimum VSCode version is now 1.80.0. Note: This is likely the last version that supports NodeJS 16 ### Fixed - highlighting of identifiers, annotations, actions, functions, comments, and more - highlighting of queries in entity definitions - highlighting of keywords and literals in `type` statements - formatting of escaped names and `order by` clauses ### Also see - `@sap/cds-lsp` 7.3.0 - `@sap/cds-compiler` 4.3.0 ## [7.2.0] - 2023-09-04 ### Added - CAP with Typescript (beta): add setting to customize type generation command ### Changed - New data structures and caching to improve performance of where-used requests (e.g. Find References) and code completion - Elements of `mixin`s now use `SymbolKind.Field` (was: Operator) in Outline ### Fixed - CAP notebooks: Do not restrict running of CDS Server cell - Highlighting of custom types starting with built-in name - Outline now only shows first non-empty line of docs when in semantic mode (see user setting `cds.outline.semantical`) as VSCode does not support multi-line docs ### Removed - Legacy `Vanilla` theme - we recommend to use the default theme e.g. `Light Modern` which is similar but covers more token classes ### Also see - `@sap/cds-lsp` 7.2.0 - `@sap/cds-compiler` 4.2.2 ## [7.0.2] - 2023-07-14 ### Fixed - CDS Welcome Page does not show an error message if page is not reachable during start up - CDS Welcome Page now starts with correct theme - CAP notebooks: Only allow resolving, but not setting of env vars in Magic command cells ### Added - CAP notebooks: add support for backslash in shell and terminal cells for multiline scripts - CAP notebooks: Shell-type syntax highlighting for Terminal cells ## [7.0.1] - 2023-06-27 ### Changed - Changed default output for generated types to `@cds-models` - Minimum VSCode version is now 1.77.0 ### Added - CAP notebooks: CDS server cell reacts to regular expression `/started application/i`. ## [7.0.0] - 2023-06-13 ### Added - CAP with Typescript (beta): generate TS typings from CDS model files upon save - requires `@cap-js/cds-typer` to be installed in project - CDS language: Support highlighting, formatting and where-used for new language constructs: ternary operator, `stored` elements and annotated `returns` statements ### Changed - CAP notebooks: Default code cell type is 'shell' - Minimum VSCode version is now 1.78.0 ### Fixed - CAP Release Notes page: remove superfluous footer section - CAP notebooks: Magic command newline issues on windows powershell ### Also see - `@sap/cds-lsp` 7.0.0 - `@sap/cds-compiler` 4.0.0 ## [6.8.2] - 2023-05-31 ### Added - CAP notebooks: magic command can also be written inside of line- and block-comments ### Changed - Changed default output directory for generated CDS types from `@types` to a `node_modules` subfolder ### Fixed - Links on CAP Release Notes page are now pointing to correct locations in Capire. ## [6.8.1] - 2023-05-12 ### Changed - CAP notebooks: improved Java cell example notebook ### Fixed - CAP notebooks: sample notebook `Shell` now uses a cross platform example - CAP notebooks: shellscript syntax highlighting for `Shell` cell - CAP notebooks: cells `CDS`, `Java` and `Javascript` now show error message if needed executable is not found - Fix CAP Release Notes page - `Report issues` url now points to correct SAP Answers location ## [6.8.0] - 2023-05-03 ### Added - User setting `cds.typeGenerator.localInstallationOnly` has been added to allow more finely grained control for the user over the resolution of the type generation package - New command `Record Traces for Support Ticket` to assist creation of support tickets for CDS editor issues - CAP notebooks: new cell type `CDS Server`, which is also executable for CDS background processes. ### Changed - Welcome page will be shown based on page's hash code - CDS type generation will now be enabled by default - Improved CAP Notebooks Welcome page (better layout, responsive icons, fixed buttons). - Changing some CDS user settings required a manual restart of the IDE. This is no longer necessary - Minimum VSCode version is now 1.76.0 ### Fixed - Where-used index could be incomplete with latest OData annotation plugin - Formatting of quoted identifiers enclosed in square brackets - Extension will no longer crash when using unknown compiler versions, though, compatibility is not guaranteed ### Also see - `@sap/cds-lsp` 6.8.0 - `@sap/cds-compiler` 3.9.2 ## [6.7.0] - 2023-03-31 ### Added - Code completion for `using` paths now + supports mono repos + for _npm package_ proposals show details of `description` property of `package.json` unless `README.md` exists + improved ordering - **Experimental** user setting `cds.typeGenerator.binary` to specify the path to the type generator binary - CAP notebooks: new cell type `Java` is now executable. Requires `JDK` version `9` or higher. ### Fixed - `format-cds` command-line tool failed to run - _Analyze Dependencies_ + Some clusters (folders) with same parent cluster were rendered outside ### Changed - _Analyze Dependencies_ + Folders which are npm package roots are rendered with their package name, in brown color + Enhance contrast - use white font color for dark background colors + Improved UX when installing required Graphviz extension ### Removed - Quickfix to migrate (long-time removed) `cds.doc` annotation to doc comment ### Also see - `@sap/cds-lsp` 6.7.0 - `@sap/cds-compiler` 3.8.2 ## [6.6.0] - 2023-03-02 ### Added - CAP notebooks: Uri handler to open notebooks coming from Capire in local VS Code workspaces. - CAP notebooks: All notebook features now have a brief description with examples, available on the CAP Notebooks Welcome page. - Type generation now detects project root ### Fixed - Highlighting of the last of a number of element names in a projection - Formatting of query `from A:B`: removed colon padding - Type generation stopped working after failure until next LSP restart ### Changed - Extension now uses vscode-languageclient 8.x + API consumers may need to adapt access. See [changes](https://github.com/microsoft/vscode-languageserver-node#3170-protocol-800-json-rpc-800-client-and-800-server). Especially `onReady` is no longer needed and was removed. - Minimum VSCode version is now 1.74.0 - Updated capire CDL docs - used in code completion details ### Also see - `@sap/cds-lsp` 6.6.0 - `@sap/cds-compiler` 3.7.2 ## [6.5.1] - 2023-02-20 ### Added - The special `up_` element is now supported in navigation ### Changed - `mixin` is now mapped to `LSP.SymbolKind.Operator` (was default `String`) - a commit hash of the last commit is now included in release under _dist/state_ - target platform back to `es2020` ### Fixed - Closing a CDS file led to 'forgetting' the content in the index. This resulted in: + `workspace/symbols` not showing all definitions + error messages of symbols not found + navigation broken for 'closed' definitions - formatting and highlighting of nested element and enum extensions - code completion for keywords and identifiers may have used wrong compiler messages, thus not working as expected ### Also see - `@sap/cds-lsp` 6.5.1 - `@sap/cds-compiler` 3.6.2 ## [6.5.0] - 2023-01-30 ### Added - **Experimental** user setting `cds.typeGenerator.enabled` to trigger a globally installed cds type generator when saving a model file. ### Changed - CAP notebooks: code cells (`terminal` and `shell`) have now their own working directory - minimum VSCode version is now 1.73.0 ### Fixed - _workspace/symbols_ request didn't include definitions of a file after it was closed. ### Removed - `@cds.doc` annotation, which was marked as deprecated for a long time, is no longer considered in requests like _document/hover_. Please use doc comments (`/** ... */`) instead. The quick fix to migrate from _@cds.doc_ to _doc comments_ is still in place, but is likely to be removed in near future. ### Also see - `@sap/cds-lsp` 6.5.0 - `@sap/cds-compiler` 3.6.0 ## [6.4.0] - 2022-12-15 ### Added - CAP notebooks: + possibility to declare variables and use them in magic commands, shell cells and terminal cells + magic command `%%systeminfo` to render system information into the notebook + magic command `%%writefile` with append option `-a` - formatter: new options `whitespaceBeforeColonInAnnotation` and `whitespaceAfterColonInAnnotation` for specific configuration in annotations ### Changed - minimum VSCode version is now 1.72.0 - uses classic `cds-lsp` for compiler versions < 3 - formatter: non-inline pre-annotations are now prefixed with an empty line to separate them from preceding elements ### Removed - OS specific CAP notebook cell types `Windows Bat (bat)`, `PowerShell`, `Shell Script (Bash)` are now replaced by cross-platform `Native Shell (shell)` ### Also see - `@sap/cds-lsp` 6.4.0 - `@sap/cds-compiler` 3.5.0 ## [6.3.0] - 2022-11-01 ### Added - CAP notebook magic command '%%extendjson' can be used to extend and overwrite existing JSON files - CAP notebook now supports working directory for terminal cells - formatting of artifact and type extensions - syntax highlighting of element extensions - syntax highlighting of numbers and some known types ## Fixed - fix various axios related bugs - formatting of extensions with selectItems - format-cds script didn't find .cdsprettier.json ### Also see - `@sap/cds-lsp` 6.3.0 - `@sap/cds-compiler` 3.4.0 ## [6.2.1] - 2022-10-17 ### Fixed - syntax highlighting of comments ### Also see - `@sap/cds-lsp` 6.2.2 ## [6.2.0] - 2022-09-30 ### Added - document link resolution of 'folder' using paths to csn index files - new formatting options `keepPreAnnotationsInOriginalLine` and `keepPostAnnotationsInOriginalLine` - auto-exposed entities are now included in semantic Outline (user setting) - code completion for annotations on auto-exposed entities ### Removed - removed `cds watch` snippet - removed formatting option `keepAnnotationsInOriginalLine` (will be migrated to the new options when set in .cdsrc.json) ### Changed - improved Java compatibility of TextMate grammar ### Fixed - fixed syntax highlighting for `extend`, attribute names, type structs, and some keywords - fixed formatting of bracketed expressions and annotations standing in their own lines - fixed alignment of multiple annotations per line ### Also see - `@sap/cds-lsp` 6.2.0 - `@sap/cds-compiler` 3.3.2 ## [6.1.1] - 2022-08-08 ### Fixed - fixed error when text editor is not found in CAP notebook decoration ## [6.1.0] - 2022-08-01 ### Added - load cds based json schemas for `package.json`, `.cdsrc.json` and `.cdsrc-private.json` dynamically based on project's cds version ## [6.0.4] - 2022-07-13 ### Fixed - show not-supported warning when opening CAP Notebook page in SAP Business Application Studio ## [6.0.3] - 2022-07-08 ### Changed - support the latest release of cds-compiler 3.0.2 - added authentication and new build task names to cds schema ### Also see - `@sap/cds-lsp` 6.0.3 - `@sap/cds-compiler` 3.0.2 ## [6.0.0] - 2022-07-01 ### Added - using native `notebook` support for `cap-notebook` - support for new major cds-compiler 3.0.0 - new user setting `cds.workspaceSymbols.caseInsensitive` (default off) to search case-insensitive - new user setting `cds.outline.semantical` (default off) to show outline in a rather semantic structure as opposed to a flat list - analyze dependencies now supports coloring of layers for monorepos - env.cdsc is now also considered for code completion - custom requests to format given content with given options (e.g. for a _formatting options config UI_) and to get path of options file ### Changed - now requires NodeJS `>=16.11` (included in recent VSCode) - now requires Visual Studio Code `>=1.66` - use `workspace.fs` for file IO during `cds preview`. ## Fixed - fixed glitches in cds schema support for `package.json`, `.cdsrc.json` and `.cdsrc-private.json` - fixed highlighting for empty block comments `/**/` ### Also see - `@sap/cds-lsp` 6.0.0 - `@sap/cds-compiler` 3.0.0 ## [4.5.6] - 2022-05-09 ### Added - file icon for CDS files ### Changed - updated included cpaire docs ### Also see - `@sap/cds-lsp` 5.5.9 ## [4.5.5] - 2022-05-05 ### Added - support syntax highlighting for escape sequences in template strings ### Fixed - find references could have shown wrong entries from localized context ### Also see - `@sap/cds-lsp` 5.5.8 ## [4.5.4] - 2022-04-05 ### Changed - `CAP Release Notes` page now persists its state ### Fixed - Syntax highlighting in SAP Business Application Studio ### Also see - `@sap/cds-lsp` 5.5.7 - `@sap/cds-compiler` 2.13.8 ## [4.5.3] - 2022-03-31 ### Changed - Consume `package.json` and `.cdsrc.json` schemas from `@sap/cds-lsp` - Better error message in case `cds preview` could not compile a source file ### Fixed - No loner set NODE_ENV to production which resulted in `npm i` only installing prod dependencies ### Also see - `@sap/cds-lsp` 5.5.6 - `@sap/cds-compiler` 2.13.6 ## [4.5.2] - 2022-03-03 ### Added - New code-formatting options for `action`s and `function`s: + `alignActionNames` (aligns names) + `alignActionReturns` (aligns `returns` keywords) ### Changed - Removed obsolete code-formatting option `alignAsInElements` (calculated fields use `=` now) ### Fixed - Saving a `cds` file now automatically refreshes all open previews for this file - _Show Formatting Options Configuration_ + Showed empty samples editor + Editor no longer switches to typescript + No longer _save changes_ popup when closing samples editor + When not opened on existing file (CDS source or .cdsprettier.json) and workspace has multiple workspace folders, user has now to pick the workspace folder - Code formatting: + Separate post-annotation with blank + Remove erroneous newlines around cardinality and filter in `select` + Separate projection items with newlines - Code completion for annotations now correctly handle e.g: @aaa.| entity ### Also see - `@sap/cds-lsp` 5.5.5 ## [4.5.1] - 2022-02-04 ### Fixed - extension did not start in SAP Business Application Studio ### Components - @sap/cds-lsp 5.5.2 ## [4.5.0] - 2022-01-28 ### Added - workspace symbols query now supports filters for kinds ### Changed - consume cds-compiler 2.12.0 - code completion for `index.cds` files will now render just the folder - CDS language server is now bundled and minified to speed up initialization - performance: revalidate file on focus got only if stale index - memory consumption: indexes are now cached per file, no longer per compilation ### Fixed - `cds preview` is now refreshing the preview correctly when called after the underlying cds file has been changed - `enum` was not indexed - `composition` of aspect was not indexed - symbols contained localized entries with recent compiler versions - workspaces with _many_ workspace folders could lead to stop lsp - syntax highlighting is now better aligned with CDS grammar: + multi-lined strings disabled + backslash escaping disabled + doubled quotes inside strings to reproduce single quotes + element types now include scopes and length/size arguments ### Components - @sap/cds-lsp 5.5.0 - @sap/cds-compiler 2.12.0 ## [4.4.0] - 2021-12-03 ### Added - progress monitor for long runners like References and WorkspaceSymbols ### Changed - new 'cold start' start-up behaviour: + workspace is not scanned unless required (references, workspace symbols) + file contents read during compilation is cached, incl. tried missing paths during path resolution + many changes to improve performance and reduce required memory - `cds preview` now opens a read-only editor to show the cds file preview. ### Components - @sap/cds-lsp 5.4.0 - @sap/cds-compiler 2.11.0 ## [4.3.0] - 2021-09-23 ### Added - doc comments are automatically aligned - new command: Restart CDS Language Support ### Fixed - certain localized elements were still indexed - new i18n entry in properties file has corrupted existing last entry - inconsistency in dependency calculation could have led to incorrect revalidations after a change ### Changed - consume cds-lsp 5.3.0 - consume cds-compiler 2.7.0 - translation support is now lazy - performance improvements when translation files changed - last workspace/symbols are cached now to speed up CAP explorer - user setting cds.workspace.scanCsn has now three modes: Off, ByFileExtension (new default) and InspectJson ## [4.2.0] - 2021-07-30 ### Added - validation mode _ActiveEditorOnly_ (new default). The new mode reduces number of compilations during editing and thus improves responsiveness. - new command _Visualize CDS file dependencies_ to analyze using dependencies of CDS model files. Getting an overview of file dependencies can help to keep your project architecture clean. Requires the 3rd party extension _Graphviz (dot) language support for Visual Studio Code_ (joaompinto), which can be installed with a single click. ### Changed - consume cds-lsp 5.2.0 - consume cds-compiler 2.5.0 ## [4.1.1] - 2021-07-05 ### Changed - consume cds-lsp 5.1.1 - consume cds-compiler 2.4.4 - new performance relevant user settings + `cds.workspace.debounceFastChanges`: skip intermediate compilations when typing - enabled by default + `cds.workspace.scanDependentModules`: skip scanning of node_modules - enabled by default, speeds up start-up time Note: - when using code completion for global identifiers (see `cds.completion.workspaceSymbols.minPrefixLength`) this option needs to be enabled - for code completion of import paths in `using` statements this option needs to be enabled - to include definitions from nodejs dependent modules in workspace symbols this option needs to be enabled ## [4.1.0] - 2021-06-22 ### Note This is a quality release focusing on performance for large models. There are new user settings and some have changed their defaults. Best performance is achieved with default settings, except `cds.contributions.enablement.odata` which should be switched `off` to speed up compilation, unless feature is needed. Additonal hints to increase performance: - Within _SAP Business Application Studio_: close `CAP Data Models and Services` view. Otherwise, it will ask for all workspace symbols at every change. - Settings: `Cds › Contributions › Enablement: Odata`: switch off as already mentioned above - Settings: `Editor › Goto Location: Alternative Definition Command`: do not select `goToReferences`. Otherwise, being already on a definition will trigger find references which requires all dirty models to be recompiled. - Settings: `Workbench › Editor › Limit: Enabled`: switch on - Settings: `Workbench › Editor › Limit: Value`: lower the number. If open editors have `using` dependencies, a change in one editor will lead to a recompile of releated editors. - Commands `Go to References` / `Find All References` will recompile all models that might have changed due to a change in a depending model. If there are index models it often means the complete workspace is being recompiled. Until a further change, reference calculation is resonably fast. - Command `Go to Symbol in Workspace` will recompile the complete workspace once, then it is reasonable fast - Changing settings in `CDS` section will currently perform a complete workspace invalidation i.e. required indexes will lead to recompilations on-demand as described above - Changing certain `cds.env` settings e.g. folder configurations will invalidate the workspace as well ### Changed - consume cds-lsp 5.1.0 - consume cds-compiler 2.3.2 - user settings + cds.workspaceValidationMode new default: OpenEditorsOnly + cds.workspace.scanCsn new settings with default switch off (before implicitly on) + cds.quickfix.importArtifact new setting with default off (before implicitly on) - command `Install CDS Development Kit (@sap/cds-dk) globally` will now show a progress dialog as long as it is running ## [4.0.4] - 2021-05-11 ### Changed - uses `@sap/cds-lsp@5.0.5` - new user option `cds.env.fetch` to dynamically fetch _cds.env_ when using non-default i18n file/folder names ### Fixed - asynchronous scanning of workspace blocked and led to high cpu usage (mostly on Linux/macOS) ## [4.0.2] - 2021-05-06 ### Changed - uses `@sap/cds-lsp@5.0.3` - uses `@sap/cds-compiler@2.2.4` ## [4.0.1] - 2021-04-22 ### Changed - now requires Visual Studio Code `>=1.54` - entry `Preview as hdbtable` replaces `Preview as hana` in `CDS Preview` menu - uses `@sap/cds-lsp@5.0.1` which includes fixes for namespace handling ## [4.0.0] - 2021-03-31 ### Note This is a major release which comes with @sap/cds-compiler v2. It still supports cds-compiler v1 if used in your project or via global @sap/cds-dk. ### Added - semantic highlighting - to be enabled via user setting `cds.semanticHighlighting.enabled` - new API for annotation handler to support semantic highlighting ### Changed - consume cds-compiler 2.1.4 ## [3.4.0] - 2021-03-25 ### Added - preliminary support for cds-compiler 2.x ### Changed - now requires Visual Studio Code `>=1.53` - uses `@sap/cds-lsp@4.4.1` - uses `@sap/cds-compiler@1.50.0` ## [3.3.0] - 2021-02-01 ### Added - find references for annotations ### Changed - extension is now called `SAP CDS language support` - uses `axios@0.21.1` - uses `@sap/cds-lsp@4.3.0` (see corresponding changelog for details) - uses `@sap/cds-compiler@1.49.0` - new user options for where-used requests<br/> until now this functionality was enabled by default and now needs to be enabled via user options + generic annotations - where a certain annotation 'class' or 'namespace' is used + strings literals - where same string literals are used ### Fixed - temporary folder for `CDS Preview` commands is no longer part of project to avoid files being checked in - revalidates workspace after an initial annotation plugin installation to show annotation errors w/o the need of manual code edit ## [3.2.0] - 2020-11-27 ### Added - quickfix for deprecated identifiers - support for quickfixes in annotation handler ### Changed - using native submenu for `CDS Preview` commands - now requires Visual Studio Code `>=1.50` - updated npm modules + `cds-lsp 4.2.0` + `cds-compiler 1.46.4` ### Fixed - improvements to the `cds section` scheme used in `.cdsrc.json` and `package.json` - bug fixes for annotation handler and others ## [3.1.4] - 2020-11-12 ### Fixed - file system watching no longer worked with latest VSCode ### Changed - updated npm modules + `cds-lsp 4.1.2` ## [3.1.3] - 2020-11-10 ### Fixed - internal refactoring and bug fixes ## [3.1.2] - 2020-11-09 ### Fixed - support for mono repo file system layouts did not work in certain cases - completion proposals for annotations were not shown at top of the list if inside an annotation - only update workspace settings file if needed due to changed fileSystemWatch setting ### Changed - updated npm modules + `cds-lsp 4.1.1` ## [3.1.0] - 2020-11-02 ### Added - release notes page shows loading text while loading content - user setting `cds.releaseNotes.showAutomatically` to enable or disable automatic display of `CAP Release Notes` when a new version is available - support mono repo file system layouts - user setting to disable odata plugin - detection of slow running odata plugin (when validating) incl. user settings to disable and fine tune - user setting for omitRedundantTypesInSnippets for annotations - user setting to enable file system watching to track installation of @sap/cds in project ### Changed - install/update contributions completely async - completion no longer suggests types when values are meant - project cds-lsp settings overrule all - consume cds-compiler 1.45.0 ### Fixed - validation of annotation plugins led to 100% cpu load - globally installed cds was not reliably found - code completion for annotation plugins did not work inside annotations at @ characters - bug fixes ## [3.0.1] - 2020-10-23 ### Changed - release notes page uses longer timeout (30sec) when waiting for content ### Fixed - `preview as...` commands now overwrite preview file content instead of appending - `preview as...` commands only fail when `cds compile` returned with exit code != 0 (severe error) ## [3.0.0] - 2020-09-30 ### Added - Plugin support for domain specific annotation handlers, featuring + diagnostics + code completion + hover information + goto definition + quickfix to maintain translation + auto-installation/update with user setting for npm registry - code completion inside string literals and `![...]` identifiers is automatically triggered by `/` character (additionally to `.` and `@`) - snippets applied via code completion are now formatted - `action`s and their parameters are now indexed and support code navigation, hover etc. ### Changed - updated npm modules + `cds-lsp 4.0.0` + `cds-compiler 1.42.2` ### Fixed - bug fixes ## [2.6.1] - 2020-09-24 ### Changed - using `axios` for https access to CAP release notes - `CAP release notes` are now displayed when new version is available on `Capire` ### Fixed - the `preview as...` commands are more robust and generate preview files without cds extension ### Added - command `install cds-dk` now available to install `CDS Development Kit (@sap/cds-dk)` globally ## [2.6.0] - 2020-09-01 ### Added - various commands for generating preview files from a cds file - Code completion proposes identifiers not yet imported in current file and generates corresponding `using` statement + user setting: minimum number of characters required to propose those identifiers (`cds.completion.workspaceSymbols.minPrefixLength`). Default is -1 (=off) + user setting: limit number of global identifiers (`cds.completion.workspaceSymbols.maxProposals`). Default is -1 (=unlimited) - Code formatting: options `whitespaceBeforeColon` and `whitespaceAfterColon` are now supported inside `Composition` structs - Code formatting: support configuration of alignment of `Composition` structs (option `alignCompositionStructToRight`) ### Changed - updated npm modules + `cds-lsp 3.5.0` + `cds-compiler 1.39.0` ## [2.5.0] - 2020-08-05 ### Added - various commands for generating preview files from a cds file ### Changed - now requires Visual Studio Code `>=1.46` - updated npm modules + `cds-lsp 3.4.3` + `cds-compiler 1.35.0` ## [2.4.2] - 2020-07-29 ### Added - issue reporting url pointing to `https://answers.sap.com/` - new user setting `cds.completion.workspaceSymbols` (default `off`) to add workspace symbols to code completion proposals ### Changed - updated npm modules + `cds-lsp 3.4.2` + `cds-compiler 1.34.0` - internal refactorings ## [2.4.1] - 2020-07-13 ### Changed - extension is now hosted on Visual Studio Marketplace and updates from there + update configuration and update command have been removed ## [2.4.0] - 2020-07-10 ### Added - support for docComments (/** ... */) + hover over artifact will consider docComment + snippet to create + formatting will beautify docComments, incl. new option maxDocCommentLine + quickFix to convert @cds.doc annotation to docComment incl. beautify + distinct syntax highlighting for docComments - quickFix to generate using statement for not yet imported artifacts + sorted by module and artifact name, beautified - semantic code completion for elements, enums, actions and parameters in annotate and extend (via cds-compiler 1.32.0) - syntax highlighting identifiers, including variants delimited with \![...] - identifier completion proposals are prioritized by message severity - messages may now contain related information - added INSTALLATION.md for 3rd party IDE integrations ### Changed - updated npm modules + `cds-lsp 3.4.0` + `cds-compiler 1.32.0` - improved `README.md` + updated feature list ### Fixed - enum keyword was wrongly syntax highlighted - when an ignored source file is closed, potential messages are wiped - annotations of extensions were not indexed - bug fixes ## [2.3.3] - 2020-06-26 ### Added - added properties `dest` and `mtx` to code completion list for `tasks` and `for` in cap project package.json files ### Fixed - syntax highlighting: colorize identifiers, including variants delimited with \![...] - minor clean up in welcome page handling ## [2.3.2] - 2020-06-17 ### Changed - using new npm modules + got 11.1.4 ## [2.3.1] - 2020-05-25 ### Added - add a welcome page with current release information ## [2.3.0] - 2020-04-26 ### Added - use global @sap/cds/common if locally not available ### Changed - now requires Visual Studio Code 1.41+ - using new npm modules + cds-lsp 3.3.1 + cds-compiler 1.26.2 - (alpha): diagnostics and hover support for external annotation providers ### Fixed - Minor fixes and improvements ## [2.2.0] ### Added - install/update global cds-dk ### Changed - using new npm modules + cds-lsp 3.2.0 + cds-compiler 1.24.3 - remove option for compiler origin - compiler will always be picked in that order: Project -> Global(via DK&CDS) -> BuiltIn - remove irrelevent formatting option (trimTrailingWhitespace) ### Fixed - global npm root for SAP Business Application Studio was not found with compiler origin option ProjectThenGlobalThenBuiltIn ## [2.1.4] ### Changed - using new npm modules + cds-lsp 3.1.3 + cds-compiler 1.23.2 ### Added - pick up compiler and env via global cds-dk if cds not (yet) in project ## [2.1.3] ### Changed - using new npm modules + cds-lsp 3.1.2 + cds-compiler 1.23.1 ### Added - code formatting - options can now be overridden in source comments e.g. // @formatter tabSize:3 - new option to add/remove final line break - new option to trim trailing whitespace ### Fixed - in some cases csn files with .json extension where not detected and thus workspace symbols were incomplete ## [2.1.2] ### Fixed - Minor bugs and improvements ## [2.1.1] ### Changed - using new npm modules + cds-lsp 3.1.1 ### Added - code formatting - option to keep original empty lines - ability to start config UI from any .cdsprettier.json - use most relevant .cdsprettier.json when starting from source file - use .cdsprettier.json in user home when none available in project ### Fixed - formatting options were taken from homedir instead of preferring from project ## [2.1.0] ### Changed - using new npm modules + cds-lsp 3.1.0 + cds-compiler 1.22.0 ### Added - extended translation support - now all runtime-supported formats (.properties, .json, .csv) incl. quick fixes to create missing entries - now all runtime-supported customizations (filename, folder name, fallback_bundle, default_language) - if entries of fallback language are missing but are defined for default language the latter ones are used - quick fix will use default language if file/json-node/section for fallback language does not exist - quick fix will try to keep entries sorted - allow .cdsprettier.json to be located in user home dir ### Changed - code formatting - improve alignment of types, values, and preceding `:` or `=` operators ### Fixed - code formatting - fix, improve, and allow to better adjust alignments and whitespace - fix alignment of annotations in `annotate` statement - fix casing of and indentation after `Association` and `Composition` - fix formatting of parts of `select` statement in case of nesting and after `in` - fix positioning of brace `{` after annotation if requested to be kept in previous line - fix bug where token starting with `$` was merged - config UI - fix cap/issues#3498 - prettierrc file appears with content - fix: no longer selects editor content - file watching for cds related files did no longer work in recent versions of VSCode e.g. package.json, .cdsrc.json, all supported translation file formats, ignore files ## [2.0.0] Official support for code formatting ### Changed - consume cds-lsp 3.0.0 - code completion - more snippet variants for extend - no longer differ entity suggestions between within service or outside - base types with parameters now suggested as simply keyword w/o params and additional suggestion as snippet (param names now enclosed in < >) - changed label indicator for snippets from <> to ellipsis - code formatting - rework formatting options: add/remove options according to relevance, rename/group options for clarity, change default behavior in some cases - various improvements, including in case statements and bracketed conditions - consume cds-compiler 1.21.1 ### Fixed - code formatting - fix alignment of annotations in views - safely identify unreserved keywords ## [1.4.0] ### Changed - **requires `Visual Studio Code` version `1.40.0` or higher** - consume cds-lsp 2.1.21 - consume cds-compiler 1.20.3 ### Added - support LSP configuration via settings file in workspace incl. logs in workspace ### Fixed - Fix indentation after element definitions using Association or Composition - fix: extraction of root models did no longer work since @sap/cds#3.19 - code formatting - Fix indentation of keywords `union`, `except`, and `minus` - Make alignments more consistent generally - Improve readability by padding operators with blanks - Improve alignment of bracketed conditions ## [1.3.1] - fix reloading formatting options in config UI - consume cds-lsp 2.1.19 - fixes and enhancements for code formatting - consume cds-compiler 1.20.0 ## [1.3.0] - configuration UI for formatting options - consumes cds-lsp 2.1.17 - fixes and enhancements for code formatting - renamed settings file to .cdsprettier.json - renamed tmLanguage for syntax highlighting - consume cds-compiler 1.19.2 - requires `Visual Studio Code` version `1.38.0` or higher ## [1.2.12] - deprecate `updatesite` setting - requires `Visual Studio Code` version `1.36.0` or higher ## [1.2.11] - consumes cds-lsp 2.1.10 - fixes and enhancements in syntax highlighting and code formatting ## [1.2.10] - requires `Visual Studio Code` version `1.35.0` or higher. - consumes cds-lsp 2.1.9 - Syntax highlighting now uses different classifications (=colors) for annotations and comments - Support user settings in $LSP/.cds-lsp/.settings.json for IDEs which do not support user settings (Eclipse, Intellij, ...) - No longer report compiler messages for csn files - Preparation for config editor for formatting options - Deadlock detection and prevention for code formatting incl. option to cancel or try best in case - Use json parsing from compiler for csn files (which allows comments etc.) - Fixes and enhancements in source formatting - consume cds-compiler 1.17.3 ## [1.2.9] - consume cds-lsp 2.1.8 - code formatting - many fixes and enhancements - now on by default but still experimental - syntax h