Skip to content

Commit

Permalink
feat: support node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
swain committed Nov 29, 2023
1 parent 2645f7f commit f1d23a9
Show file tree
Hide file tree
Showing 9 changed files with 254 additions and 146 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module.exports = {
extends: ['@lifeomic/standards', 'prettier', 'plugin:prettier/recommended'],
plugins: ['prettier'],
env: {
node: true,
},
overrides: [
// Set correct env for config files
{ files: ['*.js'], env: { node: true } },
{
files: ['**/*.test.ts'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
- name: Build & Test
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
- name: Test
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
"devDependencies": {
"@aws-sdk/client-dynamodb": "^3.369.0",
"@lifeomic/eslint-config-standards": "^2.1.1",
"@lifeomic/eslint-config-standards": "^3.2.3",
"@lifeomic/jest-config": "^1.1.2",
"@lifeomic/logging": "^4.0.0",
"@lifeomic/typescript-config": "^1.0.3",
"@lifeomic/typescript-config": "^3.1.0",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.195",
"@types/uuid": "^8.3.4",
Expand All @@ -39,7 +39,7 @@
"prettier": "^2.5.1",
"semantic-release": "^19.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5",
"typescript": "^5.3.2",
"zod": "^3.21.4"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/dynamo-streams.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('DynamoStreamHandler', () => {
{} as any,
{} as any,
);
} catch (e) {
} catch (e: any) {
expect(e).toBeInstanceOf(AggregateError);
expect(e.errors).toEqual([
new Error('Failed to process new-insert-2'),
Expand Down
2 changes: 1 addition & 1 deletion src/kinesis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe('KinesisEventHandler', () => {
},
{} as any,
);
} catch (e) {
} catch (e: any) {
expect(e).toBeInstanceOf(AggregateError);
expect(e.errors).toEqual([
new Error('Failed to process test-event-2'),
Expand Down
3 changes: 1 addition & 2 deletions src/kinesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ export class KinesisEventHandler<Event, Context> {
return {
sendEvent: async ({ events }) => {
const event: KinesisStreamEvent = {
// We don't need to mock every field on this event -- there are lots.
// @ts-expect-error
// @ts-expect-error We don't need to mock every field on this event -- there are lots.
Records: events.map((e) => ({
eventID: uuid(),
kinesis: {
Expand Down
2 changes: 1 addition & 1 deletion src/sqs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ describe('SQSMessageHandler', () => {
} as any,
{} as any,
);
} catch (e) {
} catch (e: any) {
expect(e).toBeInstanceOf(AggregateError);
expect(e.errors).toEqual([
new Error('Failed to process message test-event-3'),
Expand Down
Loading

0 comments on commit f1d23a9

Please sign in to comment.