Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Jun 9, 2020
1 parent aa85671 commit 6a43faa
Show file tree
Hide file tree
Showing 9 changed files with 565 additions and 530 deletions.
1,027 changes: 525 additions & 502 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"dependencies": {
"ansi-escapes": "^4.3.1",
"aws-lambda": "^1.0.6",
"aws-sdk": "^2.683.0",
"chalk": "^4.0.0",
"aws-sdk": "^2.692.0",
"chalk": "^4.1.0",
"dependency-tree": "^7.2.1",
"glob": "^7.1.6",
"snyk": "^1.327.0",
"snyk": "^1.336.0",
"tables": "^2.2.2",
"tmp": "^0.2.1",
"ts-loader": "^7.0.5",
Expand All @@ -41,26 +41,26 @@
"yazl": "^2.5.1"
},
"devDependencies": {
"@aws-cdk/aws-lambda": "^1.41.0",
"@aws-cdk/aws-s3": "^1.41.0",
"@aws-cdk/core": "^1.41.0",
"@bifravst/cloudformation-helpers": "^3.0.0",
"@bifravst/code-style": "^7.1.11",
"@aws-cdk/aws-lambda": "^1.44.0",
"@aws-cdk/aws-s3": "^1.44.0",
"@aws-cdk/core": "^1.44.0",
"@bifravst/cloudformation-helpers": "^3.0.6",
"@bifravst/code-style": "^8.0.1",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-angular": "^8.3.4",
"@types/aws-lambda": "^8.10.51",
"@types/aws-lambda": "^8.10.53",
"@types/dependency-tree": "^7.2.0",
"@types/glob": "^7.1.1",
"@types/node": "^14.0.5",
"@types/glob": "^7.1.2",
"@types/node": "^14.0.12",
"@types/table": "^5.0.0",
"@types/terminal-kit": "^1.28.2",
"@types/tmp": "^0.2.0",
"@types/uuid": "^8.0.0",
"@types/webpack": "^4.41.13",
"@types/webpack": "^4.41.17",
"@types/webpack-node-externals": "^1.7.1",
"@types/yazl": "^2.4.2",
"cdk": "^1.41.0",
"eslint": "^7.1.0",
"cdk": "^1.44.0",
"eslint": "^7.2.0",
"husky": "^4.2.5"
},
"files": [
Expand Down
2 changes: 0 additions & 2 deletions src/hashDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ export const hashDependencies = async (args: {
const deps = dependencyTree.toList({
filename: src,
directory: srcDir,
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
tsConfig,
filter: (sourceFile: string) =>
!sourceFile.includes('node_modules') && ignoreFolders // do not look at module dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/packBaseLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const packBaseLayer = async ({
const zipFilenameWithHash = `${name}.zip`
const localPath = path.resolve(outDir, zipFilenameWithHash)

const r = reporter || ConsoleProgressReporter('Base Layer')
const r = reporter ?? ConsoleProgressReporter('Base Layer')
const progress = r.progress(name)
const success = r.success(name)
const failure = r.failure(name)
Expand Down
4 changes: 2 additions & 2 deletions src/packLambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ export const packLambda = async (args: {
},
},
async (err, stats) => {
if (err || stats.hasErrors()) {
failure('webpack failed', err.message)
if (err !== undefined || stats.hasErrors()) {
failure('webpack failed', err?.message)
console.error(err)
console.error(stats.toString())
return reject(err)
Expand Down
4 changes: 2 additions & 2 deletions src/publishToS3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const publishToS3 = async (
Bucket: string,
Key: string,
location: string,
) => {
): Promise<void> => {
const Body = await fs.readFile(location)
return s3.putObject({ Body, Bucket, Key }).promise()
await s3.putObject({ Body, Bucket, Key }).promise()
}
11 changes: 7 additions & 4 deletions src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const tableWriter = (title: string) => {
[
[
chalk.yellow.bold(title),
...['Time', 'Size', 'Status'].map(s => chalk.yellow.dim(s)),
...['Time', 'Size', 'Status'].map((s) => chalk.yellow.dim(s)),
],
...Array.from(items, ([id, { status, message, info, updated }]) => {
const startTime = startTimes.get(id)
Expand All @@ -62,13 +62,16 @@ const tableWriter = (title: string) => {
color[status](id) +
`${
info && info.length > 0
? chalk.grey(': ') + info.map(i => chalk.blue(i)).join(' ')
? chalk.grey(': ') +
info.map((i) => chalk.blue(i)).join(' ')
: ''
}`,
startTime
? chalk.grey(`${updated.getTime() - startTime.getTime()}ms`)
: chalk.grey.dim('-'),
size ? chalk.blue(`${Math.round(size / 1024)} KB`) : '',
size !== undefined
? chalk.blue(`${Math.round(size / 1024)} KB`)
: '',
color[status](message),
]
}),
Expand Down Expand Up @@ -203,4 +206,4 @@ const onCI = () => ({
export const ConsoleProgressReporter = (
title: string,
ci = process.env.CI,
): ProgressReporter => (ci ? onCI() : onScreen(title))
): ProgressReporter => (ci !== undefined ? onCI() : onScreen(title))
6 changes: 3 additions & 3 deletions test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "test",
"version": "1.0.0",
"dependencies": {
"uuid": "8.1.0"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.53",
"@types/uuid": "8.0.0"
}
}

0 comments on commit 6a43faa

Please sign in to comment.