Skip to content

Commit fdae737

Browse files
committed
Touch #562: update changelog, docs, add code note.
1 parent b6316b8 commit fdae737

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 4.0.3
2+
3+
_New Features:_
4+
5+
- Added support for absolute paths in the `HIGHCHARTS_CACHE_PATH` option [(#562)](https://github.com/highcharts/node-export-server/issues/562)
6+
17
# 4.0.2
28

39
_Hotfix_:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ These variables are set in your environment and take precedence over options fro
291291
- `HIGHCHARTS_MODULE_SCRIPTS`: Highcharts module scripts to fetch (defaults to ``).
292292
- `HIGHCHARTS_INDICATOR_SCRIPTS`: Highcharts indicator scripts to fetch (defaults to ``).
293293
- `HIGHCHARTS_FORCE_FETCH`: The flag that determines whether to refetch all scripts after each server rerun (defaults to `false`).
294-
- `HIGHCHARTS_CACHE_PATH`: In which directory should the fetched Highcharts scripts be placed (defaults to `.cache`).
294+
- `HIGHCHARTS_CACHE_PATH`: In which directory should the fetched Highcharts scripts be placed (defaults to `.cache`). Since v4.0.3 can be either absolute or relative path.
295295
- `HIGHCHARTS_ADMIN_TOKEN`: An authentication token that is required to switch the Highcharts version on the server at runtime (defaults to ``).
296296

297297
### Export Config

lib/cache.js

+1
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ export const checkAndUpdateCache = async (options) => {
396396
export const getCachePath = () => {
397397
const cachePathOption = getOptions().highcharts.cachePath;
398398

399+
// issue #562: support for absolute paths
399400
return isAbsolute(cachePathOption)
400401
? cachePathOption
401402
: join(__dirname, cachePathOption);

lib/highcharts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export async function triggerExport(chartOptions, options, displayErrors) {
9595
const userOptions = options.export.strInj
9696
? new Function(`return ${options.export.strInj}`)()
9797
: chartOptions;
98-
98+
9999
// Trigger custom code
100100
if (options.customLogic.customCode) {
101101
new Function('options', options.customLogic.customCode)(userOptions);

0 commit comments

Comments
 (0)