Skip to content

Commit ffcf43d

Browse files
committed
Address bot comments
1 parent b4cd6ec commit ffcf43d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/@apphosting/common/src/index.spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import assert from "assert";
22
import fs from "fs";
3-
import yaml from "yaml";
43
import path from "path";
54
import os from "os";
65
const importIndex = import("@apphosting/common/dist/index.js");
@@ -12,17 +11,17 @@ describe("update or create .gitignore", () => {
1211
});
1312

1413
it(".gitignore file exists and is correctly updated with missing paths", async () => {
15-
const { UpdateOrCreateGitignore } = await importIndex;
14+
const { updateOrCreateGitignore } = await importIndex;
1615
fs.writeFileSync(path.join(tmpDir, ".gitignore"), "existingpath/");
1716

18-
UpdateOrCreateGitignore(tmpDir, ["existingpath/", "newpath/"]);
17+
updateOrCreateGitignore(tmpDir, ["existingpath/", "newpath/"]);
1918

2019
const gitignoreContent = fs.readFileSync(path.join(tmpDir, ".gitignore"), "utf-8");
2120
assert.equal(`existingpath/\nnewpath/\n`, gitignoreContent);
2221
});
2322
it(".gitignore file does not exist and is created", async () => {
24-
const { UpdateOrCreateGitignore } = await importIndex;
25-
UpdateOrCreateGitignore(tmpDir, ["chickenpath/", "newpath/"]);
23+
const { updateOrCreateGitignore } = await importIndex;
24+
updateOrCreateGitignore(tmpDir, ["chickenpath/", "newpath/"]);
2625
const gitignoreContent = fs.readFileSync(path.join(tmpDir, ".gitignore"), "utf-8");
2726
assert.equal(`chickenpath/\nnewpath/`, gitignoreContent);
2827
});

packages/@apphosting/common/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export function getBuildOptions(): BuildOptions {
145145
/**
146146
* Updates or creates a .gitignore file with the given entries in the given path
147147
*/
148-
export function UpdateOrCreateGitignore(dirPath: string, entries: string[]) {
148+
export function updateOrCreateGitignore(dirPath: string, entries: string[]) {
149149
const gitignorePath = path.join(dirPath, ".gitignore");
150150

151151
if (!fs.existsSync(gitignorePath)) {

0 commit comments

Comments
 (0)