#15578·appium

Appium 4.0: distribute ESM packages

Author: boneskullCreated Jun 25, 2021Updated Aug 13, 2026
Labelsenhancementv4

The situation:

  • Currently Appium only distributes CJS modules.
  • Appium 2.0's minimum required Node.js version is v12.x, which has ESM support.
  • Consumers writing ESM would be better off consuming ESM instead of CJS.
  • Appium would be better off consuming ESM directly than CJS; it will simplify testing and the importing of local packages. If we are in @appium/foo and import '@appium/bar', we will be importing a transpiled CJS module, which can be painful in a development environment. We should try to get as close to the source as possible.
  • The goal is to improve both the user experience and the developer experience.

Proposed solution:

  • Publish each package as a ESM package.
  • Create a reusable configuration/workflow/whatever for this to happen automatically, and make it easily applicable to multiple existing packages (and new packages).