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

Refactor to synchronous functions, update ts and vitest config #1

Merged
merged 3 commits into from
Nov 12, 2023

Conversation

fityannugroho
Copy link
Owner

@fityannugroho fityannugroho commented Nov 12, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

Put [x] to check

  • I have read the documentation.
  • I have read and followed the Contributing Guidelines.
  • I have included a pull request description of my changes.
  • I have included the necessary changes to the documentation.
  • I have added tests to cover my changes.

PR Type

What kind of change does this PR introduce?

Please check any kind of changes that applies to this PR using [x]

  • Bug fix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • ..... (describe the other type)

What is the current behavior?

Please describe the current behavior that you are modifying, or link to a relevant issue.

Issue Number: N/A

Crash when trying to run the installed wisely:

TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///home/.../node_modules/wisely/charsets/latin.json" needs an import assertion of type "json"

What is the new behavior?

  • Use fs.readFileSync and JSON.parse instead of dynamic import.
  • Make wisely synchronous.
  • Update tsconfig to use the "Next" (modern) configuration and remove resolveJsonModule.
  • Remove unnecessary __dirname in vitest.config since it was handled by path.resolve.

Other information

This PR will be included in next patch release, since the v0.1.0 doesn't work at all and no one has used it yet.

@fityannugroho fityannugroho added bug Something isn't working documentation Improvements or additions to documentation labels Nov 12, 2023
@fityannugroho fityannugroho merged commit e3ed642 into main Nov 12, 2023
2 checks passed
@fityannugroho fityannugroho deleted the fix branch November 12, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant