Skip to content

feat!: Migrate the package to ESM#312

Merged
mykola-mokhnach merged 1 commit into
appium:masterfrom
mykola-mokhnach:esm
Jul 24, 2026
Merged

feat!: Migrate the package to ESM#312
mykola-mokhnach merged 1 commit into
appium:masterfrom
mykola-mokhnach:esm

Conversation

@mykola-mokhnach

Copy link
Copy Markdown
Contributor

Summary

  • Add "type": "module" and an exports map to package.json; keep main/types for tooling compatibility.
  • Explicitly set "module": "NodeNext" / "moduleResolution": "NodeNext" in tsconfig.json.
  • Add .js extensions to all relative imports across lib/ and test/ (required by Node ESM resolution).
  • Switch lib/logger.ts to the named log import from @appium/logger instead of the default import — under NodeNext the default import resolved to the CJS module namespace rather than the Log instance, breaking .debug/.warn typings.
  • Replace __filename usage with fileURLToPath(import.meta.url) in test/unit/simctl.spec.ts.
  • Add --enable-source-maps to the test/e2e-test scripts.

BREAKING CHANGE: Consumers using require('node-simctl') must switch to import/dynamic import() — the package no longer ships a CommonJS entry point.

@mykola-mokhnach
mykola-mokhnach merged commit 6f67beb into appium:master Jul 24, 2026
7 checks passed
@mykola-mokhnach
mykola-mokhnach deleted the esm branch July 24, 2026 18:44
github-actions Bot pushed a commit that referenced this pull request Jul 24, 2026
## [9.0.0](v8.2.9...v9.0.0) (2026-07-24)

### ⚠ BREAKING CHANGES

* Consumers using require('node-simctl') must switch to import/dynamic import() — the package no longer ships a CommonJS entry point.

### Features

* Migrate the package to ESM ([#312](#312)) ([6f67beb](6f67beb))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 9.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants