Is your feature request related to a problem? Please describe.
No. Feature request.
I'd like the version of the lib easily exposed to consumers.
Describe the solution you'd like
I'd like lib/axios.js to add the following:
var VERSION = require('./env/data').version;
// ...
axios.VERSION = VERSION;
Describe alternatives you've considered
Without this, I'm forced to dig around in node_modules trying to find axios/package.json or hard code the version in my code and hope it stays in sync.
Additional context
My primary use is for constructing a user-agent header, I'd prefer to include axios and it's version.
When writing apps that call between my services, I find debugging is easier when I can include a proper user agent header.
const defaultUA = `MyOrg MyService/${pkg.version} (Axios/${axios.VERSION} Node/${process.versions.node})`;
const instance = axios.create({
// ...opts
headers: { 'User-Agent': defaultUA }
});
Is your feature request related to a problem? Please describe.
No. Feature request.
I'd like the version of the lib easily exposed to consumers.
Describe the solution you'd like
I'd like
lib/axios.jsto add the following:Describe alternatives you've considered
Without this, I'm forced to dig around in
node_modulestrying to findaxios/package.jsonor hard code the version in my code and hope it stays in sync.Additional context
My primary use is for constructing a user-agent header, I'd prefer to include axios and it's version.
When writing apps that call between my services, I find debugging is easier when I can include a proper user agent header.