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 TS #44

Merged
merged 7 commits into from
Sep 13, 2023
Merged

Migrate to TS #44

merged 7 commits into from
Sep 13, 2023

Conversation

fityannugroho
Copy link
Owner

@fityannugroho fityannugroho commented Sep 13, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Contributing Guidelines
  • Tests for the changes have been added (optional, for bug fixes or features)
  • Docs have been added / updated (optional, for bug fixes or features)

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Data change

What is the current behavior?

Issue Number: #43

What is the new behavior?

  • Migrate to TypeScript
  • Use Node.js 18
  • Bundle using tsup and publish only necessary files
  • Migrate jest to vitest for testing
  • Add options to transform the header and value
  • Rename getter functions (provinces() -> getProvinces(), etc)
  • Update the CI since the Node.js 16 is no longer supported

Other information

This PR is contains BREAKING CHANGES:

  • Need Node.js 18 or later.
  • Change to ESM module, not supporting CommonJS anymore.
  • Many types was renamed and deleted.
  • Change behavior of getData().
  • Rename provinces() into getProvinces(), etc.
  • Remove IdnArea namespace.

The details will be informed in the migration guide.

- Replace `jest` with `vitest`
- Use `tsup` to build the codes (and stored in /lib)

BREAKING CHANGES:
- Need Node.js 18 or later
- Change to ESM module, not supporting CommonJS anymore
BREAKING CHANGES:
- Many types was renamed and deleted.
- Change behavior of `getData()`.
- Rename `provinces()` into `getProvinces()`, etc.
- Remove IdnArea namespace.
`__dirname` only available in CommonJS
@fityannugroho fityannugroho added the enhancement New feature or request label Sep 13, 2023
@fityannugroho fityannugroho linked an issue Sep 13, 2023 that may be closed by this pull request
10 tasks
@fityannugroho fityannugroho added this to the v3.0.0 milestone Sep 13, 2023
@fityannugroho fityannugroho merged commit fb42b88 into main Sep 13, 2023
@fityannugroho fityannugroho deleted the next-v3 branch September 13, 2023 09:10
@fityannugroho fityannugroho removed a link to an issue Sep 18, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant