language-data icon indicating copy to clipboard operation
language-data copied to clipboard

Update JavaScript codebase to use ESM and vite

Open Abijeet opened this issue 3 months ago • 1 comments

Dropped support for Node.js 16, 18. Updated ESLint to v9 since assert is not supported in v8. See: https://github.com/eslint/eslint/discussions/15305

Dropping support for Node v16, v18 should be fine as they are both EOL.

Consequently had to drop support for Wikimedia/eslint rules as it doesn't yet support ESLint v9.

Used vite to bundle the library for browser usage.

Bug: https://phabricator.wikimedia.org/T407180 Change-Id: I44dee29b49804da5a13d986352148931baf7cb34

Abijeet avatar Oct 14 '25 08:10 Abijeet

Tested this using npm pack (docs).If package type is module, ESM can be used, otherwise CommonJS require works.

Abijeet avatar Oct 15 '25 08:10 Abijeet