Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to TSDOC #48

Merged
merged 9 commits into from
Feb 18, 2024
Merged

Migrate to TSDOC #48

merged 9 commits into from
Feb 18, 2024

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
7 of 9 checks passed
@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.

1 participant