Skip to content

Commit 2202e6f

Browse files
deps: skuba 9.0.1 (#74)
* deps: skuba 9.0.1 * Run `skuba format` * Placate linter --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: skuba <> Co-authored-by: Ryan Ling <[email protected]>
1 parent 5754407 commit 2202e6f

File tree

7 files changed

+803
-745
lines changed

7 files changed

+803
-745
lines changed

.changeset/changelog.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ const gitHubChangelogFunctions = {
7070
await Promise.all(
7171
changesets.map(async (cs) => {
7272
if (cs.commit) {
73-
let { links } = await getInfo({
73+
const info = await getInfo({
7474
repo: options.repo,
7575
commit: cs.commit,
7676
});
77-
return links.commit;
77+
return info.links.commit;
7878
}
7979
}),
8080
)
@@ -102,18 +102,15 @@ const gitHubChangelogFunctions = {
102102

103103
const replacedChangelog = changeset.summary
104104
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => {
105-
let num = Number(pr);
105+
const num = Number(pr);
106106
if (!isNaN(num)) prFromSummary = num;
107107
return '';
108108
})
109109
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => {
110110
commitFromSummary = commit;
111111
return '';
112112
})
113-
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => {
114-
usersFromSummary.push(user);
115-
return '';
116-
})
113+
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, '')
117114
.trim();
118115

119116
const [firstLine, ...futureLines] = replacedChangelog
@@ -122,25 +119,25 @@ const gitHubChangelogFunctions = {
122119

123120
const links = await (async () => {
124121
if (prFromSummary !== undefined) {
125-
let { links } = await getInfoFromPullRequest({
122+
const info = await getInfoFromPullRequest({
126123
repo: options.repo,
127124
pull: prFromSummary,
128125
});
129126
if (commitFromSummary) {
130-
links = {
131-
...links,
127+
return {
128+
...info.links,
132129
commit: `[\`${commitFromSummary}\`](https://github.com/${options.repo}/commit/${commitFromSummary})`,
133130
};
134131
}
135-
return links;
132+
return info.links;
136133
}
137134
const commitToFetchFrom = commitFromSummary || changeset.commit;
138135
if (commitToFetchFrom) {
139-
let { links } = await getInfo({
136+
const info = await getInfo({
140137
repo: options.repo,
141138
commit: commitToFetchFrom,
142139
});
143-
return links;
140+
return info.links;
144141
}
145142
return {
146143
commit: null,
@@ -163,6 +160,7 @@ const gitHubChangelogFunctions = {
163160
if (process.env.GITHUB_TOKEN) {
164161
module.exports = gitHubChangelogFunctions;
165162
} else {
163+
// eslint-disable-next-line no-console
166164
console.warn(
167165
`Defaulting to Git-based versioning.
168166
Enable GitHub-based versioning by setting the GITHUB_TOKEN environment variable.

.eslintignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

eslint.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const skuba = require('eslint-config-skuba');
2+
3+
module.exports = [
4+
{
5+
ignores: ['packages/**/lib*/', 'packages/infra/src/assets/'],
6+
},
7+
...skuba,
8+
{
9+
files: ['**/*.{ts,cts,mts,tsx}'],
10+
11+
rules: {
12+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
13+
},
14+
},
15+
{
16+
files: ['packages/infra/cli/**'],
17+
18+
rules: {
19+
'no-console': 'off',
20+
},
21+
},
22+
];

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/node": "^20.10.6",
2121
"dotenv": "16.4.5",
2222
"esbuild": "~0.23.0",
23-
"skuba": "8.2.1"
23+
"skuba": "9.0.1"
2424
},
2525
"packageManager": "[email protected]",
2626
"engines": {
@@ -30,6 +30,6 @@
3030
"entryPoint": "packages/hooks/src/index.ts",
3131
"template": "oss-npm-package",
3232
"type": "package",
33-
"version": "8.0.1"
33+
"version": "9.0.1"
3434
}
3535
}

packages/infra/src/constructs/stack.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import type { Construct } from 'constructs';
33

44
import { createLambdaHookProps } from './lambda';
55

6-
const hooks = ['BeforeAllowTraffic', 'AfterAllowTraffic'] as const;
7-
8-
type HookName = (typeof hooks)[number];
6+
type HookName = 'BeforeAllowTraffic' | 'AfterAllowTraffic';
97

108
export type HookStackProps = {
119
prune?: {

0 commit comments

Comments
 (0)