Skip to content

Conversation

@antonk52
Copy link
Owner

@antonk52 antonk52 commented Feb 16, 2024

Due to typescript not being able to leave import(filepath) as is when compiling to commonjs target even though dynamic imports work in commonjs nodejs projects since nodejs v14 I had to use eval when releasing 3.1 of this package. eval is a bad practice and can be a source of security vulnerabilities. I could not find a way to make typescript output dynamic imports as is and not turn it into Promise.resolve().then(() => require(filepath)). So I decided that it would be easier to migrate to TSDOC.

  • All runtime code remain the same. Except one test that had an error in it as it was comparing non existing properties.
  • Exported types moved to index.d.ts which is also checked in.
  • This migration also allowed to notably simplify test, lint and build setups.

@antonk52 antonk52 merged commit 2c68a1a into master Feb 18, 2024
@antonk52 antonk52 deleted the feat/tsdoc branch February 18, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants