-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
💔 |
c42945d
to
6236208
Compare
💔 |
6236208
to
1868238
Compare
💔 |
let directoryPath = temp.mkdirSync("Project Files Manager Tests"); | ||
|
||
_.each(filesToCreate, file => fs.writeFile(path.join(directoryPath, file), "")); | ||
_.each(filesToCreate, file => createFile(testInjector, file, "", directoryPath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createFile returns promise, currently noone is awaiting this promise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the method to return string. Thanks
return directoryPath; | ||
} | ||
|
||
async function createFile(testInjector: IInjector, fileToCreate: string, fileContent: string, directoryPath?: string): Promise<string> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method does not have to be async - it doesn't have any async operations in it
declarations.d.ts
Outdated
@@ -867,7 +867,7 @@ interface ILiveSyncServiceBase { | |||
* If watch option is not specified executes full sync | |||
* If watch option is specified executes partial sync | |||
*/ | |||
sync(data: ILiveSyncData[], projectId: string, filePaths?: string[]): Promise<void>; | |||
sync(data: ILiveSyncData[], projectId: string, filePaths: string[], projectFilesConfig: IProjectFilesConfig): Promise<void>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changed? The sync
method must have filePaths
as optional argument, as they are passed only when we are not in full sync mode
1868238
to
a42b05a
Compare
💔 |
a42b05a
to
0667a3a
Compare
💔 |
0667a3a
to
f15dba7
Compare
💔 |
run ci |
💔 |
f15dba7
to
661ffff
Compare
💔 |
helpers.ts
Outdated
@@ -400,6 +401,13 @@ export async function connectEventuallyUntilTimeout(factory: () => net.Socket, t | |||
}); | |||
} | |||
|
|||
export function getProjectFilesConfig(release: boolean): IProjectFilesConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;( passing boolean property to a method 😿 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can modify this to be:
export function getProjectFilesConfig(opts: { isReleaseBuild: boolean }): IProjectFilesConfig {
}
@@ -191,11 +199,39 @@ describe("Project Files Manager Tests", () => { | |||
assert.isTrue(fs.exists(path.join(directoryPath, "a.test"))); | |||
}); | |||
|
|||
it("filters release specific files", async () => { | |||
const directoryPath = await createFile(testInjector, "test.debug.x", "debug"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since createFile
is no longer async you can remove await
it("filters release specific files", async () => { | ||
const directoryPath = await createFile(testInjector, "test.debug.x", "debug"); | ||
const releaseFileContent = "release"; | ||
await createFile(testInjector, "test.release.x", releaseFileContent, directoryPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
}); | ||
|
||
it("filters debug specific files by default", async () => { | ||
const directoryPath = await createFile(testInjector, "test.release.x", "release"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await
it("filters debug specific files by default", async () => { | ||
const directoryPath = await createFile(testInjector, "test.release.x", "release"); | ||
const debugFileContent = "debug"; | ||
await createFile(testInjector, "test.debug.x", debugFileContent, directoryPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await
661ffff
to
25c8cda
Compare
💔 |
25c8cda
to
456b532
Compare
💔 |
Respect prepare/build configuration when preparing project files.
456b532
to
415631c
Compare
Respect prepare/build configuration when preparing project files.
NativeScript/nativescript-cli#2934