Skip to content

Commit

Permalink
feat(babel-plugin-canyon): add intervalTime option
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Nov 7, 2024
1 parent f0c5b31 commit 068ec3a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 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": "1.8.82",
"version": "1.8.83",
"description": "A Babel plugin cooperates with istanbul to report the coverage",
"author": "Allen Zhang <[email protected]>",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions plugins/babel-plugin-canyon/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default declare((api,config) => {
BRANCH: config.branch || '-',
REPORT_ID: config.reportID || '-',
COMPARE_TARGET: config.compareTarget || '-',
INTERVAL_TIME: config.intervalTime || '0',
VERSION: packageJson.version || '-'
}

Expand Down
1 change: 1 addition & 0 deletions plugins/babel-plugin-canyon/templates/canyon.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
compareTarget: 'COMPARE_TARGET',
branch: 'BRANCH',
version: 'VERSION',
intervalTime: 'INTERVAL_TIME'
}


Expand Down
2 changes: 1 addition & 1 deletion tools/canyon-extension/public/interceptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ window.addEventListener('message', function (e) {
canyon: {
...window.__canyon__,
reportID: localStorage.getItem('__canyon__report__id__') || undefined,
intervalTime: localStorage.getItem('__canyon__interval__time__') || undefined,
intervalTime: localStorage.getItem('__canyon__interval__time__') || window.__canyon__.intervalTime,
reporter: localStorage.getItem('__canyon__reporter__') || window.__canyon__.reporter,
},
coverage: window.__coverage__,
Expand Down
2 changes: 1 addition & 1 deletion tools/canyon-extension/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Canyon Extension",
"version": "1.0.7",
"version": "1.0.8",
"manifest_version": 3,
"description": "Canyon manual report plugin",
"icons": {
Expand Down

0 comments on commit 068ec3a

Please sign in to comment.