File tree 3 files changed +13
-4
lines changed
3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -248,3 +248,8 @@ Adds a review page for viewing tutorial content. The review page should be espec
248
248
- Supports commands on reset
249
249
- Supports running vscode commands anywhere that command line commands can be run
250
250
- Admin mode to allow creators to jump between tutorial levels/steps during development
251
+
252
+ ### [0.13.1]
253
+
254
+ - Add logo
255
+ - Fix issue with watcher tests running on reset
Original file line number Diff line number Diff line change 1
- import * as T from 'typings'
2
1
import * as TT from 'typings/tutorial'
3
2
import * as git from '../git'
4
3
import loadCommits from './utils/loadCommits'
5
- import loadWatchers from './utils/loadWatchers '
4
+ import { loadWatchers , resetWatchers } from './utils/watchers '
6
5
import openFiles from './utils/openFiles'
7
6
import runCommands from './utils/runCommands'
8
7
import runVSCodeCommands from './utils/runVSCodeCommands'
@@ -39,6 +38,7 @@ export const onSolutionEnter = async (actions: TT.StepActions): Promise<void> =>
39
38
}
40
39
41
40
export const onReset = async ( actions : TT . StepActions ) : Promise < void > => {
41
+ await resetWatchers ( )
42
42
await runCommands ( actions ?. commands )
43
43
await runVSCodeCommands ( actions ?. vscodeCommands )
44
44
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const disposeWatcher = (watcher: string) => {
14
14
delete watcherObject [ watcher ]
15
15
}
16
16
17
- const loadWatchers = ( watchers : string [ ] = [ ] ) : void => {
17
+ export const loadWatchers = ( watchers : string [ ] = [ ] ) : void => {
18
18
if ( ! watchers . length ) {
19
19
// remove all watchers
20
20
for ( const watcher of Object . keys ( watcherObject ) ) {
@@ -55,4 +55,8 @@ const loadWatchers = (watchers: string[] = []): void => {
55
55
}
56
56
}
57
57
58
- export default loadWatchers
58
+ export const resetWatchers = ( ) : void => {
59
+ for ( const watcher of Object . keys ( watcherObject ) ) {
60
+ disposeWatcher ( watcher )
61
+ }
62
+ }
You can’t perform that action at this time.
0 commit comments