microsoft / vscode-iconv-lite-umd

A UMD version of iconv-lite to be used in VSCode.
MIT License
7 stars 7 forks source link

How to ensure that install is called before new version is published #6

Open gyzerok opened 4 years ago

gyzerok commented 4 years ago

@bpasero refs https://github.com/microsoft/iconv-lite-umd/pull/5#issuecomment-650910600

@gyzerok oh, it would be great if yarn could run as part of the prepublish to fix that in the future.

I've looked into it a bit. Unfortunately when you run yarn the prepublish hook is called automatically. Which means that if you put yarn inside prepublish, you get an infinite loop of installs.

Personally I've had great experiences publishing to npm from CI. This way you just push the new tag and CI will do the rest: install, build and publish.

If it sounds good I think you can use GitHub Actions to make this work. Unfortunately I can't really make it myself since you need to generate an npm secret to make it work.

bpasero commented 4 years ago

Slightly related, given https://github.com/microsoft/iconv-lite-umd/issues/7, it would be great if the iconv-lite test suite would run against the webpacked version.