Skip to content

Commit

Permalink
chore: repo overall update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 2, 2024
1 parent 5ef6b9d commit 678dbde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion plugins/babel-plugin-canyon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-canyon",
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "",
"scripts": {
"release": "babel src --extensions \".ts\" --out-dir lib",
Expand Down
18 changes: 10 additions & 8 deletions plugins/babel-plugin-canyon/src/visitor-program-exit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import {uploaderCoverageData} from "./helpers/uploader-coverage-data";
// 关键参数 serviceParams ,它由 detectProvider 函数返回,手动设置的参数优先级高于 CI/CD 提供商
export const visitorProgramExit = (api,path,serviceParams) => {
// 生成初始覆盖率数据
const cov = generateInitialCoverage(generate(path.node).code)
uploaderCoverageData(cov,{
DSN: serviceParams.dsn,
COMMIT_SHA: serviceParams.sha,
PROJECT_ID: serviceParams.projectID,
REPORTER: 'test',
INSTRUMENT_CWD: serviceParams.instrumentCwd,
})
generateInitialCoverage(generate(path.node).code)

// 放弃上传覆盖率数据,强制流水线上报
// uploaderCoverageData(cov,{
// DSN: serviceParams.dsn,
// COMMIT_SHA: serviceParams.sha,
// PROJECT_ID: serviceParams.projectID,
// REPORTER: 'test',
// INSTRUMENT_CWD: serviceParams.instrumentCwd,
// })
if (generate(path.node).code.includes('coverageData')) {
const t = api.types;
// 遍历 Program 中的所有节点
Expand Down

0 comments on commit 678dbde

Please sign in to comment.