nerdyman / react-image-turntable

Display a set of images as a draggable 360 degree turntable.
https://githubbox.com/nerdyman/react-image-turntable/tree/main/example
MIT License
21 stars 1 forks source link

Npm package is corrupted #30

Closed webmarkyn closed 6 months ago

webmarkyn commented 6 months ago

Hello @nerdyman. I was trying to install the new 3.1.0 version today and got the following error when trying to run the project EvalError: Code generation from strings disallowed for this context. dist/index.mjs file looks strange and contains strings with absolute paths like

var e="/Users/me/Documents/projects/nerdyman/react-image-turntable/src/hooks.ts"

When I run pnpm build I get completely different output that's not even close to the index.mjs file that I get when installing a package from npm.

NPM VERSION

Screenshot 2023-12-13 at 18 50 53

PNPM OUTPUT

Screenshot 2023-12-13 at 18 51 19
nerdyman commented 6 months ago

Ah that's really wierd, thanks for opening this @webmarkyn. I changed some of the build config stuff in the last release so I've probably misconfigured something there. I'll take a look ASAP.

nerdyman commented 6 months ago

It's the np lib used to generate releases doing this, during the "Git" or "Bumping version using npm" step it seems to run the tests even though it's configured to skip them. The tests use a different build to generate coverage so that's why the build output is borked. I'm a bit fed up with np and was already going to replace it #26 so will do that and get a working build out today.

webmarkyn commented 6 months ago

Hello @nerdyman, have you managed to resolve it?

nerdyman commented 6 months ago

Sorry for the delay @webmarkyn, this has been fixed in 3.1.1. I've tested it in a demo project and everything looks OK on unpkg too.

https://unpkg.com/browse/react-image-turntable@3.1.1/dist/index.mjs

Feel free to reopen this issue if you encounter any problems.