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

0.9.0 build doesn't include src/javascript/index.js in release #29

Closed
dkniffin opened this issue Jul 26, 2023 · 7 comments
Closed

0.9.0 build doesn't include src/javascript/index.js in release #29

dkniffin opened this issue Jul 26, 2023 · 7 comments
Assignees

Comments

@dkniffin
Copy link
Contributor

In package.json, the main entrypoint is listed as src/javascript/index.js. However, in the 0.9.0 release, it looks like that was converted to TS.

I'm using this package via jspm.io, which requires the file to already be in JS. Can you please add a compilation step to release, so that the published version has the JS file available?

@ava-cassiopeia
Copy link
Owner

Dunno how I missed this issue when you first filed it...a year and a half ago...but uh sorry!! Will fix!

@ava-cassiopeia ava-cassiopeia self-assigned this Jan 7, 2025
ava-cassiopeia added a commit that referenced this issue Jan 7, 2025
* Run 'npm update --save' on repo

* Attempt a fix for the problem described in #29

* Use more recent node versions in GitHub CI/CD workflow
@ava-cassiopeia
Copy link
Owner

Version 0.9.1—which I just released on NPM and here on GitHub—should fix this issue I think, but please take a look and let me know if this is working correctly for you.

@ava-cassiopeia
Copy link
Owner

There's also v0.9.2 available now. I didn't think I would get to both fixes tonight but I ended up with more time than expected so two releases in close proximity, whoops..

Anyway, mentioning here so that you don't run npm i -S [email protected] and miss the extra SASS improvements in v0.9.2.

@dkniffin
Copy link
Contributor Author

dkniffin commented Jan 7, 2025

@ava-cassiopeia I tried to use the new version, but it still doesn't seem to work. I get the error TypeError: SimpleSwitch.init is not a function

I'm not 100% sure what the fix is, but this is a similar library that I'm using that also uses TS and it's working properly: https://github.com/jackocnr/intl-tel-input

My best guess without digging further is that you need "esModuleInterop": true or another TS config from here: https://github.com/jackocnr/intl-tel-input/blob/master/tsconfig.json

@ava-cassiopeia
Copy link
Owner

Aw darn, thanks for the hint though! Here's my attempt at a fix:

I've just released v0.9.4, please install that and see if it fixes your issue. This version includes the normal minified build file from before (if you're just dropping the file into a webserver) and special compiled-for-nodeJS variants of the code which don't have minification, should be import-able from other code, and as a bonus also include TS declaration files. To produce these, I used compiler settings very similar to the ones in intl-tel-input, so I'm hoping they work correctly.

I pointed the main field of the package at these new, NodeJS-optimized files so hopefully it works for you, but do give it a try and let me know how that works for you.

@dkniffin
Copy link
Contributor Author

dkniffin commented Jan 8, 2025

@ava-cassiopeia It looks like that worked. Thanks!

@dkniffin dkniffin closed this as completed Jan 8, 2025
@ava-cassiopeia
Copy link
Owner

Yessss!! Happy to help!

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

No branches or pull requests

2 participants