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(types): Enhance typings structure and module compatibility #5

Merged
merged 2 commits into from
Apr 21, 2024

Conversation

mitsuki31
Copy link
Owner

@mitsuki31 mitsuki31 commented Apr 21, 2024

Overview

This pull request introduces several improvements and refinements to the lsfnd package. The focus is primarily on enhancing the types declaration within the types module, making it more organized and adaptable for future development and make this project supports in TypeScript projects with various modules settings. Additionally, it includes optimizations in the build process to minify the lsTypes module (forgot to include this module while maintaining #1).

Notable Changes

  • Types Declaration Refactoring (6756665):

    • Reorganized and refactored the types declaration in the types module for improved maintainability and future development.
    • Restructured type definitions for specific API parameters.
    • Re-exported the types module in the main package entry (index.ts).
    • Enabled the declaration option in the tsconfig.production.json file to ensure proper TypeScript typings generation and it's crucial for compatibility in TypeScript project with various modules type, especially for node* modules.
    • These changes allow the lsfnd package to be correctly imported and used in TypeScript projects with various module settings, including node16, nodenext, es5, esnext, and others, in addition to commonjs, which was supported in the previous release.
  • Build Process Improvement (4d48e06):

    • Included the lsTypes module to be minified after transpilation from TypeScript during the build process.
    • Other changes are unrelated to this enhancement.

Summary

These changes significantly improve the organization and maintainability of the types module within the lsfnd package. By refactoring type declarations and enabling re-exporting, the package is now compatible with a wider range of TypeScript module settings. Additionally, the build process has been enhanced by including the lsTypes module in the minification step, ensuring a more efficient production build.

This change reorganizes and refactors the types declaration within the `types` module for better maintainability and future development. It includes restructuring the type definitions for specific API parameters.

Additionally, the `types` module is now re-exported in the main package entry (`index.ts`), and the `declaration` option is enabled in the 'tsconfig.production.json' file.

These changes enable the LSFND package to be correctly imported and used in TypeScript projects with the `module` set to `node16`, `nodenext`, `es5`, `esnext`, and others, in addition to `commonjs`, which was supported in previous release.
Added the `lsTypes` module to be minified after get transpiled from TypeScript. Other changes is unrelated changes.
@mitsuki31 mitsuki31 self-assigned this Apr 21, 2024
@mitsuki31 mitsuki31 added enhancement New feature or request minor Minor changes (e.g., introduce new features and APIs) refactor Refactor changes labels Apr 21, 2024
@mitsuki31 mitsuki31 merged commit 0403f2f into master Apr 21, 2024
3 checks passed
@mitsuki31 mitsuki31 deleted the refactor/types-refactors-and-improvements branch April 21, 2024 14:46
@mitsuki31 mitsuki31 added this to the v1.0.0 milestone Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Minor changes (e.g., introduce new features and APIs) refactor Refactor changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant