Skip to content

Commit

Permalink
update vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Sep 25, 2024
1 parent d45c855 commit 66ac0f0
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/converter/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {
} = require('../utils/dedupe.js');
const { getSourceType, initSourceMapSourcesPath } = require('../utils/source-path.js');

const { decode } = require('@jridgewell/sourcemap-codec');
const { decode } = require('../packages/monocart-coverage-vendor.js');

const InfoBranch = require('./info-branch.js');
const InfoFunction = require('./info-function.js');
Expand Down
2 changes: 1 addition & 1 deletion lib/converter/flatten-source-maps.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { decode } = require('@jridgewell/sourcemap-codec');
const { decode } = require('../packages/monocart-coverage-vendor.js');

const COLUMN = 0;
const SOURCES_INDEX = 1;
Expand Down
2 changes: 1 addition & 1 deletion lib/v8/v8.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const EC = require('eight-colors');
const { mergeScriptCovs } = require('@bcoe/v8-coverage');
const { mergeScriptCovs } = require('../packages/monocart-coverage-vendor.js');
const Util = require('../utils/util.js');
const { getV8Summary } = require('./v8-summary.js');
const { dedupeFlatRanges } = require('../utils/dedupe.js');
Expand Down
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
"url": "git+https://github.com/cenfun/monocart-coverage-reports.git"
},
"dependencies": {
"@bcoe/v8-coverage": "^0.2.3",
"@jridgewell/sourcemap-codec": "^1.5.0",
"acorn": "^8.12.1",
"acorn-loose": "^8.4.0",
"acorn-walk": "^8.3.4",
Expand All @@ -90,6 +88,8 @@
"monocart-locator": "^1.0.2"
},
"devDependencies": {
"@bcoe/v8-coverage": "^0.2.3",
"@jridgewell/sourcemap-codec": "^1.5.0",
"async-tick": "^1.0.0",
"convert-source-map": "^2.0.0",
"diff-sequences": "^29.6.3",
Expand Down
13 changes: 13 additions & 0 deletions packages/vendor/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/**
* there is performance issue if adding acorn: https://github.com/cenfun/monocart-coverage-reports/issues/47
*
*/

import * as convertSourceMap from 'convert-source-map';

import { decode } from '@jridgewell/sourcemap-codec';

import { mergeScriptCovs } from '@bcoe/v8-coverage';

import parseCss from 'postcss/lib/parse';

import WebSocket from 'ws';
Expand All @@ -19,6 +28,10 @@ export {

convertSourceMap,

decode,

mergeScriptCovs,

parseCss,

WebSocket,
Expand Down

0 comments on commit 66ac0f0

Please sign in to comment.