File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change 11const fs = require ( 'fs' ) . promises ;
22const { exec } = require ( 'child_process' ) ;
33const core = require ( '@actions/core' ) ;
4- const { nextTick } = require ( 'process' ) ;
5- const { AbortController } = require ( "node-abort-controller" ) ;
4+ const util = require ( 'util' ) ;
65( async ( ) => {
76 const [ currentDefinitions , currentDocs ] = await Promise . all ( [
87 fs . readFile ( './src/Options/Definitions.js' , 'utf8' ) ,
98 fs . readFile ( './src/Options/docs.js' , 'utf8' ) ,
109 ] ) ;
11- exec ( 'npm run definitions' ) ;
12- const ac = new AbortController ( ) ;
13- const { signal } = ac ;
14- const watcher = fs . watch ( './src/Options/docs.js' , { signal} ) ;
15- let i = 0 ;
16- // eslint-disable-next-line
17- for await ( const _ of watcher ) {
18- i ++ ;
19- if ( i === 3 ) {
20- ac . abort ( ) ;
21- break ;
22- }
23- }
24- await new Promise ( resolve => nextTick ( resolve ) ) ;
10+ const execute = util . promisify ( exec ) ;
11+ await execute ( 'npm run definitions' ) ;
2512 const [ newDefinitions , newDocs ] = await Promise . all ( [
2613 fs . readFile ( './src/Options/Definitions.js' , 'utf8' ) ,
2714 fs . readFile ( './src/Options/docs.js' , 'utf8' ) ,
You can’t perform that action at this time.
0 commit comments