Skip to content

Conversation

microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented Jan 28, 2025

  • Remove DeviceVersion exported const enum in favour of a union for this reason (breaking change due for code like DeviceVersion.V1 but not expected to have wide impact. The values are unchanged.).
  • Remove UMD build. Stop offering a browser oriented bundle.
    • If we know of any real-world script-tag-only users then I'm open to reinstating this but I'm really dubious it's worth it.
  • CJS now uses dependencies rather than bundles to aid use alongside microbit-connection (avoiding duplicating nrf-intel-hex in that scenario).
  • Fix ES module so it works with Node's ES module support (exports in package.json, .js file extensions on imports)
  • Emit more modern JavaScript (ES2021, consistent with microbit-connection).
  • Consolidate documentation into typedoc
    • Move the markdown content into typedoc's build so we don't have separation and simplify
    • Drop the unmaintained theme
    • Move to GHA publishing it to GitHub pages
    • This is now simple enough I can imaging rolling it out to other libraries
  • Update linting, TypeScript etc.
    • Intending to port most of this to typescript-library-starter, but hopefully using NodeNext there.
  • Stuck on "node10" TypeScript bundleResolution for the same reason as Add cjs build alongside esm microbit-connection#51

Other than DeviceVersion there's no code-level behaviour change but it's likely also a breaking change due to the ES2020 emit and the packaging changes so bumping version to 0.10.0. I think it should generally be easier to consume in modern projects while still working in CJS/webpack 5 type setups.

Copy link

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now looks good to me pending any comments from @microbit-carlos

@microbit-carlos
Copy link
Collaborator

No additional comments from my side. Looks like a good simplification of the docs and packaging (even if we lose the browser bundle).

@microbit-grace microbit-grace merged commit e6b3162 into master Jan 29, 2025
1 check passed
@microbit-grace microbit-grace deleted the build-updates branch January 29, 2025 16:27
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.

4 participants