From 13fa711ded1c7459a989c8962589b302089f3771 Mon Sep 17 00:00:00 2001 From: Julian Date: Wed, 28 Oct 2015 20:31:12 +0100 Subject: [PATCH] correctly generate version export in main library since npm@3, node_modules directory might be flattened out. Since version is supposed to be the version of the "to" library, getVersion should explicitly provide the package.json of the project, instead of relying on handy to determine the correct one. This fixes https://github.com/assemble/handlebars-helpers/issues/199 --- lib/to.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/to.js b/lib/to.js index 2475182..3501561 100644 --- a/lib/to.js +++ b/lib/to.js @@ -73,5 +73,5 @@ exports.stringify = function(doc) { /* Version of this lib */ -exports.version = handy.getVersion(); +exports.version = handy.getVersion(path.join(__dirname, 'package.json'));