SonarCloud does not work with Typescript inline type imports

We use sonarcloud-github-action@v1.6, we recently adopted Typescript@4.5 inline type imports

import { something, type something2 } from 'Something';

This will throw SonarCloud off with error message

ERROR: Failed to parse file [.../Something.ts] at line 17: ',' expected.

See example workflow

Some extracted real output

ERROR: Failed to parse file [packages/legend-extension-external-store-service/src/models/protocols/pure/v1/model/packageableElements/store/serviceStore/model/V1_ServiceStore.ts] at line 17: ',' expected.
ERROR: Failed to parse file [packages/legend-extension-external-store-service/src/models/protocols/pure/v1/model/packageableElements/store/serviceStore/model/V1_SerializationFormat.ts] at line 17: ',' expected.
ERROR: Failed to parse file [packages/legend-extension-external-store-service/src/models/protocols/pure/v1/model/packageableElements/store/serviceStore/model/V1_TypeReference.ts] at line 17: ',' expected.
ERROR: Failed to parse file [packages/legend-extension-external-store-service/src/models/protocols/pure/v1/model/packageableElements/store/serviceStore/model/V1_ServiceParameter.ts] at line 17: ',' expected.
ERROR: Failed to parse file [packages/legend-extension-external-store-service/src/models/protocols/pure/v1/model/packageableElements/store/serviceStore/model/V1_ServiceStoreService.ts] at line 17: ',' expected.
ERROR: Failed to parse file [packages/legend-extension-external-store-service/src/models/protocols/pure/v1/model/packageableElements/store/serviceStore/model/V1_ServiceGroup.ts] at line 17: ',' expected.

Hey there.

Support for Typescript v4.5 is planned for the next release of our Javascript/Typescript analyzer which will, once finished, be pretty quickly deployed to SonarCloud.

What’s taking so long? The dependency updates required to support Typescript 4.5 means dropping support for NodeJS 10 as a runtime (deprecated last year). This requires some effort on our side to make sure it’s a smooth experience for our users.

In any case, support is coming soon. :slight_smile:

1 Like

Such a great news! Thank you so much! Do you know how long it takes it have that available in sonarcloud-github-action?

Please keep me posted!

Hey there.

This should be available on SonarCloud either towards the end of next week, or the week after.