imdone-core 2.3.4 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 2.3.5
|
|
2
|
+
|
|
3
|
+
- Incorporate newly added watched files into repository state before emitting `file.update`, so live board consumers can render the new task without a reload or restart.
|
|
4
|
+
|
|
1
5
|
## 2.3.3
|
|
2
6
|
|
|
3
7
|
- Update `adm-zip` to `0.6.0` to address a high-severity ZIP parsing memory allocation vulnerability.
|
|
Binary file
|
|
@@ -190,18 +190,20 @@ export function watchedFileSystemStoreMixin(repo, fs = realFs) {
|
|
|
190
190
|
.on('add', trackWatcherEvent(async function (path, stat) {
|
|
191
191
|
logger.log('Watcher received add event for file: ' + path)
|
|
192
192
|
if (stat.isDirectory()) return
|
|
193
|
-
|
|
193
|
+
const relativePath = repo.getRelativePath(path)
|
|
194
|
+
let file = repo.getFile(relativePath)
|
|
194
195
|
if (file === undefined) {
|
|
195
196
|
log('Creating file: ' + path)
|
|
196
197
|
file = new File({
|
|
197
198
|
repoId: repo.getId(),
|
|
198
|
-
filePath:
|
|
199
|
+
filePath: relativePath,
|
|
199
200
|
languages: repo.languages,
|
|
200
201
|
project: repo.project,
|
|
201
202
|
})
|
|
202
203
|
}
|
|
203
204
|
|
|
204
|
-
stat = await repo.fileOK()
|
|
205
|
+
stat = await repo.fileOK(relativePath)
|
|
206
|
+
if (!stat) return
|
|
205
207
|
log('fileOK returned: ' + JSON.stringify(stat))
|
|
206
208
|
if (stat.mtime <= file.getModifiedTime()) {
|
|
207
209
|
return log('File update already applied. Change ignored for file: ' + path)
|
package/lib/repository.js
CHANGED