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: remove esm dependencies #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BryanBerger98
Copy link

Hi @rushelex !

I am encountering some problems with the current dependencies of your library.
I need to remove ES Modules that uses require() because off errors like follow: semantic-release/npm#459

This error was triggered by Chalk and Lodash.
I am using Vite and Vite does not support ES Modules and I have not find a way to make Vite accept ES modules.

I downgraded Chalk to version 4.1.2.
I removed Lodash and I created a primitive.ts file in utils folder that contains the primitive utility functions like isObject, isNil, isString.
I also removed the barrel pattern used inside the utils folder to avoid circular dependencies.

I will release my own version of your package on my npm because I need this modification to be released very quickly.
But if you validate my PR, I will use your package.

Thanks!

@rushelex
Copy link
Owner

Hi @BryanBerger98, I'm really glad you like this library and want to use it! Of course, let's make some changes to make this library work in as many environments as possible. I'll be making some changes to this PR soon to make the code more consistent with the rest of the code in the repository.

src/utils/primitive.ts Show resolved Hide resolved
src/utils/primitive.ts Show resolved Hide resolved
src/utils/primitive.ts Show resolved Hide resolved
src/utils/primitive.ts Show resolved Hide resolved
src/utils/primitive.ts Show resolved Hide resolved
src/utils/primitive.ts Show resolved Hide resolved
test/src/test.ts Show resolved Hide resolved
@rushelex
Copy link
Owner

rushelex commented Oct 18, 2024

@BryanBerger98 I've released a new pre-release version 1.2.0-rc.5. Could you check if it solves your problem?

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.

2 participants