language-data
language-data copied to clipboard
Update JavaScript codebase to use ESM and vite
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
Tested this using npm pack (docs).If package type is module, ESM can be used, otherwise CommonJS require works.