Skip to content

Commit 3189632

Browse files
committed
Update deps and CI, upgrade to ESLint v9
Remove `package.json` `eslintConfig` property Lint
1 parent b8217d0 commit 3189632

File tree

5 files changed

+27
-25
lines changed

5 files changed

+27
-25
lines changed

.github/workflows/build.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
node-version: [ 14.x, 16.x, 18.x ]
18+
node-version: [ 14.x, 16.x, 18.x, 20.x ]
1919
os: [ windows-latest, ubuntu-latest, macOS-latest ]
2020

2121
# Go
2222
steps:
2323
- name: Check out repo
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

2626
- name: Set up Node.js
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030

@@ -41,6 +41,7 @@ jobs:
4141
run: npm install
4242

4343
- name: Test
44+
if: matrix.node-version > '16.x'
4445
run: npm test
4546
env:
4647
CI: true
@@ -57,10 +58,10 @@ jobs:
5758
# Go
5859
steps:
5960
- name: Check out repo
60-
uses: actions/checkout@v3
61+
uses: actions/checkout@v4
6162

6263
- name: Set up Node.js
63-
uses: actions/setup-node@v3
64+
uses: actions/setup-node@v4
6465
with:
6566
node-version: lts/*
6667
registry-url: https://registry.npmjs.org/

eslint.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const arc = require('@architect/eslint-config')
2+
3+
module.exports = [
4+
...arc,
5+
]

package.json

+6-9
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,14 @@
2424
},
2525
"homepage": "https://github.com/architect/plugin-lambda-invoker#readme",
2626
"dependencies": {
27-
"@architect/utils": "^3.1.2",
28-
"@aws-sdk/util-dynamodb": "^3.296.0",
29-
"ansi-colors": "^4.1.1",
30-
"enquirer": "^2.3.6"
27+
"@architect/utils": "^4.0.6",
28+
"@aws-sdk/util-dynamodb": "^3.572.0",
29+
"ansi-colors": "^4.1.3",
30+
"enquirer": "^2.4.1"
3131
},
3232
"devDependencies": {
33-
"@architect/eslint-config": "^2.1.1",
34-
"eslint": "^8.33.0"
35-
},
36-
"eslintConfig": {
37-
"extends": "@architect/eslint-config"
33+
"@architect/eslint-config": "^3.0.0",
34+
"eslint": "^9.2.0"
3835
},
3936
"keywords": [
4037
"arc",

src/event-mocks.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ function scheduled () {
3333
time: new Date().toISOString(),
3434
region: 'Sandbox',
3535
resources: [
36-
'arn:architect-sandbox'
36+
'arn:architect-sandbox',
3737
],
38-
detail: {}
38+
detail: {},
3939
}
4040
}
4141

@@ -54,10 +54,10 @@ function tablesStreams (eventName, dynamoData) {
5454
NewImage: dynamoData?.NewImage ?? { NOT_MOCKED: true },
5555
SequenceNumber: 0,
5656
SizeBytes: 0,
57-
StreamViewType: 'NEW_AND_OLD_IMAGES'
57+
StreamViewType: 'NEW_AND_OLD_IMAGES',
5858
},
59-
eventSourceARN: 'arn:architect-sandbox'
60-
}
61-
]
59+
eventSourceARN: 'arn:architect-sandbox',
60+
},
61+
],
6262
}
6363
}

src/index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let sandbox = {
5555
em: colors.cyan, // Clear underlines
5656
danger: colors.red,
5757
strong: colors.white,
58-
}
58+
},
5959
}
6060
if (input === 'i') {
6161
if (Object.keys(events).length === 1) {
@@ -110,7 +110,7 @@ let sandbox = {
110110
userPayload = mocks[pragma][name][mockName] || {}
111111
}
112112
}
113-
catch (err) {
113+
catch {
114114
update.status('Canceled invoke')
115115
return start()
116116
}
@@ -140,7 +140,7 @@ let sandbox = {
140140
type: 'select',
141141
name: 'eventName',
142142
message: 'Which kind of Dynamo Stream event do you want to invoke?',
143-
choices: [ 'INSERT', 'MODIFY', 'REMOVE' ]
143+
choices: [ 'INSERT', 'MODIFY', 'REMOVE' ],
144144
})
145145
payload = mock.tablesStreams(eventName, marshallJson(mocks?.[pragma]?.[name]?.[eventName]))
146146
}
@@ -169,7 +169,7 @@ let sandbox = {
169169
})
170170
plugin.invoke = deactivatedInvoke
171171
end()
172-
}
172+
},
173173
}
174174

175175
let plugin = {
@@ -209,7 +209,6 @@ async function getMod (filepath) {
209209
delete require.cache[require.resolve(filepath)]
210210

211211
try {
212-
// eslint-disable-next-line
213212
mod = require(filepath)
214213
}
215214
catch (err) {

0 commit comments

Comments
 (0)