Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Nov 7, 2024
1 parent 6d0e101 commit d0e4087
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-babel-plugin-canyon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
- run: |
pnpm dist-tag add [email protected].84 latest
pnpm dist-tag add [email protected].85 latest
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
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": "1.8.84",
"version": "1.8.85",
"description": "A Babel plugin cooperates with istanbul to report the coverage",
"author": "Allen Zhang <[email protected]>",
"license": "MIT",
Expand Down
10 changes: 9 additions & 1 deletion plugins/babel-plugin-canyon/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ function newAtob() {
}
const newatob = newAtob()

function analyzeIntervalTime (intervalTime) {
if (!isNaN(Number(intervalTime))){
return intervalTime
} else {
return '0'
}
}

export default declare((api,config) => {
api.assertVersion(7)
return {
Expand All @@ -58,7 +66,7 @@ export default declare((api,config) => {
BRANCH: config.branch || '-',
REPORT_ID: config.reportID || '-',
COMPARE_TARGET: config.compareTarget || '-',
INTERVAL_TIME: config.intervalTime || '0',
INTERVAL_TIME: analyzeIntervalTime(config.intervalTime),
VERSION: packageJson.version || '-'
}

Expand Down

0 comments on commit d0e4087

Please sign in to comment.