Open benasher44 opened 1 year ago
Erg sorry I think I chose the wrong template, and it auto-applied the bug label 🤦
This relates to the initial attempt at updating our build tooling as well, and comments/references mentioned in there; https://github.com/validatorjs/validator.js/pull/1869
Supporting named imports from this package (at least the root "validator" package) is very difficult due to the number of different module systems supported. I opened a PR briefly to attempt this, but it failed for AMD (and maybe others? unless I misunderstood). It can be supported for
validator/es
, but IDEs don't default to this, nor is there an index.d.ts in@types/validator
to support this (i.e. more work is required).With node 14 EOL having happened this year, node 16 EOL happening later this year, and most browsers supporting ESM, it feels like a good time to migrate to ESM-only via a validator 14