-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream has no exports #4352
Comments
We also faced the same issue even when not using either of the Kinesis and Dynamo streams but only SqsEventSource. Looking at the change log of 1.11.0, the merged work of #4260 has removed redundant code in KinesisEventSource and DynamoEventSource into common StreamEventSource, and that looks like causing it. |
Sorry about that guys. @nija-at What do you think? |
Here is an immediate fix in the meantime, using patch-package: npm i patch-package
tee node_modules/@aws-cdk/aws-lambda-event-sources/lib/stream.d.ts << TS
import lambda = require('@aws-cdk/aws-lambda');
import cdk = require('@aws-cdk/core');
export interface StreamEventSourceProps {
readonly batchSize?: number;
readonly startingPosition: lambda.StartingPosition;
readonly maxBatchingWindow?: cdk.Duration;
}
export declare abstract class StreamEventSource implements lambda.IEventSource {
readonly props: StreamEventSourceProps;
protected constructor(props: StreamEventSourceProps);
public bind(_target: lambda.IFunction): void;
protected enrichMappingOptions(options: lambda.EventSourceMappingOptions): lambda.EventSourceMappingOptions;
}
TS
npx patch-package @aws-cdk/aws-lambda-event-sources
git add patches/@aws-cdk+aws-lambda-event-sources+1.11.0.patch && git commit You'll need to add Hope that helps! |
Unfortunately, we've introduced a bug here. My fault since I suggested this in the PR - #4260 (comment). Given that Equally important, we should check why our current tests don't cover this; and how we should cover this gap. |
I'm actually curious why the |
IIRC, JSII was complaining until I added the |
Oh. Adding Additionally, we currently have a pre-release test that ensures all libraries can be |
I see. My bad then, I thought this was a way to tell JSII not to worry about it not being exposed to the user, but I didn't think this would affect the internal dependencies. As for testing the definitions, running import '@aws-cdk/alexa-ask';
import '@aws-cdk/app-delivery';
// ... In v1.11.0:
|
Agreed. We definitely need a test like that. |
@nija-at when it will be fixed? We are a bit blocked. Thank you. |
Hey @aukaurea, if you need a fix ASAP, you can look into my previous comment, or downgrade back to the previous release. Sorry about the inconvenience! EDIT: fixed the comment link |
* fix(lambda-event-sources): add missing export of streams.ts Fixes #4352
HI @nmussy Having the same issues with the previous version https://www.npmjs.com/package/@aws-cdk/aws-lambda-event-sources/v/1.10.1
Packages are used:
|
@aukaurea - We're working on releasing a fix within the next 2 days. |
tsc fails to compile, StreamEventSource, StreamEventSourceProps missing from aws-lambda-event-sources streams file.
Reproduction Steps
Error Log
Environment
Other
Digging around the node_modules/@aws-cdk/aws-lambda-event-sources/lib/stream.d.ts file shows no exports
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: