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

Fix more SourceMaps issues #34

Merged
merged 1 commit into from
Sep 19, 2016
Merged

Fix more SourceMaps issues #34

merged 1 commit into from
Sep 19, 2016

Conversation

cgalvarez
Copy link

Description

PR which fixes some more issues found during testing:

  • Now covers four new source pattern (package.json of app NPM dependency).
  • Now covers the 5 permutations for executing meteor test-packages that result from combining location (executing from inside/outside a package folder) and package quantity (passing the package location or ID). All the possibilites are documented inside SourceMap.initialSetup(). 🤘
  • Now tested successfully with meteor-coverage-app-exemple too. :hurtrealbad:
  • Now covers case of package without author (like somepkg in meteor-coverage-app-exemple).
  • Fix two patterns that were previously detected but not tested (previously only tested with meteor-coverage, so I didn't test the two specific patterns of my package).
    • I've made a PR to meteor-coverage-app-exemple to cover these cases without the need to test with my own package.
  • Fix an issue with paths of NPM recursive dependencies.
  • Now skip templates paths since they are embedded in map.sourcesContent (warned through console when verbosity is enabled). Examples:
    • meteor://💻app/imports/ui/components/template.lists-show.js
    • meteor://💻app/imports/ui/components/template.todos-item.js
    • meteor://💻app/imports/ui/pages/template.app-not-found.js
    • meteor://💻app/imports/ui/pages/template.lists-show-page.js

Motivation and Context

Solves more issues with SourceMaps sources.

How Has This Been Tested?

Tested with meteor-coverage and meteor-coverage-app-exemple.

Testing environment:

Tests run and related ouputs (attached):

  • meteor-coverage$ meteor npm run test > output.txt
  • meteor-coverage-app-exemple$ meteor npm run coverage-app-unit > output.txt
  • meteor-coverage-app-exemple$ meteor npm run coverage-app-full > output.txt
  • meteor-coverage-app-exemple$ meteor npm run coverage-packages-mocha > output.txt

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@cgalvarez cgalvarez mentioned this pull request Sep 18, 2016
@codecov-io
Copy link

codecov-io commented Sep 18, 2016

Current coverage is 75.44% (diff: 83.01%)

Merging #34 into dev-1.0.0 will decrease coverage by 0.16%

@@           dev-1.0.0        #34   diff @@
===========================================
  Files             22         22          
  Lines            779        794    +15   
  Methods            0          0          
  Messages           0          0          
  Branches           0          0          
===========================================
+ Hits             589        599    +10   
- Misses           190        195     +5   
  Partials           0          0          

Powered by Codecov. Last update 3e6df35...f543a40

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 75.441% when pulling 1ee150b on cgalvarez:dev-1.0.0-more_fix_source_maps into 3e6df35 on serut:dev-1.0.0.

filepath.startsWith('../web.browser/') || filepath.startsWith(abspath.clientSide));
Log.info('Add source map for file', sourceMapPath);
sourceMap.registerMap(filepath, fileContent);
Log.timeEnd('END registerSourceMap', filepath);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string passed to console.time and console.timeEnd needs to be the same. Otherwise the CI looks promising !

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pity, since it improved (my) experience reading the outputs (because it groups all the info about SourceMaps betweetn START/END). Does it have something to do with the CI? Log.time and Log.timeEnd only output to the console in server/conf/log.js. Nevertheless, I'm changing it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log.time (string1) starts a countdown and prints nothing whereas Log.timeEnd(string1) stop the countdown and prints string1 + the corresponding time lapse

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 75.441% when pulling f543a40 on cgalvarez:dev-1.0.0-more_fix_source_maps into 3e6df35 on serut:dev-1.0.0.

@cgalvarez
Copy link
Author

Change requested done 😉

@serut
Copy link
Owner

serut commented Sep 19, 2016

Feel free to push that commit

@cgalvarez
Copy link
Author

I did a rebase this morning right after your comment, that's why it appears as a unique commit, but the change you requested is pushed. Check at Files Changed tab. What I don't know is why your review does not update... 😕

@serut
Copy link
Owner

serut commented Sep 19, 2016

I was redoing tests by myself before seeing that you attached logs to your pull request. Great work @cgalvarez . It looks perfect so far ! 🍸

@serut serut merged commit f543a40 into serut:dev-1.0.0 Sep 19, 2016
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.

None yet

4 participants