Skip to content

fix: type should match code - export default Systemic is not correct, switch to export = Systemic#69

Merged
cressie176 merged 1 commit intoonebeyond:masterfrom
albertodeago:fix/types
Nov 6, 2025
Merged

fix: type should match code - export default Systemic is not correct, switch to export = Systemic#69
cressie176 merged 1 commit intoonebeyond:masterfrom
albertodeago:fix/types

Conversation

@albertodeago
Copy link
Contributor

@albertodeago albertodeago commented Nov 4, 2025

Types are not correct, they are not aligned with the code.
Similar to onebeyond/systemic-service-runner#13

Related Issue

Didn't open an issue, should I do it?

Motivation and Context

This is an issue users encounter if they try to consume this module from an ESM service.

export default Systemic should be used if in the js file we were doing export default Systemic; -> the package is exported as a ES module.
When exporting a CJS module instead (like we're doing here with module.exports = ...) the type definition should be export = Systemic;

Typescript is probably clever enough to not raise any error when consuming this in a CJS service, but in an ESM environment it's raising an error, see screenshot of linked issue, it's the same

How Has This Been Tested?

This is a change only in the types, I've tried it changing the type definition directly in the node_modules both in a ESM service and in a CJS service

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@albertodeago albertodeago changed the title fix: export default Systemic is not correct, switch to export = Systemic fix: type should match code - export default Systemic is not correct, switch to export = Systemic Nov 4, 2025
@UlisesGascon
Copy link
Collaborator

UlisesGascon commented Nov 6, 2025

Hey @PeterAronZentai / @nochtap can you help me with the permissions... seems like I can't land the PR. I wanted to do the release as I did for onebeyond/systemic-service-runner#13. Otherwise the types will be a bit messy 😅.

Thanks in advance! ❤️

@nochtap
Copy link

nochtap commented Nov 6, 2025

Hi @UlisesGascon
I approved the workflow!

@cressie176 cressie176 merged commit 9c76606 into onebeyond:master Nov 6, 2025
2 of 3 checks passed
@UlisesGascon UlisesGascon mentioned this pull request Nov 11, 2025
@UlisesGascon
Copy link
Collaborator

It is now available in systemic@5.0.0 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants