Skip to content

Commit e32db29

Browse files
committed
Upgrade all dependencies
1 parent ddd7a57 commit e32db29

13 files changed

+3448
-3641
lines changed

package-lock.json

+3,382-3,573
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@
2525
"release": "npm run build && npm run package && npm run deploy"
2626
},
2727
"devDependencies": {
28-
"@aws-sdk/client-cloudformation": "^3.507.0",
29-
"@aws-sdk/client-s3": "^3.507.0",
30-
"@types/jest": "^29.5.0",
28+
"@aws-sdk/client-cloudformation": "^3.549.0",
29+
"@aws-sdk/client-s3": "^3.550.0",
30+
"@types/jest": "^29.5.12",
3131
"@types/minimatch": "^5.1.2",
32-
"@types/node": "^18.16.3",
33-
"@typescript-eslint/eslint-plugin": "^5.59.6",
34-
"@typescript-eslint/parser": "^5.59.6",
32+
"@types/node": "^20.12.5",
33+
"@typescript-eslint/eslint-plugin": "^7.6.0",
34+
"@typescript-eslint/parser": "^7.6.0",
3535
"deepmerge": "^4.3.1",
36-
"eslint": "^8.41.0",
37-
"jest": "^29.5.0",
38-
"minimatch": "^9.0.1",
39-
"prettier": "^2.8.8",
40-
"ts-jest": "^29.1.0",
41-
"ts-loader": "^9.4.2",
42-
"typescript": "^5.0.4",
43-
"webpack": "^5.83.1",
44-
"webpack-cli": "^5.1.1"
36+
"eslint": "^8.56.0",
37+
"jest": "^29.7.0",
38+
"minimatch": "^9.0.4",
39+
"prettier": "^3.2.5",
40+
"ts-jest": "^29.1.2",
41+
"ts-loader": "^9.5.1",
42+
"typescript": "^5.4.4",
43+
"webpack": "^5.91.0",
44+
"webpack-cli": "^5.1.4"
4545
}
4646
}

src/__tests__/s3-upload-config-test.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("S3UploadConfig", () => {
1616

1717
test("non-json", () => {
1818
expect(() => new S3UploadConfig("?")).toThrowError(
19-
"Unexpected token ? in JSON at position 0"
19+
"Unexpected token ? in JSON at position 0",
2020
);
2121
});
2222

@@ -79,7 +79,7 @@ describe("S3UploadConfig", () => {
7979

8080
test("unexpected config is fine", () => {
8181
expect(
82-
newS3UploadConfig({ file: { random: "entry" } }).getS3ParamsForKey("file")
82+
newS3UploadConfig({ file: { random: "entry" } }).getS3ParamsForKey("file"),
8383
).toStrictEqual({});
8484
});
8585

@@ -95,7 +95,7 @@ describe("S3UploadConfig", () => {
9595
cacheControl: "max-age=600",
9696
randomKey: "value",
9797
},
98-
}).getS3ParamsForKey("file.txt")
98+
}).getS3ParamsForKey("file.txt"),
9999
).toStrictEqual({
100100
Metadata: {
101101
key: "value",
@@ -114,7 +114,7 @@ describe("S3UploadConfig", () => {
114114
type: "markdown",
115115
},
116116
},
117-
}).getS3ParamsForKey("README.md")
117+
}).getS3ParamsForKey("README.md"),
118118
).toStrictEqual({
119119
Metadata: {
120120
type: "markdown",
@@ -136,7 +136,7 @@ describe("S3UploadConfig", () => {
136136
},
137137
contentType: "text/markdown",
138138
},
139-
}).getS3ParamsForKey("src/README.md")
139+
}).getS3ParamsForKey("src/README.md"),
140140
).toStrictEqual({
141141
Metadata: {
142142
type: "markdown",
@@ -155,7 +155,7 @@ describe("S3UploadConfig", () => {
155155
file: {
156156
contentType: "override",
157157
},
158-
}).getS3ParamsForKey("file")
158+
}).getS3ParamsForKey("file"),
159159
).toStrictEqual({
160160
ContentType: "override",
161161
});
@@ -168,7 +168,7 @@ describe("S3UploadConfig", () => {
168168
"*": {
169169
contentType: "override",
170170
},
171-
}).getS3ParamsForKey("file")
171+
}).getS3ParamsForKey("file"),
172172
).toStrictEqual({
173173
ContentType: "override",
174174
});

src/__tests__/simple-fs-test.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ describe("SimpleFs", () => {
2020
test("non-existent file", () => {
2121
const fileName = "fake-file-that-does-not-exist.txt";
2222
expect(() => simpleFs.readFile(fileName)).toThrowError(
23-
`ENOENT: no such file or directory, open '${fileName}`
23+
`ENOENT: no such file or directory, open '${fileName}`,
2424
);
2525
});
2626

2727
test("directory fails", () => {
2828
expect(() => simpleFs.readFile(".")).toThrowError(
29-
"EISDIR: illegal operation on a directory, read"
29+
"EISDIR: illegal operation on a directory, read",
3030
);
3131
});
3232

@@ -43,7 +43,7 @@ describe("SimpleFs", () => {
4343
describe("writeFile", () => {
4444
test("writing to directory fails", () => {
4545
expect(() => simpleFs.writeFile(tempDir, "anything")).toThrow(
46-
`EISDIR: illegal operation on a directory, open '${tempDir}'`
46+
`EISDIR: illegal operation on a directory, open '${tempDir}'`,
4747
);
4848
});
4949

@@ -81,14 +81,14 @@ describe("SimpleFs", () => {
8181
test("non-existent directory", () => {
8282
const directory = "fake-directory-that-does-not-exist";
8383
expect(() => simpleFs.listFiles(directory)).toThrowError(
84-
`ENOENT: no such file or directory, scandir '${directory}'`
84+
`ENOENT: no such file or directory, scandir '${directory}'`,
8585
);
8686
});
8787

8888
test("file fails", () => {
8989
const fileName = "package.json";
9090
expect(() => simpleFs.listFiles(fileName)).toThrowError(
91-
`ENOTDIR: not a directory, scandir '${fileName}'`
91+
`ENOTDIR: not a directory, scandir '${fileName}'`,
9292
);
9393
});
9494

@@ -106,7 +106,7 @@ describe("SimpleFs", () => {
106106
".gitignore", // Hidden file
107107
"src/index.ts", // In directory
108108
"src/__tests__/simple-fs-test.ts", // Deep file in directory
109-
])
109+
]),
110110
);
111111

112112
// Don't include folders, just files
@@ -126,7 +126,7 @@ describe("SimpleFs", () => {
126126
const file = path.join(tempDir, "file.txt");
127127
simpleFs.writeFile(file, "contents");
128128
expect(() => simpleFs.createFolder(file)).toThrow(
129-
`EEXIST: file already exists, mkdir '${file}'`
129+
`EEXIST: file already exists, mkdir '${file}'`,
130130
);
131131
});
132132

@@ -154,7 +154,7 @@ describe("SimpleFs", () => {
154154
expect(simpleFs.readFile(file).toString()).toEqual(contents);
155155
simpleFs.deleteFolder(file);
156156
expect(() => simpleFs.readFile(file).toString()).toThrow(
157-
`ENOENT: no such file or directory, open '${file}`
157+
`ENOENT: no such file or directory, open '${file}`,
158158
);
159159
});
160160

@@ -168,10 +168,10 @@ describe("SimpleFs", () => {
168168
expect(simpleFs.readFile(file).toString()).toEqual(contents);
169169
simpleFs.deleteFolder(folder);
170170
expect(() => simpleFs.readFile(file).toString()).toThrow(
171-
`ENOENT: no such file or directory, open '${file}`
171+
`ENOENT: no such file or directory, open '${file}`,
172172
);
173173
expect(() => simpleFs.listFiles(folder).toString()).toThrow(
174-
`ENOENT: no such file or directory, scandir '${folder}`
174+
`ENOENT: no such file or directory, scandir '${folder}`,
175175
);
176176
});
177177
});

src/handler/handle-create.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class CreateHandler extends EventHandler {
1414
parameters: RequestParameters,
1515
simpleS3: SimpleS3,
1616
simpleFs: SimpleFs,
17-
s3UploadFile?: S3UploadConfig
17+
s3UploadFile?: S3UploadConfig,
1818
): Promise<ResultType> {
1919
const { bucketName, objectPrefix } = parameters;
2020
let isBucketEmpty;
@@ -48,9 +48,9 @@ export class CreateHandler extends EventHandler {
4848
objectPrefix,
4949
file,
5050
contents,
51-
extraParams
51+
extraParams,
5252
);
53-
})
53+
}),
5454
);
5555
} catch (e) {
5656
return {

src/handler/handle-delete.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class DeleteHandler extends EventHandler {
1111
protected async handleEvent(
1212
parameters: RequestParameters,
1313
simpleS3: SimpleS3,
14-
_simpleFs: SimpleFs
14+
_simpleFs: SimpleFs,
1515
): Promise<ResultType> {
1616
const { bucketName, objectPrefix } = parameters;
1717

src/handler/handle-update.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class UpdateHandler extends EventHandler {
1414
parameters: RequestParameters,
1515
simpleS3: SimpleS3,
1616
simpleFs: SimpleFs,
17-
s3UploadFile?: S3UploadConfig
17+
s3UploadFile?: S3UploadConfig,
1818
): Promise<ResultType> {
1919
const { bucketName, objectPrefix } = parameters;
2020

@@ -51,9 +51,9 @@ export class UpdateHandler extends EventHandler {
5151
objectPrefix,
5252
file,
5353
contents,
54-
extraParams
54+
extraParams,
5555
);
56-
})
56+
}),
5757
);
5858
} catch (e) {
5959
return {

src/handler/handler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ export abstract class EventHandler {
7676
parameters: RequestParameters,
7777
simpleS3: SimpleS3,
7878
simpleFs: SimpleFs,
79-
s3UploadConfig?: S3UploadConfig
79+
s3UploadConfig?: S3UploadConfig,
8080
): Promise<ResultType>;
8181
}

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function sendResponse(
3535
context: CloudformationContext,
3636
responseStatus: ResponseStatus,
3737
responseReason?: string,
38-
responseData?: Record<string, unknown>
38+
responseData?: Record<string, unknown>,
3939
): Promise<void> {
4040
const responseBody = JSON.stringify({
4141
Status: responseStatus,

src/simple-s3.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ export class SimpleS3 {
99

1010
public async listObjects(
1111
bucketName: string,
12-
objectPrefix: string | undefined
12+
objectPrefix: string | undefined,
1313
): Promise<string[]> {
1414
const keys: string[] = [];
1515
for await (const page of paginateListObjectsV2(
1616
{ client: this.s3 },
1717
{
1818
Bucket: bucketName,
1919
Prefix: objectPrefix,
20-
}
20+
},
2121
)) {
2222
for (const object of page.Contents ?? []) {
2323
if (object.Key) {
@@ -30,7 +30,7 @@ export class SimpleS3 {
3030

3131
public async isBucketEmpty(
3232
bucketName: string,
33-
objectPrefix: string | undefined
33+
objectPrefix: string | undefined,
3434
): Promise<boolean> {
3535
const objects = await this.s3.listObjectsV2({
3636
Bucket: bucketName,
@@ -45,7 +45,7 @@ export class SimpleS3 {
4545
objectPrefix: string | undefined,
4646
localFilePath: string,
4747
localFileContents: Buffer,
48-
extraParams?: PutObjectRequest
48+
extraParams?: PutObjectRequest,
4949
): Promise<void> {
5050
const key = (objectPrefix ?? "") + localFilePath;
5151

0 commit comments

Comments
 (0)