@abaplint/transpiler-cli 2.11.38 → 2.11.39

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 (2) hide show
  1. package/build/bundle.js +7 -2
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -79195,9 +79195,14 @@ class FieldChainTranspiler {
79195
79195
  let name = c.getFirstToken().getStr().toLowerCase();
79196
79196
  if (context instanceof abaplint.BasicTypes.ObjectReferenceType) {
79197
79197
  const cdef = traversal.findClassDefinition(context.getIdentifierName(), scope);
79198
- const attr = cdef?.getAttributes().findByName(c.getFirstToken().getStr());
79198
+ const tokenName = c.getFirstToken().getStr();
79199
+ const attr = cdef?.getAttributes().findByName(tokenName);
79200
+ // Do not mark constants as private JS fields. Constants are exposed on instances via constructor copying.
79201
+ const constants = cdef?.getAttributes().getConstants() || [];
79202
+ const isConstant = constants.some(cons => cons.getName().toUpperCase() === tokenName.toUpperCase());
79199
79203
  if (feature_flags_1.FEATURE_FLAGS.PRIVATE_ATTRIBUTES === true
79200
- && attr?.getVisibility() === abaplint.Visibility.Private) {
79204
+ && attr?.getVisibility() === abaplint.Visibility.Private
79205
+ && isConstant === false) {
79201
79206
  const id = scope?.getParent()?.getParent()?.getIdentifier();
79202
79207
  if (id?.stype === abaplint.ScopeType.ClassImplementation
79203
79208
  && cdef?.getName().toUpperCase() === id.sname.toUpperCase()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.38",
3
+ "version": "2.11.39",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
30
  "@abaplint/core": "^2.113.180",
31
- "@abaplint/transpiler": "^2.11.38",
31
+ "@abaplint/transpiler": "^2.11.39",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.3.0",
34
34
  "@types/progress": "^2.0.7",