@sap/cds-compiler 6.8.0 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +4 -0
  3. package/bin/cdshi.js +1 -0
  4. package/lib/api/main.js +8 -1
  5. package/lib/api/options.js +3 -1
  6. package/lib/base/builtins.js +13 -9
  7. package/lib/base/csnRefs.js +8 -10
  8. package/lib/base/message-registry.js +61 -2
  9. package/lib/base/messages.js +2 -0
  10. package/lib/base/optionProcessor.js +2 -0
  11. package/lib/base/specialOptions.js +1 -1
  12. package/lib/compiler/assert-consistency.js +11 -9
  13. package/lib/compiler/base.js +5 -1
  14. package/lib/compiler/define.js +1 -1
  15. package/lib/compiler/dictionaries.js +2 -3
  16. package/lib/compiler/extend.js +119 -19
  17. package/lib/compiler/lsp-api.js +3 -3
  18. package/lib/compiler/populate.js +4 -5
  19. package/lib/compiler/resolve.js +50 -35
  20. package/lib/compiler/shared.js +33 -12
  21. package/lib/compiler/tweak-assocs.js +2 -2
  22. package/lib/compiler/utils.js +26 -23
  23. package/lib/compiler/xpr-rewrite.js +2 -2
  24. package/lib/edm/EdmPrimitiveTypeDefinitions.js +4 -1
  25. package/lib/edm/annotations/genericTranslation.js +49 -6
  26. package/lib/gen/BaseParser.js +59 -97
  27. package/lib/gen/CdlGrammar.checksum +1 -1
  28. package/lib/gen/CdlParser.js +2055 -1969
  29. package/lib/gen/Dictionary.json +67 -7
  30. package/lib/json/from-csn.js +7 -12
  31. package/lib/json/to-csn.js +59 -35
  32. package/lib/parsers/AstBuildingParser.js +43 -30
  33. package/lib/render/toCdl.js +46 -27
  34. package/lib/render/toSql.js +9 -0
  35. package/lib/render/utils/common.js +3 -2
  36. package/lib/tool-lib/enrichCsn.js +1 -0
  37. package/lib/transform/effective/flattening.js +6 -5
  38. package/lib/transform/effective/main.js +5 -0
  39. package/lib/transform/forOdata.js +20 -2
  40. package/lib/transform/forRelationalDB.js +8 -4
  41. package/lib/transform/tupleExpansion.js +40 -0
  42. package/package.json +3 -40
@@ -675,41 +675,60 @@ class CsnToCdl {
675
675
 
676
676
  // If there is nothing to extend, e.g. only annotations, don't render an
677
677
  // empty element list. This would end up in diffs with parseCdl CSN.
678
- if (!ext.elements && !ext.columns && !ext.actions && !ext.enum) {
678
+ if (!ext.elements && !ext.columns && !ext.actions && !ext.enum &&
679
+ !ext.where && !ext.groupBy && !ext.having && !ext.orderBy && !ext.limit) {
679
680
  result += `${ env.indent }extend ${ extName };\n`;
680
681
  return result;
681
682
  }
682
683
 
683
- // We have the "old-style" prefix syntax and the "new-style" postfix "with <type>" syntax.
684
- // The former one can not only extend (sub-)elements but also actions in the same statement whereas
685
- // the latter cannot.
686
- // If there are actions, check if there are also elements/columns, and if so, use the prefix notation.
687
- const usePrefixNotation = ext.actions && (ext.columns || ext.elements);
688
- if (usePrefixNotation)
689
- result += `${ env.indent }extend ${ this.getExtendPrefixVariant(ext) } ${ extName } with {\n`;
690
- else
691
- result += `${ env.indent }extend ${ extName } with ${ this.getExtendPostfixVariant(ext) }{\n`;
684
+ if (ext.elements || ext.columns || ext.actions || ext.enum) {
685
+ // We have the "old-style" prefix syntax and the "new-style" postfix "with <type>" syntax.
686
+ // The former one can not only extend (sub-)elements but also actions in the same statement whereas
687
+ // the latter cannot.
688
+ // If there are actions, check if there are also elements/columns, and if so, use the prefix notation.
689
+ const usePrefixNotation = ext.actions && (ext.columns || ext.elements);
690
+ if (usePrefixNotation)
691
+ result += `${ env.indent }extend ${ this.getExtendPrefixVariant(ext) } ${ extName } with {\n`;
692
+ else
693
+ result += `${ env.indent }extend ${ extName } with ${ this.getExtendPostfixVariant(ext) }{\n`;
692
694
 
693
- if (ext.columns)
694
- result += this.renderViewColumns(ext, env.withIncreasedIndent());
695
+ if (ext.columns)
696
+ result += this.renderViewColumns(ext, env.withIncreasedIndent());
695
697
 
696
- else if (ext.elements || ext.enum)
697
- result += this.renderExtendStatementElements(ext, env);
698
+ else if (ext.elements || ext.enum)
699
+ result += this.renderExtendStatementElements(ext, env);
698
700
 
699
- // Not part of if/else cascade, because it may be in postfix notation.
700
- if (ext.actions) {
701
- const childEnv = env.withIncreasedIndent();
702
- let actions = '';
703
- forEach(ext.actions, (actionName, action) => {
704
- actions += this.renderActionOrFunction(actionName, action, childEnv.withSubPath([ 'actions', actionName ]), true);
705
- });
706
- if (!usePrefixNotation)
707
- result += actions;
708
- else if (actions !== '')
709
- result += `${ env.indent }} actions {\n${ actions }`;
701
+ // Not part of if/else cascade, because it may be in postfix notation.
702
+ if (ext.actions) {
703
+ const childEnv = env.withIncreasedIndent();
704
+ let actions = '';
705
+ forEach(ext.actions, (actionName, action) => {
706
+ actions += this.renderActionOrFunction(actionName, action, childEnv.withSubPath([ 'actions', actionName ]), true);
707
+ });
708
+ if (!usePrefixNotation)
709
+ result += actions;
710
+ else if (actions !== '')
711
+ result += `${ env.indent }} actions {\n${ actions }`;
712
+ }
713
+
714
+ result += `${ env.indent }}`;
715
+ }
716
+ else {
717
+ result += `${ env.indent }extend ${ extName } with`;
710
718
  }
711
719
 
712
- result += `${ env.indent }};\n`;
720
+ if (ext.where)
721
+ result += ` where ${ this.exprRenderer.renderExpr(ext.where, env.withSubPath([ 'where' ])) }`;
722
+ if (ext.groupBy)
723
+ result += ` group by ${ ext.groupBy.map((expr, i) => this.exprRenderer.renderExpr(expr, env.withSubPath([ 'groupBy', i ]))).join(', ') }`;
724
+ if (ext.having)
725
+ result += ` having ${ this.exprRenderer.renderExpr(ext.having, env.withSubPath([ 'having' ])) }`;
726
+ if (ext.orderBy)
727
+ result += ` order by ${ ext.orderBy.map((entry, i) => this.renderOrderByEntry(entry, env.withSubPath([ 'orderBy', i ]))).join(', ') }`;
728
+ if (ext.limit)
729
+ result += ` ${ this.renderLimit(ext.limit, env.withSubPath([ 'limit' ])) }`;
730
+
731
+ result += ';\n';
713
732
  return result;
714
733
  }
715
734
 
@@ -1997,7 +2016,7 @@ class CsnToCdl {
1997
2016
  return `#${ annoValue['#'] }`;
1998
2017
  }
1999
2018
  // Shorthand for absolute path (as string)
2000
- else if (annoValue['='] !== undefined) {
2019
+ else if (typeof annoValue['='] === 'string') {
2001
2020
  if (annoValue['='].startsWith('@'))
2002
2021
  return this.quoteAnnotationPathIfRequired(annoValue['='], env);
2003
2022
  return this.quotePathIfRequired(annoValue['='], env);
@@ -1422,6 +1422,15 @@ function toSqlDdl( csn, options, messageFunctions ) {
1422
1422
  if (isBuiltinType(elm.type)) {
1423
1423
  // cds.Integer => render as INTEGER (no quotes)
1424
1424
  result += renderBuiltinType(elm.type);
1425
+
1426
+ // On H2 & sqlite the underlying data type for a cds.Vector is a binary, needing a length.
1427
+ // The data is stored as a vector of 4 byte real numbers with dimensions given by length. Additional 4 bytes are used to store the dimensions.
1428
+ if (
1429
+ elm.type === 'cds.Vector' && elm.length &&
1430
+ (options.sqlDialect === 'h2' || options.sqlDialect === 'sqlite')
1431
+ )
1432
+ elm.length = elm.length * 4 + 4;
1433
+
1425
1434
  result += renderTypeParameters(elm);
1426
1435
  }
1427
1436
  else {
@@ -294,7 +294,7 @@ const cdsToSqlTypes = {
294
294
  'cds.Binary': 'BINARY_BLOB',
295
295
  'cds.hana.BINARY': 'BINARY_BLOB',
296
296
  'cds.hana.SMALLDECIMAL': 'SMALLDECIMAL',
297
- 'cds.Vector': 'FLOAT32',
297
+ 'cds.Vector': 'BLOB',
298
298
  'cds.Map': 'JSON_TEXT', // '_TEXT' suffix required for text affinity
299
299
  },
300
300
  plain: {
@@ -309,6 +309,7 @@ const cdsToSqlTypes = {
309
309
  'cds.DecimalFloat': 'DECFLOAT',
310
310
  'cds.DateTime': 'TIMESTAMP(0)',
311
311
  'cds.Timestamp': 'TIMESTAMP(7)',
312
+ 'cds.Vector': 'VARBINARY',
312
313
  'cds.Map': 'JSON',
313
314
  'cds.UInt8': 'SMALLINT', // See #13870; not equivalent, but smallint can hold >byte
314
315
  },
@@ -320,7 +321,7 @@ const cdsToSqlTypes = {
320
321
  'cds.Binary': 'BYTEA',
321
322
  'cds.Double': 'FLOAT8',
322
323
  'cds.UInt8': 'SMALLINT', // See #13870; not equivalent, but smallint can hold >byte
323
- 'cds.Vector': 'VARCHAR', // Not supported; see #11725
324
+ 'cds.Vector': 'VECTOR', // vector is the datatype for [pgvector](https://github.com/pgvector/pgvector?tab=readme-ov-file)
324
325
  'cds.Map': 'JSONB',
325
326
  },
326
327
  };
@@ -142,6 +142,7 @@ function enrichCsn( csn, options = {} ) {
142
142
  obj.forEach( (n, i) => assignment( obj, i, n ) );
143
143
  }
144
144
  else {
145
+ // TODO: check obj['='] is only String|true ?
145
146
  const record = !isAnnotationExpression( obj ) && assignment;
146
147
  // is record without `=` and other expression property
147
148
  for (const name of Object.getOwnPropertyNames( obj ) ) {
@@ -4,9 +4,7 @@ const {
4
4
  forEachDefinition, forEachMemberRecursively, applyTransformationsOnNonDictionary, transformExpression, transformAnnotationExpression,
5
5
  } = require('../../model/csnUtils');
6
6
  const { getStructStepsFlattener } = require('../db/flattening');
7
- const { setProp } = require('../../utils/objectUtils');
8
- const { forEach } = require('../../utils/objectUtils');
9
-
7
+ const { setProp, forEach } = require('../../utils/objectUtils');
10
8
 
11
9
  /**
12
10
  *
@@ -39,7 +37,7 @@ function flattenRefs(csn, options, csnUtils, messageFunctions) {
39
37
  .filter(pn => pn.startsWith('@') && element[pn])
40
38
  .forEach((anno) => {
41
39
  transformAnnotationExpression(element, anno, {
42
- ref: absolutifier,
40
+ ref: (parent, prop, ref, path) => absolutifier(parent, prop, ref, path.at(-2) === 'where'), // don't absolutify paths in filters
43
41
  }, []);
44
42
  if (element[anno].ref)
45
43
  absolutifier(element[anno], 'ref', element[anno].ref);
@@ -105,7 +103,10 @@ function flattenRefs(csn, options, csnUtils, messageFunctions) {
105
103
  }
106
104
 
107
105
  function absolutifyPaths(prefix, cleanup) {
108
- return function absolutify(_parent, _prop, ref) {
106
+ return function absolutify(_parent, _prop, ref, skip) {
107
+ if (typeof skip === 'boolean' && skip)
108
+ return false;
109
+
109
110
  if (ref[0].id || ref[0] !== '$self' && ref[0] !== '$projection' && !ref[0].startsWith('$') && !_parent.param) {
110
111
  _parent.ref = [ '$self', ...prefix, ...ref ];
111
112
  cleanup.push(_parent);
@@ -153,6 +153,11 @@ function effectiveCsn( model, options, messageFunctions ) {
153
153
  messageFunctions.throwWithError();
154
154
  removeFeatureFlags(csn);
155
155
 
156
+ if (!options.testMode) {
157
+ csn.meta ??= {};
158
+ csn.meta.compilerCsnFlavor = 'effective';
159
+ }
160
+
156
161
  return csn;
157
162
  }
158
163
 
@@ -16,6 +16,7 @@ const {
16
16
  const { checkCSNVersion } = require('../json/csnVersion');
17
17
  const validate = require('../checks/validator');
18
18
  const { timetrace } = require('../utils/timetrace');
19
+ const shuffleGen = require('../utils/shuffle');
19
20
  const enrichUniversalCsn = require('./universalCsn/universalCsnEnricher');
20
21
 
21
22
  const { isArtifactInSomeService, isLocalizedArtifactInService } = require('./odata/utils');
@@ -32,7 +33,7 @@ const { addLocalizationViews } = require('./localized');
32
33
  const { cloneFullCsn } = require('../base/cloneCsn');
33
34
  const { csnRefs } = require('../base/csnRefs');
34
35
  const replaceForeignKeyRefsInExpressionAnnotations = require('./odata/foreignKeyRefsInXprAnnos');
35
- const { isAnnotationExpression, xprInAnnoProperties } = require('../base/builtins');
36
+ const { isAnnotationExpression, primaryExprProperties } = require('../base/builtins');
36
37
 
37
38
  // Transformation for ODATA. Expects a CSN 'inputModel', processes it for ODATA.
38
39
  // The result should be suitable for consumption by EDMX processors (annotations and metadata)
@@ -123,6 +124,11 @@ function transform4odataWithCsn(inputModel, options, messageFunctions) {
123
124
  // @ts-ignore
124
125
  const isExternalServiceMember = (art, name) => !!(externalServices.includes(getServiceName(name)) || (art && art['@cds.external'] && art['@cds.external'] !== 2));
125
126
 
127
+ if (options.testMode && csn.definitions) {
128
+ const { shuffleDict } = shuffleGen(options.testMode);
129
+ csn.definitions = shuffleDict(csn.definitions);
130
+ }
131
+
126
132
  if (options.csnFlavor === 'universal' && isBetaEnabled(options, 'enableUniversalCsn'))
127
133
  enrichUniversalCsn(csn, options);
128
134
 
@@ -295,6 +301,12 @@ function transform4odataWithCsn(inputModel, options, messageFunctions) {
295
301
  // Resolve annotation shorthands for entities, types, annotations, ...
296
302
  renameShorthandAnnotations(def);
297
303
 
304
+ if ((def.kind === 'entity' || def.kind === 'aspect') &&
305
+ def['@readonly'] && isAnnotationExpression(def['@readonly'])) {
306
+ message('odata-unexpected-xpr-anno', [ 'definitions', defName, '@readonly' ],
307
+ { anno: '@readonly', kind: def.kind });
308
+ }
309
+
298
310
  // Generate annotations and fields needed for the Fiori Tree Views out of the @hierarchy annotation
299
311
  if (def['@hierarchy'])
300
312
  generateFioriTreeViewAnnotationsAndFields(def, defName, messageFunctions, csnUtils, transformers, options);
@@ -356,6 +368,11 @@ function transform4odataWithCsn(inputModel, options, messageFunctions) {
356
368
  if (isBetaEnabled(options, 'odataTerms'))
357
369
  forEachGeneric(csn, 'vocabularies', renameShorthandAnnotations);
358
370
 
371
+ if (!options.testMode) {
372
+ csn.meta ??= {};
373
+ csn.meta.compilerCsnFlavor = 'odata';
374
+ }
375
+
359
376
 
360
377
  cleanup();
361
378
  // Throw exception in case of errors
@@ -424,8 +441,9 @@ function transform4odataWithCsn(inputModel, options, messageFunctions) {
424
441
  }
425
442
 
426
443
  function getXprFromAnno(anno) {
427
- const xprProp = xprInAnnoProperties.find(prop => anno[prop] !== undefined);
444
+ const xprProp = primaryExprProperties.find(prop => anno[prop] !== undefined);
428
445
  const constructResult = {
446
+ // TODO: expression property `param` not handled
429
447
  ref: () => {
430
448
  const result = { ref: anno.ref };
431
449
  if (anno.cast)
@@ -493,6 +493,11 @@ function transformForRelationalDBWithCsn(csn, options, messageFunctions) {
493
493
  redoProjections.forEach(fn => fn());
494
494
  removeFeatureFlags(csn);
495
495
 
496
+ if (!options.testMode) {
497
+ csn.meta ??= {};
498
+ csn.meta.compilerCsnFlavor = '$internal';
499
+ }
500
+
496
501
  timetrace.stop('Transform CSN');
497
502
  timetrace.stop('HANA transformation');
498
503
  return csn;
@@ -728,12 +733,11 @@ function transformForRelationalDBWithCsn(csn, options, messageFunctions) {
728
733
  break;
729
734
  }
730
735
  case 'cds.Vector': {
731
- if (options.sqlDialect !== 'hana' && options.sqlDialect !== 'sqlite') {
736
+ if (options.sqlDialect === 'plain') {
732
737
  error('ref-unsupported-type', path, {
733
- '#': 'hana',
738
+ '#': 'dialect',
734
739
  type: node.type,
735
- value: 'hana',
736
- othervalue: options.sqlDialect,
740
+ value: options.sqlDialect,
737
741
  });
738
742
  }
739
743
  else if (options.transformation === 'hdbcds') {
@@ -98,6 +98,10 @@ function tupleExpansion(csn, csnUtils, msgFunctions) {
98
98
 
99
99
  expr = expr.map((e, i) => expandStructurizedExpr(e, location.concat(i)));
100
100
 
101
+ // Handle `(list) in (...)` and `(list) not in (...)` - expand single-leafed structures in list
102
+ if (expr[0]?.list && (expr[1] === 'in' || (expr[1] === 'not' && expr[2] === 'in')))
103
+ return expandStructsInListIn(expr[0], expr, location) ?? expr;
104
+
101
105
  if (expr.length === 3 && typeof expr[1] === 'string') // also includes `<lhs> is null`
102
106
  return expandBinaryOp(expr[0], [ expr[1] ], expr[2], location) ?? expr;
103
107
 
@@ -111,6 +115,42 @@ function tupleExpansion(csn, csnUtils, msgFunctions) {
111
115
  return expr;
112
116
  }
113
117
 
118
+ /**
119
+ * Expands single-leafed structured elements and managed associations with a single key
120
+ * in `(list) in (...)` and `(list) not in (...)` expressions.
121
+ * If a structured element has more than one leaf, an error is emitted later during tupleExpansion.
122
+ *
123
+ * @param {object} listNode - The `{list: [...]}` node
124
+ * @param {Array} expr - The full expression array
125
+ * @param {CSN.Path} location
126
+ * @returns {Array|null} The (possibly modified) expr, or null on error.
127
+ */
128
+ function expandStructsInListIn(listNode, expr, location) {
129
+ const listLoc = location.concat(0, 'list');
130
+ const newItems = [];
131
+ for (let i = 0; i < listNode.list.length; i++) {
132
+ const item = listNode.list[i];
133
+ const art = item._art || (item.ref && enrichRef(item, listLoc.concat(i)));
134
+ if (!art || !isExpandable(art)) {
135
+ newItems.push(item);
136
+ continue;
137
+ }
138
+ // Expandable - try flattening to leaves
139
+ const paths = flattenPath(item, false, true);
140
+ if (paths.length === 1) {
141
+ // Single leaf - replace with the expanded scalar path
142
+ delete paths[0].comparisonRef;
143
+ newItems.push(paths[0]);
144
+ }
145
+ else {
146
+ // Multiple leaves - rejected later by rejectAnyDirectStructureReference
147
+ return null;
148
+ }
149
+ }
150
+ listNode.list = newItems;
151
+ return expr;
152
+ }
153
+
114
154
  /**
115
155
  * Expands the binary operation `lhs <op> rhs`, where `op` may be one or more tokens,
116
156
  * e.g. `is not` for `is not null`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-compiler",
3
- "version": "6.8.0",
3
+ "version": "6.9.0",
4
4
  "description": "CDS (Core Data Services) compiler and backends",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -13,50 +13,13 @@
13
13
  },
14
14
  "main": "lib/main.js",
15
15
  "types": "lib/main.d.ts",
16
- "scripts": {
17
- "download": "exit 0",
18
- "gen": "npm run rdpg",
19
- "rdpg": "node ./redepage/bin/redepage --compile lib/gen/CdlParser.js --copy-base-parser lib/parsers/CdlGrammar.g4 && node ./scripts/createCdlKeywordList.js && node scripts/genGrammarChecksum.js",
20
- "xmakeAfterInstall": "npm run gen",
21
- "xmakePrepareRelease": "echo \"$(node scripts/stripReadme.js README.md)\" > README.md && node scripts/assertSnapshotVersioning.js && node scripts/assertChangelog.js && node scripts/cleanup.js --remove-dev",
22
- "test": "node scripts/xmakeTestDispatcher.js",
23
- "test:xmake": "npm run test3 -- --topic=Drafts --test=CalculatedElements",
24
- "test:ci": "node scripts/verifyGrammarChecksum.js && mocha --timeout 10000 --reporter-option maxDiffSize=0 scripts/testLazyLoading.js && mocha --parallel --reporter-option maxDiffSize=0 test/ test3/",
25
- "test:piper": "node scripts/verifyGrammarChecksum.js && npm run coverage:piper",
26
- "test3": "node scripts/verifyGrammarChecksum.js && mocha --reporter-option maxDiffSize=0 test3/",
27
- "testStandardDatabaseFunctions": "CDS_COMPILER_STANDARD_DB_FUNCTIONS=1 mocha --reporter-option maxDiffSize=0 test3/test.standard-database-functions.js",
28
- "deployHanaSql": "CDS_COMPILER_DEPLOY_HANA=1 mocha --reporter-option maxDiffSize=0 test3/test.deploy.hana-sql.js",
29
- "deployHdiHdbcds": "CDS_COMPILER_DEPLOY_HANA=1 mocha --reporter-option maxDiffSize=0 test3/test.deploy.hdi.hdbcds.js",
30
- "deployHdi": "CDS_COMPILER_DEPLOY_HANA=1 mocha --reporter-option maxDiffSize=0 --extensions .hdi test3/test.deploy.hdi.hdbcds.js",
31
- "deployHdbcds": "CDS_COMPILER_DEPLOY_HANA=1 mocha --reporter-option maxDiffSize=0 --extensions .hdbcds test3/test.deploy.hdi.hdbcds.js",
32
- "deployGitDiffs": "CDS_COMPILER_DEPLOY_HANA=1 mocha --reporter-option maxDiffSize=0 test3/test.deploy.git-diffs.js",
33
- "deployHdbcdsGitDiffs": "CDS_COMPILER_DEPLOY_HANA=1 mocha --reporter-option maxDiffSize=0 --extensions .hdbcds test3/test.deploy.git-diffs.js",
34
- "deployHdiGitDiffs": "CDS_COMPILER_DEPLOY_HANA=1 mocha --reporter-option maxDiffSize=0 --extensions .hdi test3/test.deploy.git-diffs.js",
35
- "gentest3": "cross-env MAKEREFS=${MAKEREFS:-'true'} mocha --reporter-option maxDiffSize=0 test3/testRefFiles.js",
36
- "coverage": "cross-env npx nyc mocha --reporter-option maxDiffSize=0 test/ test3/testRefFiles.js && npx nyc report --reporter=lcov",
37
- "coverage:piper": "cross-env npx nyc mocha --reporter test/TestMochaReporter.js --reporter-options mochaFile=./coverage/TEST-results.xml --reporter-option maxDiffSize=0 --timeout 10000 test/ test3/ && npx nyc report --reporter=lcov",
38
- "lint": "eslint bin/ benchmark/ lib/ test/ test3/ scripts/ && node scripts/linter/lintConstants.js && node scripts/linter/lintGrammar.js && node scripts/linter/lintTests.js test3/ && node scripts/linter/lintMessages.js && node scripts/linter/lintMessageIdCoverage.js lib/ && markdownlint README.md CHANGELOG.md doc/ internalDoc/ && cd share/messages && markdownlint . && cd ../../ && node scripts/check-changelog.js",
39
- "lint:edmx": "node scripts/odata/lint-edmx-v4.js",
40
- "tslint": "tsc --pretty -p .",
41
- "updateVocs": "node scripts/odataAnnotations/generateDictMain.js && npm run generateAllRefs",
42
- "updateTocs": "node scripts/update-toc.js",
43
- "generateCompilerRefs": "cross-env MAKEREFS='true' mocha test/testCompiler.js",
44
- "generateMigrationRefs": "cross-env MAKEREFS='true' mocha test/test.to.migration.js",
45
- "generateEdmRefs": "cross-env MAKEREFS='true' mocha test/testEdmPositive.js",
46
- "generateForHanaRefs": "cross-env MAKEREFS='true' mocha test/testHanaTransformation.js",
47
- "generateOdataRefs": "cross-env MAKEREFS='true' mocha test/testODataTransformation.js",
48
- "generateOdataAnnoRefs": "cross-env MAKEREFS='true' mocha test/testODataAnnotations.js",
49
- "generateToSqlRefs": "cross-env MAKEREFS='true' mocha test/testToSql.js",
50
- "generateToRenameRefs": "cross-env MAKEREFS='true' mocha test/testToRename.js",
51
- "generateDraftRefs": "cross-env MAKEREFS='true' mocha test/testDraft.js",
52
- "generateAllRefs": "node scripts/verifyGrammarChecksum.js && cross-env MAKEREFS=force mocha --reporter-option maxDiffSize=0 test/ test3/"
53
- },
54
16
  "keywords": [
55
17
  "CDS"
56
18
  ],
57
19
  "files": [
58
20
  "bin",
59
21
  "lib",
22
+ "!lib/parsers/CdlGrammar.g4",
60
23
  "doc",
61
24
  "share",
62
25
  "CHANGELOG.md"
@@ -64,4 +27,4 @@
64
27
  "engines": {
65
28
  "node": ">=20"
66
29
  }
67
- }
30
+ }