Installations
npm install karma-source-map-support
Releases
Unable to fetch releases
Developer
tschaub
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
10.10.0
NPM Version
6.4.1
Statistics
33 Stars
30 Commits
5 Forks
4 Watching
20 Branches
4 Contributors
Updated on 22 Aug 2023
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
533,068,733
Last day
-2.8%
523,823
Compared to previous day
Last week
2.5%
2,705,153
Compared to previous week
Last month
7.7%
11,292,623
Compared to previous month
Last year
10.7%
122,970,218
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
2
karma-source-map-support
Karma plugin for inline sourcemap support.
Motivation
When loading Browserify bundles with inline source maps (via karma-browserify
), the stack traces in Chrome don't mention the original modules. This plugin uses source-map-support
to improve the situation.
Use
Install the plugin with npm
:
npm install --save-dev karma-source-map-support
Configure Karma to load the plugin as a framework:
1module.exports = function(config) { 2 config.set({ 3 frameworks: ['source-map-support'] 4 // additional settings here ... 5 }); 6};
Example
The config settings below are a complete example using Mocha and Browserify with source map support:
1module.exports = function(config) { 2 config.set({ 3 frameworks: ['browserify', 'source-map-support', 'mocha'], 4 files: [ 5 'src/**/*.test.js' 6 ], 7 preprocessors: { 8 'src/**/*.test.js': ['browserify'] 9 }, 10 browsers: ['PhantomJS'], 11 singleRun: false, 12 browserify: { 13 debug: true // include inline source maps 14 } 15 }); 16};
Sample stack trace without this plugin:
AssertionError: case 2: expected [ 0, 0.6666666666666666 ] to deeply equal [ 0, 0.5 ]
at Function.assert.deepEqual (http://localhost:9876/absolute/var/folders/6m/3grlt52x7w3047wy0n6j7dr00000gn/T/2d4c510ad9122153a42db199d1cc8e9553208184.browserify:1848:32)
at Context.<anonymous> (http://localhost:9876/absolute/var/folders/6m/3grlt52x7w3047wy0n6j7dr00000gn/T/2d4c510ad9122153a42db199d1cc8e9553208184.browserify:6061:14)
at callFn (http://localhost:9876/base/node_modules/mocha/mocha.js:4496:21)
at Test.Runnable.run (http://localhost:9876/base/node_modules/mocha/mocha.js:4489:7)
at Runner.runTest (http://localhost:9876/base/node_modules/mocha/mocha.js:4892:10)
at http://localhost:9876/base/node_modules/mocha/mocha.js:4970:12
at next (http://localhost:9876/base/node_modules/mocha/mocha.js:4817:14)
at http://localhost:9876/base/node_modules/mocha/mocha.js:4827:7
at next (http://localhost:9876/base/node_modules/mocha/mocha.js:4766:23)
at http://localhost:9876/base/node_modules/mocha/mocha.js:4794:5
Sample stack trace with this plugin:
AssertionError: case 2: expected [ 0, 0.6666666666666666 ] to deeply equal [ 0, 0.5 ]
at Function.assert.deepEqual (node_modules/chai/lib/chai/interface/assert.js:205:1)
at Context.<anonymous> (src/scenes/util/geom.test.js:27:1)
at callFn (http://localhost:9876/base/node_modules/mocha/mocha.js:4496:21)
at Test.Runnable.run (http://localhost:9876/base/node_modules/mocha/mocha.js:4489:7)
at Runner.runTest (http://localhost:9876/base/node_modules/mocha/mocha.js:4892:10)
at http://localhost:9876/base/node_modules/mocha/mocha.js:4970:12
at next (http://localhost:9876/base/node_modules/mocha/mocha.js:4817:14)
at http://localhost:9876/base/node_modules/mocha/mocha.js:4827:7
at next (http://localhost:9876/base/node_modules/mocha/mocha.js:4766:23)
at http://localhost:9876/base/node_modules/mocha/mocha.js:4794:5
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 3/19 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 19 are checked with a SAST tool
Reason
17 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-3gx7-xhv7-5mx3
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
Score
2.1
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More