Skip to content

Commit

Permalink
Merge pull request #13 from guiyom-e/fix-compilation-errors
Browse files Browse the repository at this point in the history
Fix compilation errors
  • Loading branch information
adelego authored May 13, 2022
2 parents 86fda5f + e3b6de8 commit 45090ba
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 1,212 deletions.
1 change: 0 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = {
presets: ['@babel/preset-typescript', '@babel/preset-env'],
plugins: [
[
'search-and-replace',
Expand Down
6 changes: 3 additions & 3 deletions lib/functions/extract/extract.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DynamoDB } from '@aws-sdk/client-dynamodb';

import { getExpressionAttributeValues, getNow } from 'lib/functions/helpers';
import { sendEventsToSQSAndDeleteRecords } from 'lib/functions/sendEventsToSQSAndDeleteRecords';
import { SchedulerDynamoDBRecord } from 'lib/types';
import { getExpressionAttributeValues, getNow } from '../helpers';
import { sendEventsToSQSAndDeleteRecords } from '../sendEventsToSQSAndDeleteRecords';
import { SchedulerDynamoDBRecord } from '../../types';

interface HandlerConfig {
tableName: string;
Expand Down
8 changes: 4 additions & 4 deletions lib/functions/handleNearFuture/handleNearFuture.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { DynamoDBStreams } from 'aws-sdk';
import { DynamoDB } from '@aws-sdk/client-dynamodb';
import { CRON_DELAY_IN_MINUTES } from 'lib/index';
import { extractDelay, getNow } from 'lib/functions/helpers';
import { sendEventsToSQSAndDeleteRecords } from 'lib/functions/sendEventsToSQSAndDeleteRecords';
import { SchedulerDynamoDBRecord } from 'lib/types';
import { CRON_DELAY_IN_MINUTES } from '../../index';
import { extractDelay, getNow } from '../helpers';
import { sendEventsToSQSAndDeleteRecords } from '../sendEventsToSQSAndDeleteRecords';
import { SchedulerDynamoDBRecord } from '../../types';

const isValidRecord = (record: unknown): record is SchedulerDynamoDBRecord =>
// @ts-expect-error record if of type unknw
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"build/lib"
],
"scripts": {
"build": "npx babel lib --out-dir build/lib --extensions \".ts\" && tsc --declaration --emitDeclarationOnly",
"build": "tsc && yarn babel build/lib --out-dir build/lib --extensions \".js\"",
"watch": "tsc -w",
"test-lint": "eslint",
"test-type": "tsc --noEmit",
Expand All @@ -42,8 +42,6 @@
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.17.10",
"@babel/preset-env": "^7.17.10",
"@babel/preset-typescript": "^7.16.7",
"@types/jest": "^26.0.10",
"@types/lodash": "^4.14.180",
"@types/node": "10.17.27",
Expand Down
6 changes: 1 addition & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
"declarationMap": true,
"strictFunctionTypes": false,
"strictNullChecks": true,
"outDir": "build",
"baseUrl": ".",
"paths": {
"lib/*": ["./lib/*"]
}
"outDir": "build"
},
"exclude": ["node_modules", "cdk.out", "build"]
}
Loading

0 comments on commit 45090ba

Please sign in to comment.