{"action":"created","comment":{"url":"https://api.github.com/repos/serut/meteor-coverage/pulls/comments/78588922","id":78588922,"diff_hunk":"@@ -1,28 +1,70 @@\n import Log from './../context/log';\n import Conf from './../context/conf';\n import fs from 'fs';\n+import path from 'path';\n \n const istanbulAPI = Npm.require('istanbul-api');\n const libSourceMaps = istanbulAPI.libSourceMaps;\n \n const sourceMap = libSourceMaps.createSourceMapStore({verbose: Conf.IS_COVERAGE_ACTIVE});\n const meteor_dir = Conf.COVERAGE_APP_FOLDER;\n-const regexAlterationSourceMapPath = new RegExp(/(packages\\/)([a-zA-Z-]*)[_:]([a-zA-Z-_]*)(.*)/);\n+// Next RegExps must consider following paths:\n+//  1. meteor://💻app/packages/lmieulet:meteor-coverage/server/index.js\n+//  2. meteor://💻app/.npm/package/node_modules/minimatch/package.json\n+//  3. meteor://💻app/node_modules/meteor/lmieulet:meteor-coverage/node_modules/minimatch/minimatch.js\n+//  4. meteor://💻app/packages/local-test:lmieulet:meteor-coverage/server/tests.js\n+//  5. meteor://💻app/node_modules/meteor/local-test:cgalvarez:my-package/tests/client/mocks.js\n+//  6. meteor://💻app/node_modules/meteor/local-test:cgalvarez:my-package/node_modules/chai-as-promised/lib/chai-as-promised.js\n+const regexAlterationSourceMapPath = new RegExp(/^(packages\\/|node_modules\\/meteor\\/)(?:local-test[_:])?([a-zA-Z-]*)[_:]([a-zA-Z-_]*)(.*)$/);\n+const regexPUT = new RegExp(/packages\\/local-test:([a-zA-Z-_]*):([a-zA-Z-_]*)\\/.*/);\n \n // Alter inside the source map the path of each sources\n alterSourceMapPaths = function (map) {\n   var match;\n+  if (!this.PUT && Meteor.isPackageTest && meteor_dir === `${process.env.PWD}/`) {","path":"server/services/source-map.js","position":25,"original_position":25,"commit_id":"caaf4396647ba8f6fa296b3de5a8d224be09841a","original_commit_id":"caaf4396647ba8f6fa296b3de5a8d224be09841a","user":{"login":"cgalvarez","id":10707639,"avatar_url":"https://avatars.githubusercontent.com/u/10707639?v=3","gravatar_id":"","url":"https://api.github.com/users/cgalvarez","html_url":"https://github.com/cgalvarez","followers_url":"https://api.github.com/users/cgalvarez/followers","following_url":"https://api.github.com/users/cgalvarez/following{/other_user}","gists_url":"https://api.github.com/users/cgalvarez/gists{/gist_id}","starred_url":"https://api.github.com/users/cgalvarez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgalvarez/subscriptions","organizations_url":"https://api.github.com/users/cgalvarez/orgs","repos_url":"https://api.github.com/users/cgalvarez/repos","events_url":"https://api.github.com/users/cgalvarez/events{/privacy}","received_events_url":"https://api.github.com/users/cgalvarez/received_events","type":"User","site_admin":false},"body":"This `if` must be `if (!this.PUT && Meteor.isPackageTest && meteor_dir.replace(/\\/$/, '') === process.env.PWD) {`.\r\n\r\nWhen executing the script `test:packages-coverage-watch`, `meteor_dir` does not contain a trailing slash, which casuses to not detect the PUT. To cover both cases, just use a regex to remove the trailing slash when present and compare it to `process.env.PWD` directly.","created_at":"2016-09-13T15:55:42Z","updated_at":"2016-09-13T15:55:42Z","html_url":"https://github.com/serut/meteor-coverage/pull/30#discussion_r78588922","pull_request_url":"https://api.github.com/repos/serut/meteor-coverage/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/serut/meteor-coverage/pulls/comments/78588922"},"html":{"href":"https://github.com/serut/meteor-coverage/pull/30#discussion_r78588922"},"pull_request":{"href":"https://api.github.com/repos/serut/meteor-coverage/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/serut/meteor-coverage/pulls/30","id":84957904,"html_url":"https://github.com/serut/meteor-coverage/pull/30","diff_url":"https://github.com/serut/meteor-coverage/pull/30.diff","patch_url":"https://github.com/serut/meteor-coverage/pull/30.patch","issue_url":"https://api.github.com/repos/serut/meteor-coverage/issues/30","number":30,"state":"open","locked":false,"title":"Next release","user":{"login":"serut","id":2767218,"avatar_url":"https://avatars.githubusercontent.com/u/2767218?v=3","gravatar_id":"","url":"https://api.github.com/users/serut","html_url":"https://github.com/serut","followers_url":"https://api.github.com/users/serut/followers","following_url":"https://api.github.com/users/serut/following{/other_user}","gists_url":"https://api.github.com/users/serut/gists{/gist_id}","starred_url":"https://api.github.com/users/serut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serut/subscriptions","organizations_url":"https://api.github.com/users/serut/orgs","repos_url":"https://api.github.com/users/serut/repos","events_url":"https://api.github.com/users/serut/events{/privacy}","received_events_url":"https://api.github.com/users/serut/received_events","type":"User","site_admin":false},"body":"My bad, something is wrong with the default `coverage.json` file now.  \r\nOtherwise, it looks stable so far.","created_at":"2016-09-12T22:43:41Z","updated_at":"2016-09-13T15:55:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40c1cc7006e28e2180522df03bea8adf7937fb0a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/serut/meteor-coverage/pulls/30/commits","review_comments_url":"https://api.github.com/repos/serut/meteor-coverage/pulls/30/comments","review_comment_url":"https://api.github.com/repos/serut/meteor-coverage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/serut/meteor-coverage/issues/30/comments","statuses_url":"https://api.github.com/repos/serut/meteor-coverage/statuses/caaf4396647ba8f6fa296b3de5a8d224be09841a","head":{"label":"serut:dev-1.0.0","ref":"dev-1.0.0","sha":"caaf4396647ba8f6fa296b3de5a8d224be09841a","user":{"login":"serut","id":2767218,"avatar_url":"https://avatars.githubusercontent.com/u/2767218?v=3","gravatar_id":"","url":"https://api.github.com/users/serut","html_url":"https://github.com/serut","followers_url":"https://api.github.com/users/serut/followers","following_url":"https://api.github.com/users/serut/following{/other_user}","gists_url":"https://api.github.com/users/serut/gists{/gist_id}","starred_url":"https://api.github.com/users/serut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serut/subscriptions","organizations_url":"https://api.github.com/users/serut/orgs","repos_url":"https://api.github.com/users/serut/repos","events_url":"https://api.github.com/users/serut/events{/privacy}","received_events_url":"https://api.github.com/users/serut/received_events","type":"User","site_admin":false},"repo":{"id":54708593,"name":"meteor-coverage","full_name":"serut/meteor-coverage","owner":{"login":"serut","id":2767218,"avatar_url":"https://avatars.githubusercontent.com/u/2767218?v=3","gravatar_id":"","url":"https://api.github.com/users/serut","html_url":"https://github.com/serut","followers_url":"https://api.github.com/users/serut/followers","following_url":"https://api.github.com/users/serut/following{/other_user}","gists_url":"https://api.github.com/users/serut/gists{/gist_id}","starred_url":"https://api.github.com/users/serut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serut/subscriptions","organizations_url":"https://api.github.com/users/serut/orgs","repos_url":"https://api.github.com/users/serut/repos","events_url":"https://api.github.com/users/serut/events{/privacy}","received_events_url":"https://api.github.com/users/serut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/serut/meteor-coverage","description":"Server and client coverage for Meteor","fork":false,"url":"https://api.github.com/repos/serut/meteor-coverage","forks_url":"https://api.github.com/repos/serut/meteor-coverage/forks","keys_url":"https://api.github.com/repos/serut/meteor-coverage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serut/meteor-coverage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serut/meteor-coverage/teams","hooks_url":"https://api.github.com/repos/serut/meteor-coverage/hooks","issue_events_url":"https://api.github.com/repos/serut/meteor-coverage/issues/events{/number}","events_url":"https://api.github.com/repos/serut/meteor-coverage/events","assignees_url":"https://api.github.com/repos/serut/meteor-coverage/assignees{/user}","branches_url":"https://api.github.com/repos/serut/meteor-coverage/branches{/branch}","tags_url":"https://api.github.com/repos/serut/meteor-coverage/tags","blobs_url":"https://api.github.com/repos/serut/meteor-coverage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serut/meteor-coverage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serut/meteor-coverage/git/refs{/sha}","trees_url":"https://api.github.com/repos/serut/meteor-coverage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serut/meteor-coverage/statuses/{sha}","languages_url":"https://api.github.com/repos/serut/meteor-coverage/languages","stargazers_url":"https://api.github.com/repos/serut/meteor-coverage/stargazers","contributors_url":"https://api.github.com/repos/serut/meteor-coverage/contributors","subscribers_url":"https://api.github.com/repos/serut/meteor-coverage/subscribers","subscription_url":"https://api.github.com/repos/serut/meteor-coverage/subscription","commits_url":"https://api.github.com/repos/serut/meteor-coverage/commits{/sha}","git_commits_url":"https://api.github.com/repos/serut/meteor-coverage/git/commits{/sha}","comments_url":"https://api.github.com/repos/serut/meteor-coverage/comments{/number}","issue_comment_url":"https://api.github.com/repos/serut/meteor-coverage/issues/comments{/number}","contents_url":"https://api.github.com/repos/serut/meteor-coverage/contents/{+path}","compare_url":"https://api.github.com/repos/serut/meteor-coverage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serut/meteor-coverage/merges","archive_url":"https://api.github.com/repos/serut/meteor-coverage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serut/meteor-coverage/downloads","issues_url":"https://api.github.com/repos/serut/meteor-coverage/issues{/number}","pulls_url":"https://api.github.com/repos/serut/meteor-coverage/pulls{/number}","milestones_url":"https://api.github.com/repos/serut/meteor-coverage/milestones{/number}","notifications_url":"https://api.github.com/repos/serut/meteor-coverage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serut/meteor-coverage/labels{/name}","releases_url":"https://api.github.com/repos/serut/meteor-coverage/releases{/id}","deployments_url":"https://api.github.com/repos/serut/meteor-coverage/deployments","created_at":"2016-03-25T09:19:59Z","updated_at":"2016-09-13T07:49:14Z","pushed_at":"2016-09-13T10:54:39Z","git_url":"git://github.com/serut/meteor-coverage.git","ssh_url":"git@github.com:serut/meteor-coverage.git","clone_url":"https://github.com/serut/meteor-coverage.git","svn_url":"https://github.com/serut/meteor-coverage","homepage":"","size":155,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":15,"default_branch":"master"}},"base":{"label":"serut:master","ref":"master","sha":"10294585a22377cd411b0b1166c06563ef1f3b7b","user":{"login":"serut","id":2767218,"avatar_url":"https://avatars.githubusercontent.com/u/2767218?v=3","gravatar_id":"","url":"https://api.github.com/users/serut","html_url":"https://github.com/serut","followers_url":"https://api.github.com/users/serut/followers","following_url":"https://api.github.com/users/serut/following{/other_user}","gists_url":"https://api.github.com/users/serut/gists{/gist_id}","starred_url":"https://api.github.com/users/serut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serut/subscriptions","organizations_url":"https://api.github.com/users/serut/orgs","repos_url":"https://api.github.com/users/serut/repos","events_url":"https://api.github.com/users/serut/events{/privacy}","received_events_url":"https://api.github.com/users/serut/received_events","type":"User","site_admin":false},"repo":{"id":54708593,"name":"meteor-coverage","full_name":"serut/meteor-coverage","owner":{"login":"serut","id":2767218,"avatar_url":"https://avatars.githubusercontent.com/u/2767218?v=3","gravatar_id":"","url":"https://api.github.com/users/serut","html_url":"https://github.com/serut","followers_url":"https://api.github.com/users/serut/followers","following_url":"https://api.github.com/users/serut/following{/other_user}","gists_url":"https://api.github.com/users/serut/gists{/gist_id}","starred_url":"https://api.github.com/users/serut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serut/subscriptions","organizations_url":"https://api.github.com/users/serut/orgs","repos_url":"https://api.github.com/users/serut/repos","events_url":"https://api.github.com/users/serut/events{/privacy}","received_events_url":"https://api.github.com/users/serut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/serut/meteor-coverage","description":"Server and client coverage for Meteor","fork":false,"url":"https://api.github.com/repos/serut/meteor-coverage","forks_url":"https://api.github.com/repos/serut/meteor-coverage/forks","keys_url":"https://api.github.com/repos/serut/meteor-coverage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serut/meteor-coverage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serut/meteor-coverage/teams","hooks_url":"https://api.github.com/repos/serut/meteor-coverage/hooks","issue_events_url":"https://api.github.com/repos/serut/meteor-coverage/issues/events{/number}","events_url":"https://api.github.com/repos/serut/meteor-coverage/events","assignees_url":"https://api.github.com/repos/serut/meteor-coverage/assignees{/user}","branches_url":"https://api.github.com/repos/serut/meteor-coverage/branches{/branch}","tags_url":"https://api.github.com/repos/serut/meteor-coverage/tags","blobs_url":"https://api.github.com/repos/serut/meteor-coverage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serut/meteor-coverage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serut/meteor-coverage/git/refs{/sha}","trees_url":"https://api.github.com/repos/serut/meteor-coverage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serut/meteor-coverage/statuses/{sha}","languages_url":"https://api.github.com/repos/serut/meteor-coverage/languages","stargazers_url":"https://api.github.com/repos/serut/meteor-coverage/stargazers","contributors_url":"https://api.github.com/repos/serut/meteor-coverage/contributors","subscribers_url":"https://api.github.com/repos/serut/meteor-coverage/subscribers","subscription_url":"https://api.github.com/repos/serut/meteor-coverage/subscription","commits_url":"https://api.github.com/repos/serut/meteor-coverage/commits{/sha}","git_commits_url":"https://api.github.com/repos/serut/meteor-coverage/git/commits{/sha}","comments_url":"https://api.github.com/repos/serut/meteor-coverage/comments{/number}","issue_comment_url":"https://api.github.com/repos/serut/meteor-coverage/issues/comments{/number}","contents_url":"https://api.github.com/repos/serut/meteor-coverage/contents/{+path}","compare_url":"https://api.github.com/repos/serut/meteor-coverage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serut/meteor-coverage/merges","archive_url":"https://api.github.com/repos/serut/meteor-coverage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serut/meteor-coverage/downloads","issues_url":"https://api.github.com/repos/serut/meteor-coverage/issues{/number}","pulls_url":"https://api.github.com/repos/serut/meteor-coverage/pulls{/number}","milestones_url":"https://api.github.com/repos/serut/meteor-coverage/milestones{/number}","notifications_url":"https://api.github.com/repos/serut/meteor-coverage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serut/meteor-coverage/labels{/name}","releases_url":"https://api.github.com/repos/serut/meteor-coverage/releases{/id}","deployments_url":"https://api.github.com/repos/serut/meteor-coverage/deployments","created_at":"2016-03-25T09:19:59Z","updated_at":"2016-09-13T07:49:14Z","pushed_at":"2016-09-13T10:54:39Z","git_url":"git://github.com/serut/meteor-coverage.git","ssh_url":"git@github.com:serut/meteor-coverage.git","clone_url":"https://github.com/serut/meteor-coverage.git","svn_url":"https://github.com/serut/meteor-coverage","homepage":"","size":155,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/serut/meteor-coverage/pulls/30"},"html":{"href":"https://github.com/serut/meteor-coverage/pull/30"},"issue":{"href":"https://api.github.com/repos/serut/meteor-coverage/issues/30"},"comments":{"href":"https://api.github.com/repos/serut/meteor-coverage/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/serut/meteor-coverage/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/serut/meteor-coverage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/serut/meteor-coverage/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/serut/meteor-coverage/statuses/caaf4396647ba8f6fa296b3de5a8d224be09841a"}}}}
{"actor":{"display_login":"cgalvarez"}}