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

fix: set package type as module #570

Merged
merged 3 commits into from
May 8, 2023
Merged

fix: set package type as module #570

merged 3 commits into from
May 8, 2023

Conversation

AykutSarac
Copy link
Member

This pull request adds the "type: module" field to the package.json file. This change is made to indicate that our component library uses ECMAScript (ES) modules syntax and is designed to be consumed as an ES module.

Motivation:
By adding "type: module", we explicitly inform the JavaScript runtime and developers that our library follows the ES modules standard. This helps in promoting interoperability and enables seamless integration with modern JavaScript environments that natively support ES modules.

Benefits:

  1. Clearer intent: By explicitly stating that our library uses ES modules, it becomes easier for developers to understand and utilize the library in projects that support ES modules.

  2. Improved interoperability: With "type: module" specified, consumers of our library using tools like bundlers, module loaders, or build systems that understand ES modules can effortlessly incorporate our library into their projects.

  3. Consistency: This change aligns our library with the industry trend of adopting ES modules, allowing for consistency across different projects and libraries that leverage ES modules.

Note:
Adding "type: module" implies that our library will not be compatible with older environments that only support CommonJS syntax. If we need to support both CommonJS and ES modules, we can explore using a build tool like Babel to transpile the code into CommonJS format and include both versions in the package.

@AykutSarac AykutSarac requested a review from muratcorlu May 8, 2023 10:53
@muratcorlu muratcorlu changed the title Add "type: module" field to package.json fix: set package type as module May 8, 2023
@AykutSarac
Copy link
Member Author

Do you think we can merge this with #526?

@muratcorlu
Copy link
Contributor

@AykutSarac Can we first merge this and check #526 with it?

@muratcorlu
Copy link
Contributor

Since #526 doesn't trigger a release, I merged it first. Once pipeline passes on next branch, we can merge this as well.

@muratcorlu muratcorlu merged commit 479b900 into next May 8, 2023
@muratcorlu muratcorlu deleted the feat/use-type-module branch May 8, 2023 14:09
@github-actions
Copy link

github-actions bot commented May 8, 2023

🎉 This PR is included in version 2.1.0-beta.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced May 8, 2023
muratcorlu added a commit that referenced this pull request May 12, 2023
This PR includes the features/fixes for the release of v2.1.0

## Features

* **Switch**: CSS property to set custom color for `off` state (#527)
* **Popover**: CSS properties to set `max-width` and `border-size` (#483)

## Fixes

* **Dropdown**: Close dropdown when an item is clicked (#533) 
* **Popover**: Prevent exiting fullscreen with popover close (#551)
* **Dialog**: Prevent exiting fullscreen with dialog close (#548)
* **Select**: Select item separator is back (#552) 
* React wrapper types (#532) 
* Set package type as module (#570)

Thanks to our contributors for this version 🚀 :

@muratcorlu @ogunb @abugraokkali @AykutSarac @ozkersemih
@github-actions
Copy link

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants