ValentinH / react-easy-sort

A React component to sort items in lists or grids
https://ValentinH.github.io/react-easy-sort
MIT License
160 stars 25 forks source link

Fix createPackageFile:exports #37

Closed zju1 closed 1 year ago

zju1 commented 1 year ago

The types field is no longer support if there's an exports field in package.json. So I updated createPackageFile function in copy-build-files.js file. Currently typescript is not supporting this package. If you merge it it works.

ValentinH commented 1 year ago

Thanks for opening this PR!

I think we need both as some older tools don't support the exports field.

zju1 commented 1 year ago

Thanks for opening this PR!

I think we need both as some older tools don't support the exports field.

Agree. What about creating a new version? If someone needs they can install older versions. Because it's being a big problem on new installations

ValentinH commented 1 year ago

Are you sure that having both causes issues on new tools?

It's always better to avoid doing breaking changes and bumping major versions.

zju1 commented 1 year ago

Yes. I had to change the source code of this package when I installed because on compilation time it was throwing some errors. And I don't want to build without compiling. This is really good package but causing severe errors.

image

ValentinH commented 1 year ago

Are you able to share a reproduction of the issue? I'd like to have a look for the best combination of values that would fix the issue while not breaking existing working projects.

zju1 commented 1 year ago

Are you able to share a reproduction of the issue? I'd like to have a look for the best combination of values that would fix the issue while not breaking existing working projects.

It's simple:

1.Install package to a typescript based React app using yarn add react-easy-sort 2.Compile project like yarn tsc

and it crashes )

zju1 commented 1 year ago

Hello @ValentinH . It's being the reason to crash on deployment. I changed package.json manually in my machine but server installs all packages again and it crashes. Will you merge it?

ValentinH commented 1 year ago

I'm sorry but I'm currently on holidays without access to my computer with publishing credentials. I'll be back in 2 weeks.

ValentinH commented 1 year ago

In the meantime, you can try using https://www.npmjs.com/package/patch-package to keep your changes during deployment.

zju1 commented 1 year ago

No worries. take your time. I've moved to another package. But anyway it will be useful for other users if you merge when you get back to work from holiday ) Have a nice holiday 😁

ValentinH commented 1 year ago

Fixed in 1.5.2