-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Allen Zhang (张涛)
committed
Nov 7, 2024
1 parent
d8063b5
commit e2b1b15
Showing
9 changed files
with
58 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,6 @@ jobs: | |
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | ||
- run: | | ||
pnpm dist-tag add [email protected].80 latest | ||
pnpm dist-tag add [email protected].86 latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "babel-plugin-canyon", | ||
"version": "1.8.78-beta.22", | ||
"version": "1.8.86", | ||
"description": "A Babel plugin cooperates with istanbul to report the coverage", | ||
"author": "Allen Zhang <[email protected]>", | ||
"license": "MIT", | ||
|
1 change: 0 additions & 1 deletion
1
plugins/babel-plugin-canyon/src/helpers/extract-coverage-data.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 13 additions & 13 deletions
26
plugins/babel-plugin-canyon/src/helpers/generate-initial-coverage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import fs from 'fs'; | ||
import path from 'path' | ||
// import fs from 'fs'; | ||
// import path from 'path' | ||
import {extractCoverageData} from "./extract-coverage-data"; | ||
|
||
|
||
export const generateInitialCoverage = (paramsPath) => { | ||
const initialCoverageDataForTheCurrentFile = extractCoverageData(paramsPath) | ||
const filePath = './.canyon_output/coverage-final.json'; | ||
const dir = path.dirname(filePath); | ||
if (!fs.existsSync(dir)) { | ||
fs.mkdirSync(dir, {recursive: true}); | ||
} | ||
// 防止返回的数据为空 | ||
if (initialCoverageDataForTheCurrentFile && initialCoverageDataForTheCurrentFile.path) { | ||
fs.writeFileSync(`./.canyon_output/coverage-${Math.random()}.json`, JSON.stringify({ | ||
[initialCoverageDataForTheCurrentFile.path]: initialCoverageDataForTheCurrentFile | ||
}, null, 2), 'utf-8'); | ||
} | ||
// const filePath = './.canyon_output/coverage-final.json'; | ||
// const dir = path.dirname(filePath); | ||
// if (!fs.existsSync(dir)) { | ||
// fs.mkdirSync(dir, {recursive: true}); | ||
// } | ||
// // 防止返回的数据为空 | ||
// if (initialCoverageDataForTheCurrentFile && initialCoverageDataForTheCurrentFile.path) { | ||
// fs.writeFileSync(`./.canyon_output/coverage-${Math.random()}.json`, JSON.stringify({ | ||
// [initialCoverageDataForTheCurrentFile.path]: initialCoverageDataForTheCurrentFile | ||
// }, null, 2), 'utf-8'); | ||
// } | ||
return initialCoverageDataForTheCurrentFile; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters