Permalink
Browse files

Allow for relative paths in YUI loader hook, update version/ README

  • Loading branch information...
1 parent f67f6e7 commit 35bbd3d5f958b2da8a7929e0e7f1e22c09255422 @gotwarlost gotwarlost committed Dec 11, 2012
Showing with 5 additions and 3 deletions.
  1. +1 −0 README.md
  2. +3 −2 lib/util/yui-load-hook.js
  3. +1 −1 package.json
View
@@ -153,6 +153,7 @@ Changelog
---------
<table>
+<tr><td>v0.1.25</td><td>Allow for relative paths in the YUI loader hook</td></tr>
<tr><td>v0.1.24</td><td>Add lcov summaries. Fixes issue #20</td></tr>
<tr><td>v0.1.23</td><td>Add ability to save a baseline coverage file for the instrument command. Fixes issue #19</td></tr>
<tr><td>v0.1.22</td><td>Add signature attribute to cobertura method tags to fix NPE by the Hudson publisher</td></tr>
@@ -5,7 +5,8 @@
//EXPERIMENTAL code: do not rely on this in anyway until the docs say it is allowed
-var yuiRegexp = /yui-nodejs\.js$/;
+var path = require('path'),
+ yuiRegexp = /yui-nodejs\.js$/;
module.exports = {
getPostLoadHook: function (matchFn, transformFn, verbose) {
@@ -27,7 +28,7 @@ module.exports = {
loaderFn.call(null, Y);
origGet = Y.Get._exec;
Y.Get._exec = function (data, url, cb) {
- if (matchFn(url)) {
+ if (matchFn(url) || matchFn(path.resolve(url))) { //allow for relative paths as well
if (verbose) {
console.log('Transforming [' + url + ']');
}
View
@@ -1,6 +1,6 @@
{
"name": "istanbul",
- "version": "0.1.24",
+ "version": "0.1.25",
"description": "Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale",
"keywords": [ "coverage", "code coverage", "JS code coverage", "JS coverage" ],
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",

0 comments on commit 35bbd3d

Please sign in to comment.