plotly / orca

Command line application for generating static images of interactive plotly charts
MIT License
296 stars 39 forks source link

Send plotly.js version in HTTP header #204

Open antoinerg opened 5 years ago

antoinerg commented 5 years ago

It might be useful to know which version of plotly.js is used by a given Orca server. This information could be passed as an HTTP header.

antoinerg commented 5 years ago

As pointed out by @etpinard, anything built off of plotly.js' master branch will have the same version number (ie. the one from the latest release). We should probably append the cryptographic hash of the library to its version number to be completely unambiguous.

etpinard commented 5 years ago

@antoinerg here's how we currently do things:

update_version.js gets called during npm run preprocess which get called during npm run build which gets called during the npm version task - just after the version gets bumped in the package.json.

So I'm thinking there must be a way to detect whether npm run preprocess (or by passing an argument) is called during npm version or a plain npm run build (like on CI).