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

(aws-lambda-nodejs): support pnpm #14757

Closed
2 tasks
donaldpipowitch opened this issue May 19, 2021 · 3 comments · Fixed by #14772 or #14954
Closed
2 tasks

(aws-lambda-nodejs): support pnpm #14757

donaldpipowitch opened this issue May 19, 2021 · 3 comments · Fixed by #14772 or #14954
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@donaldpipowitch
Copy link

donaldpipowitch commented May 19, 2021

aws-lambda-nodejs currently only supports npm and yarn, but it would be nice to also support pnpm.

E.g. see https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/function.ts#L55.

Use Case

pnpm is a powerful and fast alternative dependency manager in the Node ecosystem - with a growing popularity.

Proposed Solution

E.g. depsLockFilePath should also support pnpm-lock.yaml.

If you don't want to support pnpm it would be nice to get some hint about this as soon as possible (- currently it fails during deployment).

(Stupid question... I just looked at the source code and it looks like depsLockFilePath isn't really used for something meaningful - at least nothing lock file specific, besides a small yarn/npm difference check. It's more used to get the project path. Maybe two dedicated settings projectPath and packageManager would be more useful?)

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@donaldpipowitch donaldpipowitch added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 19, 2021
@jogold
Copy link
Contributor

jogold commented May 19, 2021

Hey @donaldpipowitch, I think we can easily add support for pnpm after #14739

@donaldpipowitch
Copy link
Author

Cool, thank you!

jogold added a commit to jogold/aws-cdk that referenced this issue May 19, 2021
eladb pushed a commit that referenced this issue May 20, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

mergify bot pushed a commit that referenced this issue Jun 3, 2021
Fix #14757

Expands on #14772

Currently get the following error when bundling with `pnpm-lock.yaml`
```
ERROR   ERROR  Unknown options: 'bundle', 'target', 'platform', 'outfile', 'external:aws-sdk'
```

----


Switch from `pnpm run esbuild` to `pnpm exec esbuild --` to properly enable esbuild with `pnpm`

`pnpm run` only supports running commands defined in the package's manifest file - [docs](https://pnpm.io/cli/run)

`pnpm exec` supports executing a shell command in scope of a project - [docs](https://pnpm.io/cli/exec)



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
Fix aws#14757

Expands on aws#14772

Currently get the following error when bundling with `pnpm-lock.yaml`
```
ERROR   ERROR  Unknown options: 'bundle', 'target', 'platform', 'outfile', 'external:aws-sdk'
```

----


Switch from `pnpm run esbuild` to `pnpm exec esbuild --` to properly enable esbuild with `pnpm`

`pnpm run` only supports running commands defined in the package's manifest file - [docs](https://pnpm.io/cli/run)

`pnpm exec` supports executing a shell command in scope of a project - [docs](https://pnpm.io/cli/exec)



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
2 participants