Skip to content

adding typescript - #6

Open
ClaReQurv wants to merge 2 commits into
mcnaveen:mainfrom
ClaReQurv:adding-typescript
Open

adding typescript#6
ClaReQurv wants to merge 2 commits into
mcnaveen:mainfrom
ClaReQurv:adding-typescript

Conversation

@ClaReQurv

Copy link
Copy Markdown

Pull Request Description

This pull request addresses several changes to improve the project's structure and development workflow:

  1. Removing "crypto" npm Package:

    • The "crypto" npm package has been removed due to its deprecation. This was done in response to security concerns and potential misuse of the package.
    • Removing this dependency simplifies the project and reduces vulnerabilities.
  2. Adding tsconfig.json for TypeScript Support:

    • A tsconfig.json file has been added to enable TypeScript support in the project. This allows us to use modern JavaScript features, improve code quality, and facilitate type checking during development.
    • The configuration ensures that the project follows best practices for setting up a TypeScript environment.
  3. Installing tsup for Build Process:

    • tsup has been installed to build the index.ts file into a single bundle. This simplifies the build process and makes it more efficient.
    • Using tsup also ensures that the output is optimized and minimizes the size of the bundled file.
  4. Updating Test Infrastructure with ts-jest:

    • ts-jest has been installed to update the test infrastructure to support TypeScript. This integration provides better test coverage, type-checking during tests, and easier debugging.
    • The updates ensure that all tests are written in TypeScript and that they leverage the benefits of modern JavaScript features.
  5. Changing package.json main and module File:

    • The main and module fields in the package.json file have been updated to point to dist/index.cjs and dist/index.esm.js, respectively. This aligns with the new build output structure and ensures that the correct entry points are used for different environments.
    • These changes improve clarity and maintainability of the project's build configuration.

Summary

This pull request focuses on enhancing the project's TypeScript support, simplifying the build process, and updating the test infrastructure. The changes address deprecation warnings, introduce modern JavaScript features, and ensure that the project is well-organized and scalable.

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