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

Esbuild nodejs builder #252

Closed
wants to merge 6 commits into from
Closed

Conversation

gojko
Copy link
Contributor

@gojko gojko commented Jul 12, 2021

Issue #, if available:

Solves the following issues or makes them obsolete

Description of changes:

Support for ESBuild bundler running as part of the Nodejs NPM workflow, providing the following benefits:

  1. support for local directory dependencies and NPM7 relative references and sym linked node_modules
  2. support for TypeScript transpilation (.ts -> .js)
  3. support for minification (smaller bundle sizes)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@falnyr
Copy link

falnyr commented Aug 31, 2021

@gojko Hi there, is there any update on this? This would be such a great feature for CDK + Typescript Lambda with SAM. 🙏

@gojko
Copy link
Contributor Author

gojko commented Sep 1, 2021

@falnyr this is waiting on aws people to merge it, @mgrandis will know more

@kellerkind87
Copy link

@mgrandis or other aws people is there any forcast / outline / perspective to get this merged soon?

@tostca
Copy link

tostca commented Sep 19, 2021

@mgrandis Is there a possibility to get some more information if this PR will be reviewed in the near future?

@falnyr
Copy link

falnyr commented Sep 22, 2021

Just pinging more AWS folks to see what do we need to make this happen. 🙏

@aahung @mildaniel

@mgrandis
Copy link
Contributor

Yes! So sorry for the late reply!
We are still planning on integrating this, can't give you an exact date but this is on our plate.

@falnyr
Copy link

falnyr commented Oct 6, 2021

@mgrandis any updates? There are conflicts now as this is ready for almost 3 months now.

Copy link
Contributor

@mgrandis mgrandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments to kick things off.
Can you fix the conflicts? We recently released ARM support which made some significant changes to the code base.
Thanks.

@@ -80,19 +81,23 @@ class NodejsNpmInstallAction(BaseAction):
DESCRIPTION = "Installing dependencies from NPM"
PURPOSE = Purpose.RESOLVE_DEPENDENCIES

def __init__(self, artifacts_dir, subprocess_npm):
def __init__(self, artifacts_dir, subprocess_npm, mode="--production"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pass a flag on which we act upon in execute instead of the value that we use.
This way if the value was to change or the way we pass the value to NPM was to change, we would only have to update execute.
The way this is currently done also allows passing any arbitrary value to NPM which I think is not something we want to allow.

:raises lambda_builders.actions.ActionFailedError: when esbuild packaging fails
"""

if 'entry_points' not in self.bundler_config:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use double quotes on our projects " for strings.
Please ensure you have run make pr.

@gojko
Copy link
Contributor Author

gojko commented Oct 25, 2021

@mgrandis I've lost interest in this and migrated to another solution since this was so long in the pipeline. If you think it's still worth merging, perhaps just take over?

@mgrandis
Copy link
Contributor

Got it, thanks @gojko!
@mildaniel will take this over

@mildaniel mildaniel assigned CoshUS and unassigned CoshUS and mgrandis Nov 9, 2021
@mildaniel mildaniel requested a review from CoshUS November 9, 2021 18:33
@mildaniel mildaniel self-assigned this Nov 9, 2021
@jfuss
Copy link
Contributor

jfuss commented Nov 23, 2021

Closing in favor of #307

@jfuss jfuss closed this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants