Skip to content

fix: add web versioning#60

Open
Jo-Byr wants to merge 1 commit into
masterfrom
web-versioning
Open

fix: add web versioning#60
Jo-Byr wants to merge 1 commit into
masterfrom
web-versioning

Conversation

@Jo-Byr

@Jo-Byr Jo-Byr commented May 22, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Jo-Byr Jo-Byr requested a review from jourdain May 22, 2026 10:05
@Jo-Byr Jo-Byr self-assigned this May 22, 2026
USER_PROVIDED_ES_SCRIPTS_DIR_PATH = USER_PROVIDED_SCRIPTS_DIR_PATH / "es"
USER_PROVIDED_SCRIPTS_SERVE_URL_PREFIX = Path("__trame_client_external_scripts")
USER_PROVIDED_SCRIPTS_SERVE_URL_PREFIX = Path(
f"__trame_client_external_scripts_{__version__}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The external scripts are independent of the version of trame_client. So no need to have version in the URL.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For external script if you want to prevent caching you can generate sha like we do in that file https://github.com/Kitware/trame-client/blob/master/trame_client/utils/web_module.py

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So then is there anything to web version ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normally the digest should already be used to enable appropriate caching/cache invalidation on file change. So I do not think there is something to be done here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version of trame-client should not affect the file your app serve as external script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this, but doesn't this mean that there are no files to version for trame-client ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, the root directory (www) is the client code for the current version...

@jourdain jourdain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add version in that URL path

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.

3 participants