Skip to content

Commit

Permalink
move acorn out of vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jul 8, 2024
1 parent 708d8d8 commit f60adee
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 25 deletions.
6 changes: 3 additions & 3 deletions lib/converter/ast.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const {
acorn, acornLoose, parseCss
} = require('../packages/monocart-coverage-vendor.js');
const acorn = require('acorn');
const acornLoose = require('acorn-loose');
const { parseCss } = require('../packages/monocart-coverage-vendor.js');
const Util = require('../utils/util.js');

const { collectAstInfo } = require('./ast-visitor.js');
Expand Down
6 changes: 3 additions & 3 deletions lib/utils/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const Share = require('../platform/share.js');
const request = require('./request.js');
const { deflateSync } = require('lz-utils');

const {
acornWalk, findUpSync, supportsColor
} = require('../packages/monocart-coverage-vendor.js');
const acornWalk = require('acorn-walk');

const { findUpSync, supportsColor } = require('../packages/monocart-coverage-vendor.js');

// https://github.com/chalk/supports-color
// disabled color if Terminal stdout does not support color
Expand Down
14 changes: 6 additions & 8 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"url": "git+https://github.com/cenfun/monocart-coverage-reports.git"
},
"dependencies": {
"acorn": "^8.12.1",
"acorn-loose": "^8.4.0",
"acorn-walk": "^8.3.3",
"console-grid": "^2.2.2",
"eight-colors": "^1.3.0",
"istanbul-lib-coverage": "^3.2.2",
Expand Down
4 changes: 1 addition & 3 deletions packages/vendor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
"devDependencies": {
"@bcoe/v8-coverage": "^0.2.3",
"@jridgewell/sourcemap-codec": "^1.4.15",
"acorn-loose": "^8.4.0",
"acorn-walk": "^8.3.3",
"convert-source-map": "^2.0.0",
"diff-sequences": "^29.6.3",
"postcss": "^8.4.39"
},
"platform": "node"
}
}
8 changes: 0 additions & 8 deletions packages/vendor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import { decode } from '@jridgewell/sourcemap-codec';

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

import * as acorn from 'acorn';
import * as acornLoose from 'acorn-loose';
import * as acornWalk from 'acorn-walk';

import parseCss from 'postcss/lib/parse';

import { minimatch } from 'minimatch';
Expand All @@ -28,10 +24,6 @@ export {

mergeScriptCovs,

acorn,
acornLoose,
acornWalk,

parseCss,

minimatch,
Expand Down

0 comments on commit f60adee

Please sign in to comment.