Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use absolute file paths in coverage #164

Merged
merged 1 commit into from
Feb 13, 2016

Conversation

novemberborn
Copy link
Contributor

Pass an absolute path to the instrumenter. This results in the coverage containing absolute paths.

Adjust caching and source map logic to use absolute paths. Rename variables.

The change to the source map logic should let it handle source map sources that have absolute paths. Before these were joined to the file path, now the new path is resolved instead.

Fixes #110.

@novemberborn
Copy link
Contributor Author

And of course this broke a whole bunch of Windows tests. Will fix tomorrow.

Also, weirdly, Travis doesn't seem to have picked up on this PR yet.

@bcoe
Copy link
Member

bcoe commented Feb 8, 2016

@novemberborn womp womp, Travis has been running very slowly during the day.

Thanks for tackling these difficult file path edge-cases, great work. I'm working on getting a major release of yargs out the door (which has some features I want for nyc) then I will be concentrating on getting a few releases of nyc out the door.

@novemberborn
Copy link
Contributor Author

@bcoe no worries. Maybe this is a good time to point out https://github.com/bcoe/nyc/blob/89098dbbcfe5880c152cba70c3100063c8ba99a9/package.json#L51:L60 is outdated? 😜

@novemberborn novemberborn force-pushed the absolute-coverage-paths branch from fe2d7ab to d0b7b86 Compare February 9, 2016 15:32
Pass an absolute path to the instrumenter. This results in the coverage
containing absolute paths.

Adjust caching and source map logic to use absolute paths. Rename variables.

The change to the source map logic should let it handle source map sources that
have absolute paths. Before these were joined to the file path, now the new path
is resolved instead.
@novemberborn novemberborn force-pushed the absolute-coverage-paths branch from d0b7b86 to 1d53f10 Compare February 9, 2016 16:48
@novemberborn
Copy link
Contributor Author

@bcoe tests pass now.

@bcoe
Copy link
Member

bcoe commented Feb 11, 2016

@novemberborn 👍 I've been pretty swamped this week, but will get a release of nyc out first thing this weekend.

bcoe added a commit that referenced this pull request Feb 13, 2016
@bcoe bcoe merged commit 9fb7da4 into istanbuljs:master Feb 13, 2016
@novemberborn novemberborn deleted the absolute-coverage-paths branch February 13, 2016 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative paths in the coverage file are in violation of istanbul spec
2 participants