Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd1e7fc3

Browse files
committed
reset watchers on reset
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parentb6501e0 commitd1e7fc3

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

‎CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,8 @@ Adds a review page for viewing tutorial content. The review page should be espec
248248
- Supports commands on reset
249249
- Supports running vscode commands anywhere that command line commands can be run
250250
- 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

‎src/services/hooks/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import*asTfrom'typings'
21
import*asTTfrom'typings/tutorial'
32
import*asgitfrom'../git'
43
importloadCommitsfrom'./utils/loadCommits'
5-
importloadWatchersfrom'./utils/loadWatchers'
4+
import{loadWatchers,resetWatchers}from'./utils/watchers'
65
importopenFilesfrom'./utils/openFiles'
76
importrunCommandsfrom'./utils/runCommands'
87
importrunVSCodeCommandsfrom'./utils/runVSCodeCommands'
@@ -39,6 +38,7 @@ export const onSolutionEnter = async (actions: TT.StepActions): Promise<void> =>
3938
}
4039

4140
exportconstonReset=async(actions:TT.StepActions):Promise<void>=>{
41+
awaitresetWatchers()
4242
awaitrunCommands(actions?.commands)
4343
awaitrunVSCodeCommands(actions?.vscodeCommands)
4444
}

‎src/services/hooks/utils/loadWatchers.tsrenamed to‎src/services/hooks/utils/watchers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const disposeWatcher = (watcher: string) => {
1414
deletewatcherObject[watcher]
1515
}
1616

17-
constloadWatchers=(watchers:string[]=[]):void=>{
17+
exportconstloadWatchers=(watchers:string[]=[]):void=>{
1818
if(!watchers.length){
1919
// remove all watchers
2020
for(constwatcherofObject.keys(watcherObject)){
@@ -55,4 +55,8 @@ const loadWatchers = (watchers: string[] = []): void => {
5555
}
5656
}
5757

58-
exportdefaultloadWatchers
58+
exportconstresetWatchers=():void=>{
59+
for(constwatcherofObject.keys(watcherObject)){
60+
disposeWatcher(watcher)
61+
}
62+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp