Skip to content

v3: upgrade all tech stack#223

Merged
matschik merged 7 commits intomainfrom
upgrade-v3
Dec 12, 2025
Merged

v3: upgrade all tech stack#223
matschik merged 7 commits intomainfrom
upgrade-v3

Conversation

@matschik
Copy link
Copy Markdown
Owner

@matschik matschik commented Dec 12, 2025

Freebox v3 Release Notes

  • ESM-only distribution

    • Package ships only as ESM; main/module now dist/index.mjs.
    • CommonJS require() entry removed.
  • Node.js 24+ required

    • Engines bumped to >=24.0.0; CI tests only on Node 24.
    • tsdown target updated to node24.
  • Improved login robustness

    • Freebox.login() auto-fetches challenge when absent; clear error if unavailable.
    • HMAC password uses the resolved challenge.
    • FreeboxRegister validates api_version and builds base URL from major version, erroring on invalid responses.
  • Integration coverage

    • New integration tests cover registration and session refresh on token expiry (MSW-based).
  • CI/CD updates

    • Reusable workflows with concurrency guard.
    • Added autofix workflow for PRs and release workflow for v* tags.

Breaking Changes

  • CommonJS builds removed; consumers must use ESM (import).
  • Minimum Node.js version is now 24.

Migration

  • Upgrade runtime to Node.js 24 or newer.
  • Switch to ESM imports, e.g. import freebox from 'freebox'; remove require() usage or configure bundler for ESM.
  • Re-verify login flows; mocks/tests should allow automatic challenge fetch.
  • Run integration and your own tests on Node 24 to confirm compatibility.

Refactors the login process to automatically retrieve the challenge if it's not initially provided.

This change enhances the robustness of the Freebox integration by ensuring that the login process can successfully complete even when the initial challenge is not explicitly passed.
It also adds validation for the Freebox API version to prevent errors due to unexpected responses.
@matschik matschik marked this pull request as ready for review December 12, 2025 09:09
Removes the dedicated release workflow and bumps the package version to 3.0.0.

Adds an ensure script to ensure linting, testing and building before publishing.
@matschik matschik merged commit 76a2e4c into main Dec 12, 2025
4 checks passed
@matschik matschik deleted the upgrade-v3 branch December 12, 2025 09:48
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.

1 participant