Skip to content
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

feat!: make plugin compatible to serverless-offline v10, convert to module #65

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

dnalborczyk
Copy link
Contributor

@dnalborczyk dnalborczyk commented Sep 2, 2022

@rubenkaiser not sure if you wanted to take the module route. I also haven't tested this, as I don't know event bridge.
also bumped all modules to latest.

related: dherault/serverless-offline#1561

for a local test you could just add this to the latest serverless-offline package.json:

"exports": {
    ".": "./src/index.js",
    "./lambda": "./src/lambda/index.js"
  },

for this to work we would need to pull in the serverless-offline PR and publish a new minor.

edit: TODO

  • bump peer deps to the correct serverless-offline version

@rubenkaiser
Copy link
Owner

This is exactly equal to my first try. Locally however the new export in serverless offline did not work. Maybe this had to do with symlinks or I made a mistake. Will give it a try. The rest looks good, thanks

@dnalborczyk
Copy link
Contributor Author

dnalborczyk commented Sep 2, 2022

This is exactly equal to my first try. Locally however the new export in serverless offline did not work. Maybe this had to do with symlinks or I made a mistake.

I had to apply an eslint ignore comment on the dynamic import, because eslint-plugin-import does not support package exports (yet), other than that it should work. I only tried the package import itself in a small standalone trial project.

thank you for having a look!

@dnalborczyk
Copy link
Contributor Author

dnalborczyk commented Sep 2, 2022

I pulled the serverless-offline PR in and tested the import, which seems to work. I'll deploy this soon as part of v10.0.0 and add the docs and tests a bit later.

@dnalborczyk dnalborczyk changed the title feat!: make plugin compatible to serverless-offline v9, convert to module feat!: make plugin compatible to serverless-offline v10, convert to module Sep 3, 2022
@rubenkaiser rubenkaiser merged commit f69c2e3 into rubenkaiser:master Sep 7, 2022
@dnalborczyk dnalborczyk deleted the v9-compat-module branch September 9, 2022 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants