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

feat: Choose asset version at export #91

Merged
merged 9 commits into from
Jun 20, 2024

Conversation

gadenbuie
Copy link
Contributor

Adds a new assets_version argument to export() that then propagates throughout the export process. This makes it possible to use shinylive::export() with asset versions other than the one currently used by default in the package.

The primary use case was to allow me to use the 0.4.1 assets even though the package is currently tied to 0.3.0. I used this to be able to use the preview version of shinylive with the wasm package library before it was officially tied to the package.

With this change assets_version() reports the current default version used by the package. Users may either set assets_version when calling export() or they may use the SHINYLIVE_ASSETS_VERSION envvar to achieve the same thing. The envvar is necessary for CI environments where it's easy to set this variable but hard to provide a version to the right function call, which is hidden from the user inside a GitHub workflow.

Note that setting assets_version is enough, assets_ensure() will find the require assets version and download it as necessary.

We don't currently do minimum version checking; in the future we would still update the default assets version used by the package. If we ever have a breaking change where the r-shinylive package would be incompatible with older versions, we could include a version check in a central place, probably in assets_ensure().

@gadenbuie gadenbuie requested a review from schloerke June 12, 2024 21:12
@gadenbuie gadenbuie merged commit d6121e2 into main Jun 20, 2024
@gadenbuie gadenbuie deleted the feat/export-choose-asset-version branch June 26, 2024 15:10
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

Successfully merging this pull request may close these issues.

2 participants