decentraland / editor-sdk7

VSCode extension for Decentraland SDK7 projects
https://marketplace.visualstudio.com/items?itemName=DecentralandFoundation.decentraland-sdk7
MIT License
3 stars 5 forks source link

fix: publish #103

Closed cazala closed 3 months ago

cazala commented 3 months ago

The CI is currently failing to publish new versions of the extension because the size of the package is too large (+400mb). See v1.48.0 and v1.48.1.

This PR ignores everything in node_modules except for npm and it uses it to install the rest of the dependencies when the extension is activated. This reduces the size of the package to just 4mb:

Screenshot 2024-04-05 at 4 11 46 PM

It will store the extension version in global storage so it doesn't install the dependencies again for a version that has already been installed.

A few test were added to keep the coverage at 100%.

It also adds the latest version and commit hash to the artifact created on each PR, this makes it easier to install test version and know which version you are running. The way it worked before it always had the 0.0.0-development version, which VSCode always auto-updated to the latest version on every refresh, so it was very annoying to use it for test purposes (you had to keep reinstalling the test version every time you open VSCode).

It also fixed an issue with the CI where it would only build the .vsix artifact when the PR was opened, but it would not rebuild it on subsequent commits. Now it generates a new .vsix on every commit.

Finally, it removes a few unused functions warnDecentralandLibrary and warnOutdatedDependency which are not used anymore, and it also removed the tests related to them.

github-actions[bot] commented 3 months ago

Test this pull request